@accurix/centrinfo-widget 4.0.0 → 5.0.0
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 +22 -0
- package/dist/cdn/centrinfo-widget.js +355 -31
- package/dist/cdn/manifest.json +6 -6
- package/dist/index.cjs +1 -3519
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -3519
- package/dist/runtime.cjs +2 -1
- package/dist/runtime.d.cts +170 -22
- package/dist/runtime.d.mts +170 -22
- package/dist/runtime.mjs +2 -1
- package/dist/styles-BgWsSZsR.cjs +7714 -0
- package/dist/styles-CIJFMOKa.mjs +3869 -0
- package/dist/{types-1ZJJY7Da.d.mts → types-BGKFxmKB.d.cts} +113 -11
- package/dist/{types-B0r4SXaT.d.cts → types-DhmmWqaj.d.mts} +115 -10
- package/package.json +5 -4
- package/dist/config-CkU4urQY.mjs +0 -30
- package/dist/config-DsNMbdKp.cjs +0 -36
package/dist/config-DsNMbdKp.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n&&e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require(`preact`),r=require(`preact/hooks`),i=require(`preact/jsx-runtime`);var a=class extends Error{constructor(e,t){super(t),this.status=e,this.name=`ApiError`}};const o=()=>({agentName:`Accurix`,greeting:`Hi! 👋 How can I help you today?`,widgetModule:`chat`,assistantMediaKind:`image`,soundEnabled:!0,voiceOutputEnabled:!1,talkbackMode:`text`,allowVoiceInput:!1,memoryEnabled:!0,memoryRetentionDays:30,memoryMessageCap:50,availableActions:[]}),s=`Sara is an AI assistant; answers may be imperfect.`,c=`Accurix is an AI assistant; answers may be imperfect.`,l=e=>{typeof console>`u`||console.warn(`[centrinfo-widget] Could not load saved widget configuration from the API (${e}). Showing default widget chrome. Check data-token, data-api-base, CORS, and backend availability.`)},u=(e,t={})=>{let n=(e.disclaimerText?.trim())?.toLowerCase(),r=t.agentName?.trim()||e.agentName?.trim()||`Accurix`,i=t.agentAvatarUrl?.trim()||e.agentAvatarUrl?.trim();return{...e,agentName:r,agentAvatarUrl:i||void 0,disclaimerText:n===`sara is an ai assistant; answers may be imperfect.`||n?.includes(`sara is an ai assistant`)?`Accurix is an AI assistant; answers may be imperfect.`:e.disclaimerText}};var d=class{constructor(e,t,n,r,i={},a,o,s=`floating`){this.baseUrl=e,this.token=t,this.gifApiKey=n,this.analyticsContextToken=r,this.bootstrapOverrides=i,this.identityToken=a,this.identityTokenProvider=o,this.chatSurface=s}async currentIdentityToken(){return this.identityTokenProvider&&(this.identityToken=(await this.identityTokenProvider())?.trim()||void 0),this.identityToken}headers(e=!0){let t={Authorization:`Bearer ${this.token}`};return e&&(t[`Content-Type`]=`application/json`),t}async json(e){let t;try{t=await e.json()}catch{t=void 0}if(!e.ok){let n=p(t)??`request failed (${e.status})`;throw new a(e.status,n)}return t?.data??t}async bootstrap(){try{let e=await fetch(`${this.baseUrl}/public-chat/bootstrap`,{headers:this.headers(!1)});if(!e.ok)return l(`bootstrap request failed with ${e.status}`),u(o(),this.bootstrapOverrides);let t=await this.json(e);return u({...o(),...t},this.bootstrapOverrides)}catch(e){return l(e instanceof Error?e.message:`bootstrap request failed`),u(o(),this.bootstrapOverrides)}}async history(){let e=await this.currentIdentityToken();if(!e)return{conversations:[]};let t=await fetch(`${this.baseUrl}/public-chat/history`,{method:`POST`,headers:this.headers(),body:JSON.stringify({identityToken:e,surface:this.chatSurface})}),n=await this.json(t);return{activeSessionId:n.activeSessionId,conversations:Array.isArray(n.conversations)?n.conversations:[]}}async stream(e,t,n){let r=await this.currentIdentityToken(),i=await fetch(`${this.baseUrl}/public-chat/stream`,{method:`POST`,headers:this.headers(),body:JSON.stringify({question:e,sessionId:t,voicePlaybackRequested:!!n.voicePlaybackRequested,analyticsContextToken:this.analyticsContextToken,identityToken:r,surface:this.chatSurface}),signal:n.signal});return!i.ok||!i.body?this.send(e,t,n):m(i.body,n)}async liveEvents(e,t){let n=`sessionId=${encodeURIComponent(e)}&after=${encodeURIComponent(t)}`,r=await fetch(`${this.baseUrl}/public-chat/live-events?${n}`,{headers:this.headers(!1)}),i=await this.json(r);return{mode:i.mode??`ai`,assignedAgentName:i.assignedAgentName,agentTyping:!!i.agentTyping,agentTypingName:i.agentTypingName,conversationEnded:!!i.conversationEnded,events:i.events??[]}}async typing(e,t){try{let n=await fetch(`${this.baseUrl}/public-chat/typing`,{method:`POST`,headers:this.headers(),body:JSON.stringify({sessionId:e,isTyping:t})});if(!n.ok)try{await n.text()}catch{}}catch{}}async send(e,t,n){let r=await this.currentIdentityToken(),i=await fetch(`${this.baseUrl}/public-chat`,{method:`POST`,headers:this.headers(),body:JSON.stringify({question:e,sessionId:t,voicePlaybackRequested:!!n.voicePlaybackRequested,analyticsContextToken:this.analyticsContextToken,identityToken:r,surface:this.chatSurface}),signal:n.signal}),a=await this.json(i);return n.onChunk(a.answer??``),{answer:a.answer??``,sources:a.sources??[],suggestedReplies:a.suggestedReplies??[],availableActions:a.availableActions??[],actions:a.actions??[],selectedAction:a.selectedAction,handoffOffered:a.handoffOffered??!1,requestedContactFields:g(a.requestedContactFields),conversationEnded:a.conversationEnded??!1,liveMode:a.liveMode,assignedAgentName:a.assignedAgentName,audioBase64:a.audioBase64,mimeType:a.mimeType,visualization:a.visualization,artifacts:a.artifacts}}async action(e,t,n){let r=n?.trim()||(e===`contact-support`?`inquiry`:e),i=await fetch(`${this.baseUrl}/public-chat/${r}`,{method:`POST`,headers:this.headers(),body:JSON.stringify(t)}),a=await this.json(i);return{ok:!0,note:a?.note,booking:a?.booking}}async speak(e){let t=await fetch(`${this.baseUrl}/public-chat/speak`,{method:`POST`,headers:this.headers(),body:JSON.stringify({text:e})}),n=await this.json(t);return{providerReady:!!n.providerReady,message:n.message,audioBase64:n.audioBase64,mimeType:n.mimeType}}async identify(e,t){if(!(!e||!t))try{let n=await fetch(`${this.baseUrl}/public-chat/identify`,{method:`POST`,headers:this.headers(),body:JSON.stringify(f(e,t))});if(!n.ok)try{await n.text()}catch{}}catch{}}async transcribe(e,t,n,r){let i=await fetch(`${this.baseUrl}/public-chat/transcribe`,{method:`POST`,headers:this.headers(),body:JSON.stringify({audioBase64:e,mimeType:t,languageHint:n,durationSeconds:r})});return(await this.json(i)).text??``}async transcribeAudio(e,t,n,r){let i=new FormData;i.append(`audio`,e,`voice-recording`),i.append(`mimeType`,t||e.type||`audio/webm`),n&&i.append(`languageHint`,n),r!==void 0&&Number.isFinite(r)&&i.append(`durationSeconds`,String(r));let a=await fetch(`${this.baseUrl}/public-chat/transcribe`,{method:`POST`,headers:this.headers(!1),body:i});return(await this.json(a)).text??``}async endConversation(e){try{let t=await fetch(`${this.baseUrl}/public-chat/end`,{method:`POST`,headers:this.headers(),body:JSON.stringify({sessionId:e})});if(!t.ok)try{await t.text()}catch{}}catch{}}async sendFeedback(e){try{let t=await fetch(`${this.baseUrl}/public-chat/feedback`,{method:`POST`,headers:this.headers(),body:JSON.stringify(e)});if(!t.ok)try{await t.text()}catch{}}catch{}}async extract(e,t,n){let r=await fetch(`${this.baseUrl}/public-chat/extract`,{method:`POST`,headers:this.headers(),body:JSON.stringify({fileBase64:e,mimeType:t,filename:n})});return(await this.json(r)).text??``}async demoSlots(e,t){let n=`from=${encodeURIComponent(e)}&to=${encodeURIComponent(t)}`,r=await fetch(`${this.baseUrl}/public-chat/demo-slots?${n}`,{headers:this.headers(!1)});if(!r.ok){let e=Error(`Calendar availability is temporarily unavailable.`);throw e.status=r.status,e}let i=await this.json(r);return{status:i?.status,reason:i?.reason,timezone:i?.timezone,slotDurationMinutes:i?.slotDurationMinutes,available:i?.available,taken:i?.taken??[],busy:i?.busy??[]}}async searchGifs(e){if(!this.gifApiKey)return[];let t=`https://tenor.googleapis.com/v2/search?q=${encodeURIComponent(e.trim()||`trending`)}&key=${this.gifApiKey}&limit=24&media_filter=tinygif,gif&contentfilter=high`;try{let e=await fetch(t);return e.ok?((await e.json()).results??[]).map(e=>({id:e.id,url:e.media_formats?.gif?.url??e.media_formats?.tinygif?.url??``,preview:e.media_formats?.tinygif?.url??e.media_formats?.gif?.url??``,alt:e.content_description||`GIF`})).filter(e=>e.url):[]}catch{return[]}}};const f=(e,t)=>{let n={...t.customAttributes??{},...t.metadata??{}};t.createdAt!==void 0&&(n.createdAt=t.createdAt),t.avatarUrl&&(n.avatarUrl=t.avatarUrl),t.company&&(n.company=t.company);let r={sessionId:e},i=t.externalId??t.userId;return i&&(r.externalId=i),t.email&&(r.email=t.email),t.firstName&&(r.firstName=t.firstName),t.lastName&&(r.lastName=t.lastName),t.name&&(r.name=t.name),t.phone&&(r.phone=t.phone),Object.keys(n).length>0&&(r.metadata=n),r},p=e=>{let t=e?.message;if(Array.isArray(t))return t.join(`, `);if(typeof t==`string`)return t},m=async(e,t)=>{let n=e.getReader(),r=new TextDecoder,i={answer:``,sources:[],suggestedReplies:[],availableActions:[],handoffOffered:!1,requestedContactFields:[],conversationEnded:!1},o=``;for(;;){let{done:e,value:s}=await n.read();if(e)break;o+=r.decode(s,{stream:!0});let c;for(;(c=o.indexOf(`
|
|
2
|
-
|
|
3
|
-
`))!==-1;){let e=o.slice(0,c);o=o.slice(c+2);let n=h(e);if(n){if(n.event===`error`)throw new a(502,n.data?.message??`stream error`);if(n.event===`chunk`&&typeof n.data?.text==`string`)i.answer+=n.data.text,t.onChunk(n.data.text);else if(n.event===`final`&&n.data)i.sources=n.data.sources??[],i.suggestedReplies=n.data.suggestedReplies??[],i.availableActions=n.data.availableActions??[],i.actions=n.data.actions??[],i.selectedAction=n.data.selectedAction,i.handoffOffered=!!n.data.handoffOffered,i.requestedContactFields=g(n.data.requestedContactFields),i.conversationEnded=!!n.data.conversationEnded,i.liveMode=n.data.liveMode,i.assignedAgentName=n.data.assignedAgentName,i.visualization=n.data.visualization,i.artifacts=n.data.artifacts,i.audioBase64=n.data.audioBase64,i.mimeType=n.data.mimeType;else if(n.event===`done`)return i}}}return i},h=e=>{let t=`message`,n=[];for(let r of e.split(`
|
|
4
|
-
`))r.startsWith(`event:`)?t=r.slice(6).trim():r.startsWith(`data:`)&&n.push(r.slice(5).trim());if(n.length===0)return{event:t};try{return{event:t,data:JSON.parse(n.join(`
|
|
5
|
-
`))}}catch{return{event:t}}},g=e=>Array.isArray(e)?e.filter(e=>typeof e==`string`):[],_=e=>new Promise(t=>setTimeout(t,e)),v={agentName:`Accurix`,agentAvatarUrl:``,widgetModule:`assistant`,assistantMediaUrl:`https://images.unsplash.com/photo-1494790108377-be9c29b29330`,assistantMediaKind:`image`,assistantPrivacyUrl:`https://accurix.tech/privacy`,soundEnabled:!0,voiceOutputEnabled:!1,talkbackMode:`avatar`,avatarProvider:`demo`,avatarId:`accurix-demo`,greeting:`Hi! I'm Accurix, the AI assistant for Accurix. Ask me anything about products, pricing, or documentation — or book a demo.`,allowVoiceInput:!1,memoryEnabled:!0,memoryRetentionDays:30,memoryMessageCap:50,availableActions:[`public_book_demo`,`public_capture_contact`,`public_submit_inquiry`],agentDescription:`I help with Accurix products, pricing, and documentation.`,welcomeSubtitle:`Ask me anything — most answers are instant.`,disclaimerText:`Accurix is an AI assistant; answers may be imperfect.`,starterQuestions:[`What can Accurix help with?`,`How do I get started?`,`What's your pricing?`],featuredLinks:[{label:`Accurix founders`,url:`https://accurix.tech/about`},{label:`Pricing`,url:`https://accurix.tech/pricing`}]},y=[{match:/demo chart|monthly orders|orders by status/i,result:{answer:`Orders moved in different directions by status in the latest month. The chart below shows one line for submitted, approved, and fulfilled orders.`,sources:[],suggestedReplies:[`Show a demo KPI`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`chart`,type:`line`,title:`Monthly orders by status`,columns:[`month`,`status`,`order_count`],rows:[{month:`2025-01-01`,status:`Submitted`,order_count:12},{month:`2025-01-01`,status:`Approved`,order_count:16},{month:`2025-01-01`,status:`Fulfilled`,order_count:14},{month:`2025-02-01`,status:`Submitted`,order_count:14},{month:`2025-02-01`,status:`Approved`,order_count:15},{month:`2025-02-01`,status:`Fulfilled`,order_count:15},{month:`2025-03-01`,status:`Submitted`,order_count:13},{month:`2025-03-01`,status:`Approved`,order_count:17},{month:`2025-03-01`,status:`Fulfilled`,order_count:16},{month:`2025-04-01`,status:`Submitted`,order_count:15},{month:`2025-04-01`,status:`Approved`,order_count:16},{month:`2025-04-01`,status:`Fulfilled`,order_count:17},{month:`2025-05-01`,status:`Submitted`,order_count:16},{month:`2025-05-01`,status:`Approved`,order_count:18},{month:`2025-05-01`,status:`Fulfilled`,order_count:17},{month:`2025-06-01`,status:`Submitted`,order_count:17},{month:`2025-06-01`,status:`Approved`,order_count:17},{month:`2025-06-01`,status:`Fulfilled`,order_count:18},{month:`2025-07-01`,status:`Submitted`,order_count:18},{month:`2025-07-01`,status:`Approved`,order_count:19},{month:`2025-07-01`,status:`Fulfilled`,order_count:18},{month:`2025-08-01`,status:`Submitted`,order_count:19},{month:`2025-08-01`,status:`Approved`,order_count:18},{month:`2025-08-01`,status:`Fulfilled`,order_count:19}],rowCount:24,timezone:`UTC`,columnMetadata:[{key:`month`,label:`Order month`,dataType:`date`,semanticRole:`date`},{key:`status`,label:`Status`,dataType:`text`,semanticRole:`dimension`},{key:`order_count`,label:`Distinct order count`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],chartRecommendation:{type:`line`,mode:`time_series`,categoryField:`month`,valueFields:[`order_count`],seriesField:`status`},expandable:!0,tableAvailable:!1,explanation:{headline:`The latest results moved in different directions by status.`,summary:`Submitted and fulfilled orders increased, while approved orders decreased.`,evidence:[`Submitted orders increased from 18 in July to 19 in August.`,`Approved orders decreased from 19 in July to 18 in August.`,`Fulfilled orders increased from 18 in July to 19 in August.`],businessMeaning:`Overall order activity is steady, but the small approval decline is worth watching if it continues.`,followUps:[`Which status changed the most?`,`How does this compare with the prior quarter?`],source:`governed_result`}}}},{match:/demo kpi|active accounts/i,result:{answer:`There are 5,632 active accounts in the current demo result.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo table`],handoffOffered:!1,visualization:{version:1,presentation:`kpi`,type:`kpi`,title:`Active accounts`,columns:[`active_accounts`],value:`active_accounts`,rows:[{active_accounts:5632}],rowCount:1,columnMetadata:[{key:`active_accounts`,label:`Active accounts`,dataType:`number`,semanticRole:`measure`,aggregation:`count_distinct`}],explanation:{headline:`Active accounts are 5,632.`,summary:`This is the latest value in the demo result.`,evidence:[`The displayed active-account count is 5,632.`],source:`governed_result`}}}},{match:/demo table|account health/i,result:{answer:`Nine accounts are included in this governed result. The table shows a compact preview and can be expanded to inspect every permitted row.`,sources:[],suggestedReplies:[`Show a demo chart`,`Test the hidden table response`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,title:`Account health`,columns:[`account_name`,`region`,`health_score`,`renewal_month`],rows:[{account_name:`Northstar Industries`,region:`West`,health_score:94,renewal_month:`August`},{account_name:`Apex Group`,region:`East`,health_score:91,renewal_month:`September`},{account_name:`Summit Retail`,region:`North`,health_score:88,renewal_month:`August`},{account_name:`Harbor Logistics`,region:`South`,health_score:86,renewal_month:`October`},{account_name:`Brightline Media`,region:`West`,health_score:84,renewal_month:`November`},{account_name:`Redwood Labs`,region:`East`,health_score:82,renewal_month:`September`},{account_name:`Atlas Foods`,region:`North`,health_score:79,renewal_month:`December`},{account_name:`Cedar Health`,region:`South`,health_score:77,renewal_month:`October`},{account_name:`Bluewave Energy`,region:`West`,health_score:74,renewal_month:`December`}],rowCount:9,columnMetadata:[{key:`account_name`,label:`Account`,dataType:`text`,semanticRole:`dimension`},{key:`region`,label:`Region`,dataType:`text`,semanticRole:`geography`},{key:`health_score`,label:`Health score`,dataType:`number`,semanticRole:`measure`},{key:`renewal_month`,label:`Renewal month`,dataType:`text`,semanticRole:`date`}],expandable:!0,tableAvailable:!0,downloadAvailable:!0,explanation:{headline:`Nine accounts are available for review.`,summary:`Health scores range from 74 to 94 across four regions.`,evidence:[`Northstar Industries has the highest health score at 94.`],source:`governed_result`}}}},{match:/hidden table|table response/i,result:{answer:`Three accounts need attention. The public widget explains the result without exposing its underlying rows.`,sources:[],suggestedReplies:[`Show a demo chart`,`Show a demo KPI`],handoffOffered:!1,visualization:{version:1,presentation:`table`,type:`table`,columns:[`account_name`,`risk_score`],rows:[{account_name:`Private account A`,risk_score:91},{account_name:`Private account B`,risk_score:87},{account_name:`Private account C`,risk_score:82}],rowCount:3,tableAvailable:!1,explanation:{headline:`Three accounts need attention.`,summary:`The written result is available without displaying a public data table.`,evidence:[`Three accounts matched the approved attention rule.`],source:`governed_result`}}}},{match:/^\s*(hi+|hey+|hello|yo|sup|howdy|hola|thanks|thank you|thx|good (morning|afternoon|evening))\b/i,result:{answer:`Hello! 👋 How can I help you today?`,sources:[],suggestedReplies:[`How do I track a shipment?`,`How does customs work?`],handoffOffered:!1}},{match:/track|shipment|where|status/i,result:{answer:`Centrinfo can answer from your indexed knowledge base, public website, connected files, and approved organization tools. It keeps answers grounded in your configured sources and can hand a conversation to your team when the AI is not enough.`,sources:[{title:`Centrinfo public widget`,url:`https://accurix.tech/centrinfo`}],suggestedReplies:[`How does the widget work?`,`Can a human take over?`],handoffOffered:!1}},{match:/custom|clear|duty|tariff|import/i,result:{answer:`Accurix connects your organization knowledge, channels, integrations, and public widget in one place. You can configure which sources the AI can use, which tools visitors can trigger, and when your team should take over live chat.`,sources:[{title:`Accurix documentation`,url:`https://accurix.tech/docs`}],suggestedReplies:[`Which tools can I connect?`,`How do permissions work?`],handoffOffered:!1}},{match:/price|cost|pricing|plan|quote/i,result:{answer:`Accurix uses a usage-based pricing model. Organizations keep an active subscription and spend credits as the AI answers, searches, and uses tools. Credit top-ups can extend usage when the subscription grant runs low.`,sources:[{title:`Pricing`,url:`https://accurix.tech/pricing`}],suggestedReplies:[`How do credits work?`,`Can I top up credits?`],handoffOffered:!1}}],b={answer:`That's a great question — I don't have a confident answer from Accurix's published docs yet. Want me to pass it to the team so a human can follow up? You can also book a quick demo.`,sources:[],suggestedReplies:[`What can you help with?`],handoffOffered:!0},x=e=>y.find(t=>t.match.test(e))?.result??b;var S=class{async history(){return{conversations:[]}}async bootstrap(){return await _(180),v}async stream(e,t,n){await _(550);let r=x(e),i=r.answer.split(/(\s+)/);for(let e of i){if(n.signal?.aborted)break;n.onChunk(e),await _(18+Math.min(40,e.length*6))}return{...r,availableActions:v.availableActions}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async typing(){await _(20)}async action(e,t){return await _(450),{ok:!0,note:{"book-demo":`Demo requested — we'll email you a few times that work. 📅`,contact:`Got it — saved your details. ✅`,"contact-support":`Support has been notified and can join this conversation. ✅`,inquiry:`Thanks! We'll get back to you shortly. ✉️`,"request-callback":`We'll call you back soon. 📞`,"subscribe-newsletter":`You're subscribed. 🎉`}[e]}}async speak(){return await _(120),{providerReady:!1,message:`Demo voice provider is not connected.`}}async transcribe(e,t,n,r){return await _(700),`How do I track a shipment?`}async extract(e,t,n){return await _(600),`[Attached file${n?`: ${n}`:``}] Invoice #4821 — 3 pallets, Rotterdam → Lagos, ETA 12 days.`}async identify(e,t){await _(50)}async endConversation(e){await _(50)}async sendFeedback(){await _(50)}async demoSlots(e,t){return await _(150),{taken:[[11,0],[15,0]].map(([e,t])=>{let n=new Date;return n.setHours(e,t,0,0),n.toISOString()}),busy:[]}}async searchGifs(e){await _(280);let t=e.trim().toLowerCase(),n=t?E.filter(e=>e.alt.includes(t)||e.tags.some(e=>e.includes(t)||t.includes(e))):E;return(n.length>0?n:E).map(e=>({id:e.id,url:T(e.emoji,e.anim),preview:T(e.emoji,e.anim),alt:e.alt}))}};const C=`<animateTransform attributeName='transform' attributeType='XML' type='translate' values='0 0;0 -16;0 0' dur='0.7s' repeatCount='indefinite'/>`,w=`<animateTransform attributeName='transform' attributeType='XML' type='rotate' values='-14 64 110;14 64 110;-14 64 110' dur='0.9s' repeatCount='indefinite'/>`,T=(e,t)=>{let n=`<svg xmlns='http://www.w3.org/2000/svg' width='128' height='128'><rect width='128' height='128' rx='14' fill='#eef1f4'/><text x='64' y='88' font-size='64' text-anchor='middle'>${e}${t}</text></svg>`;return`data:image/svg+xml,${encodeURIComponent(n)}`},E=[{id:`g1`,emoji:`👍`,alt:`thumbs up`,tags:[`thumbs`,`yes`,`ok`,`great`,`good`],anim:C},{id:`g2`,emoji:`🎉`,alt:`celebrate`,tags:[`party`,`yay`,`congrats`,`celebrate`],anim:w},{id:`g3`,emoji:`👋`,alt:`wave hello`,tags:[`hi`,`hello`,`hey`,`wave`,`bye`],anim:w},{id:`g4`,emoji:`❤️`,alt:`heart`,tags:[`love`,`thanks`,`heart`],anim:C},{id:`g5`,emoji:`🤔`,alt:`thinking`,tags:[`hmm`,`think`,`thinking`],anim:w},{id:`g6`,emoji:`😂`,alt:`laughing`,tags:[`lol`,`funny`,`haha`,`laugh`],anim:C},{id:`g7`,emoji:`🔥`,alt:`fire`,tags:[`fire`,`hot`,`lit`,`awesome`],anim:C},{id:`g8`,emoji:`🚀`,alt:`rocket`,tags:[`rocket`,`launch`,`fast`,`go`],anim:w}],D=e=>new Promise(t=>setTimeout(t,e));var O=class{constructor(e,t){this.real=e,this.strings=t}bootstrap(){return this.real.bootstrap()}async history(){return{conversations:[]}}async stream(e,t,n){await D(300);for(let e of this.strings.previewReply.split(/(\s+)/)){if(n.signal?.aborted)break;n.onChunk(e),await D(16)}return{answer:this.strings.previewReply,sources:[],suggestedReplies:[],availableActions:[],handoffOffered:!1}}async liveEvents(){return{mode:`ai`,conversationEnded:!1,events:[]}}async typing(){}async action(){return await D(250),{ok:!0,note:this.strings.previewActionNote}}async speak(){return{providerReady:!1,message:`Preview voice provider is not connected.`}}async identify(){}async endConversation(){}async sendFeedback(){}async transcribe(e,t,n,r){return``}async extract(){return``}async searchGifs(){return[]}async demoSlots(){return{taken:[],busy:[]}}},k=function(e,t){return k=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])},k(e,t)};function A(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);k(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var j=12,M=`sans-serif`,N=j+`px `+M,P=20,ee=100,te=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ne(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)-P)/ee}return t}var re=ne(te),ie={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=ie.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||N),e.measureText(n);n=n||``,r=r||N;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||j,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=re[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}},ae=xe([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),oe=xe([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),se=Object.prototype.toString,ce=Array.prototype,le=ce.forEach,ue=ce.filter,F=ce.slice,I=ce.map,de=function(){}.constructor,fe=de?de.prototype:null,pe=`__proto__`,me=2311;function he(){return me++}function ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<`u`&&console.error.apply(console,e)}function L(e){if(typeof e!=`object`||!e)return e;var t=e,n=se.call(e);if(n===`[object Array]`){if(!He(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=L(e[r])}}else if(oe[n]){if(!He(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(!ae[n]&&!He(e)&&!Ae(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==pe&&(t[o]=L(e[o]));return t}function R(e,t,n){if(!J(t)||!J(e))return n?L(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==pe){var i=e[r],a=t[r];J(a)&&J(i)&&!G(a)&&!G(i)&&!Ae(a)&&!Ae(i)&&!Oe(a)&&!Oe(i)&&!He(a)&&!He(i)?R(i,a,n):(n||!(r in e))&&(e[r]=L(t[r]))}return e}function z(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==pe&&(e[n]=t[n]);return e}function B(e,t,n){for(var r=Ce(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}var _e=ie.createCanvas;function V(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 ve(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 ye(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 B(e,t,n)}function be(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function H(e,t,n){if(e&&t)if(e.forEach&&e.forEach===le)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 U(e,t,n){if(!e)return[];if(!t)return Le(e);if(e.map&&e.map===I)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 xe(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 Se(e,t,n){if(!e)return[];if(!t)return Le(e);if(e.filter&&e.filter===ue)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 Ce(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 we(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(F.call(arguments)))}}var W=fe&&K(fe.bind)?fe.call.bind(fe.bind):we;function Te(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(F.call(arguments)))}}function G(e){return Array.isArray?Array.isArray(e):se.call(e)===`[object Array]`}function K(e){return typeof e==`function`}function q(e){return typeof e==`string`}function Ee(e){return se.call(e)===`[object String]`}function De(e){return typeof e==`number`}function J(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Oe(e){return!!ae[se.call(e)]}function ke(e){return!!oe[se.call(e)]}function Ae(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function je(e){return e.colorStops!=null}function Me(e){return e.image!=null}function Ne(e){return se.call(e)===`[object RegExp]`}function Pe(e){return e!==e}function Fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(e[n]!=null)return e[n]}function Y(e,t){return e??t}function Ie(e,t,n){return e??t??n}function Le(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return F.apply(e,t)}function Re(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 X(e,t){if(!e)throw Error(t)}function ze(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Be=`__ec_primitive__`;function Ve(e){e[Be]=!0}function He(e){return e[Be]}var Ue=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 Ce(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),We=typeof Map==`function`;function Ge(){return We?new Map:new Ue}var Ke=function(){function e(t){var n=G(t);this.data=Ge();var r=this;t instanceof e?t.each(i):t&&H(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 We?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Z(e){return new Ke(e)}function qe(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 Je(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&z(n,t),n}function Ye(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Xe(e,t){return e.hasOwnProperty(t)}function Ze(){}var Qe=180/Math.PI,$e=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),et=new(function(){function e(){this.browser=new $e,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`?(et.wxa=!0,et.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?et.worker=!0:!et.hasGlobalWindow||`Deno`in window?(et.node=!0,et.svgSupported=!0):tt(navigator.userAgent,et);function tt(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);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 Q=et,nt=`.`,rt=`___EC__COMPONENT__CONTAINER___`,it=`___EC__EXTENDED_CLASS___`;function at(e){var t={main:``,sub:``};if(e){var n=e.split(nt);t.main=n[0]||``,t.sub=n[1]||``}return t}function ot(e){X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function st(e){return!!(e&&e[it])}function ct(e,t){e.$constructor=e,e.extend=function(e){process.env.NODE_ENV!==`production`&&H(t,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?` in `+e.type:``)+`.`)});var n=this,r;return lt(n)?r=function(e){A(t,e);function t(){return e.apply(this,arguments)||this}return t}(n):(r=function(){(e.$constructor||n).apply(this,arguments)},ve(r,this)),z(r.prototype,e),r[it]=!0,r.extend=this.extend,r.superCall=pt,r.superApply=mt,r.superClass=n,r}}function lt(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function ut(e,t){e.extend=t.extend}var dt=Math.round(Math.random()*10);function ft(e){var t=[`__\0is_clz`,dt++].join(`_`);e.prototype[t]=!0,process.env.NODE_ENV!==`production`&&X(!e.isInstance,`The method "is" can not be defined.`),e.isInstance=function(e){return!!(e&&e[t])}}function pt(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function mt(e,t,n){return this.superClass.prototype[t].apply(e,n)}function ht(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){ot(r),e.prototype.type=r;var i=at(r);if(!i.sub)process.env.NODE_ENV!==`production`&&t[i.main]&&console.warn(i.main+` exists.`),t[i.main]=e;else if(i.sub!==rt){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[rt]&&(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=at(e),r=[],i=t[n.main];return i&&i[rt]?H(i,function(e,t){t!==rt&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[at(e).main]},e.getAllClassMainTypes=function(){var e=[];return H(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[at(e).main];return n&&n[rt]};function n(e){var n=t[e.main];return(!n||!n[rt])&&(n=t[e.main]={},n[rt]=!0),n}}function gt(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&V(r,s)>=0||i&&V(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var _t=[[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]],vt=gt(_t),yt=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return vt(this,e,t)},e}(),bt=function(){function e(e){this.value=e}return e}(),xt=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new bt(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}(),St=function(){function e(e){this._list=new xt,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 bt(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}(),Ct=St,wt=new Ct(50);function Tt(e){if(typeof e==`string`){var t=wt.get(e);return t&&t.image}else return e}function Et(e,t,n,r,i){if(e)if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=wt.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Ot(t)&&a.pending.push(o)):(t=ie.loadImage(e,Dt,Dt),t.__zrImageSrc=e,wt.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function Dt(){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 Ot(e){return e&&e.width&&e.height}function kt(){return[1,0,0,1,0,0]}function At(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function jt(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 Mt(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 Nt(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 Pt(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 Ft(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 It(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}var Lt=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}(),Rt=Lt,zt=Math.min,Bt=Math.max,Vt=new Rt,Ht=new Rt,Ut=new Rt,Wt=new Rt,Gt=new Rt,Kt=new Rt,qt=function(){function e(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}return e.prototype.union=function(e){var t=zt(e.x,this.x),n=zt(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Bt(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Bt(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=kt();return Nt(i,i,[-t.x,-t.y]),Ft(i,i,[n,r]),Nt(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,i=r.x,a=r.x+r.width,o=r.y,s=r.y+r.height,c=t.x,l=t.x+t.width,u=t.y,d=t.y+t.height,f=!(a<c||l<i||s<u||d<o);if(n){var p=1/0,m=0,h=Math.abs(a-c),g=Math.abs(l-i),_=Math.abs(s-u),v=Math.abs(d-o),y=Math.min(h,g),b=Math.min(_,v);a<c||l<i?y>m&&(m=y,h<g?Rt.set(Kt,-h,0):Rt.set(Kt,g,0)):y<p&&(p=y,h<g?Rt.set(Gt,h,0):Rt.set(Gt,-g,0)),s<u||d<o?b>m&&(m=b,_<v?Rt.set(Kt,0,-_):Rt.set(Kt,0,v)):y<p&&(p=y,_<v?Rt.set(Gt,0,_):Rt.set(Gt,0,-v))}return n&&Rt.copy(n,f?Gt:Kt),f},e.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},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.x,t.y,t.width,t.height)},e.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Vt.x=Ut.x=n.x,Vt.y=Wt.y=n.y,Ht.x=Wt.x=n.x+n.width,Ht.y=Ut.y=n.y+n.height,Vt.transform(r),Wt.transform(r),Ht.transform(r),Ut.transform(r),t.x=zt(Vt.x,Ht.x,Ut.x,Wt.x),t.y=zt(Vt.y,Ht.y,Ut.y,Wt.y);var c=Bt(Vt.x,Ht.x,Ut.x,Wt.x),l=Bt(Vt.y,Ht.y,Ut.y,Wt.y);t.width=c-t.x,t.height=l-t.y},e}(),$=qt,Jt={};function Yt(e,t){t=t||N;var n=Jt[t];n||(n=Jt[t]=new Ct(500));var r=n.get(e);return r??(r=ie.measureText(e,t).width,n.put(e,r)),r}function Xt(e,t,n,r){var i=Yt(e,t),a=en(t);return new $(Qt(0,i,n),$t(0,a,r),i,a)}function Zt(e,t,n,r){var i=((e||``)+``).split(`
|
|
6
|
-
`);if(i.length===1)return Xt(i[0],t,n,r);for(var a=new $(0,0,0,0),o=0;o<i.length;o++){var s=Xt(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function Qt(e,t,n){return n===`right`?e-=t:n===`center`&&(e-=t/2),e}function $t(e,t,n){return n===`middle`?e-=t/2:n===`bottom`&&(e-=t),e}function en(e){return Yt(`国`,e)}function tn(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function nn(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+=tn(r[0],n.width),l+=tn(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`;break}return e=e||{},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var rn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function an(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
7
|
-
`);a=on(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)sn(c,o[l],a),o[l]=c.textLine,s=s||c.isTruncated;e.text=o.join(`
|
|
8
|
-
`),e.isTruncated=s}function on(e,t,n,r){r=r||{};var i=z({},r);i.font=t,n=Y(n,`...`),i.maxIterations=Y(r.maxIterations,2);var a=i.minChar=Y(r.minChar,0);i.cnCharWidth=Yt(`国`,t);var o=i.ascCharWidth=Yt(`a`,t);i.placeholder=Y(r.placeholder,``);for(var s=e=Math.max(0,e-1),c=0;c<a&&s>=o;c++)s-=o;var l=Yt(n,t);return l>s&&(n=``,l=0),s=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=e,i}function sn(e,t,n){var r=n.containerWidth,i=n.font,a=n.contentWidth;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Yt(t,i);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?cn(t,a,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,c),o=Yt(t,i)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function cn(e,t,n,r){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?n:r}return a}function ln(e,t){e!=null&&(e+=``);var n=t.overflow,r=t.padding,i=t.font,a=n===`truncate`,o=en(i),s=Y(t.lineHeight,o),c=!!t.backgroundColor,l=t.lineOverflow===`truncate`,u=!1,d=t.width,f=d!=null&&(n===`break`||n===`breakAll`)?e?vn(e,t.font,d,n===`breakAll`,0).lines:[]:e?e.split(`
|
|
9
|
-
`):[],p=f.length*s,m=Y(t.height,p);if(p>m&&l){var h=Math.floor(m/s);u=u||f.length>h,f=f.slice(0,h)}if(e&&a&&d!=null)for(var g=on(d,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),_={},v=0;v<f.length;v++)sn(_,f[v],g),f[v]=_.textLine,u=u||_.isTruncated;for(var y=m,b=0,v=0;v<f.length;v++)b=Math.max(Yt(f[v],i),b);d??(d=b);var x=b;return r&&(y+=r[0]+r[2],x+=r[1]+r[3],d+=r[1]+r[3]),c&&(x=d),{lines:f,height:m,outerWidth:x,outerHeight:y,lineHeight:s,calculatedLineHeight:o,contentWidth:b,contentHeight:p,width:d,isTruncated:u}}var un=function(){function e(){}return e}(),dn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),fn=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 pn(e,t){var n=new fn;if(e!=null&&(e+=``),!e)return n;for(var r=t.width,i=t.height,a=t.overflow,o=(a===`break`||a===`breakAll`)&&r!=null?{width:r,accumWidth:0,breakAll:a===`breakAll`}:null,s=rn.lastIndex=0,c;(c=rn.exec(e))!=null;){var l=c.index;l>s&&mn(n,e.substring(s,l),t,o),mn(n,c[2],t,o,c[1]),s=rn.lastIndex}s<e.length&&mn(n,e.substring(s,e.length),t,o);var u=[],d=0,f=0,p=t.padding,m=a===`truncate`,h=t.lineOverflow===`truncate`,g={};function _(e,t,n){e.width=t,e.lineHeight=n,d+=n,f=Math.max(f,t)}outer:for(var v=0;v<n.lines.length;v++){for(var y=n.lines[v],b=0,x=0,S=0;S<y.tokens.length;S++){var C=y.tokens[S],w=C.styleName&&t.rich[C.styleName]||{},T=C.textPadding=w.padding,E=T?T[1]+T[3]:0,D=C.font=w.font||t.font;C.contentHeight=en(D);var O=Y(w.height,C.contentHeight);if(C.innerHeight=O,T&&(O+=T[0]+T[2]),C.height=O,C.lineHeight=Ie(w.lineHeight,t.lineHeight,O),C.align=w&&w.align||t.align,C.verticalAlign=w&&w.verticalAlign||`middle`,h&&i!=null&&d+C.lineHeight>i){var k=n.lines.length;S>0?(y.tokens=y.tokens.slice(0,S),_(y,x,b),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v),n.isTruncated=n.isTruncated||n.lines.length<k;break outer}var A=w.width,j=A==null||A===`auto`;if(typeof A==`string`&&A.charAt(A.length-1)===`%`)C.percentWidth=A,u.push(C),C.contentWidth=Yt(C.text,D);else{if(j){var M=w.backgroundColor,N=M&&M.image;N&&(N=Tt(N),Ot(N)&&(C.width=Math.max(C.width,N.width*O/N.height)))}var P=m&&r!=null?r-x:null;P!=null&&P<C.width?!j||P<E?(C.text=``,C.width=C.contentWidth=0):(an(g,C.text,P-E,D,t.ellipsis,{minChar:t.truncateMinChar}),C.text=g.text,n.isTruncated=n.isTruncated||g.isTruncated,C.width=C.contentWidth=Yt(C.text,D)):C.contentWidth=Yt(C.text,D)}C.width+=E,x+=C.width,w&&(b=Math.max(b,C.lineHeight))}_(y,x,b)}n.outerWidth=n.width=Y(r,f),n.outerHeight=n.height=Y(i,d),n.contentHeight=d,n.contentWidth=f,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]);for(var v=0;v<u.length;v++){var C=u[v],ee=C.percentWidth;C.width=parseInt(ee,10)/100*n.width}return n}function mn(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=tn(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
10
|
-
`),l=!0),r.accumWidth=m}else{var h=vn(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}else u=t.split(`
|
|
11
|
-
`);for(var g=0;g<u.length;g++){var _=u[g],v=new un;if(v.styleName=i,v.text=_,v.isLineHolder=!_&&!a,typeof o.width==`number`?v.width=o.width:v.width=d?d[g]:Yt(_,c),!g&&!l){var y=(s[s.length-1]||(s[0]=new dn)).tokens,b=y.length;b===1&&y[0].isLineHolder?y[0]=v:(_||!b||a)&&y.push(v)}else s.push(new dn([v]))}}function hn(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var gn=xe(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function _n(e){return hn(e)?!!gn[e]:!0}function vn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=0;d<e.length;d++){var f=e.charAt(d);if(f===`
|
|
12
|
-
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var p=Yt(f,t),m=r?!1:!_n(f);if(a.length?u+p>n:i+u+p>n){u?(s||c)&&(m?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=f,l+=p,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=f,u=p)):m?(a.push(c),o.push(l),c=f,l=p):(a.push(f),o.push(p));continue}u+=p,m?(c+=f,l+=p):(c&&(s+=c,c=``,l=0),s+=f)}return!a.length&&!s&&(s=e,c=``,l=0),c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function yn(e,t){return e??(e=0),t??(t=0),[e,t]}function bn(e){return[e[0],e[1]]}function xn(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Sn(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Cn(e){return Math.sqrt(wn(e))}function wn(e){return e[0]*e[0]+e[1]*e[1]}function Tn(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function En(e,t){var n=Cn(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Dn(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var On=Dn;function kn(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var An=kn;function jn(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 Mn(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Nn(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Pn=At,Fn=5e-5;function In(e){return e>Fn||e<-Fn}var Ln=[],Rn=[],zn=kt(),Bn=Math.abs,Vn=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},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 In(this.rotation)||In(this.x)||In(this.y)||In(this.scaleX-1)||In(this.scaleY-1)||In(this.skewX)||In(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Pn(n),this.invTransform=null);return}n=n||kt(),t?this.getLocalTransform(n):Pn(n),e&&(t?Mt(n,e,n):jt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Ln);var n=Ln[0]<0?-1:1,r=Ln[1]<0?-1:1,i=((Ln[0]-n)*t+n)/Ln[0]||0,a=((Ln[1]-r)*t+r)/Ln[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||kt(),It(this.invTransform,e)},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||kt(),Mt(Rn,e.invTransform,t),t=Rn);var n=this.originX,r=this.originY;(n||r)&&(zn[4]=n,zn[5]=r,Mt(Rn,t,zn),Rn[4]-=n,Rn[5]-=r,t=Rn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e=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&&jn(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&jn(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Bn(e[0]-1)>1e-10&&Bn(e[3]-1)>1e-10?Math.sqrt(Bn(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Un(this,e)},e.getLocalTransform=function(e,t){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&&Pt(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}(),Hn=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Un(e,t){for(var n=0;n<Hn.length;n++){var r=Hn[n];e[r]=t[r]}}var Wn=Vn,Gn={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=1.70158*1.525;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-Gn.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?Gn.bounceIn(e*2)*.5:Gn.bounceOut(e*2-1)*.5+.5}},Kn=Gn,qn=Math.pow,Jn=Math.sqrt,Yn=1e-8,Xn=1e-4,Zn=Jn(3),Qn=1/3,$n=yn(),er=yn(),tr=yn();function nr(e){return e>-Yn&&e<Yn}function rr(e){return e>Yn||e<-Yn}function ir(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 ar(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function or(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(nr(u)&&nr(d))if(nr(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(nr(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=Jn(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-qn(-y,Qn):qn(y,Qn),b=b<0?-qn(-b,Qn):qn(b,Qn);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Jn(u*u*u)),S=Math.acos(x)/3,C=Jn(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Zn*Math.sin(S)))/(3*o),T=(-s+C*(w-Zn*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 sr(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(nr(o)){if(rr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(nr(u))i[0]=-a/(2*o);else if(u>0){var d=Jn(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 cr(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 lr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;$n[0]=c,$n[1]=l;for(var v=0;v<1;v+=.05)er[0]=ir(e,n,i,o,v),er[1]=ir(t,r,a,s,v),g=An($n,er),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<Xn);y++)m=d-f,h=d+f,er[0]=ir(e,n,i,o,m),er[1]=ir(t,r,a,s,m),g=An(er,$n),m>=0&&g<p?(d=m,p=g):(tr[0]=ir(e,n,i,o,h),tr[1]=ir(t,r,a,s,h),_=An(tr,$n),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=ir(e,n,i,o,d),u[1]=ir(t,r,a,s,d)),Jn(p)}function ur(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=ir(e,n,i,o,m),g=ir(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function dr(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function fr(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function pr(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(nr(a)){if(rr(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(nr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Jn(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 mr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function hr(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 gr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;$n[0]=o,$n[1]=s;for(var f=0;f<1;f+=.05){er[0]=dr(e,n,i,f),er[1]=dr(t,r,a,f);var p=An($n,er);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<Xn);m++){var h=l-u,g=l+u;er[0]=dr(e,n,i,h),er[1]=dr(t,r,a,h);var p=An(er,$n);if(h>=0&&p<d)l=h,d=p;else{tr[0]=dr(e,n,i,g),tr[1]=dr(t,r,a,g);var _=An(tr,$n);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=dr(e,n,i,l),c[1]=dr(t,r,a,l)),Jn(d)}function _r(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=dr(e,n,i,f),m=dr(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var vr=/cubic-bezier\(([0-9,\.e ]+)\)/;function yr(e){var t=e&&vr.exec(e);if(t){var n=t[1].split(`,`),r=+ze(n[0]),i=+ze(n[1]),a=+ze(n[2]),o=+ze(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:or(0,r,a,1,e,s)&&ir(0,i,o,1,s[0])}}}var br=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||Ze,this.ondestroy=e.ondestroy||Ze,this.onrestart=e.onrestart||Ze,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!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)this._startTime=e-r%n,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=K(e)?e:Kn[e]||yr(e)},e}(),xr=br,Sr={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 Cr(e){return e=Math.round(e),e<0?0:e>255?255:e}function wr(e){return e<0?0:e>1?1:e}function Tr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Cr(parseFloat(t)/100*255):Cr(parseInt(t,10))}function Er(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?wr(parseFloat(t)/100):wr(parseFloat(t))}function Dr(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 Or(e,t,n){return e+(t-e)*n}function kr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ar(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var jr=new Ct(20),Mr=null;function Nr(e,t){Mr&&Ar(Mr,t),Mr=jr.put(e,Mr||t.slice())}function Pr(e,t){if(e){t=t||[];var n=jr.get(e);if(n)return Ar(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Sr)return Ar(t,Sr[r]),Nr(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)){kr(t,0,0,0,1);return}return kr(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),Nr(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){kr(t,0,0,0,1);return}return kr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Nr(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?kr(t,+l[0],+l[1],+l[2],1):kr(t,0,0,0,1);u=Er(l.pop());case`rgb`:if(l.length>=3)return kr(t,Tr(l[0]),Tr(l[1]),Tr(l[2]),l.length===3?u:Er(l[3])),Nr(e,t),t;kr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){kr(t,0,0,0,1);return}return l[3]=Er(l[3]),Fr(l,t),Nr(e,t),t;case`hsl`:if(l.length!==3){kr(t,0,0,0,1);return}return Fr(l,t),Nr(e,t),t;default:return}}kr(t,0,0,0,1)}}function Fr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Er(e[1]),i=Er(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t=t||[],kr(t,Cr(Dr(o,a,n+1/3)*255),Cr(Dr(o,a,n)*255),Cr(Dr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Ir(e,t){var n=Pr(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 Rr(n,n.length===4?`rgba`:`rgb`)}}function Lr(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=Pr(t[i]),s=Pr(t[a]),c=r-i,l=Rr([Cr(Or(o[0],s[0],c)),Cr(Or(o[1],s[1],c)),Cr(Or(o[2],s[2],c)),wr(Or(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Rr(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 zr(e,t){var n=Pr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Br=new Ct(100);function Vr(e){if(q(e)){var t=Br.get(e);return t||(t=Ir(e,-.1),Br.put(e,t)),t}else if(je(e)){var n=z({},e);return n.colorStops=U(e.colorStops,function(e){return{offset:e.offset,color:Ir(e.color,-.1)}}),n}return e}function Hr(e){return e.type===`linear`}function Ur(e){return e.type===`radial`}var Wr=(function(){return Q.hasGlobalWindow&&K(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return process.env.NODE_ENV!==`production`&&ge(`Base64 isn't natively supported in the current environment.`),null}})(),Gr=Array.prototype.slice;function Kr(e,t,n){return(t-e)*n+e}function qr(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Kr(t[a],n[a],r);return e}function Jr(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]=Kr(t[o][s],n[o][s],r)}return e}function Yr(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Xr(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 Zr(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 Qr(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]:Gr.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 $r(e){if(be(e)){var t=e.length;if(be(e[0])){for(var n=[],r=0;r<t;r++)n.push(Gr.call(e[r]));return n}return Gr.call(e)}return e}function ei(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 ti(e){return be(e&&e[0])?2:1}var ni=0,ri=1,ii=2,ai=3,oi=4,si=5,ci=6;function li(e){return e===oi||e===si}function ui(e){return e===ri||e===ii}var di=[0,0,0,0],fi=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=ci,s=t;if(be(t)){var c=ti(t);o=c,(c===1&&!De(t[0])||c===2&&!De(t[0][0]))&&(a=!0)}else if(De(t)&&!Pe(t))o=ni;else if(q(t))if(!isNaN(+t))o=ni;else{var l=Pr(t);l&&(s=l,o=ai)}else if(je(t)){var u=z({},s);u.colorStops=U(t.colorStops,function(e){return{offset:e.offset,color:Pr(e.color)}}),Hr(t)?o=oi:Ur(t)&&(o=si),s=u}i===0?this.valType=o:(o!==this.valType||o===ci)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:Kn[n]||yr(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=ui(r),c=li(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?Qr(d,f,r):c&&Zr(d.colorStops,f.colorStops))}if(!o&&r!==si&&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===ni?n[l].additiveValue=n[l].value-p:r===ai?n[l].additiveValue=Yr([],n[l].value,p,-1):ui(r)&&(n[l].additiveValue=r===ri?Yr([],n[l].value,p,-1):Xr([],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===ai,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?di:e[s];if((ui(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(ui(i))i===ri?qr(g,f[r],p[r],h):Jr(g,f[r],p[r],h);else if(li(i)){var _=f[r],v=p[r],y=i===oi;e[s]={type:y?`linear`:`radial`,x:Kr(_.x,v.x,h),y:Kr(_.y,v.y,h),colorStops:U(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Kr(e.offset,n.offset,h),color:ei(qr([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Kr(_.x2,v.x2,h),e[s].y2=Kr(_.y2,v.y2,h)):e[s].r=Kr(_.r,v.r,h)}else if(c)qr(g,f[r],p[r],h),n||(e[s]=ei(g));else{var b=Kr(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===ni?e[n]=e[n]+r:t===ai?(Pr(e[n],di),Yr(di,di,r,1),e[n]=ei(di)):t===ri?Yr(e[n],e[n],r,1):t===ii&&Xr(e[n],e[n],r,1)},e}(),pi=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){ge(`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,Ce(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 fi(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===ai&&c&&(c=ei(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,$r(c),r),this._trackKeys.push(o)}s.addKeyframe(e,$r(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 xr({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=[]),this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||(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 U(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=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]=$r(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t=t||Ce(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}(),mi=pi,hi=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||(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){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=r.length,s=0;s<o;s++){var c=r[s];if(!(i&&i.filter&&c.query!=null&&!i.filter(e,c.query)))switch(a){case 0:c.h.call(c.ctx);break;case 1:c.h.call(c.ctx,t[0]);break;case 2:c.h.call(c.ctx,t[0],t[1]);break;default:c.h.apply(c.ctx,t);break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var a=t.length,o=t[a-1],s=r.length,c=0;c<s;c++){var l=r[c];if(!(i&&i.filter&&l.query!=null&&!i.filter(e,l.query)))switch(a){case 0:l.h.call(o);break;case 1:l.h.call(o,t[0]);break;case 2:l.h.call(o,t[0],t[1]);break;default:l.h.apply(o,t.slice(1,a-1));break}}return i&&i.afterTrigger&&i.afterTrigger(e),this},e}(),gi=hi,_i=1;Q.hasGlobalWindow&&(_i=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var vi=_i,yi=.4,bi=`#333`,xi=`#ccc`,Si=`#eee`,Ci=1,wi=2,Ti=4,Ei=`__zr_normal__`,Di=Hn.concat([`ignore`]),Oi=xe(Hn,function(e,t){return e[t]=!0,e},{ignore:!1}),ki={},Ai=new $(0,0,0,0),ji=function(){function e(e){this.id=he(),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;break}var r=this.transform;r||(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||(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;if(i.copyTransform(t),n.position!=null){var l=Ai;n.layoutRect?l.copy(n.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ki,n,l):nn(ki,n,l),i.x=ki.x,i.y=ki.y,a=ki.align,o=ki.verticalAlign;var u=n.origin;if(u&&n.rotation!=null){var d=void 0,f=void 0;u===`center`?(d=l.width*.5,f=l.height*.5):(d=tn(u[0],l.width),f=tn(u[1],l.height)),c=!0,i.originX=-i.x+d+(r?0:l.x),i.originY=-i.y+f+(r?0:l.y)}}n.rotation!=null&&(i.rotation=n.rotation);var p=n.offset;p&&(i.x+=p[0],i.y+=p[1],c||(i.originX=-p[0],i.originY=-p[1]));var m=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,h=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,_=void 0,v=void 0;m&&this.canBeInsideText()?(g=n.insideFill,_=n.insideStroke,(g==null||g===`auto`)&&(g=this.getInsideTextFill()),(_==null||_===`auto`)&&(_=this.getInsideTextStroke(g),v=!0)):(g=n.outsideFill,_=n.outsideStroke,(g==null||g===`auto`)&&(g=this.getOutsideFill()),(_==null||_===`auto`)&&(_=this.getOutsideStroke(g),v=!0)),g=g||`#000`,(g!==h.fill||_!==h.stroke||v!==h.autoStroke||a!==h.align||o!==h.verticalAlign)&&(s=!0,h.fill=g,h.stroke=_,h.autoStroke=v,h.align=a,h.verticalAlign=o,t.setDefaultTextStyle(h)),t.__dirty|=Ci,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()?xi:bi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Pr(t);n||(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,Rr(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||{},z(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=Ce(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!==Ei)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Di)},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(Ei,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ei;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(V(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),!s&&!i){ge(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ci),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||(l=this.states[c]),l&&r.push(l)}var u=r[a-1],d=!!(u&&u.hoverLayer||n);d&&this._toggleHoverLayerFlag(!0);var f=this._mergeStates(r),p=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(e.join(`,`),f,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Ci)}},e.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},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=V(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=V(r,e),a=V(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];z(t,i),i.textConfig&&(n=n||{},z(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){var o=!(t&&r);t&&t.textConfig?(this.textConfig=z({},r?this.textConfig:n.textConfig),z(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<Di.length;l++){var u=Di[l],d=i&&Oi[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){if(process.env.NODE_ENV!==`production`)throw Error(`Text element has been added to zrender.`);return}if(e===this){if(process.env.NODE_ENV!==`production`)throw Error(`Recursive component attachment.`);return}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;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!==`production`&&e.__zr&&!e.__hostTarget)throw Error(`Text element has been added to zrender.`);e.innerTransformable=new Wn,this._attachComponent(e),this._textContent=e,this.markRedraw()}},e.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),z(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|=Ci;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},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=e?this[e]:this;if(process.env.NODE_ENV!==`production`&&!r){ge(`Property "`+e+`" is not existed in element `+this.id);return}var i=new mi(r,t,n);return e&&(i.targetName=e),this.addAnimator(i,e),i},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=V(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){Mi(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){Mi(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=Mi(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.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=Ci;var n={};function r(e,t,r){n[e+t+r]||(console.warn(`DEPRECATED: '`+e+`' has been deprecated. use '`+t+`', '`+r+`' instead`),n[e+t+r]=!0)}function i(e,n,i,a){Object.defineProperty(t,e,{get:function(){if(process.env.NODE_ENV!==`production`&&r(e,i,a),!this[n]){var t=this[n]=[];o(this,t)}return this[n]},set:function(t){process.env.NODE_ENV!==`production`&&r(e,i,a),this[i]=t[0],this[a]=t[1],this[n]=t,o(this,t)}});function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[a]},set:function(t){e[a]=t}})}}Object.defineProperty&&(i(`position`,`_legacyPos`,`x`,`y`),i(`scale`,`_legacyScale`,`scaleX`,`scaleY`),i(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();ye(ji,gi),ye(ji,Wn);function Mi(e,t,n,r,i){n=n||{};var a=[];Ri(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 Ni(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function Pi(e){return be(e[0])}function Fi(e,t,n){if(be(t[n]))if(be(e[n])||(e[n]=[]),ke(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),Ni(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(Pi(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?Ni(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else Ni(a,i,o);a.length=i.length}else e[n]=t[n]}function Ii(e,t){return e===t||be(e)&&be(t)&&Li(e,t)}function Li(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 Ri(e,t,n,r,i,a,o,s){for(var c=Ce(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)&&!be(v)&&!je(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}Ri(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=V(m,x);m.splice(S,1)}}if(i.force||(h=Se(h,function(e){return!Ii(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[_]=$r(n[_]),Fi(n,r,_)}}var x=new mi(n,!1,!1,d?Se(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)}}var zi=ji,Bi=`__zr_style_`+Math.round(Math.random()*10),Vi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},Hi={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Vi[Bi]=!0;var Ui=[`z`,`z2`,`invisible`],Wi=[`invisible`],Gi=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Ce(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(){},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&&Ji(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths){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||(this._paintRect=new $(0,0,0,0)),t?$.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 $(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:z(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=wi,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&wi)},t.prototype.styleUpdated=function(){this.__dirty&=~wi},t.prototype.createStyle=function(e){return Je(Vi,e)},t.prototype.useStyle=function(e){e[Bi]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Bi]},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,Ui)},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;if(n&&n.style?a?i?c=n.style:(c=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(c,n.style)):(c=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(c,n.style)):s&&(c=r.style),c)if(a){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=Ce(l),d=0;d<u.length;d++){var f=u[d];f in c&&(c[f]=c[f],this.style[f]=l[f])}for(var p=Ce(c),d=0;d<p.length;d++){var f=p[d];this.style[f]=this.style[f]}this._transitionState(t,{style:c},o,this.getAnimationStyleProps())}else this.useStyle(c);for(var m=this.__inHover?Wi:Ui,d=0;d<m.length;d++){var f=m[d];n&&n[f]!=null?this[f]=n[f]:s&&r[f]!=null&&(this[f]=r[f])}},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=r||{},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return z(e,t),e},t.prototype.getAnimationStyleProps=function(){return Hi},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=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=Ci|wi})(),t}(zi),Ki=new $(0,0,0,0),qi=new $(0,0,0,0);function Ji(e,t,n){return Ki.copy(e.getBoundingRect()),e.transform&&Ki.applyTransform(e.transform),qi.width=t,qi.height=n,!Ki.intersect(qi)}var Yi=Gi,Xi=Math.min,Zi=Math.max,Qi=Math.sin,$i=Math.cos,ea=Math.PI*2,ta=yn(),na=yn(),ra=yn();function ia(e,t,n,r,i,a){i[0]=Xi(e,n),i[1]=Xi(t,r),a[0]=Zi(e,n),a[1]=Zi(t,r)}var aa=[],oa=[];function sa(e,t,n,r,i,a,o,s,c,l){var u=sr,d=ir,f=u(e,n,i,o,aa);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,aa[p]);c[0]=Xi(m,c[0]),l[0]=Zi(m,l[0])}f=u(t,r,a,s,oa);for(var p=0;p<f;p++){var h=d(t,r,a,s,oa[p]);c[1]=Xi(h,c[1]),l[1]=Zi(h,l[1])}c[0]=Xi(e,c[0]),l[0]=Zi(e,l[0]),c[0]=Xi(o,c[0]),l[0]=Zi(o,l[0]),c[1]=Xi(t,c[1]),l[1]=Zi(t,l[1]),c[1]=Xi(s,c[1]),l[1]=Zi(s,l[1])}function ca(e,t,n,r,i,a,o,s){var c=mr,l=dr,u=Zi(Xi(c(e,n,i),1),0),d=Zi(Xi(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Xi(e,i,f),o[1]=Xi(t,a,p),s[0]=Zi(e,i,f),s[1]=Zi(t,a,p)}function la(e,t,n,r,i,a,o,s,c){var l=Mn,u=Nn,d=Math.abs(i-a);if(d%ea<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(ta[0]=$i(i)*n+e,ta[1]=Qi(i)*r+t,na[0]=$i(a)*n+e,na[1]=Qi(a)*r+t,l(s,ta,na),u(c,ta,na),i%=ea,i<0&&(i+=ea),a%=ea,a<0&&(a+=ea),i>a&&!o?a+=ea:i<a&&o&&(i+=ea),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(ra[0]=$i(p)*n+e,ra[1]=Qi(p)*r+t,l(s,ra,s),u(c,ra,c))}var ua={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},da=[],fa=[],pa=[],ma=[],ha=[],ga=[],_a=Math.min,va=Math.max,ya=Math.cos,ba=Math.sin,xa=Math.abs,Sa=Math.PI,Ca=Sa*2,wa=typeof Float32Array<`u`,Ta=[];function Ea(e){return Math.round(e/Sa*1e8)/1e8%2*Sa}function Da(e,t){var n=Ea(e[0]);n<0&&(n+=Ca);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ca?i=n+Ca:t&&n-i>=Ca?i=n-Ca:!t&&n>i?i=n+(Ca-Ea(n-i)):t&&n<i&&(i=n-(Ca-Ea(i-n))),e[0]=n,e[1]=i}var Oa=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=n||0,n>0&&(this._ux=xa(n/vi/e)||0,this._uy=xa(n/vi/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(ua.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=xa(e-this._xi),r=xa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(ua.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(ua.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(ua.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(),Ta[0]=r,Ta[1]=i,Da(Ta,a),r=Ta[0],i=Ta[1];var o=i-r;return this.addData(ua.A,e,t,n,n,r,o,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=ya(i)*n+e,this._yi=ba(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(ua.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(ua.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){var t=e.length;!(this.data&&this.data.length===t)&&wa&&(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){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();wa&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n));for(var i=0;i<t;i++)for(var a=e[i].data,o=0;o<a.length;o++)this.data[r++]=a[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,wa&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){pa[0]=pa[1]=ha[0]=ha[1]=Number.MAX_VALUE,ma[0]=ma[1]=ga[0]=ga[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 ua.M:t=r=e[a++],n=i=e[a++],ha[0]=r,ha[1]=i,ga[0]=r,ga[1]=i;break;case ua.L:ia(t,n,e[a],e[a+1],ha,ga),t=e[a++],n=e[a++];break;case ua.C:sa(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],ha,ga),t=e[a++],n=e[a++];break;case ua.Q:ca(t,n,e[a++],e[a++],e[a],e[a+1],ha,ga),t=e[a++],n=e[a++];break;case ua.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=ya(f)*u+c,i=ba(f)*d+l),la(c,l,u,d,f,p,m,ha,ga),t=ya(p)*u+c,n=ba(p)*d+l;break;case ua.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];ia(r,i,r+h,i+g,ha,ga);break;case ua.Z:t=r,n=i;break}Mn(pa,pa,ha),Nn(ma,ma,ga)}return a===0&&(pa[0]=pa[1]=ma[0]=ma[1]=0),new $(pa[0],pa[1],ma[0]-pa[0],ma[1]-pa[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||(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 ua.M:i=o=e[d++],a=s=e[d++];break;case ua.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(xa(_)>n||xa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case ua.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=ur(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case ua.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=_r(i,a,y,b,h,g,10),i=h,a=g;break;case ua.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=ya(D)*T+C,s=ba(D)*E+w),m=va(T,E)*_a(Ca,Math.abs(O)),i=ya(k)*T+C,a=ba(k)*E+w;break;case ua.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case ua.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}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!==ua.L&&v>0&&(e.lineTo(y,b),v=0),S){case ua.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case ua.L:u=n[x++],d=n[x++];var w=xa(u-c),T=xa(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 ua.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;cr(c,k,j,N,D,da),cr(l,A,M,P,D,fa),e.bezierCurveTo(da[1],fa[1],da[2],fa[2],da[3],fa[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case ua.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;hr(c,k,j,D,da),hr(l,A,M,D,fa),e.quadraticCurveTo(da[1],fa[1],da[2],fa[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case ua.A:var ee=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=xa(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(ee,te,ne,re,oe,ie,ue,se):e.arc(ee,te,ce,ie,ue,se),F)break lo;C&&(o=ya(ie)*ne+ee,s=ba(ie)*re+te),c=ya(ue)*ne+ee,l=ba(ue)*re+te;break;case ua.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var I=n[x++],de=n[x++];if(f){var E=p[g++];if(h+E>_){var fe=_-h;e.moveTo(u,d),e.lineTo(u+_a(fe,I),d),fe-=I,fe>0&&e.lineTo(u+I,d+_a(fe,de)),fe-=de,fe>0&&e.lineTo(u+va(I-fe,0),d+de),fe-=I,fe>0&&e.lineTo(u,d+va(de-fe,0));break lo}h+=E}e.rect(u,d,I,de);break;case ua.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.CMD=ua,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}(),ka=Oa;function Aa(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 ja(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:lr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function Ma(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:gr(e,t,n,r,i,a,s,c,null)<=l/2}var Na=Math.PI*2;function Pa(e){return e%=Na,e<0&&(e+=Na),e}var Fa=Math.PI*2;function Ia(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)%Fa<1e-4)return!0;if(a){var d=r;r=Pa(i),i=Pa(d)}else r=Pa(r),i=Pa(i);r>i&&(i+=Fa);var f=Math.atan2(c,s);return f<0&&(f+=Fa),f>=r&&f<=i||f+Fa>=r&&f+Fa<=i}function La(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 Ra=ka.CMD,za=Math.PI*2,Ba=1e-4;function Va(e,t){return Math.abs(e-t)<Ba}var Ha=[-1,-1,-1],Ua=[-1,-1];function Wa(){var e=Ua[0];Ua[0]=Ua[1],Ua[1]=e}function Ga(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=or(t,r,a,s,l,Ha);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=Ha[h],_=g===0||g===1?.5:1;ir(e,n,i,o,g)<c||(f<0&&(f=sr(t,r,a,s,Ua),Ua[1]<Ua[0]&&f>1&&Wa(),p=ir(t,r,a,s,Ua[0]),f>1&&(m=ir(t,r,a,s,Ua[1]))),f===2?g<Ua[0]?d+=p<t?_:-_:g<Ua[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<Ua[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Ka(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=pr(t,r,a,s,Ha);if(c===0)return 0;var l=mr(t,r,a);if(l>=0&&l<=1){for(var u=0,d=dr(t,r,a,l),f=0;f<c;f++){var p=Ha[f]===0||Ha[f]===1?.5:1,m=dr(e,n,i,Ha[f]);m<o||(Ha[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}else{var p=Ha[0]===0||Ha[0]===1?.5:1,m=dr(e,n,i,Ha[0]);return m<o?0:a<t?p:-p}}function qa(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);Ha[0]=-c,Ha[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=za-1e-4){r=0,i=za;var u=a?1:-1;return o>=Ha[0]+e&&o<=Ha[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=za,i+=za);for(var f=0,p=0;p<2;p++){var m=Ha[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=za+h),(h>=r&&h<=i||h+za>=r&&h+za<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function Ja(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===Ra.M&&m>1&&(n||(s+=La(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Ra.M:u=a[m++],d=a[m++],c=u,l=d;break;case Ra.L:if(n){if(Aa(c,l,a[m],a[m+1],t,r,i))return!0}else s+=La(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ra.C:if(n){if(ja(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Ga(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 Ra.Q:if(n){if(Ma(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Ka(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Ra.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+=La(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Ia(_,v,b,x,x+S,C,t,w,i))return!0}else s+=qa(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Ra.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(Aa(u,d,f,d,t,r,i)||Aa(f,d,f,p,t,r,i)||Aa(f,p,u,p,t,r,i)||Aa(u,p,u,d,t,r,i))return!0}else s+=La(f,d,f,p,r,i),s+=La(u,p,u,d,r,i);break;case Ra.Z:if(n){if(Aa(c,l,u,d,t,r,i))return!0}else s+=La(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Va(l,d)&&(s+=La(c,l,u,d,r,i)||0),s!==0}function Ya(e,t,n){return Ja(e,0,!1,t,n)}function Xa(e,t,n,r){return Ja(e,t,!0,n,r)}var Za=B({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Vi),Qa={style:B({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Hi.style)},$a=Hn.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),eo=function(e){A(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<$a.length;++s)i[$a[s]]=this[$a[s]];i.__dirty|=Ci}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=Ce(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?z(this.style,o):this.useStyle(o):a===`shape`?z(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=zr(e,0);return t>.5?bi:t>.2?Si:xi}else if(e)return xi}return bi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==zr(e,0)<yi)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=~Ti},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 ka(!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&Ti)&&(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||(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)),Xa(a,o/s,e,t)))return!0}if(this.hasFill())return Ya(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Ti,this._rect&&(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||(n=this.shape={}),typeof e==`string`?n[e]=t:z(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Ti)},t.prototype.createStyle=function(e){return Je(Za,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=z({},this.shape))},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;if(n&&n.shape?a?i?c=n.shape:(c=z({},r.shape),z(c,n.shape)):(c=z({},i?this.shape:r.shape),z(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=z({},this.shape);for(var l={},u=Ce(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=r||{},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return Qa},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){A(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 L(e.style)},n.prototype.getDefaultShape=function(){return L(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=Ci|wi|Ti})(),t}(Yi),to=eo,no=B({strokeFirst:!0,font:N,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Za),ro=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return 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.createStyle=function(e){return Je(no,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var t=e.text;t==null?t=``:t+=``;var n=Zt(t,e.font,e.textAlign,e.textBaseline);if(n.x+=e.x||0,n.y+=e.y||0,this.hasStroke()){var r=e.lineWidth;n.x-=r/2,n.y-=r/2,n.width+=r,n.height+=r}this._rect=n}return this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Yi);ro.prototype.type=`tspan`;var io=ro,ao=B({x:0,y:0},Vi),oo={style:B({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Hi.style)};function so(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var co=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Je(ao,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=so(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 oo},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new $(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Yi);co.prototype.type=`image`;var lo=co;function uo(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)}var fo=Math.round;function po(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?(fo(r*2)===fo(i*2)&&(e.x1=e.x2=ho(r,s,!0)),fo(a*2)===fo(o*2)&&(e.y1=e.y2=ho(a,s,!0)),e):e}}function mo(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=ho(r,s,!0),e.y=ho(i,s,!0),e.width=Math.max(ho(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(ho(i+o,s,!1)-e.y,o===0?0:1),e):e}}function ho(e,t,n){if(!t)return e;var r=fo(e*2);return(r+fo(t))%2==0?r/2:(r+(n?1:-1))/2}var go=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),_o={},vo=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new go},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=mo(_o,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?uo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(to);vo.prototype.type=`rect`;var yo=vo,bo={fill:`#000`},xo=2,So={style:B({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},Hi.style)},Co=function(e){A(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=bo,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,Ao(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 $(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=r||e.clone(),r.union(e)):(r=r||o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||bo},t.prototype.setTextContent=function(e){if(process.env.NODE_ENV!==`production`)throw Error(`Can't attach text on another text`)},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return z(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=Ce(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},z(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return So},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||N,n=e.padding,r=ln(Fo(e),e),i=Io(e),a=!!e.backgroundColor,o=r.outerHeight,s=r.outerWidth,c=r.contentWidth,l=r.lines,u=r.lineHeight,d=this._defaultStyle;this.isTruncated=!!r.isTruncated;var f=e.x||0,p=e.y||0,m=e.align||d.align||`left`,h=e.verticalAlign||d.verticalAlign||`top`,g=f,_=$t(p,r.contentHeight,h);if(i||n){var v=Qt(f,s,m),y=$t(p,o,h);i&&this._renderBackground(e,e,v,y,s,o)}_+=u/2,n&&(g=Po(f,m,n),h===`top`?_+=n[0]:h===`bottom`&&(_-=n[2]));for(var b=0,x=!1,S=No(`fill`in e?e.fill:(x=!0,d.fill)),C=Mo(`stroke`in e?e.stroke:!a&&(!d.autoStroke||x)?(b=xo,d.stroke):null),w=e.textShadowBlur>0,T=e.width!=null&&(e.overflow===`truncate`||e.overflow===`break`||e.overflow===`breakAll`),E=r.calculatedLineHeight,D=0;D<l.length;D++){var O=this._getOrCreateChild(io),k=O.createStyle();O.useStyle(k),k.text=l[D],k.x=g,k.y=_,m&&(k.textAlign=m),k.textBaseline=`middle`,k.opacity=e.opacity,k.strokeFirst=!0,w&&(k.shadowBlur=e.textShadowBlur||0,k.shadowColor=e.textShadowColor||`transparent`,k.shadowOffsetX=e.textShadowOffsetX||0,k.shadowOffsetY=e.textShadowOffsetY||0),k.stroke=C,k.fill=S,C&&(k.lineWidth=e.lineWidth||b,k.lineDash=e.lineDash,k.lineDashOffset=e.lineDashOffset||0),k.font=t,Oo(k,e),_+=u,T&&O.setBoundingRect(new $(Qt(k.x,c,k.textAlign),$t(k.y,E,k.textBaseline),c,E))}},t.prototype._updateRichTexts=function(){var e=this.style,t=pn(Fo(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,a=e.padding,o=e.x||0,s=e.y||0,c=this._defaultStyle,l=e.align||c.align,u=e.verticalAlign||c.verticalAlign;this.isTruncated=!!t.isTruncated;var d=Qt(o,r,l),f=$t(s,i,u),p=d,m=f;a&&(p+=a[3],m+=a[0]);var h=p+n;Io(e)&&this._renderBackground(e,e,d,f,r,i);for(var g=!!e.backgroundColor,_=0;_<t.lines.length;_++){for(var v=t.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+=(n-(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&&Io(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=Po(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(io),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=No(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),v=Mo(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=xo,m.stroke):null),y=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,y&&(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||N,p.opacity=Ie(s.opacity,t.opacity,1),Oo(p,s),v&&(p.lineWidth=Ie(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=v),_&&(p.fill=_);var b=e.contentWidth,x=e.contentHeight;f.setBoundingRect(new $(Qt(p.x,b,p.textAlign),$t(p.y,x,p.textBaseline),b,x))},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(yo),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=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(lo),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=Y(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=Ie(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ko(e)&&(t=[e.fontStyle,e.fontWeight,Do(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ze(t)||e.textFont||e.font},t}(Yi),wo={left:!0,right:1,center:1},To={top:1,bottom:1,middle:1},Eo=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Do(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?j+`px`:e+`px`}function Oo(e,t){for(var n=0;n<Eo.length;n++){var r=Eo[n],i=t[r];i!=null&&(e[r]=i)}}function ko(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function Ao(e){return jo(e),H(e.rich,jo),e}function jo(e){if(e){e.font=Co.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||wo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||To[n]?n:`top`,e.padding&&(e.padding=Re(e.padding))}}function Mo(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function No(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function Po(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function Fo(e){var t=e.text;return t!=null&&(t+=``),t}function Io(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var Lo=Co,Ro=1e-4,zo=20;function Bo(e){return e.replace(/^\s+|\s+$/g,``)}function Vo(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}function Ho(e,t){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return q(e)?Bo(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function Uo(e,t,n){return t??(t=10),t=Math.min(Math.max(0,t),zo),e=(+e).toFixed(t),n?e:+e}function Wo(e){return e.sort(function(e,t){return e-t}),e}function Go(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return Ko(e)}function Ko(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(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function qo(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Jo(e,t){var n=Math.max(Go(e),Go(t)),r=e+t;return n>zo?r:Uo(r,n)}function Yo(e){var t=Math.PI*2;return(e%t+t)%t}function Xo(e){return e>-Ro&&e<Ro}var Zo=/^(?:(\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 Qo(e){if(e instanceof Date)return e;if(q(e)){var t=Zo.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))}else 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)}else if(e==null)return new Date(NaN);return new Date(Math.round(e))}function $o(e){return 10**es(e)}function es(e){if(e===0)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/10**t>=10&&t++,t}function ts(e,t){var n=es(e),r=10**n,i=e/r;return e=(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,n>=-20?+e.toFixed(n<0?-n:0):e}function ns(e){var t=parseFloat(e);return t==e&&(t!==0||!q(e)||e.indexOf(`x`)<=0)?t:NaN}function rs(e){return!isNaN(ns(e))}function is(){return Math.round(Math.random()*9)}function as(e,t){return t===0?e:as(t,e%t)}function os(e,t){return e==null?t:t==null?e:e*t/as(e,t)}var ss=`[ECharts] `,cs={},ls=typeof console<`u`&&console.warn&&console.log;function us(e,t,n){if(ls){if(n){if(cs[t])return;cs[t]=!0}console[e](ss+t)}}function ds(e,t){us(`log`,e,t)}function fs(e,t){us(`warn`,e,t)}function ps(e,t){us(`error`,e,t)}function ms(e){process.env.NODE_ENV!==`production`&&us(`warn`,`DEPRECATED: `+e,!0)}function hs(e,t,n){process.env.NODE_ENV!==`production`&&ms((n?`[`+n+`]`:``)+(e+` is deprecated, use `+t+` instead.`))}function gs(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=``;if(process.env.NODE_ENV!==`production`){var r=function(e){return e===void 0?`undefined`:e===1/0?`Infinity`:e===-1/0?`-Infinity`:Pe(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:K(e)?`function () { ... }`:Ne(e)?e+``:null};n=U(e,function(e){if(q(e))return e;var t=r(e);if(t!=null)return t;if(typeof JSON<`u`&&JSON.stringify)try{return JSON.stringify(e,function(e,t){return r(t)??t})}catch{return`?`}else return`?`}).join(` `)}return n}function _s(e){throw Error(e)}function vs(e,t,n){return(t-e)*n+e}var ys=`series\0`,bs=`\0_ec_\0`;function xs(e){return e instanceof Array?e:e==null?[]:[e]}function Ss(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 Cs=`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 ws(e){return J(e)&&!G(e)&&!(e instanceof Date)?e.value:e}function Ts(e){return J(e)&&!(e instanceof Array)}function Es(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e=e||[],t=(t||[]).slice();var o=Z();H(t,function(e,n){if(!J(e)){t[n]=null;return}process.env.NODE_ENV!==`production`&&(e.id!=null&&!Ls(e.id)&&Is(e.id),e.name!=null&&!Ls(e.name)&&Is(e.name))});var s=Ds(e,o,n);return(r||i)&&Os(s,e,o,t),r&&ks(s,t),r||i?As(s,t,i):a&&js(s,t),Ms(s),s}function Ds(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`||zs(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Os(e,t,n,r){H(r,function(i,a){if(!(!i||i.id==null)){var o=Ps(i.id),s=n.get(o);if(s!=null){var c=e[s];X(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function ks(e,t){H(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)&&!zs(n)&&!zs(a)&&Ns(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function As(e,t,n){H(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||zs(r.existing)||r.existing&&t.id!=null&&!Ns(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function js(e,t){H(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ms(e){var t=Z();H(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),H(e,function(e){var n=e.newOption;X(!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={})}),H(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:ys+n:Ps(i.name),r)a.id=Ps(r.id);else if(i.id!=null)a.id=Ps(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 Ns(e,t,n){var r=Fs(t[e],null),i=Fs(n[e],null);return r!=null&&i!=null&&r===i}function Ps(e){if(process.env.NODE_ENV!==`production`&&e==null)throw Error();return Fs(e,``)}function Fs(e,t){return e==null?t:q(e)?e:De(e)||Ee(e)?e+``:t}function Is(e){process.env.NODE_ENV!==`production`&&fs("`"+e+"` is invalid id or name. Must be a string or number.")}function Ls(e){return Ee(e)||rs(e)}function Rs(e){var t=e.name;return!!(t&&t.indexOf(ys))}function zs(e){return e&&e.id!=null&&Ps(e.id).indexOf(bs)===0}function Bs(e,t,n){H(e,function(e){var r=e.newOption;J(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Vs(t,r,e.existing,n))})}function Vs(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Hs(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return G(t.dataIndex)?U(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return G(t.name)?U(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Us(){var e=`__ec_inner_`+ Ws++;return function(t){return t[e]||(t[e]={})}}var Ws=is();function Gs(e,t,n){var r=Ks(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=Ys(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 Ks(e,t){var n;if(q(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Z(),a={},o=!1;return H(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&&V(t.includeMainTypes,s)<0)){o=o||!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var qs={useDefault:!0,enableAll:!1,enableNone:!1},Js={useDefault:!1,enableAll:!0,enableNone:!0};function Ys(e,t,n,r){r=r||qs;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}return i===`none`||i===!1?(X(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i===`all`&&(X(r.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function Xs(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Zs(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function Qs(e){return e===`auto`?Q.domSupported?`html`:`richText`:e||`html`}function $s(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(De(r)){var o=vs(n||0,r,i);return Uo(o,a?Math.max(Go(n||0),Go(r)):t)}else if(q(r))return i<1?n:r;else{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=vs(p,m,i);s[d]=Uo(o,a?Math.max(Go(p),Go(m)):t)}}return s}}var ec=Us(),tc=function(e,t,n,r){if(r){var i=ec(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=ec(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},nc=1,rc={},ic=Us(),ac=Us(),oc=0,sc=1,cc=2,lc=[`emphasis`,`blur`,`select`],uc=[`normal`,`emphasis`,`blur`,`select`],dc=10,fc=9,pc=`highlight`,mc=`downplay`,hc=`select`,gc=`unselect`,_c=`toggleSelect`;function vc(e){return e!=null&&e!==`none`}function yc(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function bc(e){yc(e,`emphasis`,cc)}function xc(e){e.hoverState===cc&&yc(e,`normal`,oc)}function Sc(e){yc(e,`blur`,sc)}function Cc(e){e.hoverState===sc&&yc(e,`normal`,oc)}function wc(e){e.selected=!0}function Tc(e){e.selected=!1}function Ec(e,t,n){t(e,n)}function Dc(e,t,n){Ec(e,t,n),e.isGroup&&e.traverse(function(e){Ec(e,t,n)})}function Oc(e,t){switch(t){case`emphasis`:e.hoverState=cc;break;case`normal`:e.hoverState=oc;break;case`blur`:e.hoverState=sc;break;case`select`:e.selected=!0}}function kc(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 Ac(e,t,n,r){var i=n&&V(n,`select`)>=0,a=!1;if(e instanceof to){var o=ic(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(vc(s)||vc(c)){r=r||{};var l=r.style||{};l.fill===`inherit`?(a=!0,r=z({},r),l=z({},l),l.fill=s):!vc(l.fill)&&vc(s)?(a=!0,r=z({},r),l=z({},l),l.fill=Vr(s)):!vc(l.stroke)&&vc(c)&&(a||(r=z({},r),l=z({},l)),l.stroke=Vr(c)),r.style=l}}if(r&&r.z2==null){a||(r=z({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??dc)}return r}function jc(e,t,n){if(n&&n.z2==null){n=z({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??fc)}return n}function Mc(e,t,n){var r=V(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:kc(e,[`opacity`],t,{opacity:1});n=n||{};var o=n.style||{};return o.opacity??(n=z({},n),o=z({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Nc(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ac(this,e,t,n);if(e===`blur`)return Mc(this,e,n);if(e===`select`)return jc(this,e,n)}return n}function Pc(e){e.stateProxy=Nc;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Nc),n&&(n.stateProxy=Nc)}function Fc(e,t){!Uc(e,t)&&!e.__highByOuter&&Dc(e,bc)}function Ic(e,t){!Uc(e,t)&&!e.__highByOuter&&Dc(e,xc)}function Lc(e,t){e.__highByOuter|=1<<(t||0),Dc(e,bc)}function Rc(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Dc(e,xc)}function zc(e){Dc(e,Sc)}function Bc(e){Dc(e,Cc)}function Vc(e){Dc(e,wc)}function Hc(e){Dc(e,Tc)}function Uc(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Wc(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=ac(i),o=t===`series`,s=o?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!o&&r.push(s),a.isBlured&&(s.group.traverse(function(e){Cc(e)}),o&&n.push(i)),a.isBlured=!1}),H(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Gc(e,t,n,r){var i=r.getModel();n=n||`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Bc(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`||Sc(e)}),be(t))a(e.getData(),t);else if(J(t))for(var u=Ce(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),ac(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 Kc(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){ac(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Sc(e)})}}}function qc(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(!i){process.env.NODE_ENV!==`production`&&ps(`Unknown dataType `+t.dataType);return}var a=Hs(i,t);a=(G(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=ec(o);Gc(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&Gc(r,u,d,n)}}function Jc(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(process.env.NODE_ENV!==`production`&&!cl(s[l])&&ps(`param should be highDownDispatcher`),ec(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function Yc(e,t,n){process.env.NODE_ENV!==`production`&&!cl(e)&&ps(`param should be highDownDispatcher`);var r=ec(e),i=Jc(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&Kc(r.componentMainType,r.componentIndex,n),H(a,function(e){return Fc(e,t)})):(Gc(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&Kc(r.componentMainType,r.componentIndex,n),Fc(e,t))}function Xc(e,t,n){process.env.NODE_ENV!==`production`&&!cl(e)&&ps(`param should be highDownDispatcher`),Wc(n);var r=ec(e),i=Jc(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?H(i,function(e){return Ic(e,t)}):Ic(e,t)}function Zc(e,t,n){if(ul(t)){var r=t.dataType,i=Hs(e.getData(r),t);G(i)||(i=[i]),e[t.type===_c?`toggleSelect`:t.type===hc?`select`:`unselect`](i,r)}}function Qc(e){H(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Vc(t):Hc(t)})})}function $c(e){var t=[];return e.eachSeries(function(e){H(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 el(e,t,n){sl(e,!0),Dc(e,Pc),rl(e,t,n)}function tl(e){sl(e,!1)}function nl(e,t,n,r){r?tl(e):el(e,t,n)}function rl(e,t,n){var r=ec(e);t==null?r.focus&&(r.focus=null):(r.focus=t,r.blurScope=n)}var il=[`emphasis`,`blur`,`select`],al={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function ol(e,t,n,r){n=n||`itemStyle`;for(var i=0;i<il.length;i++){var a=il[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[al[n]]()}}function sl(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 cl(e){return!!(e&&e.__highDownDispatcher)}function ll(e){var t=rc[e];return t==null&&nc<=32&&(t=rc[e]=nc++),t}function ul(e){var t=e.type;return t===hc||t===gc||t===_c}function dl(e){var t=e.type;return t===pc||t===mc}function fl(e){var t=ic(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 pl=ka.CMD,ml=[[],[],[]],hl=Math.sqrt,gl=Math.atan2;function _l(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=pl.M,d=pl.C,f=pl.L,p=pl.R,m=pl.A,h=pl.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=hl(t[0]*t[0]+t[1]*t[1]),y=hl(t[2]*t[2]+t[3]*t[3]),b=gl(-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++],jn(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],jn(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=ml[c];x[0]=n[o++],x[1]=n[o++],jn(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var vl=Math.sqrt,yl=Math.sin,bl=Math.cos,xl=Math.PI;function Sl(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Cl(e,t){return(e[0]*t[0]+e[1]*t[1])/(Sl(e)*Sl(t))}function wl(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Cl(e,t))}function Tl(e,t,n,r,i,a,o,s,c,l,u){var d=xl/180*c,f=bl(d)*(e-n)/2+yl(d)*(t-r)/2,p=-1*yl(d)*(e-n)/2+bl(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=vl(m),s*=vl(m));var h=(i===a?-1:1)*vl((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+bl(d)*g-yl(d)*_,y=(t+r)/2+yl(d)*g+bl(d)*_,b=wl([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=wl(x,S);if(Cl(x,S)<=-1&&(C=xl),Cl(x,S)>=1&&(C=0),C<0){var w=Math.round(C/xl*1e6)/1e6;C=xl*2+w%2*xl}u.addData(l,v,y,o,s,b,C,d,a)}var El=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Dl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ol(e){var t=new ka;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ka.CMD,c=e.match(El);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(Dl)||[],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,Tl(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,Tl(w,T,n,r,S,C,y,b,x,f,t);break}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var kl=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(to);function Al(e){return e.setData!=null}function jl(e,t){var n=Ol(e),r=z({},t);return r.buildPath=function(e){if(Al(e)){e.setData(n.data);var t=e.getContext();t&&e.rebuildPath(t,1)}else{var t=e;n.rebuildPath(t,1)}},r.applyTransform=function(e){_l(n,e),this.dirtyShape()},r}function Ml(e,t){return new kl(jl(e,t))}function Nl(e,t){var n=jl(e,t);return function(e){A(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(kl)}function Pl(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 to(t);return o.createPathProxy(),o.buildPath=function(e){if(Al(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var Fl=function(e){A(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){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!==`production`&&e.__hostTarget))throw`This elemenet has been used as an attachment`;return 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=V(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=V(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 $(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?($.applyTransform(t,s,c),i=i||t.clone(),i.union(t)):(i=i||s.clone(),i.union(s))}}return i||t},t}(zi);Fl.prototype.type=`group`;var Il=Fl,Ll=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),Rl=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ll},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}(to);Rl.prototype.type=`circle`;var zl=Rl,Bl=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),Vl=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Bl},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}(to);Vl.prototype.type=`ellipse`;var Hl=Vl,Ul=Math.PI,Wl=Ul*2,Gl=Math.sin,Kl=Math.cos,ql=Math.acos,Jl=Math.atan2,Yl=Math.abs,Xl=Math.sqrt,Zl=Math.max,Ql=Math.min,$l=1e-4;function eu(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<$l))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function tu(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Xl(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)*Xl(Zl(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 nu(e){var t;if(G(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 ru(e,t){var n,r=Zl(t.r,0),i=Zl(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=Yl(c-s),p=f>Wl&&f%Wl;if(p>$l&&(f=p),!(r>$l))e.moveTo(l,u);else if(f>Wl-$l)e.moveTo(l+r*Kl(s),u+r*Gl(s)),e.arc(l,u,r,s,c,!d),i>$l&&(e.moveTo(l+i*Kl(c),u+i*Gl(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*Kl(s),j=r*Gl(s),M=i*Kl(c),N=i*Gl(c),P=f>$l;if(P){var ee=t.cornerRadius;ee&&(n=nu(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Yl(r-i)/2;if(v=Ql(te,g),y=Ql(te,_),b=Ql(te,m),x=Ql(te,h),w=S=Zl(v,y),T=C=Zl(b,x),(S>$l||C>$l)&&(E=r*Kl(c),D=r*Gl(c),O=i*Kl(s),k=i*Gl(s),f<Ul)){var ne=eu(A,j,O,k,E,D,M,N);if(ne){var re=A-ne[0],ie=j-ne[1],ae=E-ne[0],oe=D-ne[1],se=1/Gl(ql((re*ae+ie*oe)/(Xl(re*re+ie*ie)*Xl(ae*ae+oe*oe)))/2),ce=Xl(ne[0]*ne[0]+ne[1]*ne[1]);w=Ql(S,(r-ce)/(se+1)),T=Ql(C,(i-ce)/(se-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>$l){var le=Ql(g,w),ue=Ql(_,w),F=tu(O,k,A,j,r,le,d),I=tu(E,D,M,N,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w<S&&le===ue?e.arc(l+F.cx,u+F.cy,w,Jl(F.y0,F.x0),Jl(I.y0,I.x0),!d):(le>0&&e.arc(l+F.cx,u+F.cy,le,Jl(F.y0,F.x0),Jl(F.y1,F.x1),!d),e.arc(l,u,r,Jl(F.cy+F.y1,F.cx+F.x1),Jl(I.cy+I.y1,I.cx+I.x1),!d),ue>0&&e.arc(l+I.cx,u+I.cy,ue,Jl(I.y1,I.x1),Jl(I.y0,I.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>$l)||!P)e.lineTo(l+M,u+N);else if(T>$l){var le=Ql(m,T),ue=Ql(h,T),F=tu(M,N,E,D,i,-ue,d),I=tu(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T<C&&le===ue?e.arc(l+F.cx,u+F.cy,T,Jl(F.y0,F.x0),Jl(I.y0,I.x0),!d):(ue>0&&e.arc(l+F.cx,u+F.cy,ue,Jl(F.y0,F.x0),Jl(F.y1,F.x1),!d),e.arc(l,u,i,Jl(F.cy+F.y1,F.cx+F.x1),Jl(I.cy+I.y1,I.cx+I.x1),d),le>0&&e.arc(l+I.cx,u+I.cy,le,Jl(I.y1,I.x1),Jl(I.y0,I.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var iu=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}(),au=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new iu},t.prototype.buildPath=function(e,t){ru(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(to);au.prototype.type=`sector`;var ou=au,su=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),cu=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new su},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}(to);cu.prototype.type=`ring`;var lu=cu;function uu(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++)Mn(u,u,e[f]),Nn(d,d,e[f]);Mn(u,u,r[0]),Nn(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(bn(e[f]));continue}else c=e[f-1],l=e[f+1];Sn(a,l,c),Tn(a,a,t);var h=Dn(m,c),g=Dn(m,l),_=h+g;_!==0&&(h/=_,g/=_),Tn(o,a,-h),Tn(s,a,g);var v=xn([],m,o),y=xn([],m,s);r&&(Nn(v,v,u),Mn(v,v,d),Nn(y,y,u),Mn(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function du(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=uu(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 fu=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),pu=function(e){A(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new fu},t.prototype.buildPath=function(e,t){du(e,t,!0)},t}(to);pu.prototype.type=`polygon`;var mu=pu,hu=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),gu=function(e){A(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 hu},t.prototype.buildPath=function(e,t){du(e,t,!1)},t}(to);gu.prototype.type=`polyline`;var _u=gu,vu={},yu=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),bu=function(e){A(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 yu},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=po(vu,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}(to);bu.prototype.type=`line`;var xu=bu,Su=[],Cu=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 wu(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ar:ir)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ar:ir)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?fr:dr)(e.x1,e.cpx1,e.x2,t),(n?fr:dr)(e.y1,e.cpy1,e.y2,t)]}var Tu=function(e){A(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 Cu},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&&(hr(n,o,i,u,Su),o=Su[1],i=Su[2],hr(r,s,a,u,Su),s=Su[1],a=Su[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(cr(n,o,c,i,u,Su),o=Su[1],c=Su[2],i=Su[3],cr(r,s,l,a,u,Su),s=Su[1],l=Su[2],a=Su[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return wu(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=wu(this.shape,e,!0);return En(t,t)},t}(to);Tu.prototype.type=`bezier-curve`;var Eu=Tu,Du=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}(),Ou=function(e){A(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 Du},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}(to);Ou.prototype.type=`arc`;var ku=Ou,Au=function(e){A(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=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),to.prototype.getBoundingRect.call(this)},t}(to),ju=Au,Mu=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),Nu=Mu,Pu=function(e){A(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}(Nu),Fu=Pu,Iu=function(e){A(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}(Nu),Lu=Iu,Ru=[0,0],zu=[0,0],Bu=new Rt,Vu=new Rt,Hu=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new Rt;for(var n=0;n<2;n++)this._axes[n]=new Rt;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);Rt.sub(r[0],n[1],n[0]),Rt.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){var n=!0,r=!t;return Bu.set(1/0,1/0),Vu.set(0,0),!this._intersectCheckOneSide(this,e,Bu,Vu,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,Bu,Vu,r,-1)&&(n=!1,r)||r||Rt.copy(t,n?Bu:Vu),n},e.prototype._intersectCheckOneSide=function(e,t,n,r,i,a){for(var o=!0,s=0;s<2;s++){var c=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,Ru),this._getProjMinMaxOnAxis(s,t._corners,zu),Ru[1]<zu[0]||Ru[0]>zu[1]){if(o=!1,i)return o;var l=Math.abs(zu[0]-Ru[1]),u=Math.abs(Ru[0]-zu[1]);Math.min(l,u)>r.len()&&(l<u?Rt.scale(r,c,-l*a):Rt.scale(r,c,u*a))}else if(n){var l=Math.abs(zu[0]-Ru[1]),u=Math.abs(Ru[0]-zu[1]);Math.min(l,u)<n.len()&&(l<u?Rt.scale(n,c,l*a):Rt.scale(n,c,-u*a))}}return o},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=Math.min(l,o),s=Math.max(l,s)}n[0]=o,n[1]=s},e}(),Uu=Hu,Wu=[],Gu=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,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.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=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 $(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(Wu)),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}(Yi),Ku=Gu,qu=Us();function Ju(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=Y(r.duration,200),u=Y(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)),K(d)&&(d=d(n,i)),K(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}else return null}function Yu(e,t,n,r,i,a,o){var s=!1,c;K(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=Ju(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 Xu(e,t,n,r,i,a){Yu(`update`,e,t,n,r,i,a)}function Zu(e,t,n,r,i,a){Yu(`enter`,e,t,n,r,i,a)}function Qu(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 $u(e,t,n,r,i,a){Qu(e)||Yu(`leave`,e,t,n,r,i,a)}function ed(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),$u(e,{style:{opacity:0}},t,n,r)}function td(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||ed(e,t,n,r)}):ed(e,t,n,r)}function nd(e){qu(e).oldStyle=e.style}var rd=t({Arc:()=>ku,BezierCurve:()=>Eu,BoundingRect:()=>$,Circle:()=>zl,CompoundPath:()=>ju,Ellipse:()=>Hl,Group:()=>Il,Image:()=>lo,IncrementalDisplayable:()=>Ku,Line:()=>xu,LinearGradient:()=>Fu,OrientedBoundingRect:()=>Uu,Path:()=>to,Point:()=>Rt,Polygon:()=>mu,Polyline:()=>_u,RadialGradient:()=>Lu,Rect:()=>yo,Ring:()=>lu,Sector:()=>ou,Text:()=>Lo,applyTransform:()=>xd,clipPointsByRect:()=>Ed,clipRectByRect:()=>Dd,createIcon:()=>Od,extendPath:()=>ld,extendShape:()=>sd,getShapeClass:()=>dd,getTransform:()=>bd,groupTransition:()=>Td,initProps:()=>Zu,isElementRemoved:()=>Qu,lineLineIntersect:()=>Ad,linePolygonIntersect:()=>kd,makeImage:()=>pd,makePath:()=>fd,mergePath:()=>hd,registerShape:()=>ud,removeElement:()=>$u,removeElementWithFadeOut:()=>td,resizePath:()=>gd,setTooltipConfig:()=>Nd,subPixelOptimize:()=>yd,subPixelOptimizeLine:()=>_d,subPixelOptimizeRect:()=>vd,transformDirection:()=>Sd,traverseElements:()=>Fd,updateProps:()=>Xu}),id=Math.max,ad=Math.min,od={};function sd(e){return to.extend(e)}var cd=Nl;function ld(e,t){return cd(e,t)}function ud(e,t){od[e]=t}function dd(e){if(od.hasOwnProperty(e))return od[e]}function fd(e,t,n,r){var i=Ml(e,t);return n&&(r===`center`&&(n=md(n,i.getBoundingRect())),gd(i,n)),i}function pd(e,t,n){var r=new lo({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(md(t,i))}}});return r}function md(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 hd=Pl;function gd(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function _d(e,t){return po(e,e,{lineWidth:t}),e}function vd(e){return mo(e.shape,e.shape,e.style),e}var yd=ho;function bd(e,t){for(var n=At([]);e&&e!==t;)Mt(n,e.getLocalTransform(),n),e=e.parent;return n}function xd(e,t,n){return t&&!be(t)&&(t=Wn.getLocalTransform(t)),n&&(t=It([],t)),jn([],e,t)}function Sd(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=xd(a,t,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function Cd(e){return!e.isGroup}function wd(e){return e.shape!=null}function Td(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){Cd(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return wd(e)&&(t.shape=z({},e.shape)),t}var a=r(e);t.traverse(function(e){if(Cd(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Xu(e,r,n,ec(e).dataIndex)}}})}function Ed(e,t){return U(e,function(e){var n=e[0];n=id(n,t.x),n=ad(n,t.x+t.width);var r=e[1];return r=id(r,t.y),r=ad(r,t.y+t.height),[n,r]})}function Dd(e,t){var n=id(e.x,t.x),r=ad(e.x+e.width,t.x+t.width),i=id(e.y,t.y),a=ad(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 Od(e,t,n){var r=z({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),B(i,n),new lo(r)):fd(e.replace(`path://`,``),r,n,`center`)}function kd(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Ad(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Ad(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=jd(u,d,c,l);if(Md(f))return!1;var p=e-i,m=t-a,h=jd(p,m,c,l)/f;if(h<0||h>1)return!1;var g=jd(p,m,u,d)/f;return!(g<0||g>1)}function jd(e,t,n,r){return e*r-n*t}function Md(e){return e<=1e-6&&e>=-1e-6}function Nd(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&&H(Ce(c),function(e){Xe(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=ec(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:B({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Pd(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Fd(e,t){if(e)if(G(e))for(var n=0;n<e.length;n++)Pd(e[n],t);else Pd(e,t)}ud(`circle`,zl),ud(`ellipse`,Hl),ud(`sector`,ou),ud(`ring`,lu),ud(`polygon`,mu),ud(`polyline`,_u),ud(`rect`,yo),ud(`line`,xu),ud(`bezierCurve`,Eu),ud(`arc`,ku);var Id={};function Ld(e,t){for(var n=0;n<lc.length;n++){var r=lc[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 Rd(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??(s=K(e.defaultText)?e.defaultText(i,e,n):e.defaultText);for(var c={normal:s},l=0;l<lc.length;l++){var u=lc[l],d=t[u];c[u]=Y(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function zd(e,t,n,r){n=n||Id;for(var i=e instanceof Lo,a=!1,o=0;o<uc.length;o++){var s=t[uc[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new Lo,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Rd(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Vd(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Hd(u,n,!1));for(var o=0;o<lc.length;o++){var p=lc[o],s=t[p];if(s){var m=c.ensureState(p),h=!!Y(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Vd(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Hd(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&&(Xd(c).setLabelText=function(e){var r=Rd(n,t,e);Ld(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Bd(e,t){t=t||`label`;for(var n={normal:e.getModel(t)},r=0;r<lc.length;r++){var i=lc[r];n[i]=e.getModel([i,t])}return n}function Vd(e,t,n,r,i){var a={};return Ud(a,e,n,r,i),t&&z(a,t),a}function Hd(e,t,n){t=t||{};var r={},i,a=e.getShallow(`rotate`),o=Y(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`,r}function Ud(e,t,n,r,i){n=n||Id;var a=t.ecModel,o=a&&a.option.textStyle,s=Wd(t),c;if(s){for(var l in c={},s)if(s.hasOwnProperty(l)){var u=t.getModel([`rich`,l]);Jd(c[l]={},u,o,n,r,i,!1,!0)}}c&&(e.rich=c);var d=t.get(`overflow`);d&&(e.overflow=d);var f=t.get(`minMargin`);f!=null&&(e.margin=f),Jd(e,t,o,n,r,i,!0,!1)}function Wd(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||Id).rich;if(n){t=t||{};for(var r=Ce(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var Gd=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],Kd=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],qd=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function Jd(e,t,n,r,i,a,o,s){n=!i&&n||Id;var c=r&&r.inheritColor,l=t.getShallow(`color`),u=t.getShallow(`textBorderColor`),d=Y(t.getShallow(`opacity`),n.opacity);(l===`inherit`||l===`auto`)&&(process.env.NODE_ENV!==`production`&&l===`auto`&&hs(`color: 'auto'`,`color: 'inherit'`),l=c||null),(u===`inherit`||u===`auto`)&&(process.env.NODE_ENV!==`production`&&u===`auto`&&hs(`color: 'auto'`,`color: 'inherit'`),u=c||null),a||(l=l||n.color,u=u||n.textBorderColor),l!=null&&(e.fill=l),u!=null&&(e.stroke=u);var f=Y(t.getShallow(`textBorderWidth`),n.textBorderWidth);f!=null&&(e.lineWidth=f);var p=Y(t.getShallow(`textBorderType`),n.textBorderType);p!=null&&(e.lineDash=p);var m=Y(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);m!=null&&(e.lineDashOffset=m),!i&&d==null&&!s&&(d=r&&r.defaultOpacity),d!=null&&(e.opacity=d),!i&&!a&&e.fill==null&&r.inheritColor&&(e.fill=r.inheritColor);for(var h=0;h<Gd.length;h++){var g=Gd[h],_=Y(t.getShallow(g),n[g]);_!=null&&(e[g]=_)}for(var h=0;h<Kd.length;h++){var g=Kd[h],_=t.getShallow(g);_!=null&&(e[g]=_)}if(e.verticalAlign==null){var v=t.getShallow(`baseline`);v!=null&&(e.verticalAlign=v)}if(!o||!r.disableBox){for(var h=0;h<qd.length;h++){var g=qd[h],_=t.getShallow(g);_!=null&&(e[g]=_)}var y=t.getShallow(`borderType`);y!=null&&(e.borderDash=y),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&c&&(process.env.NODE_ENV!==`production`&&e.backgroundColor===`auto`&&hs(`backgroundColor: 'auto'`,`backgroundColor: 'inherit'`),e.backgroundColor=c),(e.borderColor===`auto`||e.borderColor===`inherit`)&&c&&(process.env.NODE_ENV!==`production`&&e.borderColor===`auto`&&hs(`borderColor: 'auto'`,`borderColor: 'inherit'`),e.borderColor=c)}}function Yd(e,t){var n=t&&t.getModel(`textStyle`);return ze([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 Xd=Us();function Zd(e,t,n,r){if(e){var i=Xd(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 Qd=[`textStyle`,`color`],$d=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],ef=new Lo,tf=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(Qd):null)},e.prototype.getFont=function(){return Yd({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<$d.length;n++)t[$d[n]]=this.getShallow($d[n]);return ef.useStyle(t),ef.update(),ef.getBoundingRect()},e}(),nf=tf,rf=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],af=gt(rf),of=function(){function e(){}return e.prototype.getLineStyle=function(e){return af(this,e)},e}(),sf=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],cf=gt(sf),lf=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return cf(this,e,t)},e}(),uf=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},e.prototype.mergeOption=function(e,t){R(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=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(L(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(!Q.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}();ct(uf),ft(uf),ye(uf,of),ye(uf,lf),ye(uf,yt),ye(uf,nf);var df=uf;function ff(e){return e==null?0:e.length||1}function pf(e){return e}var mf=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||pf,this._newKeyGetter=r||pf,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=ff(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=ff(c),d=ff(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=ff(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=ff(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),hf=mf,gf=Z([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),_f=`original`,vf=`arrayRows`,yf=`objectRows`,bf=`keyedColumns`,xf=`typedArray`,Sf=`unknown`,Cf=`column`,wf=`row`,Tf={Must:1,Might:2,Not:3},Ef=Us();function Df(e){Ef(e).datasetMap=Z()}function Of(e,t,n){var r={},i=kf(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Ef(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),H(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});H(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 kf(e){if(!e.get(`data`,!0))return Ys(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},qs).models[0]}function Af(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Ys(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},qs).models}function jf(e,t){return Mf(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Mf(e,t,n,r,i,a){var o,s=5;if(ke(e))return Tf.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`?Tf.Must:Tf.Not;if(t===vf){var d=e;if(n===wf){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===yf){var h=e;if(!c)return Tf.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===bf){var _=e;if(!c)return Tf.Not;var f=_[c];if(!f||ke(f))return Tf.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===_f)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=ws(g);if(!G(y))return Tf.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=q(e);if(e!=null&&Number.isFinite(Number(e))&&e!==``)return t?Tf.Might:Tf.Not;if(t&&e!==`-`)return Tf.Must}return Tf.Not}var Nf=function(){function e(e){this.data=e.data||(e.sourceFormat===bf?{}:[]),this.sourceFormat=e.sourceFormat||Sf,this.seriesLayoutBy=e.seriesLayoutBy||Cf,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&&jf(this,n)===Tf.Must&&(r.type=`ordinal`)}}return e}();function Pf(e){return e instanceof Nf}function Ff(e,t,n){n=n||Rf(e);var r=t.seriesLayoutBy,i=zf(e,n,r,t.sourceHeader,t.dimensions);return new Nf({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:L(t)})}function If(e){return new Nf({data:e,sourceFormat:ke(e)?xf:_f})}function Lf(e){return new Nf({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:L(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Rf(e){var t=Sf;if(ke(e))t=xf;else if(G(e)){e.length===0&&(t=vf);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(G(i)||ke(i)){t=vf;break}else if(J(i)){t=yf;break}}}}else if(J(e)){for(var a in e)if(Xe(e,a)&&be(e[a])){t=bf;break}}return t}function zf(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:Vf(i),startIndex:o,dimensionsDetectedCount:a};if(t===vf){var s=e;r===`auto`||r==null?Hf(function(e){e!=null&&e!==`-`&&(q(e)?o??(o=1):o=0)},n,s,10):o=De(r)?r:r?1:0,!i&&o===1&&(i=[],Hf(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===wf?s.length:s[0]?s[0].length:null}else if(t===yf)i||(i=Bf(e));else if(t===bf)i||(i=[],H(e,function(e,t){i.push(t)}));else if(t===_f){var c=ws(e[0]);a=G(c)&&c.length||1}else t===xf&&process.env.NODE_ENV!==`production`&&X(!!i,`dimensions must be given if data is TypedArray.`);return{startIndex:o,dimensionsDefine:Vf(i),dimensionsDetectedCount:a}}function Bf(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return Ce(n)}function Vf(e){if(e){var t=Z();return U(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.displayName=r.name);var i=t.get(r.name);return i?r.name+=`-`+ i.count++:t.set(r.name,{count:1}),r})}}function Hf(e,t,n,r){if(t===wf)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 Uf(e){var t=e.sourceFormat;return t===yf||t===bf}var Wf,Gf,Kf,qf,Jf,Yf=function(){function e(e,t){var n=Pf(e)?e:If(e);this._source=n;var r=this._data=n.data;if(n.sourceFormat===xf){if(process.env.NODE_ENV!==`production`&&t==null)throw Error(`Typed array data must specify dimension size`);this._offset=0,this._dimSize=t,this._data=r}Jf(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;Jf=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=qf[ap(o,s)];process.env.NODE_ENV!==`production`&&X(u,`Invalide sourceFormat: `+o),z(e,u),o===xf?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=W(Qf(o,s),null,i,c,l),e.count=W(tp(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t=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};qf=(e={},e[vf+`_`+Cf]={pure:!0,appendData:i},e[vf+`_`+wf]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[yf]={pure:!0,appendData:i},e[bf]={pure:!0,appendData:function(e){var t=this._data;H(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[_f]={appendData:i},e[xf]={persistent:!1,pure:!0,appendData:function(e){process.env.NODE_ENV!==`production`&&X(ke(e),`Added data must be TypedArray if data in initialization is TypedArray`),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}(),Xf=function(e,t,n,r){return e[r]},Zf=(Wf={},Wf[vf+`_`+Cf]=function(e,t,n,r){return e[r+t]},Wf[vf+`_`+wf]=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},Wf[yf]=Xf,Wf[bf]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name;if(process.env.NODE_ENV!==`production`&&s==null)throw Error();var c=e[s];a[o]=c?c[r]:null}return a},Wf[_f]=Xf,Wf);function Qf(e,t){var n=Zf[ap(e,t)];return process.env.NODE_ENV!==`production`&&X(n,`Do not support get item on "`+e+`", "`+t+`".`),n}var $f=function(e,t,n){return e.length},ep=(Gf={},Gf[vf+`_`+Cf]=function(e,t,n){return Math.max(0,e.length-t)},Gf[vf+`_`+wf]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},Gf[yf]=$f,Gf[bf]=function(e,t,n){var r=n[0].name;if(process.env.NODE_ENV!==`production`&&r==null)throw Error();var i=e[r];return i?i.length:0},Gf[_f]=$f,Gf);function tp(e,t){var n=ep[ap(e,t)];return process.env.NODE_ENV!==`production`&&X(n,`Do not support count on "`+e+`", "`+t+`".`),n}var np=function(e,t,n){return e[t]},rp=(Kf={},Kf[vf]=np,Kf[yf]=function(e,t,n){return e[n]},Kf[bf]=np,Kf[_f]=function(e,t,n){var r=ws(e);return r instanceof Array?r[t]:r},Kf[xf]=np,Kf);function ip(e){var t=rp[e];return process.env.NODE_ENV!==`production`&&X(t,`Do not support get value on "`+e+`".`),t}function ap(e,t){return e===vf?e+`_`+t:e}function op(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 ip(a)(r,o,s)}else{var c=r;return a===_f&&(c=ws(r)),c}}}}var sp=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._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},e}();function cp(e,t){var n={},r=n.encode={},i=Z(),a=[],o=[],s={};H(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){process.env.NODE_ENV!==`production`&&X(gf.get(c)==null);var l=n.coordDimIndex;lp(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),dp(n.type)&&(a[0]=t),lp(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}gf.each(function(e,t){var i=lp(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=U(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 sp(s,t),n}function lp(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function up(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function dp(e){return!(e===`ordinal`||e===`time`)}var fp=function(){function e(e){this.otherDims={},e!=null&&z(this,e)}return e}(),pp=fp;function mp(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!De(e)&&e!=null&&e!==`-`&&(e=+Qo(e)),e==null||e===``?NaN:Number(e))}var hp=Z({number:function(e){return parseFloat(e)},time:function(e){return+Qo(e)},trim:function(e){return q(e)?ze(e):e}}),gp={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}},_p=function(){function e(e,t){if(!De(t)){var n=``;process.env.NODE_ENV!==`production`&&(n=`rvalue of "<", ">", "<=", ">=" can only be number in filter.`),_s(n)}this._opFn=gp[e],this._rvalFloat=ns(t)}return e.prototype.evaluate=function(e){return De(e)?this._opFn(e,this._rvalFloat):this._opFn(ns(e),this._rvalFloat)},e}(),vp=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??(t=n?`min`:`max`),this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=De(e)?e:ns(e),r=De(t)?t:ns(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}(),yp=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ns(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=ns(e)===this._rvalFloat)}return this._isEQ?t:!t},e}(),bp=`undefined`,xp=typeof Uint32Array===bp?Array:Uint32Array,Sp=typeof Uint16Array===bp?Array:Uint16Array,Cp=typeof Int32Array===bp?Array:Int32Array,wp=typeof Float64Array===bp?Array:Float64Array,Tp={float:wp,int:Cp,ordinal:Array,number:Array,time:wp},Ep;function Dp(e){return e>65535?xp:Sp}function Op(){return[1/0,-1/0]}function kp(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Ap(e,t,n,r,i){var a=Tp[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 jp=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Z()}return e.prototype.initData=function(e,t,n){process.env.NODE_ENV!==`production`&&X(K(e.getItem)&&K(e.count),`Invalid data provider.`),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=Ep[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];var a=Uf(r);this._dimensions=U(t,function(e){return process.env.NODE_ENV!==`production`&&a&&X(e.property!=null),{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 Tp[t||`float`](this._rawCount),this._rawExtent[i]=Op(),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]=Op());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){process.env.NODE_ENV!==`production`&&X(!this._indices,`appendData can only be called on raw data.`);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];Ap(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=Ep.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=U(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Op()),Ap(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)});var n=t.sort(function(e,t){return e-t}),r=this.count();return r===0?0:r%2==1?n[(r-1)/2]:(n[r/2]+n[r/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.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(!r)return i;n??(n=1/0);for(var a=1/0,o=-1,s=0,c=0,l=this.count();c<l;c++){var u=t-r[this.getRawIndex(c)],d=Math.abs(u);d<=n&&((d<a||d===a&&u>=0&&o<0)&&(a=d,o=u,s=0),u===o&&(i[s++]=c))}return i.length=s,i},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=Dp(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(Dp(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=Ce(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Dp(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]]=Op();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(Dp(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(Dp(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]=Op(),d=new(Dp(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++)o[m]=c[this.getRawIndex(p+m)];var h=n(o),g=this.getRawIndex(Math.min(p+r(o,h)||0,l-1));c[g]=h,h<u[0]&&(u[0]=h),h>u[1]&&(u[1]=h),d[f++]=g}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){var t=this._chunks[e],n=Op();if(!t)return n;var r=this.count(),i=!this._indices,a;if(i)return this._rawExtent[e].slice();if(a=this._extent[e],a)return a.slice();a=n;for(var o=a[0],s=a[1],c=0;c<r;c++){var l=t[this.getRawIndex(c)];l<o&&(o=l),l>s&&(s=l)}return a=[o,s],this._extent[e]=a,a},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&&xe(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?kp(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=L(this._extent),e._rawExtent=L(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 mp(e[r],this._dimensions[r])}Ep={arrayRows:e,objectRows:function(e,t,n,r){return mp(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return mp(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Mp=jp,Np=Us(),Pp={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Fp=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||(this._dimNameMap=Rp(this.source)))},e.prototype.getSourceDimensionIndex=function(e){return Y(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=Uf(this.source),n=!zp(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+=Pp[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 Ip(e){return e instanceof Fp}function Lp(e){for(var t=Z(),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 Rp(e){var t=Np(e);return t.dimNameMap||(t.dimNameMap=Lp(e.dimensionsDefine))}function zp(e){return e>30}var Bp=J,Vp=U,Hp=typeof Int32Array>`u`?Array:Int32Array,Up=`e\0\0`,Wp=-1,Gp=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Kp=[`_approximateExtent`],qp,Jp,Yp,Xp,Zp,Qp,$p,em=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;Ip(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=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 pp({name:u}):u instanceof pp?u:new pp(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]=[]),p.itemName===0&&(this._nameDimIdx=l),p.itemId===0&&(this._idDimIdx=l),process.env.NODE_ENV!==`production`&&X(r||d.storeDimIndex>=0),r&&(d.storeDimIndex=l)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=Z();H(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(De(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);if(process.env.NODE_ENV!==`production`&&t==null)throw Error(`Unknown dimension `+e);return t},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 Mp&&(i=e),!i){var a=this.dimensions,o=Pf(e)||be(e)?new Yf(e,a.length):e;i=new Mp;var s=Vp(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=cp(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&&$p(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!==xf&&!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===_f&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&Ts(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=Fs(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=Fs(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)$p(this,o);qp(this)}},e.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},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){Bp(e)?z(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=Yp(this,this._nameDimIdx,t)),n??(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 Jp(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))},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 G(e)?r.getValues(Vp(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];if(process.env.NODE_ENV!==`production`&&!n)throw Error(`Do not supported yet`);var r=n&&n[t];return r==null||isNaN(r)?Wp:r},e.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},e.prototype.each=function(e,t,n){"use strict";K(e)&&(n=t,t=e,e=[]);var r=n||this,i=Vp(Xp(e),this._getStoreDimIndex,this);this._store.each(i,r?W(t,r):t)},e.prototype.filterSelf=function(e,t,n){"use strict";K(e)&&(n=t,t=e,e=[]);var r=n||this,i=Vp(Xp(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?W(t,r):t),this},e.prototype.selectRange=function(e){"use strict";var t=this,n={},r=Ce(e),i=[];return H(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){"use strict";K(e)&&(n=t,t=e,e=[]),n=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){"use strict";var i=n||r||this,a=Vp(Xp(e),this._getStoreDimIndex,this),o=Qp(this);return o._store=this._store.map(a,i?W(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=this,a=n||r||this;process.env.NODE_ENV!==`production`&&H(Xp(e),function(e){i.getDimensionInfo(e).isCalculationCoord||console.error(`Danger: only stack dimension can be modified`)});var o=Vp(Xp(e),this._getStoreDimIndex,this);this._store.modify(o,a?W(t,a):t)},e.prototype.downSample=function(e,t,n,r){var i=Qp(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=Qp(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=Qp(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 df(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new hf(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Jp(e,t)},function(e){return Jp(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||{},Bp(e)?z(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||(r=n[e]={});var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Bp(i)&&(i=z({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Bp(t)?z(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Bp(e)?z(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?z(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){tc(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){H(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Vp(this.dimensions,this._getDimInfo,this),this.hostModel)),Zp(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Le(arguments)))})},e.internalField=function(){qp=function(e){var t=e._invertedIndicesMap;H(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Hp(a.categories.length);for(var s=0;s<n.length;s++)n[s]=Wp;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},Yp=function(e,t,n){return Fs(e._getCategory(t,n),null)},Jp=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=Yp(e,e._idDimIdx,t)),n??(n=Up+t),n},Xp=function(e){return G(e)||(e=e==null?[]:[e]),e},Qp=function(t){var n=new e(t._schema?t._schema:Vp(t.dimensions,t._getDimInfo,t),t.hostModel);return Zp(n,t),n},Zp=function(e,t){H(Gp.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,H(Kp,function(n){e[n]=L(t[n])}),e._calculationInfo=z({},t._calculationInfo)},$p=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=Yp(e,i,t)),s==null&&a!=null&&(r[t]=s=Yp(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}(),tm=em;function nm(e,t){Pf(e)||(e=If(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Z(),a=[],o=im(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&zp(o),c=r===e.dimensionsDefine,l=c?Rp(e):Lp(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Z(u),f=new Cp(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 pp,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=xs(e).slice();if(n.length===1&&!q(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);H(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;H(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=z({},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=xs(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++)}H(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(B(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&&B(o.otherDims,r)})}});function g(e,t,n){gf.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.name=e.coordDim)}if(s)H(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=am(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(jf(e,S)===Tf.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return rm(a),new Fp({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function rm(e){for(var t=Z(),n=0;n<e.length;n++){var r=e[n],i=r.name,a=t.get(i)||0;a>0&&(r.name=i+(a-1)),a++,t.set(i,a)}}function im(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return H(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function am(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 om={},sm=function(){function e(){this._coordinateSystems=[]}return e.prototype.create=function(e,t){var n=[];H(om,function(r,i){var a=r.create(e,t);n=n.concat(a||[])}),this._coordinateSystems=n},e.prototype.update=function(e,t){H(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},e.register=function(e,t){om[e]=t},e.get=function(e){return om[e]},e}(),cm=sm,lm=function(){function e(e){this.coordSysDims=[],this.axisMap=Z(),this.categoryAxisMap=Z(),this.coordSysName=e}return e}();function um(e){var t=e.get(`coordinateSystem`),n=new lm(t),r=dm[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dm={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,qs).models[0],a=e.getReferringComponents(`yAxis`,qs).models[0];if(process.env.NODE_ENV!==`production`){if(!i)throw Error(`xAxis "`+Fe(e.get(`xAxisIndex`),e.get(`xAxisId`),0)+`" not found`);if(!a)throw Error(`yAxis "`+Fe(e.get(`xAxisIndex`),e.get(`yAxisId`),0)+`" not found`)}t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),fm(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),fm(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,qs).models[0];if(process.env.NODE_ENV!==`production`&&!i)throw Error(`singleAxis should be specified.`);t.coordSysDims=[`single`],n.set(`single`,i),fm(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,qs).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);if(process.env.NODE_ENV!==`production`){if(!o)throw Error(`angleAxis option not found`);if(!a)throw Error(`radiusAxis option not found`)}t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),fm(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),fm(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??(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();H(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),fm(s)&&(r.set(c,s),t.firstCategoryDimIndex??(t.firstCategoryDimIndex=a))})}};function fm(e){return e.get(`type`)===`category`}function pm(e,t,n){n=n||{};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;mm(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f;if(H(a,function(e,t){q(e)&&(a[t]=e={name:e}),c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&e.type!==`ordinal`&&e.type!==`time`&&(!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 p=u.coordDim,m=u.type,h=0;H(a,function(e){e.coordDim===p&&h++});var g={name:d,coordDim:p,coordDimIndex:h,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:f,coordDim:f,coordDimIndex:h+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),o.appendCalculationDimension(g),o.appendCalculationDimension(_)):(a.push(g),a.push(_))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function mm(e){return!Ip(e.schema)}function hm(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function gm(e,t){return hm(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function _m(e,t){var n=e.get(`coordinateSystem`),r=cm.get(n),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=up(r.get(`type`))),n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`]),i}function vm(e,t,n){var r,i;return n&&H(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??(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 ym(e,t,n){n=n||{};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=If(e)):(i=r.getSource(),a=i.sourceFormat===_f);var o=um(t),s=_m(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?Te(Of,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=nm(i,u),f=vm(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=pm(t,{schema:d,store:p}),h=new tm(d,t);h.setCalculationInfo(m);var g=f!=null&&bm(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 bm(e){if(e.sourceFormat===_f)return!G(ws(xm(e.data||[])))}function xm(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var Sm=ym,Cm=Math.round(Math.random()*10);function wm(e){return[e||``,Cm++].join(`_`)}function Tm(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=at(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=at(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Em(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(H(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]),H(u.successor,d?p:f)}H(c,function(){var n=``;throw process.env.NODE_ENV!==`production`&&(n=gs(`Circular dependency may exists: `,c,e,t)),Error(n)});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 H(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),H(c,function(e){V(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);V(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 H(e,function(e){V(t,e)>=0&&n.push(e)}),n}}function Dm(e,t){return R(R({},e,!0),t,!0)}var Om=Math.log(2);function km(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)/Om);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]*km(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function Am(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=km(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)*km(n,7,o===0?1: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 jm=`___zrEVENTSAVED`,Mm=[];function Nm(e,t,n,r,i){return Pm(Mm,t,r,i,!0)&&Pm(e,n,Mm[0],Mm[1])}function Pm(e,t,n,r,i){if(t.getBoundingClientRect&&Q.domSupported&&!Lm(t)){var a=t[jm]||(t[jm]={}),o=Im(Fm(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Fm(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 n}function Im(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?Am(s,o):Am(o,s))}function Lm(e){return e.nodeName.toUpperCase()===`CANVAS`}var Rm=/([&<>"'])/g,zm={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Bm(e){return e==null?``:(e+``).replace(Rm,function(e,t){return zm[t]})}var Vm={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:`. `}}}},Hm={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:``}}}},Um=`ZH`,Wm=`EN`,Gm=Wm,Km={},qm={},Jm=Q.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Gm).toUpperCase().indexOf(Um)>-1?Um:Gm}():Gm;function Ym(e,t){e=e.toUpperCase(),qm[e]=new df(t),Km[e]=t}function Xm(e){if(q(e)){var t=Km[e.toUpperCase()]||{};return e===Um||e===Wm?L(t):R(L(t),L(Km[Gm]),!1)}else return R(L(e),L(Km[Gm]),!1)}function Zm(e){return qm[e]}function Qm(){return qm[Gm]}Ym(Wm,Vm),Ym(Um,Hm);var $m=1e3,eh=$m*60,th=eh*60,nh=th*24,rh=nh*365,ih={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`,none:`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`},ah=`{yyyy}-{MM}-{dd}`,oh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:ah,hour:ah+` `+ih.hour,minute:ah+` `+ih.minute,second:ah+` `+ih.second,millisecond:ih.none},sh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],ch=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function lh(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function uh(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 dh(e){return e===uh(e)}function fh(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function ph(e,t,n,r){var i=Qo(e),a=i[_h(n)](),o=i[vh(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[yh(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[bh(n)](),d=(u-1)%12+1,f=i[xh(n)](),p=i[Sh(n)](),m=i[Ch(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof df?r:Zm(r||Jm)||Qm()).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,lh(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,lh(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,lh(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,lh(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,lh(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,lh(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,lh(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,lh(m,3)).replace(/{S}/g,m+``)}function mh(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n))a=n(e.value,t,{level:e.level});else{var o=z({},ih);if(e.level>0)for(var s=0;s<sh.length;++s)o[sh[s]]=`{primary|`+o[sh[s]]+`}`;var c=n?n.inherit===!1?n:B(n,o):o,l=hh(e.value,i);if(c[l])a=c[l];else if(c.inherit){for(var s=ch.indexOf(l)-1;s>=0;--s)if(c[l]){a=c[l];break}a=a||o.none}if(G(a)){var u=e.level==null?0:e.level>=0?e.level:a.length+e.level;u=Math.min(u,a.length-1),a=a[u]}}return ph(new Date(e.value),a,i,r)}function hh(e,t){var n=Qo(e),r=n[vh(t)]()+1,i=n[yh(t)](),a=n[bh(t)](),o=n[xh(t)](),s=n[Sh(t)](),c=n[Ch(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 gh(e,t,n){var r=De(e)?Qo(e):e;switch(t=t||hh(e,n),t){case`year`:return r[_h(n)]();case`half-year`:return r[vh(n)]()>=6?1:0;case`quarter`:return Math.floor((r[vh(n)]()+1)/4);case`month`:return r[vh(n)]();case`day`:return r[yh(n)]();case`half-day`:return r[bh(n)]()/24;case`hour`:return r[bh(n)]();case`minute`:return r[xh(n)]();case`second`:return r[Sh(n)]();case`millisecond`:return r[Ch(n)]()}}function _h(e){return e?`getUTCFullYear`:`getFullYear`}function vh(e){return e?`getUTCMonth`:`getMonth`}function yh(e){return e?`getUTCDate`:`getDate`}function bh(e){return e?`getUTCHours`:`getHours`}function xh(e){return e?`getUTCMinutes`:`getMinutes`}function Sh(e){return e?`getUTCSeconds`:`getSeconds`}function Ch(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function wh(e){return e?`setUTCFullYear`:`setFullYear`}function Th(e){return e?`setUTCMonth`:`setMonth`}function Eh(e){return e?`setUTCDate`:`setDate`}function Dh(e){return e?`setUTCHours`:`setHours`}function Oh(e){return e?`setUTCMinutes`:`setMinutes`}function kh(e){return e?`setUTCSeconds`:`setSeconds`}function Ah(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function jh(e){if(!rs(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 Mh(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 Nh=Re;function Ph(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ze(e)?e:`-`}function a(e){return!!(e!=null&&!isNaN(e)&&isFinite(e))}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Qo(e):e;if(isNaN(+c)){if(s)return`-`}else return ph(c,r,n)}if(t===`ordinal`)return Ee(e)?i(e):De(e)&&a(e)?e+``:`-`;var l=ns(e);return a(l)?jh(l):Ee(e)?i(e):typeof e==`boolean`?e+``:`-`}var Fh=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Ih=function(e,t){return`{`+e+(t??``)+`}`};function Lh(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Fh[a];e=e.replace(Ih(o),Ih(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(Ih(Fh[c],s),n?Bm(l):l)}return e}function Rh(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:`+Bm(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Bm(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 zh(e,t){return t=t||`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Bh=H,Vh=[`left`,`right`,`top`,`bottom`,`width`,`height`],Hh=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Uh(e,t,n,r,i){var a=0,o=0;r??(r=1/0),i??(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 Wh=Uh,Gh=Te(Uh,`vertical`),Kh=Te(Uh,`horizontal`);function qh(e,t,n){n=Nh(n||0);var r=t.width,i=t.height,a=Ho(e.left,r),o=Ho(e.top,i),s=Ho(e.right,r),c=Ho(e.bottom,i),l=Ho(e.width,r),u=Ho(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;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a=a||0,o=o||0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new $(a+n[3],o+n[0],l,u);return m.margin=n,m}function Jh(e){var t=e.layoutMode||e.constructor.layoutMode;return J(t)?t:t?{type:t}:null}function Yh(e,t,n){var r=n&&n.ignoreSize;!G(r)&&(r=[r,r]);var i=o(Hh[0],0),a=o(Hh[1],1);l(Hh[0],e,i),l(Hh[1],e,a);function o(n,i){var a={},o=0,l={},u=0,d=2;if(Bh(n,function(t){l[t]=e[t]}),Bh(n,function(e){s(t,e)&&(a[e]=l[e]=t[e]),c(a,e)&&o++,c(l,e)&&u++}),r[i])return c(t,n[1])?l[n[2]]=null:c(t,n[2])&&(l[n[1]]=null),l;if(u===d||!o)return l;if(o>=d)return a;for(var f=0;f<n.length;f++){var p=n[f];if(!s(a,p)&&s(e,p)){a[p]=e[p];break}}return a}function s(e,t){return e.hasOwnProperty(t)}function c(e,t){return e[t]!=null&&e[t]!==`auto`}function l(e,t,n){Bh(e,function(e){t[e]=n[e]})}}function Xh(e){return Zh({},e)}function Zh(e,t){return t&&e&&Bh(Vh,function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e}var Qh=Us(),$h=function(e){A(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=wm(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Jh(this),r=n?Xh(e):{};R(e,t.getTheme().get(this.mainType)),R(e,this.getDefaultOption()),n&&Yh(e,r,n)},t.prototype.mergeOption=function(e,t){R(this.option,e,!0);var n=Jh(this);n&&Yh(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!st(e))return e.defaultOption;var t=Qh(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=R(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Ys(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get(`left`),top:e.get(`top`),right:e.get(`right`),bottom:e.get(`bottom`),width:e.get(`width`),height:e.get(`height`)}},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}(df);ut($h,df),ht($h),Tm($h),Em($h,eg);function eg(e){var t=[];return H($h.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return at(e).main}),e!==`dataset`&&V(t,`dataset`)<=0&&t.unshift(`dataset`),t}var tg=$h,ng=Us(),rg=Us(),ig=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=xs(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return sg(this,ng,r,i,e,t,n)},e.prototype.clearColorPalette=function(){cg(this,ng)},e}();function ag(e,t,n,r){return sg(e,rg,xs(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function og(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 sg(e,t,n,r,i,a,o){a=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:og(r,o);if(u=u||n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function cg(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var lg=/\{@(.+?)\}/g,ug=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=t||`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||(i=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`])),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return Lh(i,s).replace(lg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1),process.env.NODE_ENV!==`production`&&isNaN(i)&&ps(`Invalide label formatter: @`+n+`, only support @[0], @[1], @[2], ...`));var s=op(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return op(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function dg(e){var t,n;return J(e)?e.type?n=e:process.env.NODE_ENV!==`production`&&console.warn("The return type of `formatTooltip` is not supported: "+gs(e)):t=e,{text:t,frag:n}}function fg(e){return new pg(e)}var pg=function(){function e(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(t?(process.env.NODE_ENV!==`production`&&X(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(process.env.NODE_ENV!==`production`&&X(!this._progress||this._count),this._dueEnd=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(G(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;process.env.NODE_ENV!==`production`&&X(g>=this._outputDueEnd),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){mg.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:mg.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),G(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){process.env.NODE_ENV!==`production`&&X(e&&!e._disposed&&e!==this),(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,this._disposed=!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}(),mg=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}}(),hg=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 mp(e,t)},e}();function gg(e,t){var n=new hg,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex,o=``;e.seriesLayoutBy!==Cf&&(process.env.NODE_ENV!==`production`&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),_s(o));var s=[],c={},l=e.dimensionsDefine;if(l)H(l,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};if(s.push(r),n!=null){var i=``;Xe(c,n)&&(process.env.NODE_ENV!==`production`&&(i=`dimension name "`+n+`" duplicated.`),_s(i)),c[n]=r}});else for(var u=0;u<e.dimensionsDetectedCount;u++)s.push({index:u});var d=Qf(i,Cf);t.__isBuiltIn&&(n.getRawDataItem=function(e){return d(r,a,s,e)},n.getRawData=W(_g,null,e)),n.cloneRawData=W(vg,null,e),n.count=W(tp(i,Cf),null,r,a,s);var f=ip(i);n.retrieveValue=function(e,t){return p(d(r,a,s,e),t)};var p=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=s[t];if(n)return f(e,t,n.name)}};return n.getDimensionInfo=W(yg,null,s,c),n.cloneAllDimensionInfo=W(bg,null,s),n}function _g(e){var t=e.sourceFormat;if(!Tg(t)){var n=``;process.env.NODE_ENV!==`production`&&(n="`getRawData` is not supported in source format "+t),_s(n)}return e.data}function vg(e){var t=e.sourceFormat,n=e.data;if(!Tg(t)){var r=``;process.env.NODE_ENV!==`production`&&(r="`cloneRawData` is not supported in source format "+t),_s(r)}if(t===vf){for(var i=[],a=0,o=n.length;a<o;a++)i.push(n[a].slice());return i}else if(t===yf){for(var i=[],a=0,o=n.length;a<o;a++)i.push(z({},n[a]));return i}}function yg(e,t,n){if(n!=null){if(De(n)||!isNaN(n)&&!Xe(t,n))return e[n];if(Xe(t,n))return t[n]}}function bg(e){return L(e)}var xg=Z();function Sg(e){e=L(e);var t=e.type,n=``;t||(process.env.NODE_ENV!==`production`&&(n="Must have a `type` when `registerTransform`."),_s(n));var r=t.split(`:`);r.length!==2&&(process.env.NODE_ENV!==`production`&&(n=`Name must include namespace like "ns:regression".`),_s(n));var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,xg.set(t,e)}function Cg(e,t,n){var r=xs(e),i=r.length,a=``;i||(process.env.NODE_ENV!==`production`&&(a="If `transform` declared, it should at least contain one transform."),_s(a));for(var o=0,s=i;o<s;o++){var c=r[o];t=wg(c,t,n,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function wg(e,t,n,r){var i=``;t.length||(process.env.NODE_ENV!==`production`&&(i=`Must have at least one upstream dataset.`),_s(i)),J(e)||(process.env.NODE_ENV!==`production`&&(i=`transform declaration must be an object rather than `+typeof e+`.`),_s(i));var a=e.type,o=xg.get(a);o||(process.env.NODE_ENV!==`production`&&(i=`Can not find transform on type "`+a+`".`),_s(i));var s=U(t,function(e){return gg(e,o)}),c=xs(o.transform({upstream:s[0],upstreamList:s,config:L(e.config)}));return process.env.NODE_ENV!==`production`&&e.print&&ds(U(c,function(e){var t=r==null?``:` === pipe index: `+r;return[`=== dataset index: `+n.datasetIndex+t+` ===`,`- transform result data:`,gs(e.data),`- transform result dimensions:`,gs(e.dimensions)].join(`
|
|
13
|
-
`)}).join(`
|
|
14
|
-
`)),U(c,function(e,n){var r=``;J(e)||(process.env.NODE_ENV!==`production`&&(r=`A transform should not return some empty results.`),_s(r)),e.data||(process.env.NODE_ENV!==`production`&&(r=`Transform result data should be not be null or undefined`),_s(r)),Tg(Rf(e.data))||(process.env.NODE_ENV!==`production`&&(r=`Transform result data should be array rows or object rows.`),_s(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:Cf,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:Cf,sourceHeader:0,dimensions:e.dimensions};return Ff(e.data,i,null)})}function Tg(e){return e===vf||e===yf}var Eg=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(Dg(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=ke(o)?xf:_f,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Ff(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=[Ff(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}process.env.NODE_ENV!==`production`&&X(r&&i),this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);if(process.env.NODE_ENV!==`production`&&X(r!=null||n!=null),r!=null){var i=``;e.length!==1&&(process.env.NODE_ENV!==`production`&&(i="When using `fromTransformResult`, there should be only one upstream dataset"),Og(i))}var a,o=[],s=[];return H(e,function(e){e.prepareSource();var t=e.getSource(r||0),n=``;r!=null&&!t&&(process.env.NODE_ENV!==`production`&&(n="Can not retrieve result by `fromTransformResult`: "+r),Og(n)),o.push(t),s.push(e._getVersionSign())}),n?a=Cg(n,o,{datasetIndex:t.componentIndex}):r!=null&&(a=[Lf(o[0])]),{sourceList:a,upstreamSignList:s}},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=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){process.env.NODE_ENV!==`production`&&X(Dg(this._sourceHost),`Can only call getDataStore on series source manager.`);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||(a=i[r]={});var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];Dg(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new Mp,o.initData(new Yf(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Dg(e)){var t=kf(e);return t?[t.getSourceManager()]:[]}else return U(Af(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(Dg(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 Dg(e){return e.mainType===`series`}function Og(e){throw Error(e)}var kg=`line-height:1`;function Ag(e){var t=e.lineHeight;return t==null?kg:`line-height:`+Bm(t+``)+`px`}function jg(e,t){var n=e.color||`#6e7079`,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||`#464646`,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+Bm(r+``)+`px;color:`+Bm(n)+`;font-weight:`+Bm(i+``),valueStyle:`font-size:`+Bm(o+``)+`px;color:`+Bm(a)+`;font-weight:`+Bm(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var Mg=[0,10,20,30],Ng=[``,`
|
|
15
|
-
`,`
|
|
16
|
-
|
|
17
|
-
`,`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`];function Pg(e,t){return t.type=e,t}function Fg(e){return e.type===`section`}function Ig(e){return Fg(e)?Rg:zg}function Lg(e){if(Fg(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return H(e.blocks,function(e){var n=Lg(e);n>=t&&(t=n+ +(r&&(!n||Fg(e)&&!e.noHeader)))}),t}return 0}function Rg(e,t,n,r){var i=t.noHeader,a=Vg(Lg(t)),o=[],s=t.blocks||[];X(!s||G(s)),s=s||[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Xe(l,c)){var u=new vp(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}H(s,function(n,i){var s=t.valueFormatter,c=Ig(n)(s?z(z({},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):Hg(r,o.join(``),i?n:a.html);if(i)return d;var f=Ph(t.header,`ordinal`,e.useUTC),p=jg(r,e.renderMode).nameStyle,m=Ag(r);return e.renderMode===`richText`?Gg(e,f,p)+a.richText+d:Hg(r,`<div style="`+p+`;`+m+`;">`+Bm(f)+`</div>`+d,n)}function zg(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=G(e)?e:[e],U(e,function(e,t){return Ph(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||`#333`,i),f=a?``:Ph(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.dataIndex),h=!s||!a,g=!s&&a,_=jg(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:Gg(e,f,v))+(o?``:Kg(e,m,h,g,y)):Hg(r,(s?``:d)+(a?``:Ug(f,!s,v))+(o?``:Wg(m,h,g,y)),n)}}function Bg(e,t,n,r,i,a){if(e)return Ig(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Vg(e){return{html:Mg[e],richText:Ng[e]}}function Hg(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Ag(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function Ug(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+Bm(e)+`</span>`}function Wg(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],`<span style="`+i+`;`+r+`">`+U(e,function(e){return Bm(e)}).join(` `)+`</span>`}function Gg(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Kg(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(G(t)?t.join(` `):t,a)}function qg(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return zh(n)}function Jg(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var Yg=function(){function e(){this.richTextStyles={},this._nextStyleNameId=is()}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=Rh({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(process.env.NODE_ENV!==`production`&&X(r),this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?H(t,function(e){return z(n,e)}):z(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Xg(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=G(s),l=qg(t,n),u,d,f,p;if(o>1||c&&!o){var m=Zg(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=op(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Rs(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Pg(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Pg(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ze(y),value:u,valueType:d,dataIndex:n})].concat(f||[])})}function Zg(e,t,n,r,i){var a=t.getData(),o=xe(e,function(e,t,n){var r=a.getDimensionInfo(n);return e=e||r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?H(r,function(e){u(op(a,n,e),e)}):H(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Pg(`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 Qg=Us();function $g(e,t){return e.getName(t)||e.getId(t)}var e_=`__universalTransitionEnabled`,t_=function(e){A(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=fg({count:i_,reset:a_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Qg(this).sourceManager=new Eg(this)).prepareSource();var r=this.getInitialData(e,n);s_(r,this),this.dataTask.context.data=r,process.env.NODE_ENV!==`production`&&X(r,`getInitialData returned invalid data.`),Qg(this).dataBeforeProcessed=r,n_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Jh(this),r=n?Xh(e):{},i=this.subType;tg.hasClass(i)&&(i+=`Series`),R(e,t.getTheme().get(this.subType)),R(e,this.getDefaultOption()),Ss(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Yh(e,r,n)},t.prototype.mergeOption=function(e,t){e=R(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Jh(this);n&&Yh(this.option,e,n);var r=Qg(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);s_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Qg(this).dataBeforeProcessed=i,n_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ke(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&Ss(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=l_(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return Qg(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=l_(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Qg(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Z(e)},t.prototype.getSourceManager=function(){return Qg(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Qg(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.formatTooltip=function(e,t,n){return Xg({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Q.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=ig.prototype.getColorFromPalette.call(this,e,t,n);return i||(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=$g(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=Ce(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[$g(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this[e_])return!0;var e=this.option.universalTransition;return e?e===!0?!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=$g(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=$g(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 tg.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}(tg);ye(t_,ug),ye(t_,ig),ut(t_,tg);function n_(e){var t=e.name;Rs(e)||(e.name=r_(e)||t)}function r_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return H(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function i_(e){return e.model.getRawData().count()}function a_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),o_}function o_(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function s_(e,t){H(qe(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Te(c_,t))})}function c_(e,t){var n=l_(e);return n&&n.setOutputEnd((t||this).count()),t}function l_(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 u_=t_,d_=to.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()}}),f_=to.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()}}),p_=to.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()}}),m_=to.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()}}),h_={line:xu,rect:yo,roundRect:yo,square:yo,circle:zl,diamond:f_,pin:p_,arrow:m_,triangle:d_},g_={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}},__={};H(h_,function(e,t){__[t]=new e});var v_=to.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=nn(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=__[r];i||(r=`rect`,i=__[r]),g_[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function y_(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||`#fff`,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function b_(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?pd(e.slice(8),new $(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?fd(e.slice(7),{},new $(t,n,r,i),o?`center`:`cover`):new v_({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=y_,a&&c.setColor(a),c}function x_(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function S_(e,t){if(e!=null)return G(e)||(e=[e,e]),[Ho(e[0],t[0])||0,Ho(Y(e[1],e[0]),t[1])||0]}var C_=function(e){A(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){if(process.env.NODE_ENV!==`production`){var t=e.coordinateSystem;if(t!==`polar`&&t!==`cartesian2d`)throw Error(`Line not support coordinateSystem besides cartesian and polar`)}return Sm(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Il,n=b_(`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=b_(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=`#fff`,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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1},t}(u_),w_=C_;function T_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=op(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(op(e,t,n[o]));return a.join(` `)}}function E_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!G(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 D_=function(e){A(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){this.removeAll();var a=b_(e,-1,-1,2,2,null,i);a.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),a.drift=O_,this._symbolType=e,this.add(a)},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(){Lc(this.childAt(0))},t.prototype.downplay=function(){Rc(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=a!==this._symbolType,l=i&&i.disableAnimation;if(c){var u=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,u)}else{var d=this.childAt(0);d.silent=!1;var f={scaleX:s[0]/2,scaleY:s[1]/2};l?d.attr(f):Xu(d,f,o,n),nd(d)}if(this._updateCommon(e,n,s,r,i),c){var d=this.childAt(0);if(!l){var f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Zu(d,f,o,n)}}l&&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=Bd(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=S_(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 lo){var S=a.style;a.useStyle(z({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(z({},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;zd(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):T_(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),nl(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=ec(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&$u(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();$u(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return x_(e.getItemVisual(t,`symbolSize`))},t}(Il);function O_(e,t){this.parent.drift(e,t)}var k_=D_;function A_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function j_(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function M_(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:Bd(t),cursorStyle:t.get(`cursor`)}}var N_=function(){function e(e){this.group=new Il,this._SymbolCtor=e||k_}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=j_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=M_(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);if(A_(e,i,r,t)){var o=new a(e,r,s,c);o.setPosition(i),e.setItemGraphicEl(r,o),n.add(o)}}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!A_(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):Xu(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(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=M_(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=j_(n);function r(e){e.isGroup||(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(A_(t,a,i,n)){var o=new this._SymbolCtor(t,i,this._seriesScope);o.traverse(r),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},e.prototype.eachRendered=function(e){Fd(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}(),P_=N_;function F_(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=I_(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=s===`x`||s===`radius`?1:0,d=U(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return hm(t,d[0])&&(f=!0,d[0]=p),hm(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 I_(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:De(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function L_(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)}var R_=typeof Float32Array<`u`,z_=R_?Float32Array:Array;function B_(e){return G(e)?R_?new Float32Array(e):e:new z_(e)}function V_(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 H_(e,t,n,r,i,a,o,s){for(var c=V_(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=F_(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=L_(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=B_(M),P=B_(M),ee=B_(M),te=B_(M),ne=[],y=0;y<m.length;y++){var re=m[y],ie=y*2,ae=re*2;N[ie]=l[ae],N[ie+1]=l[ae+1],P[ie]=u[ae],P[ie+1]=u[ae+1],ee[ie]=d[ae],ee[ie+1]=d[ae+1],te[ie]=f[ae],te[ie+1]=f[ae+1],ne[y]=p[re]}return{current:N,next:P,stackedOnCurrent:ee,stackedOnNext:te,status:ne}}var U_=Math.min,W_=Math.max;function G_(e,t){return isNaN(e)||isNaN(t)}function K_(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(G_(_,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(;G_(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||G_(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,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var ne=D>0?1:-1;p=_,m=v-ne*P*o,O=_,k=v+ne*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=U_(O,W_(S,_)),k=U_(k,W_(C,v)),O=W_(O,U_(S,_)),k=W_(k,U_(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=U_(p,W_(l,_)),m=U_(m,W_(u,v)),p=W_(p,U_(l,_)),m=W_(m,U_(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var q_=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),J_=function(e){A(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:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new q_},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&G_(n[i*2-2],n[i*2-1]);i--);for(;r<i&&G_(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=K_(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=ka.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?or(i,u,f,m,e,s):or(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?ir(a,d,p,h,b):ir(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(to),Y_=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(q_),X_=function(e){A(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 Y_},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&&G_(n[a*2-2],n[a*2-1]);a--);for(;i<a&&G_(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=K_(e,n,i,a,a,1,t.smooth,o,t.connectNulls);K_(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(to);function Z_(){var e=Us();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 Q_=Us(),$_=Z_(),ev=function(){function e(){this.group=new Il,this.uid=wm(`viewChart`),this.renderTask=fg({plan:rv,reset:iv}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){if(process.env.NODE_ENV!==`production`)throw Error(`render method must been implemented`)},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);if(!i){process.env.NODE_ENV!==`production`&&ps(`Unknown dataType `+r.dataType);return}nv(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);if(!i){process.env.NODE_ENV!==`production`&&ps(`Unknown dataType `+r.dataType);return}nv(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.updateLayout=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){Fd(this.group,e)},e.markUpdateMethod=function(e,t){Q_(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function tv(e,t,n){e&&cl(e)&&(t===`emphasis`?Lc:Rc)(e,n)}function nv(e,t,n){var r=Hs(e,t),i=t&&t.highlightKey!=null?ll(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){tv(e,n,i)}):H(xs(r),function(t){tv(e.getItemGraphicEl(t),n,i)})}ct(ev,[`dispose`]),ht(ev);function rv(e){return $_(e.model)}function iv(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&Q_(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),av[c]}var av={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)}}},ov=ev;function sv(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 yo({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=K(i)?function(e){i(e,d)}:null;Zu(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function cv(e,t,n){var r=e.getArea(),i=Uo(r.r0,1),a=Uo(r.r,1),o=new ou({shape:{cx:Uo(e.cx,1),cy:Uo(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,Zu(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function lv(e,t,n,r,i){if(e){if(e.type===`polar`)return cv(e,t,n);if(e.type===`cartesian2d`)return sv(e,t,n,r,i)}else return null;return null}function uv(e,t){return e.type===t}function dv(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function fv(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<e.length;){var o=e[a++],s=e[a++];isNaN(o)||(t=Math.min(o,t),r=Math.max(o,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function pv(e,t){var n=fv(e),r=n[0],i=n[1],a=fv(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(r[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function mv(e){return De(e)?e:e?.5:0}function hv(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=B_(r*2),a=0;a<r;a++){var o=L_(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function gv(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;!isNaN(p[c])&&!isNaN(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 _v(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Lr((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)),i=null),n.push(c),a=c}return n}function vv(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())){if(t.type!==`cartesian2d`){process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style is only supported on cartesian2d.`);return}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){process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style only support x or y dimension.`);return}var c=t.getAxis(i),l=U(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=_v(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`;H(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 Fu(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}function yv(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&bv(a,t))){var o=t.mapDimension(a.dim),s={};return H(a.getViewLabels(),function(e){var t=a.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function bv(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(k_.getSymbolSize(t,o)[e.isHorizontal()?1:0]*1.5>r)return!1;return!0}function xv(e,t){return isNaN(e)||isNaN(t)}function Sv(e){for(var t=e.length/2;t>0&&xv(e[t*2-2],e[t*2-1]);t--);return t-1}function Cv(e,t){return[e[t*2],e[t*2+1]]}function wv(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],!(isNaN(o)||isNaN(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 Tv(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<lc.length;t++)if(e.get([lc[t],`endLabel`,`show`]))return!0;return!1}function Ev(e,t,n,r){if(uv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Tv(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=sv(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}else return process.env.NODE_ENV!==`production`&&r.get([`endLabel`,`show`])&&console.warn(`endLabel is not supported for lines in polar systems.`),cv(t,n,r)}function Dv(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 Ov=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Il,t=new P_;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=W(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=F_(r,a,_),y=g&&hv(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&yv(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?!1: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=vv(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&&(y=gv(y,c,r,w,x)),c=gv(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,zh(E)),m.setClipPath(Ev(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,zh(E));var D=m.getClipPath();D?Zu(D,{shape:Ev(this,r,!1,e).shape},e):m.setClipPath(Ev(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]]}}),(!dv(this._stackedOnPoints,y)||!dv(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&(y=gv(y,c,r,w,x)),c=gv(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(B(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),ol(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}ec(f).seriesIndex=e.seriesIndex,nl(f,k,A,j);var N=mv(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(B(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=mv(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),ol(p,e,`areaStyle`),ec(p).seriesIndex=e.seriesIndex,nl(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_,e.get(`triggerLineEvent`)&&(this.packEventData(e,f),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){ec(t).eventData={componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Hs(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(isNaN(c)||isNaN(l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new k_(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 ov.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Hs(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 ov.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Oc(this._polyline,e),t&&Oc(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new J_({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 X_({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`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(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=K(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(Tv(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 Lo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=Sv(o);c>=0&&(zd(a,Bd(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?T_(i,e):E_(i,n)},enableTextSetter:!0},Dv(r,t)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=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=wv(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Cv(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=$s(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Cv(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Xd(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=H_(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=gv(u.stackedOnCurrent,u.current,n,i,o),d=gv(u.current,null,n,i,o),m=gv(u.stackedOnNext,u.next,n,i,o),p=gv(u.next,null,n,i,o)),pv(d,p)>3e3||c&&pv(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(),Xu(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Xu(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}(ov),kv=Ov;function Av(e,t){return{seriesType:e,plan:Z_(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=U(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);hm(n,o[0])&&(o[0]=c),hm(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&&B_(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)}}}}}}var jv={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]}},Mv=function(e){return Math.round(e.length/2)};function Nv(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=jv[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,Mv))}}}}}function Pv(e){e.registerChartView(kv),e.registerSeriesModel(w_),e.registerLayout(Av(`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,Nv(`line`))}var Fv=`__ec_stack_`;function Iv(e){return e.get(`stack`)||Fv+e.seriesIndex}function Lv(e){return e.dim+e.index}function Rv(e,t){var n=[];return t.eachSeriesByType(e,function(e){Gv(e)&&n.push(e)}),n}function zv(e){var t={};H(e,function(e){var n=e.coordinateSystem.getBaseAxis();if(!(n.type!==`time`&&n.type!==`value`))for(var r=e.getData(),i=n.dim+`_`+n.index,a=r.getDimensionIndex(r.mapDimension(n.dim)),o=r.getStore(),s=0,c=o.count();s<c;++s){var l=o.get(a,s);t[i]?t[i].push(l):t[i]=[l]}});var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(i){i.sort(function(e,t){return e-t});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}n[r]=a}}return n}function Bv(e){var t=zv(e),n=[];return H(e,function(e){var r=e.coordinateSystem.getBaseAxis(),i=r.getExtent(),a;if(r.type===`category`)a=r.getBandWidth();else if(r.type===`value`||r.type===`time`){var o=t[r.dim+`_`+r.index],s=Math.abs(i[1]-i[0]),c=r.scale.getExtent(),l=Math.abs(c[1]-c[0]);a=o?s/l*o:s}else{var u=e.getData();a=Math.abs(i[1]-i[0])/u.count()}var d=Ho(e.get(`barWidth`),a),f=Ho(e.get(`barMaxWidth`),a),p=Ho(e.get(`barMinWidth`)||(Kv(e)?.5:1),a),m=e.get(`barGap`),h=e.get(`barCategoryGap`);n.push({bandWidth:a,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:m,barCategoryGap:h,axisKey:Lv(r),stackId:Iv(e)})}),Vv(n)}function Vv(e){var t={};H(e,function(e,n){var r=e.axisKey,i=e.bandWidth,a=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:`20%`,stacks:{}},o=a.stacks;t[r]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var c=e.barWidth;c&&!o[s].width&&(o[s].width=c,c=Math.min(a.remainedWidth,c),a.remainedWidth-=c);var l=e.barMaxWidth;l&&(o[s].maxWidth=l);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;d!=null&&(a.gap=d);var f=e.barCategoryGap;f!=null&&(a.categoryGap=f)});var n={};return H(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,a=e.categoryGap;if(a==null){var o=Ce(r).length;a=Math.max(35-o*4,15)+`%`}var s=Ho(a,i),c=Ho(e.gap,1),l=e.remainedWidth,u=e.autoWidthCount,d=(l-s)/(u+(u-1)*c);d=Math.max(d,0),H(r,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,l-=r+c*r,u--}else{var r=d;t&&t<r&&(r=Math.min(t,l)),n&&n>r&&(r=n),r!==d&&(e.width=r,l-=r+c*r,u--)}}),d=(l-s)/(u+(u-1)*c),d=Math.max(d,0);var f=0,p;H(r,function(e,t){e.width||(e.width=d),p=e,f+=e.width*(1+c)}),p&&(f-=p.width*c);var m=-f/2;H(r,function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:m,width:e.width},m+=e.width*(1+c)})}),n}function Hv(e,t,n){if(e&&t){var r=e[Lv(t)];return r!=null&&n!=null?r[Iv(n)]:r}}function Uv(e,t){var n=Rv(e,t),r=Bv(n);H(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=Iv(e),a=r[Lv(n)][i],o=a.offset,s=a.width;t.setLayout({bandWidth:a.bandWidth,offset:o,size:s})})}function Wv(e){return{seriesType:e,plan:Z_(),reset:function(e){if(Gv(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=hm(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=qv(r,i),p=Kv(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&&B_(r*3),c=p&&s&&B_(r*3),l=p&&B_(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]);if(u){var M=n.dataToPoint([E,w]);T=M[0]}D=T,O=j[1]+_,k=j[0]-T,A=g,Math.abs(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);if(u){var M=n.dataToPoint([w,E]);T=M[1]}D=j[0]+_,O=T,k=g,A=j[1]-T,Math.abs(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 Gv(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function Kv(e){return e.pipelineContext&&e.pipelineContext.large}function qv(e,t){var n=t.model.get(`startValue`);return n||(n=0),t.toGlobalCoord(t.dataToCoord(t.type===`log`?n>0?n:1:n))}var Jv=function(e){A(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 Sm(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)H(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?1:0]);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}else 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()?0:1;a[l]+=s+c/2}return a}return[NaN,NaN]},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`},t}(u_);u_.registerClass(Jv);var Yv=Jv,Xv=function(e){A(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 Sm(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get(`progressiveThreshold`),t=this.get(`largeThreshold`);return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Dm(Yv.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:`#212121`}},realtimeSort:!1}),t}(Yv),Zv=Xv,Qv=`\0__throttleOriginMethod`,$v=`\0__throttleRate`,ey=`\0__throttleType`;function ty(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t=t||0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];r=new Date().getTime(),c=this,l=e;var p=u||t,m=u||n;u=null,s=r-(m?i:a)-p,clearTimeout(o),m?o=setTimeout(d,p):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(e){u=e},f}function ny(e,t,n,r){var i=e[t];if(i){var a=i[Qv]||i,o=i[ey];if(i[$v]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=ty(a,n,r===`debounce`),i[Qv]=a,i[ey]=r,i[$v]=n}return i}}function ry(e,t){var n=e[t];n&&n[Qv]&&(n.clear&&n.clear(),e[t]=n[Qv])}var iy=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}(),ay=function(e){A(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new iy},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}(to),oy=ay;function sy(e,t){t=t||{};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return nn(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)+ly(m,s+_,!1),x=u+p*y(m)+uy(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+ly(m,-s+_,!1),x=u+p*y(m)+uy(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)+ly(h,s+_,!0),x=u+p*y(h)+uy(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+ly(h,-s+_,!0),x=u+p*y(h)+uy(h,-s+_,!0),S=`right`,C=`middle`;break;default:return nn(t,r,i)}return t=t||{},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function cy(e,t,n,r){if(De(r)){e.setTextConfig({rotation:r});return}else if(G(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 ly(e,t,n){return t*Math.sin(e)*(n?-1:1)}function uy(e,t,n){return t*Math.cos(e)*(n?1:-1)}function dy(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;G(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(r,function(e){return tn(e,i)})}}var fy=Math.max,py=Math.min;function my(e,t){var n=e.getArea&&e.getArea();if(uv(e,`cartesian2d`)){var r=e.getBaseAxis();if(r.type!==`category`||!r.onBand){var i=t.getLayout(`bandWidth`);r.isHorizontal()?(n.x-=i,n.width+=i*2):(n.y-=i,n.height+=i*2)}}return n}var hy=function(e){A(t,e);function t(){var n=e.call(this)||this;return n.type=t.type,n._isFirstFrame=!0,n}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)):process.env.NODE_ENV!==`production`&&fs(`Only cartesian2d and polar supported for bar.`)},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){Fd(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=vy(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=my(s,a);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=wy[s.type](a,e),n=Fy(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=wy[s.type](a,t,n);if(h&&S(t),!(!a.hasValue(t)||!Cy[s.type](r))){var o=!1;f&&(o=gy[s.type](p,r));var g=_y[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),Dy(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?yy(d,u,g,r,t,l,!1,!1):Zu(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=wy[s.type](a,t,r);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=wy[s.type](a,t),E=Py(l,T,s);Xu(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!Cy[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=gy[s.type](p,C),O&&i.remove(D)),D?nd(D):D=_y[s.type](e,a,t,C,l,u,c.model,!!D,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=Xd(k);A.prevValue!=null&&(A.prevValue=A.value)}}else Dy(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?yy(d,u,D,C,t,l,!0,x):Xu(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&&td(n,e,t)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new Il);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(),jy(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),jy(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&lv(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=i??NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:U(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),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){td(t,e,ec(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}(ov),gy={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=fy(t.x,e.x),s=py(t.x+t.width,i),c=fy(t.y,e.y),l=py(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=py(t.r,e.r),a=fy(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}},_y={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new yo({shape:z({},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?oy:ou,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=sy(Ey(i),{isRoundCap:l===oy}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Xu:Zu)(u,{shape:p},a)}return u}};function vy(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(process.env.NODE_ENV!==`production`&&n&&(r.type!==`category`&&fs("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!==`cartesian2d`&&fs("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function yy(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?Xu:Zu)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Xu:Zu)(n,{shape:l},u,i)}function by(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var xy=[`x`,`y`,`width`,`height`],Sy=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],Cy={cartesian2d:function(e){return!by(e,xy)},polar:function(e){return!by(e,Sy)}},wy={cartesian2d:function(e,t,n){var r=e.getItemLayout(t),i=n?Oy(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 Ty(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function Ey(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 Dy(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(s){if(!a.get(`roundCap`)){var l=e.shape;z(l,dy(r.getModel(`itemStyle`),l,!0)),e.setShape(l)}}else{var u=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,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?i.height>=0?`bottom`:`top`:i.width>=0?`right`:`left`,p=Bd(r);zd(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:T_(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`?!0:null,cy(e,h===`outside`?f:h,Ey(o),r.get([`label`,`rotate`]))}Zd(m,p,a.getRawValue(n),function(e){return E_(t,e)});var g=r.getModel([`emphasis`]);nl(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),ol(e,r),Ty(i)&&(e.style.fill=`none`,e.style.stroke=`none`,H(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function Oy(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 ky=function(){function e(){}return e}(),Ay=function(e){A(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new ky},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}(to);function jy(e,t,n,r){var i=e.getData(),a=i.getLayout(`valueAxisHorizontal`)?1:0,o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`);if(l){var u=new Ay({shape:{points:l},incremental:!!r,silent:!0,z2:0});u.baseDimIdx=a,u.largeDataIndices=o,u.barWidth=s,u.useStyle(c.getItemStyle()),t.add(u),n&&n.push(u)}var d=new Ay({shape:{points:i.getLayout(`largePoints`)},incremental:!!r,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,t.add(d),d.useStyle(i.getVisual(`style`)),d.style.stroke=null,ec(d).seriesIndex=e.seriesIndex,e.get(`silent`)||(d.on(`mousedown`,My),d.on(`mousemove`,My)),n&&n.push(d)}var My=ty(function(e){var t=this,n=Ny(t,e.offsetX,e.offsetY);ec(t).dataIndex=n>=0?n:null},30,!1);function Ny(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 Py(e,t,n){if(uv(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}}else{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 Fy(e,t,n){return new(e.type===`polar`?ou:yo)({shape:Py(t,n,e),silent:!0,z2:0})}var Iy=hy;function Ly(e){e.registerChartView(Iy),e.registerSeriesModel(Zv),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Te(Uv,`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Wv(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Nv(`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)})})}function Ry(e,t,n,r,i){var a=e+t;n.isSilent(a)||(process.env.NODE_ENV!==`production`&&ms(`event `+a+` is deprecated.`),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=Hs(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:G(l)?c.getName(l[0]):c.getName(l),selected:q(r)?r:z({},r)})}}))}function zy(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(Ry(`map`,`selectchanged`,t,r,e),Ry(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(Ry(`map`,`selected`,t,r,e),Ry(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(Ry(`map`,`unselected`,t,r,e),Ry(`pie`,`unselected`,t,r,e))})}function By(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];if(!r.defaultAttr.ignore){var i=r.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,c=i.style.margin||0,l=o.clone();l.applyTransform(a),l.x-=c/2,l.y-=c/2,l.width+=c,l.height+=c;var u=s?new Uu(o,a):null;t.push({label:i,labelLine:r.labelLine,rect:l,localRect:o,obb:u,priority:r.priority,defaultAttr:r.defaultAttr,layoutOption:r.computedLayoutOption,axisAligned:s,transform:a})}}return t}function Vy(e){var t=[];e.sort(function(e,t){return t.priority-e.priority});var n=new $(0,0,0,0);function r(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??(t.ignore=!1)}e.ignore=!0}for(var i=0;i<e.length;i++){var a=e[i],o=a.axisAligned,s=a.localRect,c=a.transform,l=a.label,u=a.labelLine;n.copy(a.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var d=a.obb,f=!1,p=0;p<t.length;p++){var m=t[p];if(n.intersect(m.rect)){if(o&&m.axisAligned){f=!0;break}if(m.obb||(m.obb=new Uu(m.localRect,m.transform)),d||(d=new Uu(s,c)),d.intersect(m.obb)){f=!0;break}}}f?(r(l),u&&r(u)):(l.attr(`ignore`,a.defaultAttr.ignore),u&&u.attr(`ignore`,a.defaultAttr.labelGuideIgnore),t.push(a))}}var Hy=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Uy=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 Hy(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 Hy(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 Hy(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Hy(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Hy(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Hy(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),Wy=Uy,Gy=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ky=[],qy=Q.browser.firefox&&+Q.browser.version.split(`.`)[0]<39;function Jy(e,t,n,r){return n=n||{},r?Yy(e,t,n):qy&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Yy(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Yy(e,t,n){if(Q.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Lm(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(Pm(Ky,e,r,i)){n.zrX=Ky[0],n.zrY=Ky[1];return}}n.zrX=n.zrY=0}function Xy(e){return e||window.event}function Zy(e,t,n){if(t=Xy(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&&Jy(e,i,t,n)}else{Jy(e,t,t,n);var a=Qy(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Gy.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Qy(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=r===0?Math.abs(n):Math.abs(r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function $y(e,t,n,r){e.addEventListener(t,n,r)}function eb(e,t,n,r){e.removeEventListener(t,n,r)}var tb=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function nb(e){return e.which===2||e.which===3}var rb=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=Jy(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 ob)if(ob.hasOwnProperty(t)){var n=ob[t](this._track,e);if(n)return n}},e}();function ib(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function ab(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var ob={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=ib(r)/ib(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ab(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},sb=`silent`;function cb(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:lb}}function lb(){tb(this.event)}var ub=function(e){A(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}(gi),db=function(){function e(e,t){this.x=e,this.y=t}return e}(),fb=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],pb=new $(0,0,0,0),mb=function(e){A(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new db(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r=r||new ub,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Wy(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(H(fb,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=_b(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 db(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 db(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=e||{};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=cb(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 db(e,t);if(gb(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new $(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)&&(pb.copy(u.getBoundingRect()),u.transform&&pb.applyTransform(u.transform),pb.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(gb(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||(this._gestureMgr=new rb);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 db;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(gi);H([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){mb.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=_b(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||On(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function hb(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),r=r.__hostTarget||r.parent}return i?sb:!0}return!1}function gb(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=hb(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==sb)){t.target=o;break}}}function _b(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var vb=mb,yb=32,bb=7;function xb(e){for(var t=0;e>=yb;)t|=e&1,e>>=1;return e+t}function Sb(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++;Cb(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function Cb(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function wb(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 Tb(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 Eb(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 Db(e,t){var n=bb,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=Eb(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Tb(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=Eb(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=Tb(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>=bb||m>=bb);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-Eb(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-Tb(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>=bb||g>=bb);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 Ob(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var a=0;if(i<yb){a=Sb(e,n,r,t),wb(e,n,r,n+a,t);return}var o=Db(e,t),s=xb(i);do{if(a=Sb(e,n,r,t),a<s){var c=i;c>s&&(c=s),wb(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 kb=!1;function Ab(){kb||(kb=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function jb(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Mb=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=jb}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=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,Ob(n,jb)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,a=e;i;)i.parent=a,i.updateTransform(),t.push(i),a=i,i=i.getClipPath()}if(e.childrenRef){for(var o=e.childrenRef(),s=0;s<o.length;s++){var c=o[s];e.__dirty&&(c.__dirty|=Ci),this._updateAndAddDisplayable(c,t,n)}e.__dirty=0}else{var l=e;t&&t.length?l.__clipPaths=t:l.__clipPaths&&l.__clipPaths.length>0&&(l.__clipPaths=[]),isNaN(l.z)&&(Ab(),l.z=0),isNaN(l.z2)&&(Ab(),l.z2=0),isNaN(l.zlevel)&&(Ab(),l.zlevel=0),this._displayList[this._displayListLen++]=l}var u=e.getDecalElement&&e.getDecalElement();u&&this._updateAndAddDisplayable(u,t,n);var d=e.getTextGuideLine();d&&this._updateAndAddDisplayable(d,t,n);var f=e.getTextContent();f&&this._updateAndAddDisplayable(f,t,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=V(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}(),Nb=Mb,Pb=Q.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Fb=Pb;function Ib(){return new Date().getTime()}var Lb=function(e){A(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=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=Ib()-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&&(Fb(t),!e._paused&&e.update())}Fb(t)},t.prototype.start=function(){this._running||(this._time=Ib(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Ib(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Ib()-this._pauseStart,this._paused=!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=t||{},this.start();var n=new mi(e,t.loop);return this.addAnimator(n),n},t}(gi),Rb=Lb,zb=300,Bb=Q.domSupported,Vb=(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:U(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Hb={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ub=!1;function Wb(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Gb(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 Kb(e){e&&(e.zrByTouch=!0)}function qb(e,t){return Zy(e.dom,new Yb(e,t),!0)}function Jb(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 Yb=function(){function e(e,t){this.stopPropagation=Ze,this.stopImmediatePropagation=Ze,this.preventDefault=Ze,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Xb={mousedown:function(e){e=Zy(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Zy(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=Zy(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Zy(this.dom,e);var t=e.toElement||e.relatedTarget;Jb(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ub=!0,e=Zy(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ub||(e=Zy(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Zy(this.dom,e),Kb(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Xb.mousemove.call(this,e),Xb.mousedown.call(this,e)},touchmove:function(e){e=Zy(this.dom,e),Kb(e),this.handler.processGesture(e,`change`),Xb.mousemove.call(this,e)},touchend:function(e){e=Zy(this.dom,e),Kb(e),this.handler.processGesture(e,`end`),Xb.mouseup.call(this,e),new Date-+this.__lastTouchMoment<zb&&Xb.click.call(this,e)},pointerdown:function(e){Xb.mousedown.call(this,e)},pointermove:function(e){Wb(e)||Xb.mousemove.call(this,e)},pointerup:function(e){Xb.mouseup.call(this,e)},pointerout:function(e){Wb(e)||Xb.mouseout.call(this,e)}};H([`click`,`dblclick`,`contextmenu`],function(e){Xb[e]=function(t){t=Zy(this.dom,t),this.trigger(e,t)}});var Zb={pointermove:function(e){Wb(e)||Zb.mousemove.call(this,e)},pointerup:function(e){Zb.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 Qb(e,t){var n=t.domHandlers;Q.pointerEventsSupported?H(Vb.pointer,function(r){ex(t,r,function(t){n[r].call(e,t)})}):(Q.touchEventsSupported&&H(Vb.touch,function(r){ex(t,r,function(i){n[r].call(e,i),Gb(t)})}),H(Vb.mouse,function(r){ex(t,r,function(i){i=Xy(i),t.touching||n[r].call(e,i)})}))}function $b(e,t){Q.pointerEventsSupported?H(Hb.pointer,n):Q.touchEventsSupported||H(Hb.mouse,n);function n(n){function r(r){r=Xy(r),Jb(e,r.target)||(r=qb(e,r),t.domHandlers[n].call(e,r))}ex(t,n,r,{capture:!0})}}function ex(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,$y(e.domTarget,t,n,r)}function tx(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&eb(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var nx=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),rx=function(e){A(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 nx(t,Xb),Bb&&(r._globalHandlerScope=new nx(document,Zb)),Qb(r,r._localHandlerScope),r}return t.prototype.dispose=function(){tx(this._localHandlerScope),Bb&&tx(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,Bb&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?$b(this,t):tx(t)}},t}(gi),ix=rx,ax={},ox={};function sx(e){delete ox[e]}function cx(e){if(!e)return!1;if(typeof e==`string`)return zr(e,1)<yi;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=zr(t[i].color,1);return n/=r,n<yi}return!1}var lx=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var i=new Nb,a=n.renderer||`canvas`;if(ax[a]||(a=Ce(ax)[0]),process.env.NODE_ENV!==`production`&&!ax[a])throw Error(`Renderer '`+a+`' is not imported. Please import it first.`);n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new ax[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!Q.node&&!Q.worker&&!s?new ix(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?Q.touchEventsSupported:!!l,d=44,f;u&&(f=Y(n.pointerSize,d)),this.handler=new vb(i,o,c,o.root,f),this.animation=new Rb({stage:{update:s?null:function(){return r._flush(!0)}}}),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=cx(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||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!1)},e.prototype._flush=function(e){var t,n=Ib();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var r=Ib();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:r-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._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e=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 Il&&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,sx(this.id))},e}();function ux(e,t){var n=new lx(he(),e,t);return ox[n.id]=n,n}function dx(e,t){ax[e]=t}var fx;function px(e){}var mx=``;typeof navigator<`u`&&(mx=navigator.platform||``);var hx=`rgba(0, 0, 0, 0.2)`,gx={darkMode:`auto`,colorBy:`series`,color:[`#5470c6`,`#91cc75`,`#fac858`,`#ee6666`,`#73c0de`,`#3ba272`,`#fc8452`,`#9a60b4`,`#ea7ccc`],gradientColor:[`#f6efa6`,`#d88273`,`#bf444c`],aria:{decal:{decals:[{color:hx,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:hx,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:hx,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:hx,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:hx,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:hx,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:mx.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},_x=Z();function vx(e,t,n){var r=_x.get(t);if(!r)return n;var i=r(e);if(!i)return n;if(process.env.NODE_ENV!==`production`)for(var a=0;a<i.length;a++)X(zs(i[a]));return n.concat(i)}var yx,bx,xx,Sx=`\0_ec_inner`,Cx=1,Tx={grid:`GridComponent`,polar:`PolarComponent`,geo:`GeoComponent`,singleAxis:`SingleAxisComponent`,parallel:`ParallelComponent`,calendar:`CalendarComponent`,graphic:`GraphicComponent`,toolbox:`ToolboxComponent`,tooltip:`TooltipComponent`,axisPointer:`AxisPointerComponent`,brush:`BrushComponent`,title:`TitleComponent`,timeline:`TimelineComponent`,markPoint:`MarkPointComponent`,markLine:`MarkLineComponent`,markArea:`MarkAreaComponent`,legend:`LegendComponent`,dataZoom:`DataZoomComponent`,visualMap:`VisualMapComponent`,xAxis:`GridComponent`,yAxis:`GridComponent`,angleAxis:`PolarComponent`,radiusAxis:`PolarComponent`},Ex={line:`LineChart`,bar:`BarChart`,pie:`PieChart`,scatter:`ScatterChart`,radar:`RadarChart`,map:`MapChart`,tree:`TreeChart`,treemap:`TreemapChart`,graph:`GraphChart`,gauge:`GaugeChart`,funnel:`FunnelChart`,parallel:`ParallelChart`,sankey:`SankeyChart`,boxplot:`BoxplotChart`,candlestick:`CandlestickChart`,effectScatter:`EffectScatterChart`,lines:`LinesChart`,heatmap:`HeatmapChart`,pictorialBar:`PictorialBarChart`,themeRiver:`ThemeRiverChart`,sunburst:`SunburstChart`,custom:`CustomChart`},Dx={};function Ox(e){H(e,function(e,t){if(!tg.hasClass(t)){var n=Tx[t];n&&!Dx[n]&&(ps(`Component `+t+` is used but not imported.
|
|
21
|
-
import { `+n+` } from 'echarts/components';
|
|
22
|
-
echarts.use([`+n+`]);`),Dx[n]=!0)}})}var kx=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r=r||{},this.option=null,this._theme=new df(r),this._locale=new df(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){process.env.NODE_ENV!==`production`&&(X(e!=null,`option is null/undefined`),X(e[Sx]!==Cx,`please use chart.getOption()`));var r=Px(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Px(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);process.env.NODE_ENV!==`production`&&Ox(i),!this.option||e===`recreate`?xx(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&&H(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=Z(),s=t&&t.replaceMergeMainTypeMap;Df(this),H(e,function(e,t){e!=null&&(tg.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?L(e):R(n[t],e,!0))}),s&&s.each(function(e,t){tg.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),tg.topologicalTravel(a,tg.getAllClassMainTypes(),c,this);function c(t){var a=vx(this,t,xs(e[t])),o=r.get(t),c=Es(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Bs(c,t,tg),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f,p;H(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=tg.getClass(t,e.keyInfo.subType,!a);if(!o){if(process.env.NODE_ENV!==`production`){var s=e.keyInfo.subType,c=Ex[s];Dx[s]||(Dx[s]=!0,ps(c?`Series `+s+` is used but not imported.
|
|
23
|
-
import { `+c+` } from 'echarts/charts';
|
|
24
|
-
echarts.use([`+c+`]);`:`Unknown series `+s))}return}if(t===`tooltip`){if(f){process.env.NODE_ENV!==`production`&&(p||(fs(`Currently only one tooltip component is allowed.`),p=!0));return}f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var m=z({componentIndex:n},e.keyInfo);r=new o(i,this,this,m),z(r,m),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`&&yx(this)}this._seriesIndices||yx(this)},t.prototype.getOption=function(){var e=L(this.option);return H(e,function(t,n){if(tg.hasClass(n)){for(var r=xs(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!zs(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[Sx],e},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?Se(a,function(e){return!!e}):Mx(`name`,i,a):Mx(`id`,r,a):(o=[],H(xs(n),function(e){a[e]&&o.push(a[e])})),Nx(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(Nx(r?this.queryComponents(r):Se(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?Se(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(K(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=Fs(e,null);return Se(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 Se(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return Se(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){bx(this),H(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){H(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){bx(this),H(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 H(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return bx(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){bx(this);var n=[];H(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=Z(n)},t.prototype.restoreData=function(e){yx(this);var t=this._componentsMap,n=[];t.each(function(e,t){tg.hasClass(t)&&n.push(t)}),tg.topologicalTravel(n,tg.getAllClassMainTypes(),function(n){H(t.get(n),function(t){t&&(n!==`series`||!Ax(t,e))&&t.restoreData()})})},t.internalField=function(){yx=function(e){var t=e._seriesIndices=[];H(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Z(t)},bx=function(e){if(process.env.NODE_ENV!==`production`&&!e._seriesIndices)throw Error(`Option should contains series.`)},xx=function(e,t){e.option={},e.option[Sx]=Cx,e._componentsMap=Z({series:[]}),e._componentsCount=Z();var n=t.aria;J(n)&&n.enabled==null&&(n.enabled=!0),jx(t,e._theme.option),R(t,gx,!1),e._mergeOption(t,null)}}(),t}(df);function Ax(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 jx(e,t){var n=e.color&&!e.colorLayer;H(t,function(t,r){r===`colorLayer`&&n||tg.hasClass(r)||(typeof t==`object`?e[r]=e[r]?R(e[r],t,!1):L(t):e[r]??(e[r]=t))})}function Mx(e,t,n){if(G(t)){var r=Z();return H(t,function(e){e!=null&&Fs(e,null)!=null&&r.set(e,!0)}),Se(n,function(t){return t&&r.get(t[e])})}else{var i=Fs(t,null);return Se(n,function(t){return t&&i!=null&&t[e]===i})}}function Nx(e,t){return t.hasOwnProperty(`subType`)?Se(e,function(e){return e&&e.subType===t.subType}):e}function Px(e){var t=Z();return e&&H(xs(e.replaceMerge),function(e){process.env.NODE_ENV!==`production`&&X(tg.hasClass(e),`"`+e+`" is not valid component main type in "replaceMerge"`),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}ye(kx,ig);var Fx=kx,Ix=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],Lx=function(){function e(e){H(Ix,function(t){this[t]=W(e[t],e)},this)}return e}(),Rx=Lx,zx=/^(min|max)?(.+)$/,Bx=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(H(xs(e.series),function(e){e&&e.data&&ke(e.data)&&Ve(e.data)}),H(xs(e.dataset),function(e){e&&e.source&&ke(e.source)&&Ve(e.source)})),e=L(e);var r=this._optionBackup,i=Vx(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=[],L(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=L(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++)Hx(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!Wx(a,this._currentMediaIndices)&&(o=U(a,function(e){return L(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function Vx(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&&(G(l)?H(l,function(e){process.env.NODE_ENV!==`production`&&e&&!e.option&&J(e.query)&&J(e.query.option)&&ps(`Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }`),e&&e.option&&(e.query?r.push(e):i||(i=e))}):process.env.NODE_ENV!==`production`&&ps(`Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }`)),f(a),H(c,function(e){return f(e)}),H(r,function(e){return f(e.option)});function f(e){H(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function Hx(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return H(e,function(e,t){var n=t.match(zx);if(!(!n||!n[1]||!n[2])){var a=n[1];Ux(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function Ux(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function Wx(e,t){return e.join(`,`)===t.join(`,`)}var Gx=Bx,Kx=H,qx=J,Jx=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function Yx(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Jx.length;n<r;n++){var i=Jx[n],a=t.normal,o=t.emphasis;a&&a[i]&&(process.env.NODE_ENV!==`production`&&hs(`itemStyle.normal.`+i,i),e[i]=e[i]||{},e[i].normal?R(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!==`production`&&hs(`itemStyle.emphasis.`+i,`emphasis.`+i),e[i]=e[i]||{},e[i].emphasis?R(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function Xx(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(process.env.NODE_ENV!==`production`&&ms(`'normal' hierarchy in `+t+` has been removed since 4.0. All style properties are configured in `+t+` directly now.`),n?(e[t].normal=e[t].emphasis=null,B(e[t],r)):e[t]=r),i&&(process.env.NODE_ENV!==`production`&&ms(t+`.emphasis has been changed to emphasis.`+t+` since 4.0`),e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Zx(e){Xx(e,`itemStyle`),Xx(e,`lineStyle`),Xx(e,`areaStyle`),Xx(e,`label`),Xx(e,`labelLine`),Xx(e,`upperLabel`),Xx(e,`edgeLabel`)}function Qx(e,t){var n=qx(e)&&e[t],r=qx(n)&&n.textStyle;if(r){process.env.NODE_ENV!==`production`&&ms(`textStyle hierarchy in `+t+` has been removed since 4.0. All textStyle properties are configured in `+t+` directly now.`);for(var i=0,a=Cs.length;i<a;i++){var o=Cs[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}}function $x(e){e&&(Zx(e),Qx(e,`label`),e.emphasis&&Qx(e.emphasis,`label`))}function eS(e){if(qx(e)){Yx(e),Zx(e),Qx(e,`label`),Qx(e,`upperLabel`),Qx(e,`edgeLabel`),e.emphasis&&(Qx(e.emphasis,`label`),Qx(e.emphasis,`upperLabel`),Qx(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(Yx(t),$x(t));var n=e.markLine;n&&(Yx(n),$x(n));var r=e.markArea;r&&$x(r);var i=e.data;if(e.type===`graph`){i=i||e.nodes;var a=e.links||e.edges;if(a&&!ke(a))for(var o=0;o<a.length;o++)$x(a[o]);H(e.categories,function(e){Zx(e)})}if(i&&!ke(i))for(var o=0;o<i.length;o++)$x(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)$x(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)G(c[o])?($x(c[o][0]),$x(c[o][1])):$x(c[o]);e.type===`gauge`?(Qx(e,`axisLabel`),Qx(e,`title`),Qx(e,`detail`)):e.type===`treemap`?(Xx(e.breadcrumb,`itemStyle`),H(e.levels,function(e){Zx(e)})):e.type===`tree`&&Zx(e.leaves)}}function tS(e){return G(e)?e:e?[e]:[]}function nS(e){return(G(e)?e[0]:e)||{}}function rS(e,t){Kx(tS(e.series),function(e){qx(e)&&eS(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),Kx(n,function(t){Kx(tS(e[t]),function(e){e&&(Qx(e,`axisLabel`),Qx(e.axisPointer,`label`))})}),Kx(tS(e.parallel),function(e){var t=e&&e.parallelAxisDefault;Qx(t,`axisLabel`),Qx(t&&t.axisPointer,`label`)}),Kx(tS(e.calendar),function(e){Xx(e,`itemStyle`),Qx(e,`dayLabel`),Qx(e,`monthLabel`),Qx(e,`yearLabel`)}),Kx(tS(e.radar),function(e){Qx(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name,process.env.NODE_ENV!==`production`&&ms(`name property in radar component has been changed to axisName`)),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap,process.env.NODE_ENV!==`production`&&ms(`nameGap property in radar component has been changed to axisNameGap`)),process.env.NODE_ENV!==`production`&&Kx(e.indicator,function(e){e.text&&hs(`text`,`name`,`radar.indicator`)})}),Kx(tS(e.geo),function(e){qx(e)&&($x(e),Kx(tS(e.regions),function(e){$x(e)}))}),Kx(tS(e.timeline),function(e){$x(e),Xx(e,`label`),Xx(e,`itemStyle`),Xx(e,`controlStyle`,!0);var t=e.data;G(t)&&H(t,function(e){J(e)&&(Xx(e,`label`),Xx(e,`itemStyle`))})}),Kx(tS(e.toolbox),function(e){Xx(e,`iconStyle`),Kx(e.feature,function(e){Xx(e,`iconStyle`)})}),Qx(nS(e.axisPointer),`label`),Qx(nS(e.tooltip).axisPointer,`label`)}function iS(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r=r&&r[n[i]],r!=null);i++);return r}function aS(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 oS(e){e&&H(sS,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var sS=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],cS=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],lS=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function uS(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<lS.length;n++){var r=lS[n][1],i=lS[n][0];t[r]!=null&&(t[i]=t[r],process.env.NODE_ENV!==`production`&&hs(r,i))}}function dS(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(process.env.NODE_ENV!==`production`&&hs(`label.margin`,`label.edgeDistance`,`pie`),e.edgeDistance=e.margin)}function fS(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,process.env.NODE_ENV!==`production`&&hs(`downplay`,`blur`,`sunburst`))}function pS(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(process.env.NODE_ENV!==`production`&&hs(`focusNodeAdjacency`,`emphasis: { focus: 'adjacency'}`,`graph/sankey`),e.emphasis.focus=`adjacency`))}function mS(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&mS(e[n].children,t)}function hS(e,t){rS(e,t),e.series=xs(e.series),H(e.series,function(e){if(J(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow,process.env.NODE_ENV!==`production`&&hs(`clipOverflow`,`clip`,`line`));else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise,process.env.NODE_ENV!==`production`&&hs(`clockWise`,`clockwise`)),dS(e.label);var n=e.data;if(n&&!ke(n))for(var r=0;r<n.length;r++)dS(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(process.env.NODE_ENV!==`production`&&hs(`hoverOffset`,`emphasis.scaleSize`),e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=iS(e,`pointer.color`);i!=null&&aS(e,`itemStyle.color`,i)}else if(t===`bar`){uS(e),uS(e.backgroundStyle),uS(e.emphasis);var n=e.data;if(n&&!ke(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(uS(n[r]),uS(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,process.env.NODE_ENV!==`production`&&hs(`highlightPolicy`,`emphasis.focus`,`sunburst`))),fS(e),mS(e.data,fS)}else t===`graph`||t===`sankey`?pS(e):t===`map`&&(e.mapType&&!e.map&&(process.env.NODE_ENV!==`production`&&hs(`mapType`,`map`,`map`),e.map=e.mapType),e.mapLocation&&(process.env.NODE_ENV!==`production`&&ms("`mapLocation` is not used anymore."),B(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(process.env.NODE_ENV!==`production`&&hs(`hoverAnimation`,`emphasis.scale`),e.emphasis.scale=e.hoverAnimation)),oS(e)}}),e.dataRange&&(e.visualMap=e.dataRange),H(cS,function(t){var n=e[t];n&&(G(n)||(n=[n]),H(n,function(e){oS(e)}))})}function gS(e){var t=Z();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.length&&i.setCalculationInfo(`stackedOnSeries`,r[r.length-1].seriesModel),r.push(a)}}),t.each(_S)}function _S(e){H(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=Jo(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var vS=function(){function e(){this.group=new Il,this.uid=wm(`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}();ct(vS),ht(vS);var yS=vS,bS=Us(),xS={itemStyle:gt(sf,!0),lineStyle:gt(rf,!0)},SS={lineStyle:`stroke`,itemStyle:`fill`};function CS(e,t){return e.visualStyleMapper||xS[t]||(console.warn(`Unknown style type '`+t+`'.`),xS.itemStyle)}function wS(e,t){return e.visualDrawType||SS[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var TS={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=CS(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=wS(e,r),c=a[s],l=K(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`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(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=z({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},ES=new df,DS={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=CS(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){ES.option=n[r];var o=i(ES);z(e.ensureUniqueItemVisual(t,`style`),o),ES.option.decal&&(e.setItemVisual(t,`decal`,ES.option.decal),ES.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},OS={performRawSeries:!0,overallReset:function(e){var t=Z();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+`-`+n,i=t.get(r);i||(i={},t.set(r,i)),bS(e).scope=i}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),r={},i=t.getData(),a=bS(t).scope,o=wS(t,t.visualStyleAccessPath||`itemStyle`);i.each(function(e){var t=i.getRawIndex(e);r[t]=e}),n.each(function(e){var s=r[e];if(i.getItemVisual(s,`colorFromPalette`)){var c=i.ensureUniqueItemVisual(s,`style`),l=n.getName(e)||e+``,u=n.count();c[o]=t.getColorFromPalette(l,a,u)}})}})}},kS=Math.PI;function AS(e,t){t=t||{},B(t,{text:`loading`,textColor:`#000`,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255, 255, 255, 0.8)`,showSpinner:!0,color:`#5470c6`,spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Il,r=new yo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Lo({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 yo({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 ku({shape:{startAngle:-kS/2,endAngle:-kS/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:kS*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:kS*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 jS=function(){function e(e,t,n,r){this._stageTaskMap=Z(),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),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,a=e.get(`large`)&&r>=e.get(`largeThreshold`);e.pipelineContext=n.context={progressiveRender:i,modDataCount:e.get(`progressiveChunkMode`)===`mod`?r:null,large:a}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Z();e.eachSeries(function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;H(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{}),a=``;process.env.NODE_ENV!==`production`&&(a=`"reset" and "overallReset" must not be both specified.`),X(!(r.reset&&r.overallReset),a),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=r||{};var i=!1,a=this;H(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=Z(),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)||fg({plan:IS,reset:LS,count:BS}));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||fg({reset:MS});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Z(),c=e.seriesType,l=e.getTargetSeries,u=!0,d=!1,f=``;process.env.NODE_ENV!==`production`&&(f=`"createOnAllSeries" is not supported for "overallReset", because it will block all streams.`),X(!e.createOnAllSeries,f),c?n.eachRawSeriesByType(c,p):l?l(n,r).each(p):(u=!1,H(n.getSeries(),p));function p(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,fg({reset:NS,onDirty:FS})));n.context={model:e,overallProgress: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 K(e)&&(e={overallReset:e,seriesType:VS(e)}),e.uid=wm(`stageHandler`),t&&(e.visualType=t),e},e}();function MS(e){e.overallReset(e.ecModel,e.api,e.payload)}function NS(e){return e.overallProgress&&PS}function PS(){this.agent.dirty(),this.getDownstream().dirty()}function FS(){this.agent&&this.agent.dirty()}function IS(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function LS(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=xs(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?U(t,function(e,t){return zS(t)}):RS}var RS=zS(0);function zS(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 BS(e){return e.data.count()}function VS(e){WS=null;try{e(HS,US)}catch{}return WS}var HS={},US={},WS;GS(HS,Fx),GS(US,Rx),HS.eachSeriesByType=HS.eachRawSeriesByType=function(e){WS=e},HS.eachComponent=function(e){e.mainType===`series`&&e.subType&&(WS=e.subType)};function GS(e,t){for(var n in t.prototype)e[n]=Ze}var KS=jS,qS=[`#37A2DA`,`#32C5E9`,`#67E0E3`,`#9FE6B8`,`#FFDB5C`,`#ff9f7f`,`#fb7293`,`#E062AE`,`#E690D1`,`#e7bcf3`,`#9d96f5`,`#8378EA`,`#96BFFF`],JS={color:qS,colorLayer:[[`#37A2DA`,`#ffd85c`,`#fd7b5f`],[`#37A2DA`,`#67E0E3`,`#FFDB5C`,`#ff9f7f`,`#E062AE`,`#9d96f5`],[`#37A2DA`,`#32C5E9`,`#9FE6B8`,`#FFDB5C`,`#ff9f7f`,`#fb7293`,`#e7bcf3`,`#8378EA`,`#96BFFF`],qS]},YS=`#B9B8CE`,XS=`#100C2A`,ZS=function(){return{axisLine:{lineStyle:{color:YS}},splitLine:{lineStyle:{color:`#484753`}},splitArea:{areaStyle:{color:[`rgba(255,255,255,0.02)`,`rgba(255,255,255,0.05)`]}},minorSplitLine:{lineStyle:{color:`#20203B`}}}},QS=[`#4992ff`,`#7cffb2`,`#fddd60`,`#ff6e76`,`#58d9f9`,`#05c091`,`#ff8a45`,`#8d48e3`,`#dd79ff`],$S={darkMode:!0,color:QS,backgroundColor:XS,axisPointer:{lineStyle:{color:`#817f91`},crossStyle:{color:`#817f91`},label:{color:`#fff`}},legend:{textStyle:{color:YS},pageTextStyle:{color:YS}},textStyle:{color:YS},title:{textStyle:{color:`#EEF1FA`},subtextStyle:{color:`#B9B8CE`}},toolbox:{iconStyle:{borderColor:YS}},dataZoom:{borderColor:`#71708A`,textStyle:{color:YS},brushStyle:{color:`rgba(135,163,206,0.3)`},handleStyle:{color:`#353450`,borderColor:`#C5CBE3`},moveHandleStyle:{color:`#B0B6C3`,opacity:.3},fillerColor:`rgba(135,163,206,0.2)`,emphasis:{handleStyle:{borderColor:`#91B7F2`,color:`#4D587D`},moveHandleStyle:{color:`#636D9A`,opacity:.7}},dataBackground:{lineStyle:{color:`#71708A`,width:1},areaStyle:{color:`#71708A`}},selectedDataBackground:{lineStyle:{color:`#87A3CE`},areaStyle:{color:`#87A3CE`}}},visualMap:{textStyle:{color:YS}},timeline:{lineStyle:{color:YS},label:{color:YS},controlStyle:{color:YS,borderColor:YS}},calendar:{itemStyle:{color:XS},dayLabel:{color:YS},monthLabel:{color:YS},yearLabel:{color:YS}},timeAxis:ZS(),logAxis:ZS(),valueAxis:ZS(),categoryAxis:ZS(),line:{symbol:`circle`},graph:{color:QS},gauge:{title:{color:YS},axisLine:{lineStyle:{color:[[1,`rgba(207,212,219,0.2)`]]}},axisLabel:{color:YS},detail:{color:`#EEF1FA`}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}}};$S.categoryAxis.splitLine.show=!1;var eC=$S,tC=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(q(e)){var i=at(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};H(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}(),nC=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],rC=nC.concat([`symbolKeepAspect`]),iC={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<nC.length;o++){var s=nC[o],c=e.get(s);K(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(z({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=Ce(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}}},aC={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<rC.length;r++){var i=rC[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function oC(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);default:process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type `+n)}}function sC(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);default:process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type `+t)}}function cC(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var lC=Math.round(Math.random()*9),uC=typeof Object.defineProperty==`function`,dC=function(){function e(){this._id=`__ec_inner_`+ lC++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return uC?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}(),fC=dC;function pC(e){return isFinite(e)}function mC(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=pC(r)?r:0,i=pC(i)?i:1,a=pC(a)?a:0,o=pC(o)?o:0,e.createLinearGradient(r,a,i,o)}function hC(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=pC(o)?o:.5,s=pC(s)?s:.5,c=c>=0&&pC(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function gC(e,t,n){for(var r=t.type===`radial`?hC(e,t,n):mC(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function _C(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 vC(e){return parseInt(e,10)}function yC(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]||vC(s[r])||vC(e.style[r]))-(vC(s[a])||0)-(vC(s[o])||0)|0}function bC(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:De(e)?[e]:G(e)?e:null}function xC(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&bC(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=U(n,function(e){return e/i}),r/=i)}return[n,r]}var SC=new ka(!0);function CC(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function wC(e){return typeof e==`string`&&e!==`none`}function TC(e){var t=e.fill;return t!=null&&t!==`none`}function EC(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 DC(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 OC(e,t,n){var r=Et(t.image,t.__image,n);if(Ot(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)*Qe),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function kC(e,t,n,r){var i,a=CC(n),o=TC(n),s=n.strokePercent,c=s<1,l=!t.path;(!t.silent||c)&&l&&t.createPathProxy();var u=t.path||SC,d=t.__dirty;if(!r){var f=n.fill,p=n.stroke,m=o&&!!f.colorStops,h=a&&!!p.colorStops,g=o&&!!f.image,_=a&&!!p.image,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;(m||h)&&(S=t.getBoundingRect()),m&&(v=d?gC(e,f,S):t.__canvasFillGradient,t.__canvasFillGradient=v),h&&(y=d?gC(e,p,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=y),g&&(b=d||!t.__canvasFillPattern?OC(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=b),_&&(x=d||!t.__canvasStrokePattern?OC(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=b),m?e.fillStyle=v:g&&(b?e.fillStyle=b:o=!1),h?e.strokeStyle=y:_&&(x?e.strokeStyle=x:a=!1)}var C=t.getGlobalScale();u.setScale(C[0],C[1],t.segmentIgnoreThreshold);var w,T;e.setLineDash&&n.lineDash&&(i=xC(t),w=i[0],T=i[1]);var E=!0;(l||d&Ti)&&(u.setDPR(e.dpr),c?u.setContext(null):(u.setContext(e),E=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),E&&u.rebuildPath(e,c?s:1),w&&(e.setLineDash(w),e.lineDashOffset=T),r||(n.strokeFirst?(a&&DC(e,n),o&&EC(e,n)):(o&&EC(e,n),a&&DC(e,n))),w&&e.setLineDash([])}function AC(e,t,n){var r=t.__image=Et(n.image,t.__image,t,t.onload);if(!(!r||!Ot(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 jC(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||N,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=xC(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(CC(n)&&e.strokeText(i,n.x,n.y),TC(n)&&e.fillText(i,n.x,n.y)):(TC(n)&&e.fillText(i,n.x,n.y),CC(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var MC=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],NC=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function PC(e,t,n,r,i){var a=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){GC(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Vi.opacity:o}(r||t.blend!==n.blend)&&(a||(GC(e,i),a=!0),e.globalCompositeOperation=t.blend||Vi.blend);for(var s=0;s<MC.length;s++){var c=MC[s];(r||t[c]!==n[c])&&(a||(GC(e,i),a=!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||(GC(e,i),a=!0),e.shadowColor=t.shadowColor||Vi.shadowColor),a}function FC(e,t,n,r,i){var a=KC(t,i.inHover),o=r?null:n&&KC(n,i.inHover)||{};if(a===o)return!1;var s=PC(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||(GC(e,i),s=!0),wC(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||(GC(e,i),s=!0),wC(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||(GC(e,i),s=!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||(GC(e,i),s=!0),e.lineWidth=c)}for(var l=0;l<NC.length;l++){var u=NC[l],d=u[0];(r||a[d]!==o[d])&&(s||(GC(e,i),s=!0),e[d]=a[d]||u[1])}return s}function IC(e,t,n,r,i){return PC(e,KC(t,i.inHover),n&&KC(n,i.inHover),r,i)}function LC(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 RC(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r=r||a.isZeroArea(),LC(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function zC(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 BC=1,VC=2,HC=3,UC=4;function WC(e){var t=TC(e),n=CC(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 GC(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill=``,t.batchStroke=``}function KC(e,t){return t&&e.__hoverStyle||e.style}function qC(e,t){JC(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function JC(e,t,n,r){var i=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=~Ci,t.__isRendered=!1;return}var a=t.__clipPaths,o=n.prevElClipPaths,s=!1,c=!1;if((!o||_C(a,o))&&(o&&o.length&&(GC(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),a&&a.length&&(GC(e,n),e.save(),RC(a,e,n),s=!0),n.prevElClipPaths=a),n.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof to&&t.autoBatch&&WC(t.style);s||zC(i,l.transform)?(GC(e,n),LC(e,t)):u||GC(e,n);var d=KC(t,n.inHover);t instanceof to?(n.lastDrawType!==BC&&(c=!0,n.lastDrawType=BC),FC(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),kC(e,t,d,u),u&&(n.batchFill=d.fill||``,n.batchStroke=d.stroke||``)):t instanceof io?(n.lastDrawType!==HC&&(c=!0,n.lastDrawType=HC),FC(e,t,l,c,n),jC(e,t,d)):t instanceof lo?(n.lastDrawType!==VC&&(c=!0,n.lastDrawType=VC),IC(e,t,l,c,n),AC(e,t,d)):t.getTemporalDisplayables&&(n.lastDrawType!==UC&&(c=!0,n.lastDrawType=UC),YC(e,t,n)),u&&r&&GC(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function YC(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},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JC(e,c,a,o===s-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(),c.innerBeforeBrush(),JC(e,c,a,l===u-1),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var XC=new fC,ZC=new Ct(100),QC=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function $C(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&XC.delete(e);var a=XC.get(e);if(a)return a;var o=B(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,XC.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<QC.length;++s){var c=o[QC[s]];if(c!=null&&!G(c)&&!q(c)&&!De(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=ZC.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=tw(o.dashArrayX),f=nw(o.dashArrayY),p=ew(o.symbol),m=rw(d),h=iw(f),g=!i&&ie.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&&ZC.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=os(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=os(r,p[t].length);e*=r;var i=h*m.length*p.length;if(process.env.NODE_ENV!==`production`){var a=function(e){console.warn(`Calculated decal size is greater than `+e+` due to decal option settings so `+e+` is used for the decal size. Please consider changing the decal option to make a smaller decal or set `+e+` to be larger to avoid incontinuity.`)};e>o.maxTileWidth&&a(`maxTileWidth`),i>o.maxTileHeight&&a(`maxTileHeight`)}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=b_(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 qC(y,u)}}}}function ew(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 ew([e]);for(var r=[],n=0;n<e.length;++n)q(e[n])?r.push([e[n]]):r.push(e[n]);return r}function tw(e){if(!e||e.length===0)return[[0,0]];if(De(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!De(e[r])){n=!1;break}if(n)return tw([e]);for(var i=[],r=0;r<e.length;++r)if(De(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=U(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function nw(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(De(e)){var t=Math.ceil(e);return[t,t]}var n=U(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function rw(e){return U(e,function(e){return iw(e)})}function iw(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}function aw(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=$C(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=$C(i,t)}}})}var ow=new gi,sw=ow,cw={};function lw(e,t){process.env.NODE_ENV!==`production`&&cw[e]&&ps(`Already has an implementation of `+e+`.`),cw[e]=t}function uw(e){return process.env.NODE_ENV!==`production`&&(cw[e]||ps(`Implementation of `+e+` doesn't exists.`)),cw[e]}var dw=1,fw=800,pw=900,mw=1e3,hw=2e3,gw=5e3,_w=1e3,vw=1100,yw=2e3,bw=3e3,xw=4e3,Sw=4500,Cw=4600,ww=5e3,Tw=6e3,Ew=7e3,Dw={PROCESSOR:{FILTER:mw,SERIES_FILTER:fw,STATISTIC:gw},VISUAL:{LAYOUT:_w,PROGRESSIVE_LAYOUT:vw,GLOBAL:yw,CHART:bw,POST_CHART_LAYOUT:Cw,COMPONENT:xw,BRUSH:ww,CHART_ITEM:Sw,ARIA:Tw,DECAL:Ew}},Ow=`__flagInMainProcess`,kw=`__pendingUpdate`,Aw=`__needsUpdateStatus`,jw=/^[a-zA-Z0-9_]+$/,Mw=`__connectUpdateStatus`,Nw=0,Pw=1,Fw=2;function Iw(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(this.isDisposed()){cT(this.id);return}return Rw(this,e,t)}}function Lw(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Rw(this,e,t)}}function Rw(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),gi.prototype[t].apply(e,n)}var zw=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(gi),Bw=zw.prototype;Bw.on=Lw(`on`),Bw.off=Lw(`off`);var Vw,Hw,Uw,Ww,Gw,Kw,qw,Jw,Yw,Xw,Zw,Qw,$w,eT,tT,nT,rT,iT,aT=function(e){A(t,e);function t(t,n,r){var i=e.call(this,new tC)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r=r||{},q(n)&&(n=mT[n]),i._dom=t;var a=`canvas`,o=`auto`,s=!1;if(process.env.NODE_ENV!==`production`){var c=Q.hasGlobalWindow?window:global;c&&(a=Y(c.__ECHARTS__DEFAULT__RENDERER__,a),o=Y(c.__ECHARTS__DEFAULT__COARSE_POINTER,o),s=Y(c.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,s))}r.ssr;var l=i._zr=ux(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Y(r.useDirtyRect,s),useCoarsePointer:Y(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=ty(W(l.flush,l),17),n=L(n),n&&hS(n,!0),i._theme=n,i._locale=Xm(r.locale||Jm),i._coordSysMgr=new cm;var u=i._api=tT(i);function d(e,t){return e.__prio-t.__prio}return Ob(pT,d),Ob(dT,d),i._scheduler=new KS(i,u,dT,pT),i._messageCenter=new zw,i._initEvents(),i.resize=W(i.resize,i),l.animation.on(`frame`,i._onframe,i),Xw(l,i),Zw(l,i),Ve(i),i}return t.prototype._onframe=function(){if(!this._disposed){iT(this);var e=this._scheduler;if(this[kw]){var t=this[kw].silent;this[Ow]=!0;try{Vw(this),Ww.update.call(this,null,this[kw].updateParams)}catch(e){throw this[Ow]=!1,this[kw]=null,e}this._zr.flush(),this[Ow]=!1,this[kw]=null,Jw.call(this,t),Yw.call(this,t)}else if(e.unfinished){var n=dw,r=this._model,i=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(r),e.performDataProcessorTasks(r),Kw(this,r),e.performVisualTasks(r),eT(this,this._model,i,`remain`,{}),n-=+new Date-a}while(n>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[Ow]){process.env.NODE_ENV!==`production`&&ps("`setOption` should not be called during main process.");return}if(this._disposed){cT(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[Ow]=!0,!this._model||t){var o=new Gx(this._api),s=this._theme,c=this._model=new Fx;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},fT);var l={seriesTransition:a,optionChanged:!0};if(n)this[kw]={silent:r,updateParams:l},this[Ow]=!1,this.getZr().wakeUp();else{try{Vw(this),Ww.update.call(this,null,l)}catch(e){throw this[kw]=null,this[Ow]=!1,e}this._ssr||this._zr.flush(),this[kw]=null,this[Ow]=!1,Jw.call(this,r),Yw.call(this,r)}},t.prototype.setTheme=function(){ms(`ECharts#setTheme() is DEPRECATED in ECharts 3.0`)},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||Q.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return process.env.NODE_ENV!==`production`&&hs(`getRenderedCanvas`,`renderToCanvas`),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var t=this._zr.painter;if(process.env.NODE_ENV!==`production`&&t.type!==`canvas`)throw Error(`renderToCanvas can only be used in the canvas renderer.`);return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var t=this._zr.painter;if(process.env.NODE_ENV!==`production`&&t.type!==`svg`)throw Error(`renderToSVGString can only be used in the svg renderer.`);return t.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(Q.svgSupported){var e=this._zr;return H(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){cT(this.id);return}e=e||{};var t=e.excludeComponents,n=this._model,r=[],i=this;H(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 H(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){cT(this.id);return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(_T[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();H(gT,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(L(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=ie.createCanvas(),h=ux(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return H(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()}else return e.connectedBackgroundColor&&h.add(new yo({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),H(u,function(e){var t=new lo({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`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t){return Gw(this,`convertToPixel`,e,t)},t.prototype.convertFromPixel=function(e,t){return Gw(this,`convertFromPixel`,e,t)},t.prototype.containPixel=function(e,t){if(this._disposed){cT(this.id);return}var n=this._model,r;return H(Gs(n,e),function(e,n){n.indexOf(`Models`)>=0&&H(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r=r||!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint?r=r||a.containPoint(t,e):process.env.NODE_ENV!==`production`&&fs(n+`: `+(a?`The found component do not support containPoint.`:`No view mapping to the found component.`))}else process.env.NODE_ENV!==`production`&&fs(n+`: containPoint is not supported`)},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Gs(n,e,{defaultMainType:`series`}),i=r.seriesModel;process.env.NODE_ENV!==`production`&&(i||fs(`There is no specified series model`));var a=i.getData(),o=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?a.indexOfRawIndex(r.dataIndex):null;return o==null?sC(a,t):oC(a,o,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;H(sT,function(t){var n=function(n){var r=e.getModel(),i=n.target,a,o=t===`globalout`;if(o?a={}:i&&cC(i,function(e){var t=ec(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}else if(t.eventData)return a=z({},t.eventData),!0},!0),a){var s=a.componentType,c=a.componentIndex;(s===`markLine`||s===`markPoint`||s===`markArea`)&&(s=`series`,c=a.seriesIndex);var l=s&&c!=null&&r.getComponent(s,c),u=l&&e[l.mainType===`series`?`_chartsMap`:`_componentsMap`][l.__viewId];process.env.NODE_ENV!==`production`&&!o&&!(l&&u)&&fs(`model or view can not be found by params`),a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:l,view:u},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)}),H(uT,function(t,n){e._messageCenter.on(n,function(e){this.trigger(n,e)},e)}),H([`selectchanged`],function(t){e._messageCenter.on(t,function(e){this.trigger(t,e)},e)}),zy(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){cT(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){cT(this.id);return}this._disposed=!0,this.getDom()&&Xs(this.getDom(),bT,``);var e=this,t=e._api,n=e._model;H(e._componentsViews,function(e){e.dispose(n,t)}),H(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 gT[e.id]},t.prototype.resize=function(e){if(this[Ow]){process.env.NODE_ENV!==`production`&&ps("`resize` should not be called during main process.");return}if(this._disposed){cT(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[kw]&&(r??(r=this[kw].silent),n=!0,this[kw]=null),this[Ow]=!0;try{n&&Vw(this),Ww.update.call(this,{type:`resize`,animation:z({duration:0},e&&e.animation)})}catch(e){throw this[Ow]=!1,e}this[Ow]=!1,Jw.call(this,r),Yw.call(this,r)}},t.prototype.showLoading=function(e,t){if(this._disposed){cT(this.id);return}if(J(e)&&(t=e,e=``),e=e||`default`,this.hideLoading(),!hT[e]){process.env.NODE_ENV!==`production`&&fs(`Loading effects `+e+` not exists.`);return}var n=hT[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)},t.prototype.hideLoading=function(){if(this._disposed){cT(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=z({},e);return t.type=uT[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){cT(this.id);return}if(J(t)||(t={silent:!!t}),lT[e.type]&&this._model){if(this[Ow]){this._pendingActions.push(e);return}var n=t.silent;qw.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Q.browser.weChat&&this._throttledZrFlush(),Jw.call(this,n),Yw.call(this,n)}},t.prototype.updateLabelLayout=function(){sw.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){cT(this.id);return}var t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);process.env.NODE_ENV!==`production`&&X(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Vw=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),Hw(e,!0),Hw(e,!1),t.plan()},Hw=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=at(e.type),f=t?yS.getClass(d.main,d.sub):ov.getClass(d.sub);process.env.NODE_ENV!==`production`&&X(f,d.sub+` does not exist.`),u=new f,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)}},Uw=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){H([].concat(e._componentsViews,e._chartsViews),u);return}var o={};o[r+`Id`]=n[r+`Id`],o[r+`Index`]=n[r+`Index`],o[r+`Name`]=n[r+`Name`];var s={mainType:r,query:o};i&&(s.subType=i);var c=n.excludeSeriesId,l;c!=null&&(l=Z(),H(xs(c),function(e){var t=Fs(e,null);t!=null&&l.set(t,!0)})),a&&a.eachComponent(s,function(t){if(!(l&&l.get(t.id)!=null))if(dl(n))if(t instanceof u_)n.type===pc&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&qc(t,n,e._api);else{var r=Jc(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===pc&&i&&!n.notBlur&&Kc(t.mainType,t.componentIndex,e._api),a&&H(a,function(e){n.type===pc?Lc(e):Rc(e)})}else ul(n)&&t instanceof u_&&(Zc(t,n,e._api),Qc(t),rT(e))},e),a&&a.eachComponent(s,function(t){l&&l.get(t.id)!=null||u(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},Ww={prepareAndUpdate:function(e){Vw(this),Ww.update.call(this,e,{optionChanged:e.newOption!=null})},update:function(t,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){r.setUpdatePayload(t),s.restoreData(r,t),s.performSeriesTasks(r),o.create(r,i),s.performDataProcessorTasks(r,t),Kw(this,r),o.update(r,i),e(r),s.performVisualTasks(r,t),Qw(this,r,i,t,n);var c=r.get(`backgroundColor`)||`transparent`,l=r.get(`darkMode`);a.setBackgroundColor(c),l!=null&&l!==`auto`&&a.setDarkMode(l),sw.trigger(`afterupdate`,r,i)}},updateTransform:function(t){var n=this,r=this._model,i=this._api;if(r){r.setUpdatePayload(t);var a=[];r.eachComponent(function(e,o){if(e!==`series`){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var c=s.updateTransform(o,r,i,t);c&&c.update&&a.push(s)}else a.push(s)}});var o=Z();r.eachSeries(function(e){var a=n._chartsMap[e.__viewId];if(a.updateTransform){var s=a.updateTransform(e,r,i,t);s&&s.update&&o.set(e.uid,1)}else o.set(e.uid,1)}),e(r),this._scheduler.performVisualTasks(r,t,{setDirty:!0,dirtyMap:o}),eT(this,r,i,t,{},o),sw.trigger(`afterupdate`,r,i)}},updateView:function(t){var n=this._model;n&&(n.setUpdatePayload(t),ov.markUpdateMethod(t,`updateView`),e(n),this._scheduler.performVisualTasks(n,t,{setDirty:!0}),Qw(this,n,this._api,t,{}),sw.trigger(`afterupdate`,n,this._api))},updateVisual:function(t){var n=this,r=this._model;r&&(r.setUpdatePayload(t),r.eachSeries(function(e){e.getData().clearAllVisual()}),ov.markUpdateMethod(t,`updateVisual`),e(r),this._scheduler.performVisualTasks(r,t,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(e,i){if(e!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,t)}}),r.eachSeries(function(e){n._chartsMap[e.__viewId].updateVisual(e,r,n._api,t)}),sw.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){Ww.update.call(this,e)}},Gw=function(e,t,n,r){if(e._disposed){cT(e.id);return}for(var i=e._model,a=e._coordSysMgr.getCoordinateSystems(),o,s=Gs(i,n),c=0;c<a.length;c++){var l=a[c];if(l[t]&&(o=l[t](i,s,r))!=null)return o}process.env.NODE_ENV!==`production`&&fs(`No coordinate system that supports `+t+` found by the given finder.`)},Kw=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},qw=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=lT[i],s=o.actionInfo,c=(s.update||`update`).split(`:`),l=c.pop(),u=c[0]!=null&&at(c[0]);this[Ow]=!0;var d=[e],f=!1;e.batch&&(f=!0,d=U(e.batch,function(t){return t=B(z({},t),e),t.batch=null,t}));var p=[],m,h=ul(e),g=dl(e);if(g&&Wc(this._api),H(d,function(t){if(m=o.action(t,n._model,n._api),m=m||z({},t),m.type=s.event||m.type,p.push(m),g){var r=Ks(e),i=r.queryOptionMap,a=r.mainTypeSpecified?i.keys()[0]:`series`;Uw(n,l,t,a),rT(n)}else h?(Uw(n,l,t,`series`),rT(n)):u&&Uw(n,l,t,u.main,u.sub)}),l!==`none`&&!g&&!h&&!u)try{this[kw]?(Vw(this),Ww.update.call(this,e),this[kw]=null):Ww[l].call(this,e)}catch(e){throw this[Ow]=!1,e}if(m=f?{type:s.event||i,escapeConnect:a,batch:p}:p[0],this[Ow]=!1,!t){var _=this._messageCenter;if(_.trigger(m.type,m),h){var v={type:`selectchanged`,escapeConnect:a,selected:$c(r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e};_.trigger(v.type,v)}}},Jw=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();qw.call(this,n,e)}},Yw=function(e){!e&&this.trigger(`updated`)},Xw=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[kw]&&!t._scheduler.unfinished&&!t._pendingActions.length&&t.trigger(`finished`)})},Zw=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=cC(n,cl);r&&(Yc(r,e,t._api),rT(t))}).on(`mouseout`,function(e){var n=e.target,r=cC(n,cl);r&&(Xc(r,e,t._api),rT(t))}).on(`click`,function(e){var n=e.target,r=cC(n,function(e){return ec(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=ec(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function e(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function t(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=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;Ob(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),H(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++,o=``),a=r,n.setZLevel(r)})}}Qw=function(e,n,r,i,a){t(n),$w(e,n,r,i,a),H(e._chartsViews,function(e){e.__alive=!1}),eT(e,n,r,i,a),H(e._chartsViews,function(e){e.__alive||e.remove(n,r)})},$w=function(e,t,n,r,i,o){H(o||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),a(i,e),c(i,e)})},eT=function(e,t,n,o,l,u){var d=e._scheduler;l=z(l||{},{updatedSeries:t.getSeries()}),sw.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var r=n.renderTask;d.updatePayload(r,o),s(t,n),u&&u.get(t.uid)&&r.dirty(),r.perform(d.getPerformArgs(r))&&(f=!0),n.group.silent=!!t.get(`silent`),i(t,n),Qc(t)}),d.unfinished=f||d.unfinished,sw.trigger(`series:layoutlabels`,t,n,l),sw.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];a(t,n),c(t,n)}),r(e,t),sw.trigger(`series:afterupdate`,t,n,l)},rT=function(e){e[Aw]=!0,e.getZr().wakeUp()},iT=function(e){e[Aw]&&(e.getZr().storage.traverse(function(e){Qu(e)||n(e)}),e[Aw]=!1)};function n(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===cc&&e.states.emphasis?t.push(`emphasis`):e.hoverState===sc&&e.states.blur&&t.push(`blur`),e.useStates(t)}function r(e,t){var n=e._zr.storage,r=0;n.traverse(function(e){e.isGroup||r++}),r>t.get(`hoverLayerThreshold`)&&!Q.node&&!Q.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}function i(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function a(e,t){if(!e.preventAutoZ){var n=e.get(`z`)||0,r=e.get(`zlevel`)||0;t.eachRendered(function(e){return o(e,n,r,-1/0),!0})}}function o(e,t,n,r){var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var s=e.childrenRef(),c=0;c<s.length;c++)r=Math.max(o(s[c],t,n,r),r);else e.z=t,e.zlevel=n,r=Math.max(e.z2,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var l=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(l&&l.showAbove?1:-1))}return r}function s(e,t){t.eachRendered(function(e){if(!Qu(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(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&&(e.prevStates=null)}})}function c(e,t){var r=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=r.get(`duration`),o=a>0?{duration:a,delay:r.get(`delay`),easing:r.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Qu(e))return;if(e instanceof to&&fl(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var r=e.getTextContent(),a=e.getTextGuideLine();r&&(r.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&n(e)}})}tT=function(e){return new(function(t){A(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){Lc(t,n),rT(e)},n.prototype.leaveEmphasis=function(t,n){Rc(t,n),rT(e)},n.prototype.enterBlur=function(t){zc(t),rT(e)},n.prototype.leaveBlur=function(t){Bc(t),rT(e)},n.prototype.enterSelect=function(t){Vc(t),rT(e)},n.prototype.leaveSelect=function(t){Hc(t),rT(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}(Rx))(e)},nT=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[Mw]=t}}H(uT,function(n,r){e._messageCenter.on(r,function(n){if(_T[e.group]&&e[Mw]!==Nw){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];H(gT,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,Nw),H(i,function(e){e[Mw]!==Pw&&e.dispatchAction(r)}),t(i,Fw)}})})}}(),t}(gi),oT=aT.prototype;oT.on=Iw(`on`),oT.off=Iw(`off`),oT.one=function(e,t,n){var r=this;ms(`ECharts#one is deprecated.`);function i(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var sT=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`];function cT(e){process.env.NODE_ENV!==`production`&&fs(`Instance `+e+` has been disposed`)}var lT={},uT={},dT=[],fT=[],pT=[],mT={},hT={},gT={},_T={},vT=new Date-0,yT=new Date-0,bT=`_echarts_instance_`;function xT(e,t,n){var r=!(n&&n.ssr);if(r){if(process.env.NODE_ENV!==`production`&&!e)throw Error(`Initialize failed: invalid dom.`);var i=ST(e);if(i)return process.env.NODE_ENV!==`production`&&fs(`There is a chart instance already initialized on the dom.`),i;process.env.NODE_ENV!==`production`&&Ae(e)&&e.nodeName.toUpperCase()!==`CANVAS`&&(!e.clientWidth&&(!n||n.width==null)||!e.clientHeight&&(!n||n.height==null))&&fs(`Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.`)}var a=new aT(e,t,n);return a.id=`ec_`+ vT++,gT[a.id]=a,r&&Xs(e,bT,a.id),nT(a),sw.trigger(`afterinit`,a),a}function ST(e){return gT[Zs(e,bT)]}function CT(e,t){mT[e]=t}function wT(e){V(fT,e)<0&&fT.push(e)}function TT(e,t){PT(dT,e,t,hw)}function ET(e){OT(`afterinit`,e)}function DT(e){OT(`afterupdate`,e)}function OT(e,t){sw.on(e,t)}function kT(e,t,n){K(t)&&(n=t,t=``);var r=J(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,!uT[t]&&(X(jw.test(r)&&jw.test(t)),lT[r]||(lT[r]={action:n,actionInfo:e}),uT[t]=r)}function AT(e,t){cm.register(e,t)}function jT(e,t){PT(pT,e,t,_w,`layout`)}function MT(e,t){PT(pT,e,t,bw,`visual`)}var NT=[];function PT(e,t,n,r,i){if((K(t)||J(t))&&(n=t,t=r),process.env.NODE_ENV!==`production`){if(isNaN(t)||t==null)throw Error(`Illegal priority`);H(e,function(e){X(e.__raw!==n)})}if(!(V(NT,n)>=0)){NT.push(n);var a=KS.wrapStageHandler(n,i);a.__prio=t,a.__raw=n,e.push(a)}}function FT(e,t){hT[e]=t}function IT(e,t,n){var r=uw(`registerMap`);r&&r(e,t,n)}var LT=Sg;MT(yw,TS),MT(Sw,DS),MT(Sw,OS),MT(yw,iC),MT(Sw,aC),MT(Ew,aw),wT(hS),TT(pw,gS),FT(`default`,AS),kT({type:pc,event:pc,update:pc},Ze),kT({type:mc,event:mc,update:mc},Ze),kT({type:hc,event:hc,update:hc},Ze),kT({type:gc,event:gc,update:gc},Ze),kT({type:_c,event:_c,update:_c},Ze),CT(`light`,JS),CT(`dark`,eC);var RT=[],zT={registerPreprocessor:wT,registerProcessor:TT,registerPostInit:ET,registerPostUpdate:DT,registerUpdateLifecycle:OT,registerAction:kT,registerCoordinateSystem:AT,registerLayout:jT,registerVisual:MT,registerTransform:LT,registerLoading:FT,registerMap:IT,registerImpl:lw,PRIORITY:Dw,ComponentModel:tg,ComponentView:yS,SeriesModel:u_,ChartView:ov,registerComponentModel:function(e){tg.registerClass(e)},registerComponentView:function(e){yS.registerClass(e)},registerSeriesModel:function(e){u_.registerClass(e)},registerChartView:function(e){ov.registerClass(e)},registerSubTypeDefaulter:function(e,t){tg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){dx(e,t)}};function BT(e){if(G(e)){H(e,function(e){BT(e)});return}V(RT,e)>=0||(RT.push(e),K(e)&&(e={install:e}),e.install(zT))}var VT=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`10%`,top:60,right:`10%`,bottom:70,containLabel:!1,backgroundColor:`rgba(0,0,0,0)`,borderWidth:1,borderColor:`#ccc`},t}(tg),HT=VT,UT=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),WT=function(e){A(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,qs).models[0]},t.type=`cartesian2dAxis`,t}(tg);ye(WT,UT);var GT={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:!0,onZeroAxisIndex:null,lineStyle:{color:`#6E7079`,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15]},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},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:[`#E0E6F1`],width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[`rgba(250,250,250,0.2)`,`rgba(210,219,238,0.2)`]}}},KT=R({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`},axisLabel:{interval:`auto`}},GT),qT=R({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:`#F4F7FD`,width:1}}},GT),JT=R({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},qT),YT=B({logBase:10},qT),XT={category:KT,value:qT,time:JT,log:YT},ZT=0,QT=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ZT}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&U(r,$T);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,t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||(this._map=Z(this.categories))},e}();function $T(e){return J(e)&&e.value!=null?e.value:e+``}var eE=QT,tE={value:1,category:1,time:1,log:1};function nE(e,t,n,r){H(tE,function(i,a){var o=R(R({},XT[a],!0),r,!0),s=function(e){A(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=Jh(this),r=n?Xh(e):{};R(e,t.getTheme().get(a+`Axis`)),R(e,this.getDefaultOption()),e.type=rE(e),n&&Yh(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=eE.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.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,rE)}function rE(e){return e.type||(e.data?`category`:`value`)}var iE=function(){function e(e){this._setting=e||{},this._extent=[1/0,-1/0]}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},e.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();ht(iE);var aE=iE;function oE(e){var t=10**es(Math.abs(e)),n=Math.abs(e/t);return n===0||n===1||n===2||n===3||n===5}function sE(e){return e.type===`interval`||e.type===`log`}function cE(e,t,n,r){var i={},a=i.interval=ts((e[1]-e[0])/t,!0);n!=null&&a<n&&(a=i.interval=n),r!=null&&a>r&&(a=i.interval=r);var o=i.intervalPrecision=uE(a);return fE(i.niceTickExtent=[Uo(Math.ceil(e[0]/a)*a,o),Uo(Math.floor(e[1]/a)*a,o)],e),i}function lE(e){var t=10**es(e),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,Uo(n*t)}function uE(e){return Go(e)+2}function dE(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function fE(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),dE(e,0,t),dE(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function pE(e,t){return e>=t[0]&&e<=t[1]}function mE(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function hE(e,t){return e*(t[1]-t[0])+t[0]}var gE=function(e){A(t,e);function t(t){var n=e.call(this,t)||this;n.type=`ordinal`;var r=n.getSetting(`ordinalMeta`);return r||(r=new eE({})),G(r)&&(r=new eE({categories:U(r,function(e){return J(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting(`extent`)||[0,r.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:q(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),pE(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),mE(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(hE(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return 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=Math.min(a,t.length);i<o;++i){var s=t[i];n[i]=s,r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n.push(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(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type=`ordinal`,t}(aE);aE.registerClass(gE);var _E=gE,vE=Uo,yE=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`interval`,t._interval=0,t._intervalPrecision=2,t}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return pE(e,this._extent)},t.prototype.normalize=function(e){return mE(e,this._extent)},t.prototype.scale=function(e){return hE(e,this._extent)},t.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},t.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=uE(e)},t.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,a=[];if(!t)return a;var o=1e4;n[0]<r[0]&&(e?a.push({value:vE(r[0]-t,i)}):a.push({value:n[0]}));for(var s=r[0];s<=r[1]&&(a.push({value:s}),s=vE(s+t,i),s!==a[a.length-1].value);)if(a.length>o)return[];var c=a.length?a[a.length-1].value:r[1];return n[1]>c&&(e?a.push({value:vE(c+t,i)}):a.push({value:n[1]})),a},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var a=t[i],o=t[i-1],s=0,c=[],l=(a.value-o.value)/e;s<e-1;){var u=vE(o.value+(s+1)*l);u>r[0]&&u<r[1]&&c.push(u),s++}n.push(c)}return n},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Go(e.value)||0:n===`auto`&&(n=this._intervalPrecision),jh(vE(e.value,n,!0))},t.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];if(isFinite(i)){i<0&&(i=-i,r.reverse());var a=cE(r,e,t,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1])if(t[0]!==0){var n=Math.abs(t[0]);e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var r=t[1]-t[0];isFinite(r)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=vE(Math.floor(t[0]/i)*i)),e.fixMax||(t[1]=vE(Math.ceil(t[1]/i)*i))},t.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},t.type=`interval`,t}(aE);aE.registerClass(yE);var bE=yE,xE=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},SE=function(e){A(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`time`,n}return t.prototype.getLabel=function(e){var t=this.getSetting(`useUTC`);return ph(e.value,oh[fh(uh(this._minLevelUnit))]||oh.second,t,this.getSetting(`locale`))},t.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting(`useUTC`);return mh(e,t,n,this.getSetting(`locale`),r)},t.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];if(!e)return n;n.push({value:t[0],level:0});var r=this.getSetting(`useUTC`),i=jE(this._minLevelUnit,this._approxInterval,r,t);return n=n.concat(i),n.push({value:t[1],level:0}),n},t.prototype.calcNiceExtent=function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=nh,t[1]+=nh),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-nh}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,t,n){e=e||10;var r=this._extent;this._approxInterval=(r[1]-r[0])/e,t!=null&&this._approxInterval<t&&(this._approxInterval=t),n!=null&&this._approxInterval>n&&(this._approxInterval=n);var i=CE.length,a=Math.min(xE(CE,this._approxInterval,0,i),i-1);this._interval=CE[a][1],this._minLevelUnit=CE[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return De(e)?e:+Qo(e)},t.prototype.contain=function(e){return pE(this.parse(e),this._extent)},t.prototype.normalize=function(e){return mE(this.parse(e),this._extent)},t.prototype.scale=function(e){return hE(e,this._extent)},t.type=`time`,t}(bE),CE=[[`second`,$m],[`minute`,eh],[`hour`,th],[`quarter-day`,th*6],[`half-day`,th*12],[`day`,nh*1.2],[`half-week`,nh*3.5],[`week`,nh*7],[`month`,nh*31],[`quarter`,nh*95],[`half-year`,rh/2],[`year`,rh]];function wE(e,t,n,r){var i=Qo(t),a=Qo(n),o=function(e){return gh(i,e,r)===gh(a,e,r)},s=function(){return o(`year`)},c=function(){return s()&&o(`month`)},l=function(){return c()&&o(`day`)},u=function(){return l()&&o(`hour`)},d=function(){return u()&&o(`minute`)},f=function(){return d()&&o(`second`)},p=function(){return f()&&o(`millisecond`)};switch(e){case`year`:return s();case`month`:return c();case`day`:return l();case`hour`:return u();case`minute`:return d();case`second`:return f();case`millisecond`:return p()}}function TE(e,t){return e/=nh,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function EE(e){var t=30*nh;return e/=t,e>6?6:e>3?3:e>2?2:1}function DE(e){return e/=th,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function OE(e,t){return e/=t?eh:$m,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function kE(e){return ts(e,!0)}function AE(e,t,n){var r=new Date(e);switch(uh(t)){case`year`:case`month`:r[Th(n)](0);case`day`:r[Eh(n)](1);case`hour`:r[Dh(n)](0);case`minute`:r[Oh(n)](0);case`second`:r[kh(n)](0),r[Ah(n)](0)}return r.getTime()}function jE(e,t,n,r){var i=1e4,a=ch,o=0;function s(e,t,n,i,a,o,s){for(var c=new Date(t),l=t,u=c[i]();l<n&&l<=r[1];)s.push({value:l}),u+=e,c[a](u),l=c.getTime();s.push({value:l,notAdd:!0})}function c(e,i,a){var o=[],c=!i.length;if(!wE(uh(e),r[0],r[1],n)){c&&(i=[{value:AE(new Date(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/nh/365)),p=_h(n),m=wh(n);break;case`half-year`:case`quarter`:case`month`:f=EE(t),p=vh(n),m=Th(n);break;case`week`:case`half-week`:case`day`:f=TE(t,31),p=yh(n),m=Eh(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=DE(t),p=bh(n),m=Dh(n);break;case`minute`:f=OE(t,!0),p=xh(n),m=Oh(n);break;case`second`:f=OE(t,!1),p=Sh(n),m=kh(n);break;case`millisecond`:f=kE(t),p=Ch(n),m=Ah(n);break}s(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]);return o}}for(var l=[],u=[],d=0,f=0,p=0;p<a.length&&o++<i;++p){var m=uh(a[p]);if(dh(a[p])&&(c(a[p],l[l.length-1]||[],u),m!==(a[p+1]?uh(a[p+1]):null))){if(u.length){f=d,u.sort(function(e,t){return e.value-t.value});for(var h=[],g=0;g<u.length;++g){var _=u[g].value;(g===0||u[g-1].value!==_)&&(h.push(u[g]),_>=r[0]&&_<=r[1]&&d++)}var v=(r[1]-r[0])/t;if(d>v*1.5&&f>v/1.5||(l.push(h),d>v||e===a[p]))break}u=[]}}process.env.NODE_ENV!==`production`&&o>=i&&fs(`Exceed safe limit.`);for(var y=Se(U(l,function(e){return Se(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),b=[],x=y.length-1,p=0;p<y.length;++p)for(var S=y[p],C=0;C<S.length;++C)b.push({value:S[C].value,level:x-p});b.sort(function(e,t){return e.value-t.value});for(var w=[],p=0;p<b.length;++p)(p===0||b[p].value!==b[p-1].value)&&w.push(b[p]);return w}aE.registerClass(SE);var ME=SE,NE=aE.prototype,PE=bE.prototype,FE=Uo,IE=Math.floor,LE=Math.ceil,RE=Math.pow,zE=Math.log,BE=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`log`,t.base=10,t._originalScale=new bE,t._interval=0,t}return t.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();return U(PE.getTicks.call(this,e),function(e){var t=e.value,i=Uo(RE(this.base,t));return i=t===n[0]&&this._fixMin?HE(i,r[0]):i,i=t===n[1]&&this._fixMax?HE(i,r[1]):i,{value:i}},this)},t.prototype.setExtent=function(e,t){var n=zE(this.base);e=zE(Math.max(0,e))/n,t=zE(Math.max(0,t))/n,PE.setExtent.call(this,e,t)},t.prototype.getExtent=function(){var e=this.base,t=NE.getExtent.call(this);t[0]=RE(e,t[0]),t[1]=RE(e,t[1]);var n=this._originalScale.getExtent();return this._fixMin&&(t[0]=HE(t[0],n[0])),this._fixMax&&(t[1]=HE(t[1],n[1])),t},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=zE(e[0])/zE(t),e[1]=zE(e[1])/zE(t),NE.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},t.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var r=$o(n);for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&Math.abs(r)>0;)r*=10;var i=[Uo(LE(t[0]/r)*r),Uo(IE(t[1]/r)*r)];this._interval=r,this._niceExtent=i}},t.prototype.calcNiceExtent=function(e){PE.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=zE(e)/zE(this.base),pE(e,this._extent)},t.prototype.normalize=function(e){return e=zE(e)/zE(this.base),mE(e,this._extent)},t.prototype.scale=function(e){return e=hE(e,this._extent),RE(this.base,e)},t.type=`log`,t}(aE),VE=BE.prototype;VE.getMinorTicks=PE.getMinorTicks,VE.getLabel=PE.getLabel;function HE(e,t){return FE(e,Go(t))}aE.registerClass(BE);var UE=BE,WE=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal=e.type===`ordinal`;this._needCrossZero=e.type===`interval`&&t.getNeedCrossZero&&t.getNeedCrossZero();var i=t.get(`min`,!0);i??(i=t.get(`startValue`,!0));var a=this._modelMinRaw=i;K(a)?this._modelMinNum=JE(e,a({min:n[0],max:n[1]})):a!==`dataMin`&&(this._modelMinNum=JE(e,a));var o=this._modelMaxRaw=t.get(`max`,!0);if(K(o)?this._modelMaxNum=JE(e,o({min:n[0],max:n[1]})):o!==`dataMax`&&(this._modelMaxNum=JE(e,o)),r)this._axisDataLen=t.getCategories().length;else{var s=t.get(`boundaryGap`),c=G(s)?s:[s||0,s||0];typeof c[0]==`boolean`||typeof c[1]==`boolean`?(process.env.NODE_ENV!==`production`&&console.warn(`Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.`),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[tn(c[0],1),tn(c[1],1)]}},e.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,a=e?null:n-t||Math.abs(t),o=this._modelMinRaw===`dataMin`?t:this._modelMinNum,s=this._modelMaxRaw===`dataMax`?n:this._modelMaxNum,c=o!=null,l=s!=null;o??(o=e?r?0:NaN:t-i[0]*a),s??(s=e?r?r-1:NaN:n+i[1]*a),(o==null||!isFinite(o))&&(o=NaN),(s==null||!isFinite(s))&&(s=NaN);var u=Pe(o)||Pe(s)||e&&!r;this._needCrossZero&&(o>0&&s>0&&!c&&(o=0),o<0&&s<0&&!l&&(s=0));var d=this._determinedMin,f=this._determinedMax;return d!=null&&(o=d,c=!0),f!=null&&(s=f,l=!0),{min:o,max:s,minFixed:c,maxFixed:l,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){process.env.NODE_ENV!==`production`&&X(!this.frozen),this[KE[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=GE[e];process.env.NODE_ENV!==`production`&&X(!this.frozen&&this[n]==null),this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),GE={min:`_determinedMin`,max:`_determinedMax`},KE={min:`_dataMin`,max:`_dataMax`};function qE(e,t,n){var r=e.rawExtentInfo;return r||(r=new WE(e,t,n),e.rawExtentInfo=r,r)}function JE(e,t){return t==null?null:Pe(t)?NaN:e.parse(t)}function YE(e,t){var n=e.type,r=qE(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,a=r.max,o=t.ecModel;if(o&&n===`time`){var s=Rv(`bar`,o),c=!1;if(H(s,function(e){c=c||e.getBaseAxis()===t.axis}),c){var l=Bv(s),u=XE(i,a,t,l);i=u.min,a=u.max}}return{extent:[i,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function XE(e,t,n,r){var i=n.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Hv(r,n.axis);if(o===void 0)return{min:e,max:t};var s=1/0;H(o,function(e){s=Math.min(e.offset,s)});var c=-1/0;H(o,function(e){c=Math.max(e.offset+e.width,c)}),s=Math.abs(s),c=Math.abs(c);var l=s+c,u=t-e,d=u/(1-(s+c)/a)-u;return t+=c/l*d,e-=s/l*d,{min:e,max:t}}function ZE(e,t){var n=t,r=YE(e,n),i=r.extent,a=n.get(`splitNumber`);e instanceof UE&&(e.base=n.get(`logBase`));var o=e.type,s=n.get(`interval`),c=o===`interval`||o===`time`;e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:c?n.get(`minInterval`):null,maxInterval:c?n.get(`maxInterval`):null}),s!=null&&e.setInterval&&e.setInterval(s)}function QE(e,t){if(t=t||e.get(`type`),t)switch(t){case`category`:return new _E({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case`time`:return new ME({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`)});default:return new((aE.getClass(t))||bE)}}function $E(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function eD(e){var t=e.getLabelModel().get(`formatter`),n=e.type===`category`?e.scale.getExtent()[0]:null;return e.scale.type===`time`?function(t){return function(n,r){return e.scale.getFormattedLabel(n,r,t)}}(t):q(t)?function(t){return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)}}(t):K(t)?function(t){return function(r,i){return n!=null&&(i=r.value-n),t(tD(e,r),i,r.level==null?null:{level:r.level})}}(t):function(t){return e.scale.getLabel(t)}}function tD(e,t){return e.type===`category`?e.scale.getLabel(t):t.value}function nD(e){var t=e.model,n=e.scale;if(!(!t.get([`axisLabel`,`show`])||n.isBlank())){var r,i,a=n.getExtent();n instanceof _E?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=eD(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;u<i;u+=l){var d=s(r?r[u]:{value:a[0]+u},u),f=rD(o.getTextRect(d),o.get(`rotate`)||0);c?c.union(f):c=f}return c}}function rD(e,t){var n=t*Math.PI/180,r=e.width,i=e.height,a=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),o=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new $(e.x,e.y,a,o)}function iD(e){return e.get(`interval`)??`auto`}function aD(e){return e.type===`category`&&iD(e.getLabelModel())===0}function oD(e,t){var n={};return H(e.mapDimensionsAll(t),function(t){n[gm(e,t)]=!0}),Ce(n)}function sD(e,t,n){t&&H(oD(t,n),function(n){var r=t.getApproximateExtent(n);r[0]<e[0]&&(e[0]=r[0]),r[1]>e[1]&&(e[1]=r[1])})}var cD=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 U(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Se(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}(),lD=cD,uD=[`x`,`y`];function dD(e){return e.type===`interval`||e.type===`time`}var fD=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`cartesian2d`,t.dimensions=uD,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!dD(e)||!dD(t))){var n=e.getExtent(),r=t.getExtent(),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;this._invTransform=It([],this._transform=[c,0,0,l,i[0]-n[0]*c,i[1]-r[0]*l])}}},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 $(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n=n||[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return jn(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||[],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){var n=[];if(this._invTransform)return jn(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=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 $(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(lD),pD=fD,mD=Us();function hD(e,t){var n=U(t,function(t){return e.scale.parse(t)});return e.type===`time`&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function gD(e){var t=e.getLabelModel().get(`customValues`);if(t){var n=eD(e),r=e.scale.getExtent();return{labels:U(Se(hD(e,t),function(e){return e>=r[0]&&e<=r[1]}),function(t){var r={value:t};return{formattedLabel:n(r),rawLabel:e.scale.getLabel(r),tickValue:t}})}}return e.type===`category`?vD(e):xD(e)}function _D(e,t){var n=e.getTickModel().get(`customValues`);if(n){var r=e.scale.getExtent();return{ticks:Se(hD(e,n),function(e){return e>=r[0]&&e<=r[1]})}}return e.type===`category`?bD(e,t):{ticks:U(e.scale.getTicks(),function(e){return e.value})}}function vD(e){var t=e.getLabelModel(),n=yD(e,t);return!t.get(`show`)||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function yD(e,t){var n=SD(e,`labels`),r=iD(t),i=CD(n,r);if(i)return i;var a,o;return K(r)?a=kD(e,r):(o=r===`auto`?TD(e):r,a=OD(e,o)),wD(n,r,{labels:a,labelCategoryInterval:o})}function bD(e,t){var n=SD(e,`ticks`),r=iD(t),i=CD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=kD(e,r,!0);else if(r===`auto`){var s=yD(e,e.getLabelModel());o=s.labelCategoryInterval,a=U(s.labels,function(e){return e.tickValue})}else o=r,a=OD(e,o,!0);return wD(n,r,{ticks:a,tickCategoryInterval:o})}function xD(e){var t=e.scale.getTicks(),n=eD(e);return{labels:U(t,function(t,r){return{level:t.level,formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value}})}}function SD(e,t){return mD(e)[t]||(mD(e)[t]=[])}function CD(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function wD(e,t,n){return e.push({key:t,value:n}),n}function TD(e){return mD(e).autoInterval??(mD(e).autoInterval=e.calculateCategoryInterval())}function ED(e){var t=DD(e),n=eD(e),r=(t.axisRotate-t.labelRotate)/180*Math.PI,i=e.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var c=a[0],l=e.dataToCoord(c+1)-e.dataToCoord(c),u=Math.abs(l*Math.cos(r)),d=Math.abs(l*Math.sin(r)),f=0,p=0;c<=a[1];c+=s){var m=0,h=0,g=Zt(n({value:c}),t.font,`center`,`top`);m=g.width*1.3,h=g.height*1.3,f=Math.max(f,m,7),p=Math.max(p,h,7)}var _=f/u,v=p/d;isNaN(_)&&(_=1/0),isNaN(v)&&(v=1/0);var y=Math.max(0,Math.floor(Math.min(_,v))),b=mD(e.model),x=e.getExtent(),S=b.lastAutoInterval,C=b.lastTickCount;return S!=null&&C!=null&&Math.abs(S-y)<=1&&Math.abs(C-o)<=1&&S>y&&b.axisExtent0===x[0]&&b.axisExtent1===x[1]?y=S:(b.lastTickCount=o,b.lastAutoInterval=y,b.axisExtent0=x[0],b.axisExtent1=x[1]),y}function DD(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 OD(e,t,n){var r=eD(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],c=Math.max((t||0)+1,1),l=a[0],u=i.count();l!==0&&c>1&&u/c>2&&(l=Math.round(Math.ceil(l/c)*c));var d=aD(e),f=o.get(`showMinLabel`)||d,p=o.get(`showMaxLabel`)||d;f&&l!==a[0]&&h(a[0]);for(var m=l;m<=a[1];m+=c)h(m);p&&m-c!==a[1]&&h(a[1]);function h(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return s}function kD(e,t,n){var r=e.scale,i=eD(e),a=[];return H(r.getTicks(),function(e){var o=r.getLabel(e),s=e.value;t(e.value,o)&&a.push(n?s:{formattedLabel:i(e),rawLabel:o,tickValue:s})}),a}var AD=[0,1],jD=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(e)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return qo(e||this.scale.getExtent(),this._extent)},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._extent,r=this.scale;return e=r.normalize(e),this.onBand&&r.type===`ordinal`&&(n=n.slice(),MD(n,r.count())),Vo(e,AD,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&r.type===`ordinal`&&(n=n.slice(),MD(n,r.count()));var i=Vo(e,n,AD,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=_D(this,t).ticks,r=U(n,function(e){return{coord:this.dataToCoord(this.scale.type===`ordinal`?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this),i=t.get(`alignWithLabel`);return ND(this,r,i,e.clamp),r},e.prototype.getMinorTicksCoords=function(){if(this.scale.type===`ordinal`)return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),U(this.scale.getMinorTicks(e),function(e){return U(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(){return gD(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(){return ED(this)},e}();function MD(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}function ND(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var c=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/c;H(t,function(e){e.coord-=l/2});var u=e.scale.getExtent();s=1+u[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*s,tickValue:u[1]+1},t.push(o)}var d=a[0]>a[1];f(t[0].coord,a[0])&&(r?t[0].coord=a[0]:t.shift()),r&&f(a[0],t[0].coord)&&t.unshift({coord:a[0]}),f(a[1],o.coord)&&(r?o.coord=a[1]:t.pop()),r&&f(o.coord,a[1])&&t.push({coord:a[1]});function f(e,t){return e=Uo(e),t=Uo(t),d?e>t:e<t}}var PD=jD,FD=function(e){A(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}(PD),ID=FD;function LD(e,t,n){n=n||{};var r=e.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,c=o?`onZero`:s,l=i.dim,u=r.getRect(),d=[u.x,u.x+u.width,u.y,u.y+u.height],f={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get(`offset`)||0,m=l===`x`?[d[2]-p,d[3]+p]:[d[0]-p,d[1]+p];if(o){var h=o.toGlobalCoord(o.dataToCoord(0));m[f.onZero]=Math.max(Math.min(h,m[1]),m[0])}a.position=[l===`y`?m[f[c]]:d[0],l===`x`?m[f[c]]:d[3]],a.rotation=Math.PI/2*(l===`x`?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?m[f[s]]-m[f.onZero]:0,t.get([`axisTick`,`inside`])&&(a.tickDirection=-a.tickDirection),Fe(n.labelInside,t.get([`axisLabel`,`inside`]))&&(a.labelDirection=-a.labelDirection);var g=t.get([`axisLabel`,`rotate`]);return a.labelRotate=c===`top`?-g:g,a.z2=1,a}function RD(e){return e.get(`coordinateSystem`)===`cartesian2d`}function zD(e){var t={xAxisModel:null,yAxisModel:null};return H(t,function(n,r){var i=r.replace(/Model$/,``),a=e.getReferringComponents(i,qs).models[0];if(process.env.NODE_ENV!==`production`&&!a)throw Error(i+` "`+Ie(e.get(i+`Index`),e.get(i+`Id`),0)+`" not found`);t[r]=a}),t}var BD=Math.log;function VD(e,t,n){var r=bE.prototype,i=r.getTicks.call(n),a=r.getTicks.call(n,!0),o=i.length-1,s=r.getInterval.call(n),c=YE(e,t),l=c.extent,u=c.fixMin,d=c.fixMax;if(e.type===`log`){var f=BD(e.base);l=[BD(l[0])/f,BD(l[1])/f]}e.setExtent(l[0],l[1]),e.calcNiceExtent({splitNumber:o,fixMin:u,fixMax:d});var p=r.getExtent.call(e);u&&(l[0]=p[0]),d&&(l[1]=p[1]);var m=r.getInterval.call(e),h=l[0],g=l[1];if(u&&d)m=(g-h)/o;else if(u)for(g=l[0]+m*o;g<l[1]&&isFinite(g)&&isFinite(l[1]);)m=lE(m),g=l[0]+m*o;else if(d)for(h=l[1]-m*o;h>l[0]&&isFinite(h)&&isFinite(l[0]);)m=lE(m),h=l[1]-m*o;else{e.getTicks().length-1>o&&(m=lE(m));var _=m*o;g=Math.ceil(l[1]/m)*m,h=Uo(g-_),h<0&&l[0]>=0?(h=0,g=Uo(_)):g>0&&l[1]<=0&&(g=0,h=-Uo(_))}var v=(i[0].value-a[0].value)/s,y=(i[o].value-a[o].value)/s;if(r.setExtent.call(e,h+m*v,g+m*y),r.setInterval.call(e,m),(v||y)&&r.setNiceExtent.call(e,h+m,g-m),process.env.NODE_ENV!==`production`){var b=r.getTicks.call(e);b[1]&&(!oE(m)||Ko(b[1].value)>Ko(m))&&fs(`The ticks may be not readable when set min: `+t.get(`min`)+`, max: `+t.get(`max`)+` and alignTicks: true`)}}var HD=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=uD,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;this._updateScale(e,this.model);function r(e){var t,n=Ce(e),r=n.length;if(r){for(var i=[],a=r-1;a>=0;a--){var o=e[+n[a]],s=o.model,c=o.scale;sE(c)&&s.get(`alignTicks`)&&s.get(`interval`)==null?i.push(o):(ZE(c,s),sE(c)&&(t=o))}i.length&&(t||(t=i.pop(),ZE(t.scale,t.model)),H(i,function(e){VD(e.scale,e.model,t.scale)}))}}r(n.x),r(n.y);var i={};H(n.x,function(e){WD(n,`y`,e,i)}),H(n.y,function(e){WD(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=!n&&e.get(`containLabel`),a=qh(r,{width:t.getWidth(),height:t.getHeight()});this._rect=a;var o=this._axesList;s(),i&&(H(o,function(e){if(!e.model.get([`axisLabel`,`inside`])){var t=nD(e);if(t){var n=e.isHorizontal()?`height`:`width`,r=e.model.get([`axisLabel`,`margin`]);a[n]-=t[n]+r,e.position===`top`?a.y+=t.height+r:e.position===`left`&&(a.x+=t.width+r)}}}),s()),H(this._coordsList,function(e){e.calcAffineTransform()});function s(){H(o,function(e){var t=e.isHorizontal(),n=t?[0,a.width]:[0,a.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),KD(e,t?a.x:a.y)})}},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`,qs).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,qs).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,V(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,H(o.x,function(t,n){H(o.y,function(i,a){var o=`x`+n+`y`+a,s=new pD(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})});function c(t){return function(n,r){if(UD(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=new ID(t,QE(n),[0,0],n.get(`type`),c);l.onBand=l.type===`category`&&n.get(`boundaryGap`),l.inverse=n.get(`inverse`),n.axis=l,l.model=n,l.grid=i,l.index=r,i._axesList.push(l),o[t][r]=l,s[t]++}}}},e.prototype._updateScale=function(e,t){H(this._axesList,function(e){if(e.scale.setExtent(1/0,-1/0),e.type===`category`){var t=e.model.get(`categorySortInfo`);e.scale.setSortInfo(t)}}),e.eachSeries(function(e){if(RD(e)){var r=zD(e),i=r.xAxisModel,a=r.yAxisModel;if(!UD(i,t)||!UD(a,t))return;var o=this.getCartesian(i.componentIndex,a.componentIndex),s=e.getData(),c=o.getAxis(`x`),l=o.getAxis(`y`);n(s,c),n(s,l)}},this);function n(e,t){H(oD(e,t.dim),function(n){t.scale.unionExtentFromData(e,n)})}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return H(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);V(t,i)<0&&t.push(i),V(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)}),t.eachSeries(function(e){if(RD(e)){var t=zD(e),n=t.xAxisModel,r=t.yAxisModel,i=n.getCoordSysModel();if(process.env.NODE_ENV!==`production`){if(!i)throw Error(`Grid "`+Ie(n.get(`gridIndex`),n.get(`gridId`),0)+`" not found`);if(n.getCoordSysModel()!==r.getCoordSysModel())throw Error(`xAxis and yAxis must use the same grid`)}e.coordinateSystem=i.coordinateSystem.getCartesian(n.componentIndex,r.componentIndex)}}),r},e.dimensions=uD,e}();function UD(e,t){return e.getCoordSysModel()===t}function WD(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)GD(i[c])&&(a=i[c]);else for(var l in i)if(i.hasOwnProperty(l)&&GD(i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function GD(e){return e&&e.type!==`category`&&e.type!==`time`&&$E(e)}function KD(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}}var qD=HD,JD=Math.PI,YD=function(){function e(e,t){this.group=new Il,this.opt=t,this.axisModel=e,B(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Il({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return e.prototype.hasBuilder=function(e){return!!XD[e]},e.prototype.add=function(e){XD[e](this.opt,this.axisModel,this.group,this._transformGroup)},e.prototype.getGroup=function(){return this.group},e.innerTextLayout=function(e,t,n){var r=Yo(t-e),i,a;return Xo(r)?(a=n>0?`top`:`bottom`,i=`center`):Xo(r-JD)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<JD?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}(),XD={axisLine:function(e,t,n,r){var i=t.get([`axisLine`,`show`]);if(i===`auto`&&e.handleAutoShown&&(i=e.handleAutoShown(`axisLine`)),i){var a=t.axis.getExtent(),o=r.transform,s=[a[0],0],c=[a[1],0],l=s[0]>c[0];o&&(jn(s,s,o),jn(c,c,o));var u=z({lineCap:`round`},t.getModel([`axisLine`,`lineStyle`]).getLineStyle()),d=new xu({shape:{x1:s[0],y1:s[1],x2:c[0],y2:c[1]},style:u,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});_d(d.shape,d.style.lineWidth),d.anid=`line`,n.add(d);var f=t.get([`axisLine`,`symbol`]);if(f!=null){var p=t.get([`axisLine`,`symbolSize`]);q(f)&&(f=[f,f]),(q(p)||De(p))&&(p=[p,p]);var m=S_(t.get([`axisLine`,`symbolOffset`])||0,p),h=p[0],g=p[1];H([{rotate:e.rotation+Math.PI/2,offset:m[0],r:0},{rotate:e.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((s[0]-c[0])*(s[0]-c[0])+(s[1]-c[1])*(s[1]-c[1]))}],function(t,r){if(f[r]!==`none`&&f[r]!=null){var i=b_(f[r],-h/2,-g/2,h,g,u.stroke,!0),a=t.r+t.offset,o=l?c:s;i.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),n.add(i)}})}}},axisTickLabel:function(e,t,n,r){var i=rO(n,r,t,e),a=aO(n,r,t,e);QD(t,a,i),iO(n,r,t,e.tickDirection),t.get([`axisLabel`,`hideOverlap`])&&Vy(By(U(a,function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}})))},axisName:function(e,t,n,r){var i=Fe(e.axisName,t.get(`name`));if(i){var a=t.get(`nameLocation`),o=e.nameDirection,s=t.getModel(`nameTextStyle`),c=t.get(`nameGap`)||0,l=t.axis.getExtent(),u=l[0]>l[1]?-1:1,d=[a===`start`?l[0]-u*c:a===`end`?l[1]+u*c:(l[0]+l[1])/2,tO(a)?e.labelOffset+o*c:0],f,p=t.get(`nameRotate`);p!=null&&(p=p*JD/180);var m;tO(a)?f=YD.innerTextLayout(e.rotation,p??e.rotation,o):(f=ZD(e.rotation,a,p||0,l),m=e.axisNameAvailableWidth,m!=null&&(m=Math.abs(m/Math.sin(f.rotation)),!isFinite(m)&&(m=null)));var h=s.getFont(),g=t.get(`nameTruncate`,!0)||{},_=g.ellipsis,v=Fe(e.nameTruncateMaxWidth,g.maxWidth,m),y=new Lo({x:d[0],y:d[1],rotation:f.rotation,silent:YD.isLabelSilent(t),style:Vd(s,{text:i,font:h,overflow:`truncate`,width:v,ellipsis:_,fill:s.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),align:s.get(`align`)||f.textAlign,verticalAlign:s.get(`verticalAlign`)||f.textVerticalAlign}),z2:1});if(Nd({el:y,componentModel:t,itemName:i}),y.__fullText=i,y.anid=`name`,t.get(`triggerEvent`)){var b=YD.makeAxisEventDataBase(t);b.targetType=`axisName`,b.name=i,ec(y).eventData=b}r.add(y),y.updateTransform(),n.add(y),y.decomposeTransform()}}};function ZD(e,t,n,r){var i=Yo(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Xo(i-JD/2)?(o=c?`bottom`:`top`,a=`center`):Xo(i-JD*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<JD*1.5&&i>JD/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function QD(e,t,n){if(!aD(e.axis)){var r=e.get([`axisLabel`,`showMinLabel`]),i=e.get([`axisLabel`,`showMaxLabel`]);t=t||[],n=n||[];var a=t[0],o=t[1],s=t[t.length-1],c=t[t.length-2],l=n[0],u=n[1],d=n[n.length-1],f=n[n.length-2];r===!1?($D(a),$D(l)):eO(a,o)&&(r?($D(o),$D(u)):($D(a),$D(l))),i===!1?($D(s),$D(d)):eO(c,s)&&(i?($D(c),$D(f)):($D(s),$D(d)))}}function $D(e){e&&(e.ignore=!0)}function eO(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(!(!n||!r)){var i=At([]);return Pt(i,i,-e.rotation),n.applyTransform(Mt([],i,e.getLocalTransform())),r.applyTransform(Mt([],i,t.getLocalTransform())),n.intersect(r)}}function tO(e){return e===`middle`||e===`center`}function nO(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&&(jn(o,o,t),jn(s,s,t));var u=new xu({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});_d(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u)}return a}function rO(e,t,n,r){var i=n.axis,a=n.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&r.handleAutoShown&&(o=r.handleAutoShown(`axisTick`)),!(!o||i.scale.isBlank())){for(var s=a.getModel(`lineStyle`),c=r.tickDirection*a.get(`length`),l=nO(i.getTicksCoords(),t.transform,c,B(s.getLineStyle(),{stroke:n.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)e.add(l[u]);return l}}function iO(e,t,n,r){var i=n.axis,a=n.getModel(`minorTick`);if(!(!a.get(`show`)||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel(`lineStyle`),c=r*a.get(`length`),l=B(s.getLineStyle(),B(n.getModel(`axisTick`).getLineStyle(),{stroke:n.get([`axisLine`,`lineStyle`,`color`])})),u=0;u<o.length;u++)for(var d=nO(o[u],t.transform,c,l,`minorticks_`+u),f=0;f<d.length;f++)e.add(d[f])}}function aO(e,t,n,r){var i=n.axis;if(!(!Fe(r.axisLabelShow,n.get([`axisLabel`,`show`]))||i.scale.isBlank())){var a=n.getModel(`axisLabel`),o=a.get(`margin`),s=i.getViewLabels(),c=(Fe(r.labelRotate,a.get(`rotate`))||0)*JD/180,l=YD.innerTextLayout(r.rotation,c,r.labelDirection),u=n.getCategories&&n.getCategories(!0),d=[],f=YD.isLabelSilent(n),p=n.get(`triggerEvent`);return H(s,function(c,m){var h=i.scale.type===`ordinal`?i.scale.getRawOrdinalNumber(c.tickValue):c.tickValue,g=c.formattedLabel,_=c.rawLabel,v=a;if(u&&u[h]){var y=u[h];J(y)&&y.textStyle&&(v=new df(y.textStyle,a,n.ecModel))}var b=v.getTextColor()||n.get([`axisLine`,`lineStyle`,`color`]),x=i.dataToCoord(h),S=v.getShallow(`align`,!0)||l.textAlign,C=Y(v.getShallow(`alignMinLabel`,!0),S),w=Y(v.getShallow(`alignMaxLabel`,!0),S),T=v.getShallow(`verticalAlign`,!0)||v.getShallow(`baseline`,!0)||l.textVerticalAlign,E=Y(v.getShallow(`verticalAlignMinLabel`,!0),T),D=Y(v.getShallow(`verticalAlignMaxLabel`,!0),T),O=new Lo({x,y:r.labelOffset+r.labelDirection*o,rotation:l.rotation,silent:f,z2:10+(c.level||0),style:Vd(v,{text:g,align:m===0?C:m===s.length-1?w:S,verticalAlign:m===0?E:m===s.length-1?D:T,fill:K(b)?b(i.type===`category`?_:i.type===`value`?h+``:h,m):b})});if(O.anid=`label_`+h,Nd({el:O,componentModel:n,itemName:g,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:_,tickIndex:m}}),p){var k=YD.makeAxisEventDataBase(n);k.targetType=`axisLabel`,k.value=_,k.tickIndex=m,i.type===`category`&&(k.dataIndex=h),ec(O).eventData=k}t.add(O),O.updateTransform(),d.push(O),e.add(O),O.decomposeTransform()}),d}}var oO=YD;function sO(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return cO(n,e,t),n.seriesInvolved&&uO(n,e),n}function cO(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];H(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=_O(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(H(n.getAxes(),Te(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)&&H(f.baseAxes,Te(p,d?`cross`:!0,u)),d&&H(f.otherAxes,Te(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!gO(d))){s??(s=d.get(`triggerTooltip`)),d=r?lO(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=_O(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:gO(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=dO(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function lO(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};H(s,function(e){c[e]=L(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||(c.label={});if(l.show??(l.show=!1),i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&B(l,u.textStyle)}return e.model.getModel(`axisPointer`,new df(c,n,r))}function uO(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||H(e.coordSysAxesInfo[_O(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}function dO(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(fO(a[r+`AxisId`],n.id)||fO(a[r+`AxisIndex`],n.componentIndex)||fO(a[r+`AxisName`],n.name))return i}}function fO(e,t){return e===`all`||G(e)&&V(e,t)>=0||e===t}function pO(e){var t=mO(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=gO(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent().slice();c[0]>c[1]&&c.reverse(),(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 mO(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[_O(e)]}function hO(e){var t=mO(e);return t&&t.axisPointerModel}function gO(e){return!!e.get([`handle`,`show`])}function _O(e){return e.type+`||`+e.id}var vO={},yO=function(e){A(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&&pO(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=hO(e);a?(this._axisPointer||(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){if(process.env.NODE_ENV!==`production`&&vO[e])throw Error(`axisPointer `+e+` exists`);vO[e]=t},t.getAxisPointerClass=function(e){return e&&vO[e]},t.type=`axis`,t}(yS),bO=yO,xO=Us();function SO(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,clamp:!0});if(l.length){var u=s.length,d=xO(e).splitAreaColors,f=Z(),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=G(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 yo({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:B({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}xO(e).splitAreaColors=f}}}function CO(e){xO(e).splitAreaColors=null}var wO=[`axisLine`,`axisTickLabel`,`axisName`],TO=[`splitArea`,`splitLine`,`minorSplitLine`],EO=function(e){A(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;if(this._axisGroup=new Il,this.group.add(this._axisGroup),t.get(`show`)){var o=t.getCoordSysModel(),s=new oO(t,z({handleAutoShown:function(e){for(var n=o.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(sE(n[r].getOtherAxis(t.axis).scale))return!0;return!1}},LD(o,t)));H(wO,s.add,s),this._axisGroup.add(s.getGroup()),H(TO,function(e){t.get([e,`show`])&&DO[e](this,this._axisGroup,t,o)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||Td(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i)}},t.prototype.remove=function(){CO(this)},t.type=`cartesianAxis`,t}(bO),DO={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitLine`),o=a.getModel(`lineStyle`),s=o.get(`color`),c=a.get(`showMinLine`)!==!1,l=a.get(`showMaxLine`)!==!1;s=G(s)?s:[s];for(var u=r.coordinateSystem.getRect(),d=i.isHorizontal(),f=0,p=i.getTicksCoords({tickModel:a}),m=[],h=[],g=o.getLineStyle(),_=0;_<p.length;_++){var v=i.toGlobalCoord(p[_].coord);if(!(_===0&&!c||_===p.length-1&&!l)){var y=p[_].tickValue;d?(m[0]=v,m[1]=u.y,h[0]=v,h[1]=u.y+u.height):(m[0]=u.x,m[1]=v,h[0]=u.x+u.width,h[1]=v);var b=f++%s.length,x=new xu({anid:y==null?null:`line_`+y,autoBatch:!0,shape:{x1:m[0],y1:m[1],x2:h[0],y2:h[1]},style:B({stroke:s[b]},g),silent:!0});_d(x.shape,g.lineWidth),t.add(x)}}}},minorSplitLine:function(e,t,n,r){var i=n.axis,a=n.getModel(`minorSplitLine`).getModel(`lineStyle`),o=r.coordinateSystem.getRect(),s=i.isHorizontal(),c=i.getMinorTicksCoords();if(c.length)for(var l=[],u=[],d=a.getLineStyle(),f=0;f<c.length;f++)for(var p=0;p<c[f].length;p++){var m=i.toGlobalCoord(c[f][p].coord);s?(l[0]=m,l[1]=o.y,u[0]=m,u[1]=o.y+o.height):(l[0]=o.x,l[1]=m,u[0]=o.x+o.width,u[1]=m);var h=new xu({anid:`minor_line_`+c[f][p].tickValue,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:d,silent:!0});_d(h.shape,d.lineWidth),t.add(h)}},splitArea:function(e,t,n,r){SO(e,t,n,r)}},OO=function(e){A(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(EO),kO=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=OO.type,t}return t.type=`yAxis`,t}(EO),AO=function(e){A(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 yo({shape:e.coordinateSystem.getRect(),style:B({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(yS),jO={offset:0};function MO(e){e.registerComponentView(AO),e.registerComponentModel(HT),e.registerCoordinateSystem(`cartesian2d`,qD),nE(e,`x`,WT,jO),nE(e,`y`,WT,jO),e.registerComponentView(OO),e.registerComponentView(kO),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var NO=`\0_ec_interaction_mutex`;function PO(e,t){return!!FO(e)[t]}function FO(e){return e[NO]||(e[NO]={})}kT({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Ze);var IO=function(e){A(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=W(n._mousedownHandler,n),i=W(n._mousemoveHandler,n),a=W(n._mouseupHandler,n),o=W(n._mousewheelHandler,n),s=W(n._pinchHandler,n);return n.enable=function(e,n){this.disable(),this._opt=B(L(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e??(e=!0),(e===!0||e===`move`||e===`pan`)&&(t.on(`mousedown`,r),t.on(`mousemove`,i),t.on(`mouseup`,a)),(e===!0||e===`scale`||e===`zoom`)&&(t.on(`mousewheel`,o),t.on(`pinch`,s))},n.disable=function(){t.off(`mousedown`,r),t.off(`mousemove`,i),t.off(`mouseup`,a),t.off(`mousewheel`,o),t.off(`pinch`,s)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!nb(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this.pointerChecker&&this.pointerChecker(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!zO(`moveOnMouseMove`,e,this._opt)||e.gestureEvent===`pinch`||PO(this._zr,`globalPan`))){var t=e.offsetX,n=e.offsetY,r=this._x,i=this._y,a=t-r,o=n-i;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&tb(e.event),RO(this,`pan`,`moveOnMouseMove`,e,{dx:a,dy:o,oldX:r,oldY:i,newX:t,newY:n,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){nb(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var t=zO(`zoomOnMouseWheel`,e,this._opt),n=zO(`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;LO(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r);LO(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:(r>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!PO(this._zr,`globalPan`)){var t=e.pinchScale>1?1.1:1/1.1;LO(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t}(gi);function LO(e,t,n,r,i){e.pointerChecker&&e.pointerChecker(r,i.originX,i.originY)&&(tb(r.event),RO(e,t,n,r,i))}function RO(e,t,n,r,i){i.isAvailableBehavior=W(zO,null,n,r),e.trigger(t,i)}function zO(e,t,n){var r=n[e];return!e||r&&(!q(r)||t.event[r+`Key`])}var BO=IO;function VO(e,t,n,r,i,a){e=e||0;var o=n[1]-n[0];if(i!=null&&(i=UO(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(t[1]-t[0]);s=UO(s,[0,o]),i=a=UO(s,[i,a]),r=0}t[0]=UO(t[0],n),t[1]=UO(t[1],n);var c=HO(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]+=l:u[1]-=l,t[r]=UO(t[r],u);var d=HO(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=t[r]+c.sign*i),d=HO(t,r),a!=null&&d.span>a&&(t[1-r]=t[r]+d.sign*a),t}function HO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function UO(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var WO=Us(),GO=L,KO=W,qO=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 Il,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Te(JO,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}QO(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&&r.getBandWidth()>o)return!0;if(a){var s=mO(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=WO(e).pointerEl=new rd[i.type](GO(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=WO(e).labelEl=new Lo(GO(t.label));e.add(i),XO(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=WO(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=WO(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),XO(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=Od(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){tb(e.event)},onmousedown:KO(this._onHandleDragMove,this,0,0),drift:KO(this._onHandleDragMove,this),ondragend:KO(this._onHandleDragEnd,this)}),n.add(r)),QO(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,ny(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){JO(this._axisPointerModel,!t&&this._moveAnimation,this._handle,ZO(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(ZO(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(ZO(r)),WO(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),ry(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function JO(e,t,n,r){YO(WO(n).lastProp,r)||(WO(n).lastProp=r,t?Xu(n,r,e):(n.stopAnimation(),n.attr(r)))}function YO(e,t){if(J(e)&&J(t)){var n=!0;return H(t,function(t,r){n=n&&YO(e[r],t)}),!!n}else return e===t}function XO(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function ZO(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function QO(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)})}var $O=qO;function ek(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 tk(e,t,n,r,i){var a=rk(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=Nh(o.get(`padding`)||0),c=o.getFont(),l=Zt(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),nk(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:Vd(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function nk(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 rk(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:tD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};H(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):K(o)&&(a=o(s))}return a}function ik(e,t,n){var r=kt();return Pt(r,r,n.rotation),Nt(r,r,n.position),xd([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function ak(e,t,n,r,i,a){var o=oO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),tk(t,r,i,a,{position:ik(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ok(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function sk(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}var ck=function(e){A(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=lk(o,a).getOtherAxis(a).getGlobalExtent(),l=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var u=ek(r),d=uk[s](a,l,c);d.style=u,e.graphicKey=d.type,e.pointer=d}ak(t,e,LD(o.model,n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=LD(t.axis.grid.model,t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=ik(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=lk(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Math.min(o[1],l[c]),l[c]=Math.max(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}($O);function lk(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var uk={line:function(e,t,n){return{type:`Line`,subPixelOptimize:!0,shape:ok([t,n[0]],[t,n[1]],dk(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:`Rect`,shape:sk([t-r/2,n[0]],[r,i],dk(e))}}};function dk(e){return e.dim===`x`?0:1}var fk=ck,pk=function(e){A(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:`#B9BEC9`,width:1,type:`dashed`},shadowStyle:{color:`rgba(210,219,238,0.2)`},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:`#fff`,padding:[5,7,5,7],backgroundColor:`auto`,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:`#333`,shadowBlur:3,shadowColor:`#aaa`,shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(tg),mk=pk,hk=Us(),gk=H;function _k(e,t,n){if(!Q.node){var r=t.getZr();hk(r).records||(hk(r).records={}),vk(r,t);var i=hk(r).records[e]||(hk(r).records[e]={});i.handler=n}}function vk(e,t){if(hk(e).initialized)return;hk(e).initialized=!0,n(`click`,Te(xk,`click`)),n(`mousemove`,Te(xk,`mousemove`)),n(`globalout`,bk);function n(n,r){e.on(n,function(n){var i=Sk(t);gk(hk(e).records,function(e){e&&r(e,n,i.dispatchAction)}),yk(i.pendings,t)})}}function yk(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 bk(e,t,n){e.handler(`leave`,null,n)}function xk(e,t,n,r){t.handler(e,n,r)}function Sk(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 Ck(e,t){if(!Q.node){var n=t.getZr();(hk(n).records||{})[e]&&(hk(n).records[e]=null)}}var wk=function(e){A(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`;_k(`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){Ck(`axisPointer`,t)},t.prototype.dispose=function(e,t){Ck(`axisPointer`,t)},t.type=`axisPointer`,t}(yS),Tk=wk;function Ek(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Hs(a,e);if(o==null||o<0||G(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`?1:0,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(U(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 Dk=Us();function Ok(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||W(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Rk(i)&&(i=Ek({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Rk(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Rk(i),f={},p={},m={list:[],map:{}},h={showPointer:Te(jk,p),showTooltip:Te(Mk,m)};H(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);H(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Ik(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&kk(e,o,h,!1,f)}})});var g={};return H(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&H(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,Lk(t),Lk(e)))),g[e.key]=a}})}),H(g,function(e,t){kk(u[t],e,h,!0,f)}),Nk(p,u,f),Pk(m,i,e,o),Fk(u,o,n),f}}function kk(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=Ak(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&z(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Ak(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return H(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.getData().indicesOfNearest(l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(!(u==null||!isFinite(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),H(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function jk(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Mk(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=_O(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 Nk(e,t,n){var r=n.axesInfo=[];H(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 Pk(e,t,n,r){if(Rk(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 Fk(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Dk(r)[i]||{},o=Dk(r)[i]={};H(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&H(n.seriesDataIndices,function(e){var t=e.seriesIndex+` | `+e.dataIndex;o[t]=e})});var s=[],c=[];H(a,function(e,t){!o[t]&&c.push(e)}),H(o,function(e,t){!a[t]&&s.push(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 Ik(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 Lk(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 Rk(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function zk(e){bO.registerAxisPointerClass(`CartesianAxisPointer`,fk),e.registerComponentModel(mk),e.registerComponentView(Tk),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=sO(e,t)}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},Ok)}function Bk(e){BT(MO),BT(zk)}var Vk=[`x`,`y`,`radius`,`angle`,`single`],Hk=[`cartesian2d`,`polar`,`singleAxis`];function Uk(e){return V(Hk,e.get(`coordinateSystem`))>=0}function Wk(e){return process.env.NODE_ENV!==`production`&&X(e),e+`Axis`}function Gk(e,t){var n=Z(),r=[],i=Z();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});var a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){var t=!1;return e.eachTargetAxis(function(e,r){var i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function Kk(e){var t=e.ecModel,n={infoList:[],infoMap:Z()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(Wk(e),r);if(i){var a=i.getCoordSysModel();if(a){var o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}}}),n}var qk=function(){function e(){this.indexList=[],this.indexMap=[]}return e.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},e}(),Jk=function(e){A(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=[`percent`,`percent`],n}return t.prototype.init=function(e,t,n){var r=Yk(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=Yk(e);R(this.option,e,!0),R(this.settledOption,t,!0),this._doInit(t)},t.prototype._doInit=function(e){var t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;H([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get(`orient`,!0),t=this._targetAxisInfoMap=Z();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var t=!1;return H(Vk,function(n){var r=this.getReferringComponents(Wk(n),Js);if(r.specified){t=!0;var i=new qk;H(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)}},this),t},t.prototype._fillAutoTargetAxisByOrient=function(e,t){var n=this.ecModel,r=!0;if(r){var i=t===`vertical`?`y`:`x`,a=n.findComponents({mainType:i+`Axis`});o(a,i)}if(r){var a=n.findComponents({mainType:`singleAxis`,filter:function(e){return e.get(`orient`,!0)===t}});o(a,`single`)}function o(t,n){var i=t[0];if(i){var a=new qk;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,qs).models[0];o&&H(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,qs).models[0]&&a.add(e.componentIndex)})}}}r&&H(Vk,function(t){if(r){var i=n.findComponents({mainType:Wk(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new qk;a.add(i[0].componentIndex),e.set(t,a),r=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var t=this._rangePropMode,n=this.get(`rangeMode`);H([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){var a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(t,n){e??(e=this.ecModel.getComponent(Wk(t),n))},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){H(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){var n=this.getAxisModel(e,t);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,t){process.env.NODE_ENV!==`production`&&X(e&&t!=null);var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(Wk(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;H([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var t=this.option;H([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,t).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var t,n=this._targetAxisInfoMap.keys(),r=0;r<n.length;r++)for(var i=n[r],a=this._targetAxisInfoMap.get(i),o=0;o<a.indexList.length;o++){var s=this.getAxisProxy(i,a.indexList[o]);if(s.hostedBy(this))return s;t||(t=s)}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!==`production`&&X(this._orient),this._orient},t.type=`dataZoom`,t.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],t.defaultOption={z:4,filterMode:`filter`,start:0,end:100},t}(tg);function Yk(e){var t={};return H([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var Xk=Jk,Zk=function(e){A(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.dataZoomModel=e,this.ecModel=t,this.api=n},t.type=`dataZoom`,t}(yS),Qk=Zk,$k=H,eA=Wo,tA=function(){function e(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}return e.prototype.hostedBy=function(e){return this._dataZoomModel===e},e.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},e.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(Uk(t)){var n=Wk(this._dimName),r=t.getReferringComponents(n,qs).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e},e.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)},e.prototype.getMinMaxSpan=function(){return L(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),i=[0,100],a=[],o=[],s;$k([`start`,`end`],function(c,l){var u=e[c],d=e[c+`Value`];r[l]===`percent`?(u??(u=i[l]),d=n.parse(Vo(u,i,t))):(s=!0,d=d==null?t[l]:n.parse(d),u=Vo(d,t,i)),o[l]=d==null||isNaN(d)?t[l]:d,a[l]=u==null||isNaN(u)?i[l]:u}),eA(o),eA(a);var c=this._minMaxSpan;s?l(o,a,t,i,!1):l(a,o,i,t,!0);function l(e,t,r,i,a){var o=a?`Span`:`ValueSpan`;VO(0,e,r,`all`,c[`min`+o],c[`max`+o]);for(var s=0;s<2;s++)t[s]=Vo(e[s],r,i,!0),a&&(t[s]=n.parse(t[s]))}return{valueWindow:o,percentWindow:a}},e.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=nA(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},e.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._valueWindow;if(i===`none`)return;$k(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=U(r,function(e){return t.getDimensionIndex(e)},t);t.filterSelf(function(e){for(var t,n,i,o=0;o<r.length;o++){var l=s.get(c[o],e),u=!isNaN(l),d=l<a[0],f=l>a[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else $k(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{var r={};r[n]=a,t.selectRange(r)}});$k(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}},e.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;$k([`min`,`max`],function(r){var i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=Vo(i,[0,100],n,!0)-n[0]):i=Vo(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var r=qo(n,[0,500]);r=Math.min(r,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax(`min`,+n[0].toFixed(r)),t[1]!==100&&i.setDeterminedMinMax(`max`,+n[1].toFixed(r)),i.freeze()}},e}();function nA(e,t,n){var r=[1/0,-1/0];$k(n,function(e){sD(r,e.getData(),t)});var i=e.getAxisModel(),a=qE(i.axis.scale,i,r).calculate();return[a.min,a.max]}var rA=tA,iA={getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(Wk(r),i),n)})})}t(function(e,t,n,r){n.__dzAxisProxy=null});var n=[];t(function(t,r,i,a){i.__dzAxisProxy||(i.__dzAxisProxy=new rA(t,r,a,e),n.push(i.__dzAxisProxy))});var r=Z();return H(n,function(e){H(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){e.eachTargetAxis(function(t,n){e.getAxisProxy(t,n).reset(e)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){var t=e.findRepresentativeAxisProxy();if(t){var n=t.getDataPercentWindow(),r=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}},aA=iA;function oA(e){e.registerAction(`dataZoom`,function(e,t){H(Gk(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var sA=!1;function cA(e){sA||(sA=!0,e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,aA),oA(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`}))}function lA(e,t){var n=Nh(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),e=new yo({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}),e}var uA=function(e){A(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`,alwaysShowContent:!1,displayMode:`single`,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:`#fff`,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:`#999`,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:`#666`,fontSize:14}},t}(tg),dA=uA;function fA(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function pA(e){if(Q.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var mA=pA([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),hA=pA([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function gA(e,t){if(!e)return t;t=Mh(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function _A(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var vA=gA(hA,`transition`),yA=gA(mA,`transform`),bA=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(Q.transform3dSupported?`will-change:transform;`:``);function xA(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function SA(e,t,n){if(!q(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=zh(t);var a=xA(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=yA+`:`,l;V([`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 CA(e,t){var n=`cubic-bezier(0.23,1,0.32,1)`,r=` `+e/2+`s `+n,i=`opacity`+r+`,visibility`+r;return t||(r=` `+e+`s `+n,i+=Q.transformSupported?`,`+yA+r:`,left`+r+`,top`+r),vA+`:`+i}function wA(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Q.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Q.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+yA+`:`+o+`;`:[[`top`,0],[`left`,0],[mA,o]]}function TA(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(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),H([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function EA(e,t,n){var r=[],i=e.get(`transitionDuration`),a=e.get(`backgroundColor`),o=e.get(`shadowBlur`),s=e.get(`shadowColor`),c=e.get(`shadowOffsetX`),l=e.get(`shadowOffsetY`),u=e.getModel(`textStyle`),d=Jg(e,`html`),f=c+`px `+l+`px `+o+`px `+s;return r.push(`box-shadow:`+f),t&&i&&r.push(CA(i,n)),a&&r.push(`background-color:`+a),H([`width`,`color`,`radius`],function(t){var n=`border-`+t,i=Mh(n),a=e.get(i);a!=null&&r.push(n+`:`+a+(t===`color`?``:`px`))}),r.push(TA(u)),d!=null&&r.push(`padding:`+Nh(d).join(`px `)+`px`),r.join(`;`)+`;`}function DA(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Nm(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 OA=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,Q.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):Ae(i)?i:K(i)&&i(e.getDom()));DA(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=e||window.event,!o._enterable){var t=r.handler;Zy(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=_A(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.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=bA+EA(e,!this._firstShow,this._longHide)+wA(i[0],i[1],!0)+(`border-color:`+zh(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`&&!fA(n)&&(o=SA(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s<e.length;s++)Ae(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(DA(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;H(wA(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;t.visibility=`hidden`,t.opacity=`0`,Q.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(W(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.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},e}(),kA=OA,AA=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),NA(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)&&_s(process.env.NODE_ENV===`production`?``:`Passing DOM nodes as content is not supported in richText tooltip!`),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new Lo({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:Jg(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),H([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),H([`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=MA(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;NA(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=jA(i.borderWidth||0),o=MA(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(W(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function jA(e){return Math.max(0,e)}function MA(e){var t=jA(e.shadowBlur||0),n=jA(e.shadowOffsetX||0),r=jA(e.shadowOffsetY||0);return{left:jA(t-n),right:jA(t+n),top:jA(t-r),bottom:jA(t+r)}}function NA(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var PA=AA,FA=new yo({shape:{x:-1,y:-1,width:2,height:2}}),IA=function(e){A(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(!(Q.node||!t.getDom())){var n=e.getComponent(`tooltip`);this._tooltipContent=(this._renderMode=Qs(n.get(`renderMode`)))===`richText`?new PA(t):new kA(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(Q.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`)?ny(this,`_updatePosition`,50,`fixRate`):ry(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);_k(`itemTooltip`,this._api,W(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(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||Q.node||!n.getDom())){var i=RA(r,n);this._ticket=``;var a=r.dataByCoordSys,o=UA(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=FA;c.x=r.x,c.y=r.y,c.update(),ec(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=Ek(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,r.from!==this.uid&&this._hide(RA(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&&LA([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(ec(n).ssrType===`legend`)return;this._lastDataByCoordSys=null;var i,a;cC(n,function(e){if(ec(e).dataIndex!=null)return i=e,!0;if(ec(e).tooltipConfig!=null)return a=e,!0},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=W(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=LA([t.tooltipOption],r),o=this._renderMode,s=[],c=Pg(`section`,{blocks:[],noHeader:!0}),l=[],u=new Yg;H(e,function(e){H(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value;if(!(!t||i==null)){var a=rk(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=Pg(`section`,{header:a,noHeader:!ze(a),sortBlocks:!0,blocks:[]});c.blocks.push(d),H(e.seriesDataIndices,function(c){var f=n.getSeriesByIndex(c.seriesIndex),p=c.dataIndexInside,m=f.getDataParams(p);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=tD(t.axis,{value:i}),m.axisValueLabel=a,m.marker=u.makeTooltipMarker(`item`,zh(m.color),o);var h=dg(f.formatTooltip(p,!0,null)),g=h.frag;if(g){var _=LA([f],r).get(`valueFormatter`);d.blocks.push(_?z({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Bg(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
25
|
-
|
|
26
|
-
`:`<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=ec(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=LA([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 Yg;h.marker=g.makeTooltipMarker(`item`,zh(h.color),d);var _=dg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Bg(y?z({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=ec(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=L(a),a.content=Bm(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=LA(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new Yg;this._showOrMove(d,function(){var n=L(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=o||e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`)).color;if(u)if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=ph(m.axisValue,d,p)),d=Lh(d,n,!0)}else if(K(u)){var g=W(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){if(n===`axis`||G(t))return{color:r||(this._renderMode===`html`?`#fff`:`none`)};if(!G(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=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),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=Ho(t[0],s),r=Ho(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=qh(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=VA(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=zA(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=HA(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=HA(d)?l[1]/2:d===`bottom`?l[1]:0),fA(e)){var h=BA(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&&H(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i=i&&o.length===s.length,i&&H(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&&H(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&H(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,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){Q.node||!t.getDom()||(ry(this,`_updatePosition`),this._tooltipContent.dispose(),Ck(`itemTooltip`,t))},t.type=`tooltip`,t}(yS);function LA(e,t,n){var r=t.ecModel,i;n?(i=new df(n,r,r),i=new df(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof df&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new df(o,i,r)))}return i}function RA(e,t){return e.dispatchAction||W(t.dispatchAction,t)}function zA(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 BA(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 VA(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 HA(e){return e===`center`||e===`middle`}function UA(e,t,n){var r=Ks(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Ys(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=ec(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}var WA=IA;function GA(e){BT(zk),e.registerComponentModel(dA),e.registerComponentView(WA),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ze),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ze)}var KA=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`])}},qA=function(e){A(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`]),G(t)&&H(t,function(e,r){q(e)&&(e={type:e}),t[r]=R(e,KA(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&&Rs(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Z();this._data=Se(U(r,function(e){return(q(e)||De(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new df(e,this,this.ecModel))},this),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;H(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;H(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;H(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])&&V(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`,top:0,align:`auto`,backgroundColor:`rgba(0,0,0,0)`,borderColor:`#ccc`,borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:`#ccc`,inactiveBorderColor:`#ccc`,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:`#ccc`,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:`#333`},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:`#666`,borderWidth:1,borderColor:`#666`},emphasis:{selectorLabel:{show:!0,color:`#eee`,backgroundColor:`#666`}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(tg),JA=qA,YA=Te,XA=H,ZA=Il,QA=function(e){A(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 ZA),this.group.add(this._selectorGroup=new ZA),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=e.getBoxLayoutParams(),l={width:n.getWidth(),height:n.getHeight()},u=e.get(`padding`),d=qh(c,l,u),f=this.layoutInner(e,i,d,r,o,s),p=qh(B({width:f.width,height:f.height},c),l,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=lA(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=Z(),l=t.get(`selectedMode`),u=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&u.push(e.id)}),XA(t.getData(),function(i,a){var o=i.get(`name`);if(!this.newlineDisabled&&(o===``||o===`
|
|
27
|
-
`)){var d=new ZA;d.newline=!0,s.add(d);return}var f=n.getSeriesByName(o)[0];if(!c.get(o)){if(f){var p=f.getData(),m=p.getVisual(`legendLineStyle`)||{},h=p.getVisual(`legendIcon`),g=p.getVisual(`style`),_=this._createItem(f,o,a,i,t,e,m,g,h,l,r);_.on(`click`,YA(tj,o,null,r,u)).on(`mouseover`,YA(rj,f.name,null,r,u)).on(`mouseout`,YA(ij,f.name,null,r,u)),n.ssr&&_.eachChild(function(e){var t=ec(e);t.seriesIndex=f.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),c.set(o,!0)}else n.eachRawSeries(function(s){if(!c.get(o)&&s.legendVisualProvider){var d=s.legendVisualProvider;if(!d.containName(o))return;var f=d.indexOfName(o),p=d.getItemVisual(f,`style`),m=d.getItemVisual(f,`legendIcon`),h=Pr(p.fill);h&&h[3]===0&&(h[3]=.2,p=z(z({},p),{fill:Rr(h,`rgba`)}));var g=this._createItem(s,o,a,i,t,e,{},p,m,l,r);g.on(`click`,YA(tj,null,o,r,u)).on(`mouseover`,YA(rj,null,o,r,u)).on(`mouseout`,YA(ij,null,o,r,u)),n.ssr&&g.eachChild(function(e){var t=ec(e);t.seriesIndex=s.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),c.set(o,!0)}},this);process.env.NODE_ENV!==`production`&&(c.get(o)||console.warn(o+` series not exists. Legend data should be same with series name or data name.`))}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();XA(e,function(e){var r=e.type,i=new Lo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),zd(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),el(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=$A(c,r,o,s,d,m,u),y=new ZA,b=r.getModel(`textStyle`);if(K(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(ej({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??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Lo({style:Vd(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new yo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Nd({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),el(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Wh(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){Wh(`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]),_}else 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}(yS);function $A(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),XA(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:$C(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 ej(e){var t=e.icon||`roundRect`,n=b_(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=`#fff`,n.style.lineWidth=2),n}function tj(e,t,n,r){ij(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),rj(e,t,n,r)}function nj(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,i=t.length;r<i&&!(n=t[r].states.emphasis);)r++;return n&&n.hoverLayer}function rj(e,t,n,r){nj(n)||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function ij(e,t,n,r){nj(n)||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}var aj=QA;function oj(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 sj(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),cj(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){H(i,function(t,n){e[t?`select`:`unSelect`](n)}),cj(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function cj(e,t){var n=t||{};return H(e.getData(),function(t){var r=t.get(`name`);if(!(r===`
|
|
28
|
-
`||r===``)){var i=e.isSelected(r);Xe(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function lj(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Te(sj,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Te(sj,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Te(sj,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Te(sj,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Te(sj,`unSelect`))}function uj(e){e.registerComponentModel(JA),e.registerComponentView(aj),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,oj),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),lj(e)}var dj=function(e){A(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=Xh(t);e.prototype.init.call(this,t,n,r),fj(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),fj(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Dm(JA.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:`#2f4554`,pageIconInactiveColor:`#aaa`,pageIconSize:15,pageTextStyle:{color:`#333`},animationDurationUpdate:800}),t}(JA);function fj(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,Yh(t,n,{type:`box`,ignoreSize:!!i})}var pj=dj,mj=Il,hj=[`width`,`height`],gj=[`x`,`y`],_j=function(e){A(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 mj),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new mj)},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=G(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new Lo({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=Od(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:W(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=hj[s],l=gj[s],u=hj[1-s],d=gj[1-s];i&&Wh(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=L(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;Wh(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),Wh(`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],_=Y(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 yo({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&&Xu(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;H([`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=hj[i],o=gj[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=u?1:0,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??(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??(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}(aj),vj=_j;function yj(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 bj(e){BT(uj),e.registerComponentModel(pj),e.registerComponentView(vj),yj(e)}function xj(e){BT(uj),BT(bj)}var Sj=function(e){A(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.inside`,t.defaultOption=Dm(Xk.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Xk),Cj=Sj,wj=Us();function Tj(e,t,n){wj(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function Ej(e,t){for(var n=wj(e).coordSysRecordMap,r=n.keys(),i=0;i<r.length;i++){var a=r[i],o=n.get(a),s=o.dataZoomInfoMap;if(s){var c=t.uid;s.get(c)&&(s.removeKey(c),s.keys().length||Dj(n,o))}}}function Dj(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function Oj(e,t){var n={model:t,containsPoint:Te(Aj,t),dispatchAction:Te(kj,e),dataZoomInfoMap:null,controller:null},r=n.controller=new BO(e.getZr());return H([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){var r=[];n.dataZoomInfoMap.each(function(i){if(t.isAvailableBehavior(i.model.option)){var a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}}),r.length&&n.dispatchAction(r)})}),n}function kj(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function Aj(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function jj(e){var t,n=`type_`,r={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return e.each(function(e){var a=e.model,o=a.get(`disabled`,!0)?!1:a.get(`zoomLock`,!0)?`move`:!0;r[n+o]>r[n+t]&&(t=o),i=i&&a.get(`preventDefaultMouseMove`,!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function Mj(e){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=wj(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=Z());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){H(Kk(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,Oj(t,n.model));(a.dataZoomInfoMap||(a.dataZoomInfoMap=Z())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var t=e.controller,n,i=e.dataZoomInfoMap;if(i){var a=i.keys()[0];a!=null&&(n=i.get(a))}if(!n){Dj(r,e);return}var o=jj(i);t.enable(o.controlType,o.opt),t.setPointerChecker(e.containsPoint),ny(e,`dispatchAction`,n.model.get(`throttle`,!0),`fixRate`)})})}var Nj=function(e){A(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Tj(r,t,{pan:W(Pj.pan,this),zoom:W(Pj.zoom,this),scrollMove:W(Pj.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ej(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(Qk),Pj={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=Ij[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(VO(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Fj(function(e,t,n,r,i,a){var o=Ij[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:Fj(function(e,t,n,r,i,a){return Ij[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function Fj(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(VO(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var Ij={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,n,r,i){var a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},Lj=Nj;function Rj(e){cA(e),e.registerComponentModel(Cj),e.registerComponentView(Lj),Mj(e)}var zj={label:{enabled:!0},decal:{show:!1}},Bj=Us(),Vj={};function Hj(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=L(zj);R(r.label,e.getLocaleModel().get(`aria`),!1),R(n.option,r,!1),i(),a();function i(){if(n.getModel(`decal`).get(`show`)){var t=Z();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=t.get(e.type);n||(n={},t.set(e.type,n)),Bj(e).scope=n}}),e.eachRawSeries(function(t){if(e.isSeriesFiltered(t))return;if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var r=ag(t.ecModel,t.name,Vj,e.getSeriesCount()),i=n.getVisual(`decal`);n.setVisual(`decal`,l(i,r))}else{var a=t.getRawData(),o={},s=Bj(t).scope;n.each(function(e){var t=n.getRawIndex(e);o[t]=e});var c=a.count();a.each(function(e){var r=o[e],i=a.getName(e)||e+``,u=ag(t.ecModel,i,s,c),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,l(d,u))})}function l(e,t){var n=e?z(z({},t),e):t;return n.dirty=!0,n}})}}function a(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=B(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var l=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(l,d),p;if(!(l<1)){var m=s();p=m?o(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=l>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=o(g,{seriesCount:l}),e.eachSeries(function(e,t){if(t<f){var n=void 0,r=e.get(`name`)?`withName`:`withoutName`;n=l>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=o(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:c(e.subType)});var i=e.getData();if(i.count()>u){var s=a.get([`data`,`partialData`]);n+=o(s,{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?Se(i.getValues(_),function(e,t){return V(m,t)===-1}):i.getValues(_),b=a.get([`data`,v?`withName`:`withoutName`]);g.push(o(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 o(e,t){if(!q(e))return e;var n=e;return H(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function s(){var t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function c(t){var n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function Uj(e){if(!(!e||!e.aria)){var t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},H([`description`,`general`,`series`,`data`],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function Wj(e){e.registerPreprocessor(Uj),e.registerVisual(e.PRIORITY.VISUAL.ARIA,Hj)}function Gj(e,t,n){var r=ie.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}var Kj=function(e){A(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.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var a;r=r||vi,typeof t==`string`?a=Gj(t,n,r):J(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Ye(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.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},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=Gj(`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 $(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(i.length===0){var t=new $(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 $(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}else 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 $(0,0,0,0);t.copy(e),i.push(t)}o||(o=i.length>=a)}}for(var l=this.__startIndex;l<this.__endIndex;++l){var u=e[l];if(u){var d=u.shouldBePainted(n,r,!0,!0),f=u.__isRendered&&(u.__dirty&Ci||!d)?u.getPrevPaintRect():null;f&&c(f);var p=d&&(u.__dirty&Ci||!u.__isRendered)?u.getPaintRect():null;p&&c(p)}}for(var l=this.__prevStartIndex;l<this.__prevEndIndex;++l){var u=t[l],d=u&&u.shouldBePainted(n,r,!0,!0);if(u&&(!d||!u.__zr)&&u.__isRendered){var f=u.getPrevPaintRect();f&&c(f)}}var m;do{m=!1;for(var l=0;l<i.length;){if(i[l].isZero()){i.splice(l,1);continue}for(var h=l+1;h<i.length;)i[l].intersect(i[h])?(m=!0,i[l].union(i[h]),i.splice(h,1)):h++;l++}}while(m);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=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;je(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||gC(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Me(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=OC(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&&H(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(gi),qj=Kj,Jj=1e5,Yj=314159,Xj=.01,Zj=.001;function Qj(e){return e?e.__builtin__?!0:!(typeof e.resize!=`function`||typeof e.refresh!=`function`):!1}function $j(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}var eM=function(){function e(e,t,n,r){this.type=`canvas`,this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`;var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;this._opts=n=z({},n||{}),this.dpr=n.devicePixelRatio||vi,this._singleCanvas=i,this.root=e,e.style&&(Ye(e),e.innerHTML=``),this.storage=t;var a=this._zlevelList;this._prevDisplayList=[];var o=this._layers;if(i){var s=e,c=s.width,l=s.height;n.width!=null&&(c=n.width),n.height!=null&&(l=n.height),this.dpr=n.devicePixelRatio||1,s.width=c*this.dpr,s.height=l*this.dpr,this._width=c,this._height=l;var u=new qj(s,this,this.dpr);u.__builtin__=!0,u.initContext(),o[Yj]=u,u.zlevel=Yj,a.push(Yj),this._domRoot=e}else{this._width=yC(e,0,n),this._height=yC(e,1,n);var d=this._domRoot=$j(this._width,this._height);e.appendChild(d)}}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=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var a=r[i],o=this._layers[a];if(!o.__builtin__&&o.refresh){var s=i===0?this._backgroundColor:null;o.refresh(s)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},e.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},e.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},i,a=0;a<t;a++){var o=e[a];o.__inHover&&(n||(n=this._hoverlayer=this.getLayer(Jj)),i||(i=n.ctx,i.save()),JC(i,o,r,a===t-1))}i&&i.restore()}},e.prototype.getHoverLayer=function(){return this.getLayer(Jj)},e.prototype.paintOne=function(e,t){qC(e,t)},e.prototype._paintList=function(e,t,n,r){if(this._redrawId===r){n=n||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t,n),a=i.finished,o=i.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),a)this.eachLayer(function(e){e.afterBrush&&e.afterBrush()});else{var s=this;Fb(function(){s._paintList(e,t,n,r)})}}},e.prototype._compositeManually=function(){var e=this.getLayer(Yj).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)})},e.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],a=this._opts.useDirtyRect,o=0;o<this._zlevelList.length;o++){var s=this._zlevelList[o],c=this._layers[s];c.__builtin__&&c!==this._hoverlayer&&(c.__dirty||n)&&i.push(c)}for(var l=!0,u=!1,d=function(o){var s=i[o],c=s.ctx,d=a&&s.createRepaintRects(e,t,f._width,f._height),p=n?s.__startIndex:s.__drawIndex,m=!n&&s.incremental&&Date.now,h=m&&Date.now(),g=s.zlevel===f._zlevelList[0]?f._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,g,d);else if(p===s.__startIndex){var _=e[p];(!_.incremental||!_.notClear||n)&&s.clear(!1,g,d)}p===-1&&(console.error(`For some unknown reason. drawIndex is -1`),p=s.__startIndex);var v,y=function(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(v=p;v<s.__endIndex;v++){var i=e[v];if(i.__inHover&&(u=!0),r._doPaintEl(i,s,a,t,n,v===s.__endIndex-1),m&&Date.now()-h>15)break}n.prevElClipPaths&&c.restore()};if(d)if(d.length===0)v=s.__endIndex;else for(var b=f.dpr,x=0;x<d.length;++x){var S=d[x];c.save(),c.beginPath(),c.rect(S.x*b,S.y*b,S.width*b,S.height*b),c.clip(),y(S),c.restore()}else c.save(),y(),c.restore();s.__drawIndex=v,s.__drawIndex<s.__endIndex&&(l=!1)},f=this,p=0;p<i.length;p++)d(p);return Q.wxa&&H(this._layers,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),{finished:l,needsRefreshHover:u}},e.prototype._doPaintEl=function(e,t,n,r,i,a){var o=t.ctx;if(n){var s=e.getPaintRect();(!r||s&&s.intersect(r))&&(JC(o,e,i,a),e.setPrevPaintRect(s))}else JC(o,e,i,a)},e.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Yj);var n=this._layers[e];return n||(n=new qj(`zr_`+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?R(n,this._layerConfig[e],!0):this._layerConfig[e-Xj]&&R(n,this._layerConfig[e-Xj],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},e.prototype.insertLayer=function(e,t){var n=this._layers,r=this._zlevelList,i=r.length,a=this._domRoot,o=null,s=-1;if(n[e]){process.env.NODE_ENV!==`production`&&ge(`ZLevel `+e+` has been used already`);return}if(!Qj(t)){process.env.NODE_ENV!==`production`&&ge(`Layer of zlevel `+e+` is not valid`);return}if(i>0&&e>r[0]){for(s=0;s<i-1&&!(r[s]<e&&r[s+1]>e);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?a.insertBefore(t.dom,c.nextSibling):a.appendChild(t.dom)}else a.firstChild?a.insertBefore(t.dom,a.firstChild):a.appendChild(t.dom);t.painter||(t.painter=this)},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},e.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],a=this._layers[i];a.__builtin__&&e.call(t,a,i)}},e.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],a=this._layers[i];a.__builtin__||e.call(t,a,i)}},e.prototype.getLayers=function(){return this._layers},e.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(e,t){e.__dirty=e.__used=!1});function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var r=e[n];if(r.zlevel!==e[n-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var i=null,a=0,o,s;for(s=0;s<e.length;s++){var r=e[s],c=r.zlevel,l=void 0;o!==c&&(o=c,a=0),r.incremental?(l=this.getLayer(c+Zj,this._needsManuallyCompositing),l.incremental=!0,a=1):l=this.getLayer(c+(a>0?Xj:0),this._needsManuallyCompositing),l.__builtin__||ge(`ZLevel `+c+` has been used by unkown layer `+l.id),l!==i&&(l.__used=!0,l.__startIndex!==s&&(l.__dirty=!0),l.__startIndex=s,l.incremental?l.__drawIndex=-1:l.__drawIndex=s,t(s),i=l),r.__dirty&Ci&&!r.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=s))}t(s),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,H(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?R(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];if(i===e||i===e+Xj){var a=this._layers[i];R(a,n[e],!0)}}}},e.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(V(n,e),1))},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;if(e!=null&&(r.width=e),t!=null&&(r.height=t),e=yC(i,0,r),t=yC(i,1,r),n.style.display=``,this._width!==e||t!==this._height){for(var a in n.style.width=e+`px`,n.style.height=t+`px`,this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Yj).resize(e,t)}return this},e.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._layers=null},e.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Yj].dom;var t=new qj(`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;this.eachLayer(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},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];JC(n,l,a,s===c-1)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),tM=eM;function nM(e){e.registerPainter(`canvas`,tM)}const rM=4;BT([Wj,Ly,nM,Rj,Bk,xj,Pv,GA]);const iM={background:`#ffffff`,border:`#dce4e9`,muted:`#5b7186`,surface:`#ffffff`,text:`#0f1e2a`,colors:[`#2f7f55`,`#2563eb`,`#d97706`,`#7c3aed`]},aM=`cf-widget-category-zoom`,oM=.68,sM=2,cM=e=>({startIndex:0,endIndex:Math.max(0,e-1)}),lM=(e,t)=>{if(t<=0)return cM(0);let n=t-1,r=Math.max(0,Math.min(n,Math.floor(Math.min(e.startIndex,e.endIndex))));return{startIndex:r,endIndex:Math.max(r,Math.min(n,Math.floor(Math.max(e.startIndex,e.endIndex))))}},uM=(e,t,n)=>{let r=lM(e,n);if(n<=2)return cM(n);let i=r.endIndex-r.startIndex+1,a=t===`in`?Math.max(2,Math.floor(i*oM)):Math.min(n,Math.ceil(i/oM));if(a===i)return r;let o=(r.startIndex+r.endIndex)/2,s=n-a,c=Math.max(0,Math.min(s,Math.round(o-(a-1)/2)));return{startIndex:c,endIndex:c+a-1}},dM=(e,t)=>{let n=e.length;if(n===0)return`No chart points`;let r=lM(t,n);if(r.startIndex===0&&r.endIndex===n-1)return`All ${n} ${n===1?`point`:`points`}`;let i=r.endIndex-r.startIndex+1;return`${e[r.startIndex]} – ${e[r.endIndex]} · ${i} of ${n} points`},fM=e=>{let t=e.replaceAll(`_`,` `).replace(/([a-z])([A-Z])/g,`$1 $2`).trim();return t?`${t.charAt(0).toUpperCase()}${t.slice(1)}`:`Value`},pM=e=>{let t=new Set,n=[];return e.forEach(e=>{let r=e?.trim();!r||t.has(r)||(t.add(r),n.push(r))}),n},mM=e=>{if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=Number(e);if(Number.isFinite(t))return t}return null},hM=e=>{if(e===null)return`null:`;if(e===void 0)return`undefined:`;if(typeof e==`object`)try{return`object:${JSON.stringify(e)}`}catch{return`object:`}return`${typeof e}:${String(e)}`},gM=(e,t)=>t?e.columnMetadata?.find(e=>e.key===t):void 0,_M=(e,t)=>gM(e,t)?.label?.trim()||fM(t),vM=(e,t,n)=>{if(n==null||n===``)return`Not set`;let r=gM(e,t);if(r?.dataType===`boolean`){let e=String(n).trim().toLowerCase();return n===!1||n===0||[`0`,`false`,`no`].includes(e)?`No`:`Yes`}if(r?.dataType===`date`||r?.dataType===`datetime`){let t=new Date(n);if(!Number.isNaN(t.getTime()))try{return new Intl.DateTimeFormat(void 0,{month:`short`,year:`numeric`,timeZone:e.timezone||`UTC`}).format(t)}catch{return new Intl.DateTimeFormat(void 0,{month:`short`,year:`numeric`,timeZone:`UTC`}).format(t)}}return String(n)},yM=(e,t,n,r=!1)=>{if(t?.dataType===`currency`){let i=t.currencyCode||n?.currency?.code;if(i)return new Intl.NumberFormat(void 0,{style:`currency`,currency:i,notation:r&&Math.abs(e)>=1e4?`compact`:`standard`,maximumFractionDigits:2}).format(e)}return t?.dataType===`percent`?new Intl.NumberFormat(void 0,{style:`percent`,maximumFractionDigits:2}).format(Math.abs(e)>1?e/100:e):new Intl.NumberFormat(void 0,{notation:r&&Math.abs(e)>=1e4?`compact`:`standard`,maximumFractionDigits:2}).format(e)},bM=(e,t)=>{if(e.presentation===`table`||e.presentation===`kpi`)return null;if(t)return t;let n=e.chartRecommendation?.type;return n===`line`||n===`bar`||n===`stacked_bar`?n:e.type===`line`||e.type===`bar`||e.type===`stacked_bar`?e.type:null},xM=e=>e.chartRecommendation?.categoryField?.trim()||e.label?.trim()||e.columnMetadata?.find(e=>[`date`,`dimension`,`geography`,`boolean`].includes(e.semanticRole))?.key||e.columns?.[0],SM=e=>e.chartRecommendation?.seriesField?.trim()||e.seriesField?.trim()||e.series?.trim()||void 0,CM=(e,t,n)=>{let r=pM([...e.chartRecommendation?.valueFields??[],...e.valueFields??[],e.value,...e.columnMetadata?.filter(e=>e.semanticRole===`measure`).map(e=>e.key)??[]]),i=new Set([...e.columns??[],...e.columnMetadata?.map(e=>e.key)??[],...Object.keys(e.rows?.[0]??{})]);return r.filter(e=>e!==t&&e!==n&&i.has(e)).filter(t=>e.rows?.some(e=>mM(e[t])!==null))},wM=(e,t,n,r,i)=>{let a=i?` Showing 4 of ${r.length+i} series.`:``;if(t===`line`){let t=n.length-1,i=r.map(n=>{let r=n.values[t];return r==null?null:`${n.name}: ${yM(r,n.valueColumn,e)}`}).filter(e=>!!e);return i.length?`Latest (${n[t]}): ${i.join(`; `)}.${a}`:`No numeric trend values are available.${a}`}let o;return r.forEach(e=>{e.values.forEach((t,r)=>{t===null||o&&t<=o.value||(o={category:n[r]??`Not set`,series:e,value:t})})}),o?`Highest: ${o.category}, ${o.series.name} ${yM(o.value,o.series.valueColumn,e)}.${a}`:`No numeric comparison values are available.${a}`},TM=(e,t)=>{let n=bM(e,t),r=xM(e),i=e.rows??[];if(!n||!r||i.length===0)return null;let a=SM(e),o=CM(e,r,a);if(o.length===0)return null;let s=o.length===1?a:void 0,c=[],l=new Set;i.forEach(t=>{let n=hM(t[r]);l.has(n)||(l.add(n),c.push({key:n,label:vM(e,r,t[r])}))});let u=c.map(e=>e.label),d=0,f;if(s){let t=[],n=new Set;i.forEach(r=>{let i=hM(r[s]);n.has(i)||(n.add(i),t.push({key:i,label:vM(e,s,r[s])}))});let a=t.slice(0,4);d=Math.max(0,t.length-a.length);let l=o[0];f=a.map(t=>{let n=new Map;return i.forEach(e=>{if(hM(e[s])!==t.key)return;let i=hM(e[r]);n.has(i)||n.set(i,mM(e[l]))}),{field:l,name:t.label,values:c.map(e=>n.get(e.key)??null),valueColumn:gM(e,l)}})}else d=Math.max(0,o.length-4),f=o.slice(0,4).map(t=>({field:t,name:_M(e,t),values:i.map(e=>mM(e[t])),valueColumn:gM(e,t)}));if(f.length===0)return null;let p=_M(e,r),m=`Values`;return s?m=_M(e,o[0]):f.length===1&&(m=f[0].name),{type:n,title:e.title?.trim()||`${m} by ${p}`,xAxisTitle:p,yAxisTitle:m,categories:u,series:f,omittedSeriesCount:d,summary:wM(e,n,u,f,d)}},EM=e=>{if(e.presentation===`table`||e.presentation===`kpi`)return[];let t=TM(e);if(!t)return[];let n=[{type:`line`,label:`Line`},{type:`bar`,label:`Bar`}];return t.series.length>1&&n.push({type:`stacked_bar`,label:`Stacked bar`}),n},DM=(e,{expanded:t=!1,reducedMotion:n=!1,theme:r=iM,zoomWindow:i=cM(e.categories.length)}={})=>{let a=e.series.length>1,o=e.type===`stacked_bar`,s=e.categories.length>2,c=lM(i,e.categories.length);return{animation:!n,animationDuration:n?0:260,aria:{enabled:!0,decal:{show:!0},label:{description:`${e.title}. ${e.summary}`}},backgroundColor:`transparent`,color:r.colors,textStyle:{color:r.text,fontFamily:`inherit`},grid:{top:a?t?48:42:14,right:12,bottom:t?18:10,left:10,containLabel:!0},legend:{show:a,type:`scroll`,top:0,left:`center`,itemWidth:12,itemHeight:8,textStyle:{color:r.muted,fontSize:t?11:10}},tooltip:{trigger:`axis`,triggerOn:`mousemove|click`,confine:!0,backgroundColor:r.surface,borderColor:r.border,borderWidth:1,textStyle:{color:r.text,fontSize:12},axisPointer:{type:`line`,lineStyle:{color:r.muted,opacity:.5}}},dataZoom:s?[{id:aM,type:`inside`,xAxisIndex:0,startValue:c.startIndex,endValue:c.endIndex,minValueSpan:1,filterMode:`filter`,disabled:!0}]:void 0,xAxis:{type:`category`,data:e.categories,name:e.xAxisTitle,nameLocation:`middle`,nameGap:t?38:32,nameTextStyle:{color:r.muted,fontSize:t?11:10},axisLine:{lineStyle:{color:r.border}},axisTick:{show:!1},axisLabel:{color:r.muted,fontSize:t?11:9,hideOverlap:!0,interval:`auto`,rotate:!t&&e.categories.length>5?28:0,formatter:e=>e.length>(t?18:11)?`${e.slice(0,t?16:9)}…`:e}},yAxis:{type:`value`,name:e.yAxisTitle,nameLocation:`middle`,nameGap:t?52:44,nameTextStyle:{color:r.muted,fontSize:t?11:10},axisLabel:{color:r.muted,fontSize:t?11:9,formatter:t=>yM(t,e.series[0]?.valueColumn,void 0,!0)},axisLine:{show:!1},axisTick:{show:!1},splitNumber:4,splitLine:{lineStyle:{color:r.border,opacity:.75}}},series:e.series.map(n=>({type:e.type===`line`?`line`:`bar`,name:n.name,data:n.values,stack:o?`total`:void 0,connectNulls:!1,showSymbol:e.type===`line`&&e.categories.length<=18,symbol:`circle`,symbolSize:t?7:6,smooth:!1,maxBarWidth:t?38:28,lineStyle:e.type===`line`?{width:t?3:2.5}:void 0,itemStyle:e.type===`line`?{borderColor:r.background,borderWidth:2}:{borderRadius:o?0:[4,4,0,0]},emphasis:{focus:`series`},tooltip:{valueFormatter:e=>yM(e,n.valueColumn)}}))}},OM=e=>{let t=getComputedStyle(e),n=(e,n)=>t.getPropertyValue(e).trim()||n,r=n(`--cf-accent`,iM.colors[0]);return{background:n(`--cf-bg`,iM.background),border:n(`--cf-border`,iM.border),muted:n(`--cf-muted`,iM.muted),surface:n(`--cf-surface`,iM.surface),text:n(`--cf-text`,iM.text),colors:[r,`#2563eb`,`#d97706`,`#7c3aed`]}},kM=({model:e,expanded:t=!1})=>{let n=(0,r.useRef)(null),a=(0,r.useRef)(null),[o,s]=(0,r.useState)(()=>({model:e,window:cM(e.categories.length)})),[c,l]=(0,r.useState)(!1),u=o.model===e?lM(o.window,e.categories.length):cM(e.categories.length),d=(0,r.useRef)(u);d.current=u;let f=t=>{let n=lM(t,e.categories.length);d.current=n,s({model:e,window:n}),a.current?.dispatchAction({type:`dataZoom`,dataZoomId:aM,startValue:n.startIndex,endValue:n.endIndex})};(0,r.useEffect)(()=>{let e=n.current;if(!(!e||typeof navigator<`u`&&navigator.userAgent.toLowerCase().includes(`jsdom`)))try{let t=xT(e,null,{renderer:`canvas`,devicePixelRatio:Math.min(window.devicePixelRatio||1,2)});a.current=t;let n=()=>t.resize(),r=typeof ResizeObserver>`u`?null:new ResizeObserver(n);return r?.observe(e),r||window.addEventListener(`resize`,n,{passive:!0}),()=>{r?.disconnect(),r||window.removeEventListener(`resize`,n),t.dispose(),a.current=null}}catch{l(!0);return}},[]),(0,r.useEffect)(()=>{let r=n.current,i=a.current;if(!r||!i)return;let o=typeof matchMedia<`u`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches;i.setOption(DM(e,{expanded:t,reducedMotion:o,theme:OM(r),zoomWindow:d.current}),{lazyUpdate:!0,notMerge:!0}),i.resize()},[t,e]);let p=!c&&e.categories.length>2,m=u.endIndex-u.startIndex+1,h=u.startIndex===0&&u.endIndex===e.categories.length-1,g=p&&m>2,_=p&&!h;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{ref:n,class:`cf-analytics-echart${t?` is-expanded`:``}`,role:`img`,"aria-label":`${e.title}. ${e.summary}`,"data-chart-status":c?`fallback`:`ready`,children:c?(0,i.jsx)(`span`,{class:`cf-analytics-echart__fallback`,children:e.summary}):null}),p?(0,i.jsxs)(`div`,{class:`cf-analytics-zoom`,children:[(0,i.jsx)(`span`,{class:`cf-analytics-zoom__range`,"aria-live":`polite`,"aria-atomic":`true`,children:dM(e.categories,u)}),(0,i.jsxs)(`div`,{class:`cf-analytics-zoom__controls`,role:`group`,"aria-label":`Chart zoom controls`,children:[(0,i.jsx)(`button`,{type:`button`,"aria-label":`Zoom out chart`,title:`Zoom out`,disabled:!_,onClick:()=>f(uM(d.current,`out`,e.categories.length)),children:`−`}),(0,i.jsx)(`button`,{type:`button`,class:`cf-analytics-zoom__reset`,"aria-label":`Reset chart zoom`,title:`Reset zoom`,disabled:h,onClick:()=>f(cM(e.categories.length)),children:`Reset`}),(0,i.jsx)(`button`,{type:`button`,"aria-label":`Zoom in chart`,title:`Zoom in`,disabled:!g,onClick:()=>f(uM(d.current,`in`,e.categories.length)),children:`+`})]})]}):null]})},AM=e=>{let t=e.replaceAll(`_`,` `).replace(/([a-z])([A-Z])/g,`$1 $2`).trim();return t?`${t.charAt(0).toUpperCase()}${t.slice(1)}`:`Value`},jM=(e,t)=>(t?.length?t:Object.keys(e[0]??{})).map(e=>typeof e==`string`?{key:e,label:AM(e)}:{...e,label:e.label?.trim()||AM(e.key)}),MM=(e,t,n)=>{if(e==null||e===``)return`—`;if((n?.dataType===`date`||n?.dataType===`datetime`)&&typeof e==`string`){let r=new Date(e);if(!Number.isNaN(r.getTime()))return new Intl.DateTimeFormat(t,{dateStyle:`medium`,...n.dataType===`datetime`?{timeStyle:`short`}:{}}).format(r)}return n?.dataType===`currency`&&typeof e==`number`?new Intl.NumberFormat(t,{style:`currency`,currency:n.currencyCode||`USD`,maximumFractionDigits:2}).format(e):typeof e==`number`&&Number.isFinite(e)?new Intl.NumberFormat(t,{maximumFractionDigits:4}).format(e):typeof e==`boolean`?e?`Yes`:`No`:String(e)},NM=e=>{let t=String(e??``);return/[",\r\n]/.test(t)?`"${t.replaceAll(`"`,`""`)}"`:t},PM=(e,t)=>{let n=jM(e,t);return[n.map(e=>NM(e.label)).join(`,`),...e.map(e=>n.map(t=>NM(e[t.key])).join(`,`))].join(`\r
|
|
29
|
-
`)},FM=({rows:e,columns:t,maxRows:n=6,locale:r,expanded:a=!1,classNames:o,emptyLabel:s=`No rows returned.`})=>{let c=jM(e,t),l=a?e:e.slice(0,Math.max(1,n));return e.length===0||c.length===0?(0,i.jsx)(`div`,{class:o?.note,children:s}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{class:o?.wrap,role:`region`,"aria-label":`Result table with ${e.length} ${e.length===1?`row`:`rows`}`,tabIndex:0,children:(0,i.jsxs)(`table`,{class:o?.table,children:[(0,i.jsxs)(`caption`,{style:`position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)`,children:[`Result table with `,e.length,` `,e.length===1?`row`:`rows`]}),(0,i.jsx)(`thead`,{children:(0,i.jsx)(`tr`,{children:c.map(e=>(0,i.jsx)(`th`,{scope:`col`,children:e.label},e.key))})}),(0,i.jsx)(`tbody`,{children:l.map((e,t)=>(0,i.jsx)(`tr`,{children:c.map(t=>(0,i.jsx)(`td`,{children:MM(e[t.key],r,t)},t.key))},t))})]})}),!a&&e.length>l.length?(0,i.jsxs)(`div`,{class:o?.note,children:[`Showing `,l.length,` of `,e.length,` rows. Expand to view all rows.`]}):null]})},IM=({rows:e,columns:t,maxRows:n=100,locale:a,expanded:o=!1,classPrefix:s=`cr`,pageSize:c=10})=>{let l=(0,r.useMemo)(()=>jM(e,t),[t,e]),u=l.map(e=>e.key).join(`\0`),[d,f]=(0,r.useState)(()=>l.map(e=>e.key)),[p,m]=(0,r.useState)(``),[h,g]=(0,r.useState)(),[_,v]=(0,r.useState)(`asc`),[y,b]=(0,r.useState)([]),[x,S]=(0,r.useState)(`table`),[C,w]=(0,r.useState)(1),[T,E]=(0,r.useState)(c);(0,r.useEffect)(()=>{f(l.map(e=>e.key)),g(void 0),b([]),w(1)},[u]);let D=l.filter(e=>d.includes(e.key)),O=(0,r.useMemo)(()=>{let t=p.toLocaleLowerCase(a),n=e.map((e,t)=>({row:e,index:t})).filter(({row:e})=>D.some(n=>MM(e[n.key],a,n).toLocaleLowerCase(a).includes(t)));return h?n.sort((e,t)=>{let n=e.row[h],r=t.row[h],i=typeof n==`number`?n:NaN,o=typeof r==`number`?r:NaN,s=!Number.isNaN(i)&&!Number.isNaN(o)?i-o:String(n??``).localeCompare(String(r??``),a,{numeric:!0,sensitivity:`base`});return _===`asc`?s:-s}):n},[D,a,p,e,_,h]),k=O.slice(0,Math.max(1,n)),A=Math.max(1,Math.ceil(k.length/T)),j=Math.min(C,A),M=o?k:k.slice((j-1)*T,j*T),N=M.length>0&&M.every(({index:e})=>y.includes(e)),P=e=>`${s}-${e}`;if(e.length===0||l.length===0)return(0,i.jsx)(`div`,{class:P(`table-note`),children:`No rows returned.`});let ee=e=>{let t=new Set(M.map(({index:e})=>e));b(n=>e?[...new Set([...n,...t])]:n.filter(e=>!t.has(e)))};return(0,i.jsxs)(`section`,{class:P(`data-table`),children:[(0,i.jsxs)(`div`,{class:P(`table-fields`),children:[(0,i.jsx)(`strong`,{children:`Fields`}),(0,i.jsx)(`div`,{class:P(`field-list`),children:l.map(e=>(0,i.jsx)(`span`,{class:P(`field-chip`),children:e.label},e.key))}),(0,i.jsxs)(`span`,{class:P(`table-field-count`),children:[e.length.toLocaleString(a),` rows`]})]}),(0,i.jsxs)(`div`,{class:P(`table-controls`),children:[(0,i.jsxs)(`label`,{class:P(`table-search`),children:[(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`⌕`}),(0,i.jsx)(`input`,{type:`search`,value:p,placeholder:`Search this result...`,"aria-label":`Search this result`,onInput:e=>{m(e.currentTarget.value.trim()),w(1)}})]}),(0,i.jsx)(`div`,{class:P(`table-modes`),role:`group`,"aria-label":`Table display mode`,children:[`table`,`matrix`].map(e=>(0,i.jsx)(`button`,{type:`button`,class:`${P(`segment`)}${x===e?` is-active`:``}`,"aria-pressed":x===e,onClick:()=>S(e),children:e===`table`?`Table`:`Matrix`},e))})]}),(0,i.jsx)(`div`,{class:P(`table-column-bar`),children:(0,i.jsxs)(`details`,{class:P(`column-picker`),children:[(0,i.jsx)(`summary`,{children:`Columns`}),(0,i.jsx)(`div`,{class:P(`column-menu`),children:l.map(e=>(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`input`,{type:`checkbox`,checked:d.includes(e.key),onChange:t=>{let n=t.currentTarget.checked;f(t=>n?[...new Set([...t,e.key])]:t.length>1?t.filter(t=>t!==e.key):t)}}),(0,i.jsx)(`span`,{children:e.label})]},e.key))})]})}),(0,i.jsx)(`div`,{class:P(`table-wrap`),role:`region`,"aria-label":`Scrollable result table`,tabIndex:0,children:(0,i.jsxs)(`table`,{class:`${P(`table`)}${x===`matrix`?` is-matrix`:``}`,children:[(0,i.jsxs)(`caption`,{class:P(`visually-hidden`),children:[`Result table with `,O.length,` `,O.length===1?`row`:`rows`]}),(0,i.jsx)(`thead`,{children:(0,i.jsxs)(`tr`,{children:[(0,i.jsx)(`th`,{class:P(`select-cell`),children:(0,i.jsx)(`input`,{type:`checkbox`,"aria-label":`Select all visible rows`,checked:N,onChange:e=>ee(e.currentTarget.checked)})}),D.map(e=>(0,i.jsx)(`th`,{scope:`col`,children:(0,i.jsxs)(`button`,{type:`button`,class:P(`table-sort`),"aria-label":`Sort by ${e.label}`,onClick:()=>{h===e.key?v(e=>e===`asc`?`desc`:`asc`):(g(e.key),v(`asc`)),w(1)},children:[(0,i.jsx)(`span`,{children:e.label}),(0,i.jsx)(`span`,{class:P(`sort-direction`),"aria-hidden":`true`,children:h===e.key?_===`asc`?`↑`:`↓`:`↕`})]})},e.key))]})}),(0,i.jsx)(`tbody`,{children:M.map(({row:e,index:t})=>(0,i.jsxs)(`tr`,{class:y.includes(t)?`is-selected`:void 0,children:[(0,i.jsx)(`td`,{class:P(`select-cell`),children:(0,i.jsx)(`input`,{type:`checkbox`,"aria-label":`Select row ${t+1}`,checked:y.includes(t),onChange:e=>b(n=>e.currentTarget.checked?[...new Set([...n,t])]:n.filter(e=>e!==t))})}),D.map(t=>(0,i.jsx)(`td`,{children:MM(e[t.key],a,t)},t.key))]},t))})]})}),(0,i.jsxs)(`div`,{class:P(`table-summary`),children:[(0,i.jsx)(`span`,{children:k.length?`${((j-1)*T+1).toLocaleString(a)}-${Math.min(j*T,k.length).toLocaleString(a)} of ${O.length.toLocaleString(a)}`:`0 of ${O.length.toLocaleString(a)}`}),o?(0,i.jsx)(`span`,{children:e.length>n?`First ${n.toLocaleString(a)} rows available`:`All returned rows loaded`}):(0,i.jsxs)(`div`,{class:P(`table-pagination`),"aria-label":`Table pagination`,children:[(0,i.jsxs)(`label`,{children:[(0,i.jsx)(`span`,{children:`Rows`}),(0,i.jsx)(`select`,{"aria-label":`Rows per page`,value:T,onChange:e=>{E(Number(e.currentTarget.value)),w(1)},children:[10,25,50].map(e=>(0,i.jsx)(`option`,{value:e,children:e},e))})]}),(0,i.jsx)(`button`,{type:`button`,"aria-label":`Previous page`,disabled:j<=1,onClick:()=>w(e=>Math.max(1,e-1)),children:`‹`}),(0,i.jsxs)(`span`,{children:[j,` / `,A]}),(0,i.jsx)(`button`,{type:`button`,"aria-label":`Next page`,disabled:j>=A,onClick:()=>w(e=>Math.min(A,e+1)),children:`›`})]})]})]})},LM=[`audio/webm;codecs=opus`,`audio/webm`,`audio/ogg;codecs=opus`,`audio/ogg`],RM=()=>{if(typeof navigator>`u`||!navigator.mediaDevices?.getSupportedConstraints)return{};try{return navigator.mediaDevices.getSupportedConstraints()}catch{return{}}},zM=(e=``,t=RM())=>{let n={...e?{deviceId:{exact:e}}:{}};return t.echoCancellation&&(n.echoCancellation={ideal:!0}),t.noiseSuppression&&(n.noiseSuppression={ideal:!0}),t.autoGainControl&&(n.autoGainControl={ideal:!0}),t.channelCount&&(n.channelCount={ideal:1}),t.voiceIsolation&&(n.voiceIsolation={ideal:!0}),n},BM=(e={})=>{let t=Math.max(2,e.calibrationSamples??6),n=Math.max(t,e.ambientWindowSamples??72),r=Math.min(.5,Math.max(0,e.ambientPercentile??.2)),i=Math.min(1,Math.max(.01,e.smoothing??.22)),a=Math.max(2**-52,e.minimumNoiseFloor??5e-4),o=Math.max(1.1,e.speechToNoiseRatio??2.7),s=Math.min(o,Math.max(1,e.quietToNoiseRatio??1.55)),c=Math.max(250,e.minimumEndSilenceMs??650),l=Math.max(c,e.maximumEndSilenceMs??1100),u=[],d=a,f=d*o,p=0;return{observe:e=>{let m=Number.isFinite(e)?Math.max(0,e):0;if(u.length<t||m<=f){u.push(m),u.length>n&&u.shift();let e=[...u].sort((e,t)=>e-t),t=Math.min(e.length-1,Math.floor((e.length-1)*r)),o=Math.max(a,e[t]??a);d+=(o-d)*i}f=d*o;let h=d*s,g=u.length>=t,_=g&&m>=f;_&&(p=Math.max(p,m/Math.max(d,a)));let v=Math.min(1,Math.max(0,(p-o)/o)),y=Math.round(l-(l-c)*v);return{speech:_,quiet:g&&m<=h,calibrated:g,noiseFloor:d,speechThreshold:f,quietThreshold:h,endOfSpeechDelayMs:y}},reset:()=>{u=[],d=a,f=d*o,p=0}}},VM=e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result??``).split(`,`)[1]??``),r.onerror=()=>n(r.error),r.readAsDataURL(e)}),HM=e=>{let t=globalThis.MediaRecorder;if(typeof t?.isTypeSupported==`function`){for(let n of LM)if(t.isTypeSupported(n))try{return new t(e,{mimeType:n})}catch{}}return new t(e)},UM=e=>{if(!(!e||e.state!==`recording`)){try{e.requestData()}catch{}e.stop()}},WM={openChat:`Open chat`,closeChat:`Close chat`,closeHistory:`Close conversation history`,unreadMessage:`1 unread message`,unreadMessages:`{count} unread messages`,muteSounds:`Mute sounds`,unmuteSounds:`Unmute sounds`,statusOnline:`Online · replies instantly`,statusOffline:`Away · leave a message`,liveSupport:`Live support`,waitingForTeam:`Waiting for the team`,assistantName:`Assistant`,chatName:`Chat`,welcomeLabel:`{name} welcome`,welcomeEyebrow:`Ready when you are`,welcomePrompt:`Ask a question, leave a message, or book a demo.`,agentTyping:`{name} is typing…`,expandedAnalyticsResult:`Expanded analytics result`,privacyAndData:`Privacy and local data`,muteMicrophone:`Mute microphone`,unmuteMicrophone:`Unmute microphone`,chooseMicrophone:`Choose microphone`,defaultMicrophone:`Default microphone`,microphone:`Microphone`,talkNow:`Talk now`,expandView:`Expand view`,exitExpandedView:`Exit expanded view`,minimizeVoiceChat:`Minimize voice chat`,endVoiceChat:`End voice chat`,restoreVoiceChat:`Restore voice chat`,reopenVoiceChat:`Reopen voice chat with {name}`,voiceConnecting:`Connecting…`,voiceListening:`Listening…`,voiceProcessing:`Thinking…`,voiceSpeaking:`Speaking…`,voiceNoise:`Background noise detected`,voiceMisunderstood:`I could not understand that audio`,voiceDenied:`Microphone access is unavailable`,composerPlaceholder:`Type your message…`,send:`Send message`,emoji:`Emoji`,gifs:`GIFs`,attachFile:`Attach a file`,recordVoice:`Record a voice message`,stopRecording:`Stop recording`,actionTestMode:`Test mode`,stop:`Stop`,copy:`Copy`,copied:`Copied`,retry:`Retry`,clearChat:`Clear conversation`,clearChatConfirm:`Clear this conversation?`,clearChatConfirmBody:`This clears the messages on this device and starts a fresh chat.`,clearConfirmCta:`Clear chat`,endChat:`End conversation`,endChatConfirm:`End this conversation?`,endChatConfirmBody:`You won't be able to send more messages in this chat, but you can start a new one anytime.`,endConfirmCta:`End conversation`,conversationEnded:`This conversation has ended.`,startNewChat:`Start a new conversation`,pastConversations:`Past conversations`,viewingPast:`Viewing a past conversation (read-only)`,backToChat:`Back to current chat`,historyEnded:`ended`,feedbackHelpful:`Helpful`,feedbackNotHelpful:`Not helpful`,feedbackThanks:`Thanks for the feedback`,csatPrompt:`How was this chat?`,feedbackCommentPlaceholder:`What went wrong? (optional)`,feedbackSend:`Send`,cancel:`Cancel`,newMessages:`New messages`,poweredBy:`Powered by`,searchGifs:`Search GIFs…`,searchingGifs:`Searching…`,noGifs:`No GIFs found`,assistantTyping:`Assistant is typing`,emptyReply:`Sorry, I couldn't generate a reply.`,errorGeneric:`Something went wrong reaching the assistant. Please try again.`,errorRateLimit:`You’re sending messages a little fast — give it a second and try again.`,attaching:`Reading file…`,attachTooLarge:`That file is too large (max 8 MB).`,attachFailed:`Couldn’t read that file — try another.`,removeAttachment:`Remove attachment`,dropFileHere:`Drop the file here`,clearDeviceData:`Clear conversations from this device`,clearDeviceDataBody:`This removes locally stored conversations and visitor details from this browser. It cannot be undone.`,clearDeviceDataCta:`Clear this device`,handoffTitle:`Want our team to follow up?`,handoffName:`Name (optional)`,handoffEmail:`Your email`,handoffNotify:`Notify the team`,sending:`Sending…`,handoffShared:`I’ve shared this with our team — they’ll get back to you at {email}.`,formThanks:`Thanks! We’ll be in touch.`,formError:`Something went wrong — please try again.`,actionContactOptions:`Contact options`,actionGetInTouch:`Get in touch`,actionMore:`+{count} more`,actionNeedHelp:`Need help?`,actionChoose:`Choose what you want to do`,actionFooter:`We’ll ask for your full name and the best email or phone so the team can reach you.`,actionCategorySupport:`Support`,actionCategorySales:`Talk to sales`,actionCategoryMarketing:`Stay in touch`,actionClose:`Close`,actionAs:`as {identity}`,bookingPickTime:`What time works best?`,bookingPickDay:`Pick a day`,bookingPickTimeLabel:`Pick a time`,bookingDuration:`{count}-minute demo`,bookingTimezone:`Times shown in {timezone}`,bookingSchedulerFallback:`the scheduler`,bookingCheckingAvailability:`Checking calendar availability…`,bookingNoSlots:`No available times were found in this booking window.`,bookingAvailabilityUnavailable:`Calendar availability is temporarily unavailable. Please try again shortly.`,bookingEarlierToday:`Earlier today`,bookingCalendarBusy:`Busy on the calendar`,bookingAlreadyBooked:`Already booked`,bookingNotOffered:`Not offered by the calendar`,bookingRequested:`Requested for {when} — we’ll confirm by email.`,bookingConfirmed:`You’re booked for {when}! A calendar invite is on its way. 📅`,bookingSlotTaken:`That time was just taken — please pick another.`,bookingViaProvider:`Pick a time that works for you on {provider}.`,bookingOpenScheduler:`Open the scheduler`,bookingLinkOpened:`Opening the scheduler — pick a time that suits you. 📅`,bookingMeetingLink:`Meeting link`,previewReply:`👋 This is a preview — replies here are samples. Publish the widget on your site to chat with the live AI.`,previewActionNote:`Preview — nothing was actually sent. This works for real once you publish.`,previewBanner:`Preview — sample replies, no AI`},GM=(e,t)=>e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??``),KM=e=>e?{...WM,...e}:WM,qM=(0,n.createContext)(WM),JM=qM.Provider,YM=()=>(0,r.useContext)(qM),XM=/(`[^`]+`)|(\*\*[^*]+\*\*)|(\[[^\]]+\]\(https?:\/\/[^\s)]+\))|(https?:\/\/[^\s)]+)/g,ZM=e=>e.replace(/([^\n])\s+((?:[-*•]|\d+\.)\s+)(?=(?:\*\*[^*\n]{1,80}\*\*|[A-Z][A-Za-z0-9/& -]{1,50}:))/g,`$1
|
|
30
|
-
$2`),QM=e=>{let t=[],n=0,r=0,a;for(XM.lastIndex=0;(a=XM.exec(e))!==null;){a.index>n&&t.push(e.slice(n,a.index));let o=a[0];if(o.startsWith("`"))t.push((0,i.jsx)(`code`,{class:`cf-md-code`,children:o.slice(1,-1)},r++));else if(o.startsWith(`**`))t.push((0,i.jsx)(`strong`,{children:o.slice(2,-2)},r++));else if(o.startsWith(`[`)){let e=/^\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)$/.exec(o),n=e?e[1]:o,a=e?e[2]:`#`;t.push((0,i.jsx)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer nofollow`,children:n},r++))}else t.push((0,i.jsx)(`a`,{href:o,target:`_blank`,rel:`noopener noreferrer nofollow`,children:o},r++));n=a.index+o.length}return n<e.length&&t.push(e.slice(n)),t},$M=/^(```|#{1,6}\s|\s*[-*•]\s|\s*\d+\.\s)/,eN=(e,t,n)=>{let r=`cf-md-h cf-md-h--${Math.min(e,6)}`;return e<=2?(0,i.jsx)(`h3`,{class:r,children:t},n):e===3?(0,i.jsx)(`h4`,{class:r,children:t},n):(0,i.jsx)(`h5`,{class:r,children:t},n)},tN=e=>{let t=ZM(e.replace(/\r\n/g,`
|
|
31
|
-
`)).split(`
|
|
32
|
-
`),n=[],r=0,a=0;for(;a<t.length;){let e=t[a];if(e.trim().startsWith("```")){let e=[];for(a++;a<t.length&&!t[a].trim().startsWith("```");)e.push(t[a]),a++;a++,n.push((0,i.jsx)(`pre`,{class:`cf-md-pre`,children:(0,i.jsx)(`code`,{children:e.join(`
|
|
33
|
-
`)})},r++));continue}if(e.trim()===``){a++;continue}let o=/^(#{1,6})\s+(.*)$/.exec(e);if(o){n.push(eN(o[1].length,QM(o[2]),r++)),a++;continue}if(/^\s*[-*•]\s+/.test(e)){let e=[];for(;a<t.length&&/^\s*[-*•]\s+/.test(t[a]);)e.push((0,i.jsx)(`li`,{children:QM(t[a].replace(/^\s*[-*•]\s+/,``))},e.length)),a++;n.push((0,i.jsx)(`ul`,{class:`cf-md-list`,children:e},r++));continue}if(/^\s*\d+\.\s+/.test(e)){let e=[];for(;a<t.length&&/^\s*\d+\.\s+/.test(t[a]);)e.push((0,i.jsx)(`li`,{children:QM(t[a].replace(/^\s*\d+\.\s+/,``))},e.length)),a++;n.push((0,i.jsx)(`ol`,{class:`cf-md-list`,children:e},r++));continue}let s=[e];for(a++;a<t.length&&t[a].trim()!==``&&!$M.test(t[a]);)s.push(t[a]),a++;let c=s.join(` `);if(/:\s*$/.test(c)&&a<t.length&&/^(?:\s*[-*•]\s+|\s*\d+\.\s+)/.test(t[a])){let e=/^(.*[.!?])\s+([^.!?]{2,120}:)$/.exec(c);e&&n.push((0,i.jsx)(`p`,{children:QM(e[1])},r++)),n.push((0,i.jsx)(`p`,{class:`cf-md-list-intro`,children:QM(e?.[2]??c)},r++))}else n.push((0,i.jsx)(`p`,{children:QM(c)},r++))}return n};let nN=!0,rN=null;const iN=e=>{nN=e},aN=()=>{let e=typeof window<`u`?window.AudioContext??window.webkitAudioContext:void 0;if(!e)return null;if(!rN)try{rN=new e}catch{return null}return rN.state===`suspended`&&rN.resume(),rN},oN=(e,t,n,r,i,a)=>{let o=e.createOscillator(),s=e.createGain();o.type=i,o.frequency.setValueAtTime(t,n),o.connect(s),s.connect(e.destination),s.gain.setValueAtTime(1e-4,n),s.gain.exponentialRampToValueAtTime(a,n+.012),s.gain.exponentialRampToValueAtTime(1e-4,n+r),o.start(n),o.stop(n+r+.03)},sN=e=>{if(!nN)return;let t=aN();if(!t)return;let n=t.currentTime;try{e===`open`?(oN(t,523,n,.12,`sine`,.05),oN(t,784,n+.08,.16,`sine`,.05)):e===`send`?oN(t,660,n,.08,`triangle`,.04):e===`receive`&&(oN(t,880,n,.1,`sine`,.045),oN(t,1175,n+.09,.14,`sine`,.045))}catch{}},cN=(e,t)=>e?.status===429?t.errorRateLimit:t.errorGeneric,lN=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),uN=(e,t)=>{let n=lN(),r={stage:e,durationMs:Math.max(0,n-t)};try{performance.measure(`centrinfo-widget:${e}`,{start:t,end:n})}catch{}return typeof window<`u`&&typeof CustomEvent<`u`&&window.dispatchEvent(new CustomEvent(`centrinfo:performance`,{detail:r})),r},dN=/!?\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,fN=/https?:\/\/[^\s)]+/g,pN=e=>e.replace(/```[\s\S]*?```/g,e=>e.replace(/^```[^\n]*\n?/,``).replace(/```$/,``).trim()),mN=e=>pN(e).replace(dN,`$1`).replace(/`([^`]+)`/g,`$1`).replace(/\*\*([^*]+)\*\*/g,`$1`).replace(/__([^_]+)__/g,`$1`).replace(/(^|[\s([{])\*([^*\n]{1,120})\*(?=[\s.,;:!?)}\]]|$)/g,`$1$2`).replace(/(^|[\s([{])_([^_\n]{1,120})_(?=[\s.,;:!?)}\]]|$)/g,`$1$2`).replace(/^\s{0,3}#{1,6}\s+/gm,``).replace(/^\s{0,3}[-*+]\s+/gm,``).replace(/^\s{0,3}\d+\.\s+/gm,``).replace(/\s+\*/g,` `).replace(/\*\s+/g,` `).replace(/[*_]{2,}/g,``).replace(fN,e=>e.replace(/^https?:\/\//,``).replace(/^www\./,``).replace(/\/$/,``)).replace(/[ \t]+\n/g,`
|
|
34
|
-
`).replace(/\n{3,}/g,`
|
|
35
|
-
|
|
36
|
-
`).replace(/[ \t]{2,}/g,` `).trim(),hN=()=>typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.round(Math.random()*1e9)}`,gN=(e,t)=>{typeof console>`u`||console.warn(`[centrinfo-widget] ${e}`,t??{})},_N=(e,t,n,r,i=1,a,o=!1,s,c)=>{e.current?.pause(),e.current=null,typeof window<`u`&&`speechSynthesis`in window&&window.speechSynthesis.cancel(),t.current=null;let l=()=>{let e=a?.trim();if(!o||!e||typeof window>`u`||!(`speechSynthesis`in window)||typeof SpeechSynthesisUtterance>`u`)return!1;let n=new SpeechSynthesisUtterance(e),r=!1,l=()=>{r||(r=!0,t.current===n&&(t.current=null,c?.()))};return n.rate=i,n.lang=typeof navigator<`u`&&(navigator.languages?.[0]||navigator.language)||`en-US`,n.onend=l,n.onerror=l,t.current=n,s?.(),window.speechSynthesis.cancel(),window.speechSynthesis.speak(n),!0};if(!n||typeof Audio>`u`)return l();let u=new Audio(`data:${r||`audio/mpeg`};base64,${n}`),d=!1,f=()=>{d||(d=!0,e.current===u&&(e.current=null,c?.()))};return u.playbackRate=i,u.onended=f,u.onerror=f,e.current=u,u.play().then(()=>{if(e.current!==u){f();return}s?.(Number.isFinite(u.duration)?u.duration*1e3:void 0)}).catch(()=>{l()||f()}),!0},vN=e=>{try{return e===`none`?null:e===`session`?sessionStorage:localStorage}catch{return null}},yN=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)},bN=e=>{try{let t=e?.split(`.`)[1];if(!t)return;let n=t.replace(/-/g,`+`).replace(/_/g,`/`),r=JSON.parse(atob(n.padEnd(Math.ceil(n.length/4)*4,`=`)));for(let e of[`sub`,`external_user_id`,`user_id`]){let t=r[e];if(typeof t==`string`&&t.trim())return t.trim()}}catch{}},xN=e=>{let t=e.user?.externalId?.trim()||e.user?.userId?.trim()||e.user?.email?.trim().toLowerCase()||bN(e.identityToken)||(e.identityToken||e.getIdentityToken?`authenticated`:`anonymous`);return`${e.token.slice(0,12)}:${e.chatSurface}:${yN(t)}`},SN=e=>`${e.chatSurface}:${hN()}`,CN=e=>e.slice(0,12),wN=e=>`centrinfo:session:${e}`,TN=e=>`centrinfo:visitor:${e}`,EN=(e,t)=>`centrinfo:chat:${e}:${t}`,DN=e=>`centrinfo:history:${e}`,ON=20,kN=720*60*60*1e3,AN=1440*60*1e3,jN=(e,t)=>{try{return JSON.parse(e?.getItem(TN(t))||`{}`)}catch{return{}}},MN=(e,t,n)=>{if(!e)return SN(n);try{let r=wN(t),i=e.getItem(r);if(i)return i;let a=SN(n);return e.setItem(r,a),a}catch{return SN(n)}},NN=(e,t,n)=>{if(!e)return{};try{let r=e.getItem(EN(t,n));return r?JSON.parse(r):{}}catch{return{}}},PN=(e,t,n)=>{let{ts:r,expiresAt:i,messages:a}=NN(e,t,n);return!Array.isArray(a)||typeof i==`number`&&Date.now()>i||typeof r==`number`&&Date.now()-r>kN?[]:a},FN=(e,t,n)=>{let{ts:r,expiresAt:i,messages:a,ended:o}=NN(e,t,n);return!Array.isArray(a)||a.length===0||typeof i==`number`&&Date.now()>i||typeof r==`number`&&Date.now()-r>kN?!1:o===!0||typeof r==`number`&&Date.now()-r>864e5},IN=e=>Number.isFinite(e??NaN)?Math.max(5,Math.min(200,Math.round(e))):50,LN=e=>Number.isFinite(e??NaN)?Math.max(1,Math.min(365,Math.round(e)))*24*60*60*1e3:kN,RN=(e,t,n,r,i,a,o,s)=>{if(e)try{if(!a){e.removeItem(EN(t,n));return}let c=r.filter(e=>!e.pending).slice(-o);if(c.length===0)return;let l=Date.now();e.setItem(EN(t,n),JSON.stringify({ts:l,expiresAt:l+s,messages:c,ended:i}))}catch{}},zN=(e,t)=>{if(!e)return[];try{let n=e.getItem(DN(t)),r=n?JSON.parse(n):[];return Array.isArray(r)?r:[]}catch{return[]}},BN=(e,t,n)=>{if(e)try{e.setItem(DN(t),JSON.stringify(n.slice(0,20)))}catch{}},VN=(e,t)=>{if(e)try{let n=`centrinfo:chat:${t}:`,r=new Set([wN(t),TN(t),DN(t)]),i=[];for(let t=0;t<e.length;t++){let a=e.key(t);a&&(r.has(a)||a.startsWith(n))&&i.push(a)}i.forEach(t=>e.removeItem(t))}catch{}},HN=e=>{let t=(e.find(e=>e.role===`user`&&e.content.trim())?.content||e.find(e=>e.content.trim())?.content||``).trim().replace(/\s+/g,` `);return t.length>60?t.slice(0,60)+`…`:t||`Conversation`},UN=e=>({id:`live:${e.id}`,role:e.type===`chat`||e.type===`ai_resume`?`assistant`:`system`,content:e.content,authorName:e.authorName,liveEventType:e.type,createdAt:e.createdAt}),WN=(e,t,n=!0)=>{let i=(0,r.useRef)(vN(t.persistence)).current,a=xN(t),o=(0,r.useRef)(MN(i,a,t)),s=(0,r.useRef)(null),c=(0,r.useRef)(null),l=(0,r.useRef)(null),u=(0,r.useRef)(void 0),d=(0,r.useRef)(null),f=(0,r.useRef)({}),[p,m]=(0,r.useState)(null),[h,g]=(0,r.useState)(()=>PN(i,a,o.current)),_=(0,r.useRef)(h.length>0),v=(0,r.useRef)(h.some(e=>e.role===`user`)),[y,b]=(0,r.useState)(!1),[x,S]=(0,r.useState)(!1),[C,w]=(0,r.useState)(()=>FN(i,a,o.current)),[T,E]=(0,r.useState)(()=>jN(i,a)),[D,O]=(0,r.useState)(()=>zN(i,a)),[k,A]=(0,r.useState)(null),[j,M]=(0,r.useState)([]),[N,P]=(0,r.useState)(`ai`),[ee,te]=(0,r.useState)(void 0),[ne,re]=(0,r.useState)(void 0),ie=(0,r.useRef)(new Date().toISOString()),ae=(0,r.useRef)(void 0),oe=(0,r.useRef)(!1),se=(0,r.useRef)(0),ce=(0,r.useRef)(T);(0,r.useEffect)(()=>{ce.current=T},[T]);let le=p?.memoryEnabled!==!1,ue=IN(p?.memoryMessageCap),F=LN(p?.memoryRetentionDays),I=(0,r.useCallback)(()=>{s.current?.abort(),VN(i,a),VN(i,CN(t.token));let e=SN(t);o.current=e;try{i?.setItem(wN(a),e)}catch{}A(null),M([]),w(!1),O([]),E({}),P(`ai`),te(void 0),re(void 0),ie.current=new Date().toISOString(),g(p?[{id:hN(),role:`assistant`,content:p.greeting,availableActions:p.availableActions,actions:p.actions}]:[])},[i,a,t.token,p]),de=(0,r.useCallback)(e=>{try{i?.setItem(TN(a),JSON.stringify(e))}catch{}},[i,a]),fe=(0,r.useCallback)(t=>{let n=(t.email??``).trim().toLowerCase(),r=(ce.current.email??``).trim().toLowerCase();n&&r&&n!==r&&I();let i={};t.email?.trim()&&(i.email=t.email.trim()),t.phone?.trim()&&(i.phone=t.phone.trim());let a=[t.firstName,t.lastName].filter(e=>!!e?.trim()).join(` `).trim()||t.name?.trim()||``;a&&(i.name=a),Object.keys(i).length>0&&E(e=>{let t={...i,...e};return de(t),t}),e.identify(o.current,t).catch(()=>{})},[e,de,I]),pe=(0,r.useCallback)(e=>{m(e),g(t=>{if(t.length===0)return[{id:hN(),role:`assistant`,content:e.greeting,availableActions:e.availableActions,actions:e.actions}];let n=t.some(e=>e.role===`user`),r=t[0];return!n&&r?.role===`assistant`?[{...r,content:e.greeting,availableActions:e.availableActions,actions:e.actions},...t.slice(1)]:t})},[]);(0,r.useEffect)(()=>{if(p?.memoryEnabled===!1){try{i?.removeItem(EN(a,o.current))}catch{}BN(i,a,[]),O([]),A(null),M([]),g(e=>_.current?(_.current=!1,p?[{id:hN(),role:`assistant`,content:p.greeting,availableActions:p.availableActions,actions:p.actions}]:[]):e)}},[p,i,a]);let me=(0,r.useCallback)(async()=>{pe(await e.bootstrap())},[pe,e]);(0,r.useEffect)(()=>{let t=!0,n=e=>e.messages.map(e=>({id:e.id,role:e.role,content:e.content,authorName:e.authorName,liveEventType:e.messageType,sources:e.sources,visualization:e.visualization,artifacts:e.artifacts,createdAt:e.createdAt}));return e.history().then(e=>{if(!t||e.conversations.length===0)return;let r=e.conversations.map(e=>({sessionId:e.sessionId,ts:Date.parse(e.lastSeenAt)||Date.now(),title:e.title,ended:e.ended}));for(let t of e.conversations)RN(i,a,t.sessionId,n(t),t.ended,!0,ue,F);BN(i,a,r),O(r);let s=e.conversations.find(t=>t.sessionId===e.activeSessionId);if(!s||v.current)return;let c=n(s);o.current=s.sessionId,_.current=c.length>0;try{i?.setItem(wN(a),s.sessionId)}catch{}let l=c[c.length-1]?.createdAt;l&&(ie.current=l),w(s.ended),g(c)}).catch(()=>{}),()=>{t=!1}},[ue,F,a,i,e]),(0,r.useEffect)(()=>{let n=!0;return e.bootstrap().then(e=>{n&&pe(e)}),t.user&&fe(t.user),()=>{n=!1}},[pe,e]),(0,r.useEffect)(()=>{let e=t.configRefreshSeconds;if(!n||e<=0||typeof window>`u`)return;let r=!0,i=!1,a=Math.max(10,e)*1e3,o=()=>typeof document>`u`||document.visibilityState!==`hidden`,s=async()=>{if(!(!r||i||!o())){i=!0;try{await me()}catch{}finally{i=!1}}};s();let c=window.setInterval(s,a),l=()=>void s(),u=()=>void s();return window.addEventListener(`focus`,l),document?.addEventListener?.(`visibilitychange`,u),()=>{r=!1,window.clearInterval(c),window.removeEventListener(`focus`,l),document?.removeEventListener?.(`visibilitychange`,u)}},[n,t.configRefreshSeconds,me]),(0,r.useEffect)(()=>{RN(i,a,o.current,h,C,le,ue,F)},[h,C,i,a,le,ue,F]),(0,r.useEffect)(()=>{if(C||k)return;let n=!0,r=!1,i=async()=>{if(!r){r=!0;try{let r=await e.liveEvents(o.current,ie.current);if(!n)return;if(P(r.mode),te(r.assignedAgentName||void 0),re(r.agentTyping?r.agentTypingName||r.assignedAgentName||`Agent`:void 0),r.conversationEnded){w(!0),P(`ai`),te(void 0),re(void 0),g(e=>e.some(e=>e.id===`live:conversation-ended`)?e:[...e,{id:`live:conversation-ended`,role:`system`,content:t.strings.conversationEnded,liveEventType:`conversation_ended`,createdAt:new Date().toISOString()}]);return}if(r.events.length>0){let e=ie.current,t=Date.parse(e),n=r.events.map(n=>{let r=Date.parse(n.createdAt);return Number.isFinite(r)&&r>t&&(t=r,e=n.createdAt),UN(n)});ie.current=e,g(e=>{let t=new Set(e.map(e=>e.id)),r=n.filter(e=>!t.has(e.id));return r.length>0?[...e,...r]:e}),n.some(e=>e.role===`assistant`)&&sN(`receive`)}}catch{}finally{r=!1}}};i();let a=window.setInterval(i,2200);return()=>{n=!1,window.clearInterval(a)}},[t.strings.conversationEnded,e,C,k]),(0,r.useEffect)(()=>{if(!le){BN(i,a,[]),O(e=>e.length>0?[]:e);return}h.some(e=>e.role===`user`)&&O(e=>{let t=o.current,n=[{sessionId:t,ts:Date.now(),title:HN(h),ended:C},...e.filter(e=>e.sessionId!==t)];return BN(i,a,n),n.slice(0,20)})},[h,C,i,a,le]);let he=(0,r.useCallback)((e,t)=>{g(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),ge=(0,r.useCallback)(()=>{u.current!==void 0&&typeof window<`u`&&window.clearInterval(u.current),u.current=void 0},[]),L=(0,r.useCallback)((e,t)=>{ge(),d.current===e&&(d.current=null),he(e,{content:t,pending:!1,streaming:!1})},[ge,he]),R=(0,r.useCallback)((e,t,n)=>{let r=t.trim();if(!r||typeof window>`u`){L(e,r);return}ge(),d.current=e;let i=r.match(/\S+\s*/g)??[r],a=n&&n>0?n:i.length*95,o=Math.max(28,Math.min(150,a/Math.max(i.length,1))),s=0;he(e,{content:``,pending:!1,streaming:!0}),u.current=window.setInterval(()=>{s+=1,he(e,{content:i.slice(0,s).join(``),pending:!1,streaming:s<i.length}),s>=i.length&&(ge(),d.current===e&&(d.current=null),he(e,{content:r,pending:!1,streaming:!1}))},o)},[ge,L,he]),z=(0,r.useCallback)(()=>{let e=d.current;ge(),d.current=null,e&&he(e,{pending:!1,streaming:!1})},[ge,he]),B=(0,r.useCallback)(t=>{if(C||k||N===`ai`||typeof window>`u`)return;if(ae.current!==void 0&&window.clearTimeout(ae.current),!t){if(!oe.current)return;oe.current=!1,se.current=0,e.typing(o.current,!1).catch(()=>{});return}let n=Date.now();(!oe.current||n-se.current>2500)&&(oe.current=!0,se.current=n,e.typing(o.current,!0).catch(()=>{})),ae.current=window.setTimeout(()=>{oe.current&&(oe.current=!1,se.current=0,e.typing(o.current,!1).catch(()=>{}))},1600)},[e,C,k,N]);(0,r.useEffect)(()=>()=>{ae.current!==void 0&&typeof window<`u`&&window.clearTimeout(ae.current)},[]),(0,r.useEffect)(()=>()=>ge(),[ge]);let _e=(0,r.useCallback)((n,r,i={})=>{z(),b(!0);let a=lN(),u=!1,d=new AbortController;s.current=d;let m=!!(p?.allowVoiceInput&&p?.voiceOutputEnabled&&p.talkbackMode!==`text`),h=!!(i.forceVoicePlayback&&m);e.stream(n,o.current,{voicePlaybackRequested:!!i.forceVoicePlayback,signal:d.signal,onChunk:e=>{e&&!u&&(u=!0,uN(`data-first-chunk`,a)),!h&&(i.forceVoicePlayback&&e&&(f.current[r]=!0),g(t=>t.map(t=>t.id===r?{...t,content:t.content+e,pending:!1,streaming:!0}:t)))}}).then(e=>{if(e.liveMode&&(P(e.liveMode),te(e.assignedAgentName||void 0)),e.liveMode&&e.liveMode!==`ai`&&!e.answer.trim()){g(e=>e.filter(e=>e.id!==r));return}let n=!!f.current[r];delete f.current[r];let a=!!(i.forceVoicePlayback&&m&&e.audioBase64&&e.answer.trim()&&!n);if(g(n=>n.map(n=>n.id===r?{...n,content:a?``:e.answer||n.content||t.strings.emptyReply,pending:!1,streaming:a,error:!1,retryText:void 0,sources:e.sources,suggestedReplies:e.suggestedReplies,availableActions:e.availableActions,actions:e.actions,selectedAction:e.selectedAction,handoffOffered:e.handoffOffered,requestedContactFields:e.requestedContactFields,visualization:e.visualization,artifacts:e.artifacts}:n)),sN(`receive`),i.forceVoicePlayback&&!e.audioBase64&&gN(m?`Talkback expected backend TTS audio, but the chat response did not include audioBase64.`:`Talkback voice was requested, but the loaded widget token config does not enable provider TTS.`,{voiceOutputEnabled:p?.voiceOutputEnabled,talkbackMode:p?.talkbackMode,voiceProvider:p?.voiceProvider,hasAudioBase64:!!e.audioBase64}),i.forceVoicePlayback){let t=_N(c,l,e.audioBase64,e.mimeType,p?.voiceSpeed??1,e.answer,!0,t=>{S(!0),a&&R(r,e.answer,t)},()=>{S(!1),a&&L(r,e.answer)});a&&!t&&L(r,e.answer)}e.answer&&t.onMessage?.({role:`assistant`,content:e.answer}),e.handoffOffered&&t.onHandoff?.(),e.conversationEnded&&w(!0)}).catch(e=>{if(d.signal.aborted){delete f.current[r],he(r,{pending:!1,streaming:!1});return}delete f.current[r],he(r,{content:cN(e,t.strings),pending:!1,streaming:!1,error:!0,retryText:n})}).finally(()=>{uN(`data-complete`,a),delete f.current[r],b(!1),s.current=null})},[e,t,he,p?.allowVoiceInput,p?.talkbackMode,p?.voiceOutputEnabled,p?.voiceSpeed,z]),V=(0,r.useCallback)((e,n={})=>{let r=e.trim(),{imageUrl:i,attachmentName:a,attachmentText:o,forceVoicePlayback:s,userMessageId:c}=n;if(!r&&!i&&!o||y||C)return;v.current=!0;let l=r;o?l=`${r}\n\n[Attached file${a?` "${a}"`:``}]:\n${o}`.trim():!l&&i&&(l=i);let u={id:c||hN(),role:`user`,content:r,imageUrl:i,attachmentName:a},d=hN();g(e=>[...c&&e.some(e=>e.id===c)?e.map(e=>e.id===c?{...e,content:r,pending:!1,streaming:!1,imageUrl:i,attachmentName:a}:e):[...e,u],{id:d,role:`assistant`,content:``,pending:!0}]),sN(`send`),t.onMessage?.({role:`user`,content:l}),_e(l,d,{forceVoicePlayback:s})},[y,C,t,_e]),ve=(0,r.useCallback)(()=>s.current?.abort(),[]),ye=(0,r.useCallback)(()=>{z(),c.current?.pause(),c.current=null,typeof window<`u`&&`speechSynthesis`in window&&window.speechSynthesis.cancel(),l.current=null,S(!1)},[z]),be=(0,r.useCallback)(t=>{let n=mN(t);if(!n)return Promise.resolve(!1);let r=!!(p?.allowVoiceInput&&p?.voiceOutputEnabled&&p.talkbackMode!==`text`),i=(e,t)=>new Promise(r=>{let i=!1;_N(c,l,e,t,p?.voiceSpeed??1,n,!0,()=>{i=!0,S(!0)},()=>{S(!1),r(i)})||(S(!1),r(!1))});return r?e.speak(n).then(e=>e.audioBase64?i(e.audioBase64,e.mimeType):(gN(`Talkback prompt TTS did not return provider audio.`,{providerReady:e.providerReady,message:e.message,voiceProvider:p?.voiceProvider,voiceOutputEnabled:p?.voiceOutputEnabled,talkbackMode:p?.talkbackMode}),i())).catch(e=>(gN(`Talkback prompt TTS request failed before audio playback.`,{error:e instanceof Error?e.message:String(e),voiceProvider:p?.voiceProvider,voiceOutputEnabled:p?.voiceOutputEnabled,talkbackMode:p?.talkbackMode}),i())):(gN(`Talkback prompt wanted voice, but the loaded widget token config has provider TTS disabled.`,{voiceOutputEnabled:p?.voiceOutputEnabled,talkbackMode:p?.talkbackMode,voiceProvider:p?.voiceProvider}),i())},[p?.allowVoiceInput,p?.talkbackMode,p?.voiceOutputEnabled,p?.voiceSpeed,e]),H=(0,r.useCallback)((e,t)=>{y||C||!t||(he(e,{content:``,pending:!0,streaming:!1,error:!1}),sN(`send`),_e(t,e))},[y,C,he,_e]),U=(0,r.useCallback)((t,n,r)=>{he(t,{feedback:n});let i=h.findIndex(e=>e.id===t),a=i>=0?h[i]?.content:void 0,s;for(let e=i-1;e>=0;e--)if(h[e]?.role===`user`){s=h[e]?.content;break}e.sendFeedback({sessionId:o.current,messageId:t,rating:n,comment:r,question:s,answer:a}).catch(()=>{})},[e,he,h]),xe=(0,r.useCallback)(async(n,r,i={},a)=>{t.onAction?.(n);let s=await e.action(n,{sessionId:o.current,...r},a),c={};return i.name?.trim()&&(c.name=i.name.trim()),i.email?.trim()&&(c.email=i.email.trim()),i.phone?.trim()&&(c.phone=i.phone.trim()),Object.keys(c).length>0&&(E(e=>{let t={...e,...c};return de(t),t}),c.email&&n!==`contact`&&e.action(`contact`,{sessionId:o.current,...c}).catch(()=>{})),sN(`receive`),s},[e,t,de]),Se=(0,r.useCallback)(e=>{let t=e.trim();t&&g(e=>e.some(e=>e.role===`assistant`&&e.content===t)?e:[...e,{id:hN(),role:`assistant`,content:t}])},[]),Ce=(0,r.useCallback)(e=>{v.current=!0;let t=hN();return g(n=>[...n,{id:t,role:`user`,content:e.trim(),pending:!0}]),t},[]),we=(0,r.useCallback)((e,t)=>{g(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),W=(0,r.useCallback)(e=>{g(t=>t.filter(t=>t.id!==e))},[]),Te=(0,r.useCallback)((t,n)=>{e.sendFeedback({sessionId:o.current,messageId:`__csat__`,rating:t,comment:n}).catch(()=>{})},[e]),G=(0,r.useCallback)(async(t,n,r,i)=>{let a=lN();try{if(typeof t!=`string`&&e.transcribeAudio)return await e.transcribeAudio(t,n,r,i);let a=typeof t==`string`?t:await VM(t);return await e.transcribe(a,n,r,i)}finally{uN(`voice-transcription`,a)}},[e]),K=(0,r.useCallback)((t,n,r)=>e.extract(t,n,r),[e]),q=(0,r.useCallback)(t=>e.searchGifs(t),[e]),Ee=(0,r.useCallback)((t,n)=>e.demoSlots(t,n),[e]),De=(0,r.useCallback)(e=>V(``,{imageUrl:e}),[V]),J=t.demo||!!t.gifApiKey,Oe=(0,r.useCallback)(()=>{s.current?.abort(),w(!0),e.endConversation(o.current).catch(()=>{})},[e]),ke=(0,r.useCallback)(()=>{s.current?.abort();let e=SN(t);o.current=e;try{i?.setItem(wN(a),e)}catch{}A(null),M([]),w(!1),P(`ai`),te(void 0),re(void 0),ie.current=new Date().toISOString(),g(p?[{id:hN(),role:`assistant`,content:p.greeting,availableActions:p.availableActions,actions:p.actions}]:[])},[i,a,p]),Ae=(0,r.useCallback)(e=>{if(le){if(e===o.current){A(null);return}M(PN(i,a,e)),A(e)}},[i,a,le]),je=(0,r.useCallback)(()=>{A(null),M([])},[]);return{persona:p,messages:h,sending:y,assistantSpeaking:x,visitor:T,starters:t.starters.length>0?t.starters:p?.starterQuestions??[],featuredLinks:p?.featuredLinks??[],hasEmail:!!T.email,liveMode:N,assignedAgentName:ee,agentTypingName:ne,send:V,sendGif:De,notifyTyping:B,stop:ve,retry:H,rateMessage:U,injectAssistant:Se,appendUserDraft:Ce,patchMessage:we,removeMessage:W,submitCsat:Te,submitForm:xe,transcribe:G,extract:K,searchGifs:q,demoSlots:Ee,gifEnabled:J,identify:fe,ended:C,endConversation:Oe,startNew:ke,history:le?D:[],viewingSessionId:k,viewMessages:j,openConversation:Ae,closeHistoryView:je,shutdown:I,stopSpeaking:ye,speakAssistantText:be}},GN=`https://api.accurixtech.com`,KN=()=>typeof navigator<`u`&&(navigator.languages?.[0]||navigator.language)||`en`,qN=(e,t)=>{if(!e)return;let n=t.trim().toLowerCase(),r=n.split(`-`)[0]??n,i=Object.entries(e);return i.find(([e])=>e.toLowerCase()===n)?.[1]??i.find(([e])=>e.toLowerCase()===r)?.[1]},JN=e=>{if(!e||typeof e.token!=`string`||e.token.length===0)throw Error("[centrinfo-widget] `token` is required — pass your pub_* token to Centrinfo.init({ token }).");let t=e.locale?.trim()||KN(),n=qN(e.translations,t);return{token:e.token,chatSurface:e.chatSurface??`floating`,analyticsContextToken:e.analyticsContextToken,identityToken:e.identityToken,getIdentityToken:e.getIdentityToken,apiBaseUrl:(e.apiBaseUrl??`https://api.accurixtech.com`).replace(/\/$/,``),accentColor:e.accentColor,themeTokens:e.themeTokens,agentName:e.agentName?.trim()||void 0,agentAvatarUrl:e.agentAvatarUrl?.trim()||void 0,launcherIcon:e.launcherIcon,gifApiKey:e.gifApiKey,theme:e.theme??`auto`,openByDefault:e.openByDefault??!1,sound:e.sound??!0,starters:e.starters??[],strings:KM({...n?.labels,...e.labels}),locale:t,actionTranslations:n?.actions??{},persistence:e.persistence??`local`,attachments:e.attachments??!0,zIndex:e.zIndex??2147483e3,styleNonce:e.styleNonce?.trim()??``,demo:e.demo??!1,preview:e.preview??!1,alignment:e.alignment===`left`?`left`:`right`,horizontalPadding:typeof e.horizontalPadding==`number`?e.horizontalPadding:20,verticalPadding:typeof e.verticalPadding==`number`?e.verticalPadding:20,hideDefaultLauncher:e.hideDefaultLauncher??!1,customLauncherSelector:e.customLauncherSelector,sessionDurationMinutes:typeof e.sessionDurationMinutes==`number`?e.sessionDurationMinutes:0,configRefreshSeconds:typeof e.configRefreshSeconds==`number`?e.configRefreshSeconds:30,proactiveMessage:e.proactiveMessage,proactiveDelaySeconds:typeof e.proactiveDelaySeconds==`number`?e.proactiveDelaySeconds:5,proactiveOnPaths:e.proactiveOnPaths,csat:e.csat??!0,user:e.user,onOpen:e.onOpen,onClose:e.onClose,onShow:e.onShow,onHide:e.onHide,onUnreadChange:e.onUnreadChange,onMessage:e.onMessage,onAction:e.onAction,onHandoff:e.onHandoff}};Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return kM}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return tN}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return EM}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return YM}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return zM}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return UM}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return PM}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return MM}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return iN}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return BM}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return FM}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return WN}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return JM}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return IM}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return sN}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return GM}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return JN}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return HM}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return TM}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return yM}});
|