@webority/chat-elements 0.0.0-stage → 0.134.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.
Files changed (77) hide show
  1. package/LICENSE.txt +9 -0
  2. package/dist/chat-elements.js +1 -0
  3. package/dist/chat.css +1 -0
  4. package/dist/chat.global.js +44 -0
  5. package/dist/types/WuiChat.d.ts +271 -0
  6. package/dist/types/agent.d.ts +7 -0
  7. package/dist/types/composer.d.ts +7 -0
  8. package/dist/types/dom.d.ts +31 -0
  9. package/dist/types/footer.d.ts +4 -0
  10. package/dist/types/global.d.ts +1 -0
  11. package/dist/types/header.d.ts +4 -0
  12. package/dist/types/history.d.ts +7 -0
  13. package/dist/types/http.d.ts +12 -0
  14. package/dist/types/index.d.ts +5 -0
  15. package/dist/types/loaders/index.d.ts +5 -0
  16. package/dist/types/loaders/orb.d.ts +4 -0
  17. package/dist/types/loaders/phrases.d.ts +4 -0
  18. package/dist/types/loaders/skeleton.d.ts +4 -0
  19. package/dist/types/loaders/steps.d.ts +4 -0
  20. package/dist/types/loaders/typing.d.ts +9 -0
  21. package/dist/types/nudge.d.ts +8 -0
  22. package/dist/types/past-chats.d.ts +18 -0
  23. package/dist/types/recaptcha.d.ts +2 -0
  24. package/dist/types/renderers/action-part.d.ts +17 -0
  25. package/dist/types/renderers/cell-format.d.ts +6 -0
  26. package/dist/types/renderers/chart-engine.d.ts +1 -0
  27. package/dist/types/renderers/chart-engine.global.d.ts +1 -0
  28. package/dist/types/renderers/chart-part.d.ts +11 -0
  29. package/dist/types/renderers/figure-runs.d.ts +4 -0
  30. package/dist/types/renderers/figures-part.d.ts +1 -0
  31. package/dist/types/renderers/file-part.d.ts +4 -0
  32. package/dist/types/renderers/handoff-part.d.ts +6 -0
  33. package/dist/types/renderers/image-part.d.ts +1 -0
  34. package/dist/types/renderers/index.d.ts +32 -0
  35. package/dist/types/renderers/input-request-part.d.ts +12 -0
  36. package/dist/types/renderers/notice-part.d.ts +4 -0
  37. package/dist/types/renderers/part-base.d.ts +20 -0
  38. package/dist/types/renderers/quick-replies-part.d.ts +1 -0
  39. package/dist/types/renderers/record-card-part.d.ts +1 -0
  40. package/dist/types/renderers/sources-part.d.ts +1 -0
  41. package/dist/types/renderers/table-part.d.ts +1 -0
  42. package/dist/types/renderers/text-part.d.ts +2 -0
  43. package/dist/types/renderers/ticket-part.d.ts +1 -0
  44. package/dist/types/renderers/voice-clip-part.d.ts +6 -0
  45. package/dist/types/share-actions.d.ts +23 -0
  46. package/dist/types/shell-docked.d.ts +11 -0
  47. package/dist/types/shell-embed.d.ts +10 -0
  48. package/dist/types/shell-launcher.d.ts +10 -0
  49. package/dist/types/shell-page.d.ts +10 -0
  50. package/dist/types/starters.d.ts +6 -0
  51. package/dist/types/thread.d.ts +6 -0
  52. package/dist/types/voice/composer-voice.d.ts +13 -0
  53. package/dist/types/voice/controller.d.ts +24 -0
  54. package/dist/types/voice/icons.d.ts +1 -0
  55. package/dist/types/voice/read-aloud-button.d.ts +10 -0
  56. package/dist/types/web/autoopen.d.ts +3 -0
  57. package/dist/types/web/avoid.d.ts +3 -0
  58. package/dist/types/web/behaviour.d.ts +6 -0
  59. package/dist/types/web/explain.d.ts +27 -0
  60. package/dist/types/web/focus.d.ts +2 -0
  61. package/dist/types/web/haptics.d.ts +1 -0
  62. package/dist/types/web/index.d.ts +17 -0
  63. package/dist/types/web/moment.d.ts +15 -0
  64. package/dist/types/web/motion.d.ts +5 -0
  65. package/dist/types/web/print.d.ts +19 -0
  66. package/dist/types/web/scrolllock.d.ts +1 -0
  67. package/dist/types/web/share.d.ts +10 -0
  68. package/dist/types/web/sound.d.ts +6 -0
  69. package/dist/types/web/speech-azure.d.ts +29 -0
  70. package/dist/types/web/speech-sdk-absent.d.ts +1 -0
  71. package/dist/types/web/speech.d.ts +9 -0
  72. package/dist/types/web/switch.d.ts +13 -0
  73. package/dist/types/web/viewport.d.ts +3 -0
  74. package/dist/web-Ezt3Vwhd.js +1 -0
  75. package/dist/web.js +1 -0
  76. package/package.json +67 -3
  77. package/README.md +0 -3
@@ -0,0 +1,44 @@
1
+ (function(){var e=Object.defineProperty,t=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},n=(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};function r(e){let t=new Uint8Array(e),n=(e,n)=>String.fromCharCode(...t.slice(e,n));return n(0,4)===`OggS`?`audio/ogg`:t[0]===26&&t[1]===69&&t[2]===223&&t[3]===163?`audio/webm`:n(4,8)===`ftyp`?`audio/mp4`:n(0,4)===`RIFF`?`audio/wav`:n(0,3)===`ID3`||t[0]===255&&(t[1]&224)==224?`audio/mpeg`:`application/octet-stream`}var i={Open:`Open`,InProgress:`In progress`,WaitingOnCustomer:`Waiting on you`,Resolved:`Resolved`,Closed:`Closed`,Cancelled:`Cancelled`},a={Positive:`Good`,Caution:`Watch`,Negative:`Poor`,Neutral:``},o=Object.freeze({launcher:`Open chat`,launcherClose:`Close chat`,panelTitle:`Assistant`,headerStatus:`Usually replies instantly`,newChat:`New chat`,close:`Close`,history:`Past chats`,historyEmptyTitle:`No past chats`,historyEmptyText:`Your conversations show here.`,untitled:`Untitled chat`,rename:`Rename chat`,renameSave:`Save`,conversationTitle:`Chat name`,renameFailed:`We could not rename this chat. Please try again.`,deleteChat:`Delete chat`,deleteConfirmTitle:`Delete this chat?`,deleteConfirmMessage:`The conversation is removed for good.`,deleteConfirm:`Delete`,deleteFailed:`We could not delete this chat. Please try again.`,cancel:`Cancel`,loadMore:`Show more`,loadFailed:`We could not load your chats. Please try again.`,backToChat:`Back to the chat`,thread:`Conversation`,you:`You`,assistant:`Assistant`,agent:`Team`,thinking:`Working on it`,loadingConversation:`Loading the conversation`,emptyTitle:`How can I help?`,starters:`Suggested questions`,resumeLast:`Continue your last chat`,nudgeDismiss:`Dismiss suggestion`,composer:`Your message`,placeholder:`Ask anything`,send:`Send`,stop:`Stop`,composerHint:`Press Enter to send, Shift and Enter for a new line.`,counter:(e,t)=>`${e.toLocaleString(`en-GB`)} of ${t.toLocaleString(`en-GB`)}`,allowance:e=>e===0?`You have no messages left today.`:e===1?`You have 1 message left today.`:`You have ${e} messages left today.`,attach:`Attach a file`,attachHint:`Pictures or PDFs.`,removeAttachment:e=>`Remove ${e}`,attachmentUploading:`Uploading`,attachmentFailed:`That file did not upload. Please try again.`,attachmentLimit:e=>`You can attach up to ${e} files.`,editing:`Editing your message`,footerPrivacy:`Privacy`,captchaNote:`Protected by reCAPTCHA.`,captchaPrivacy:`Privacy`,captchaTerms:`Terms`,captchaUnavailable:`We could not check this message. Please try again in a moment.`,newMessages:`New messages`,disclaimer:`The assistant can make mistakes, so check important details.`,copy:`Copy`,copied:`Copied`,share:`Share`,print:`Print`,retry:`Try again`,stopped:`Stopped.`,regenerate:`New answer`,edit:`Edit`,rateUp:`Helpful`,rateDown:`Not helpful`,rating:`Rate this answer`,rated:`Thanks for the feedback.`,ratingFailed:`Your rating did not save. Please try again.`,sources:`Sources`,openSource:e=>`Open ${e}`,quickReplies:`Suggested replies`,inputSubmitting:`Sending`,inputRequired:`This field is required.`,inputConsentRequired:`Please accept to continue.`,inputAnswered:`Details sent.`,inputExpired:`This form has expired.`,inputSkipped:`Skipped.`,inputOptional:`Optional`,inputChooseFile:`Choose a file`,inputSendCode:`Send code`,inputEnterCode:`Enter the code`,inputCodeSent:`We sent a code. Enter it below.`,inputCodeFailed:`The code could not be sent. Try again.`,inputRemoveFile:e=>`Remove ${e}`,actionConfirm:`Confirm`,actionDismiss:`Not now`,actionWorking:`Working on it`,actionConfirmed:`Confirmed.`,actionRejected:`Not sent.`,actionExpired:`This request expired and was not sent.`,actionDone:`Done.`,actionFailed:`We could not do this. Please try again.`,actionRepeat:e=>`Already done on ${e}. Nothing was sent again.`,fileOpen:e=>`Open ${e}`,needsNewerApp:`This message needs a newer version of the app.`,errorGeneric:`Something went wrong. Please try again.`,assistantOutdated:`The assistant needs an update before it can answer. Please try again later.`,typeAnswer:`or type your answer below`,skip:`Skip`,editSomething:`Edit something`,muteSounds:`Mute sounds`,unmuteSounds:`Unmute sounds`,preparingAnswer:e=>`${e} is preparing an answer`,explainTrigger:`Why?`,explainTriggerLabel:e=>`Why? Explain ${e}`,explainAskMore:`Ask more`,explainSlow:`Still working on this.`,explainOffline:`You are offline. Explanations need a connection.`,explainError:`This could not be explained just now. Try again.`,explainRetry:`Try again`,explainEmpty:`This could not be explained in words.`,explainCapacity:e=>`The limit for explanations has been reached. They come back at ${e}.`,explainCapacityNoDate:`You have reached today's limit. Try again later.`,explainNotCounted:`Explanations do not use your daily messages. A question you type does.`,openFullScreen:`Open full screen`,openSidePanel:`Open as side panel`,earlierChat:`Earlier chat`,justNow:`Just now`,dailyLimitRefresh:e=>`They refresh on ${e}.`,talkToPerson:`Talk to a person`,handoffRequested:`Connecting you to our team.`,handoffWaiting:`Waiting for the next available person.`,handoffQueued:e=>`You are number ${e} in line.`,handoffQueuedText:`We will bring you in as soon as someone is free.`,handoffJoined:e=>`${e} joined the chat.`,handoffJoinedText:e=>`The conversation so far has been shared with ${e}, so you will not need to repeat anything.`,handoffLeft:e=>`${e} left the chat.`,handoffLeftText:`Another member of the team may join, or you can start a new chat.`,handoffEnded:`This chat with our team has ended.`,handoffEndedText:`Thank you for talking to us. Start a new chat if you need anything else.`,handoffAgentFallback:`A member of our team`,handoffMoment:`One moment`,liveLost:`We lost the connection to support.`,agentTyping:e=>`${e} is typing`,agentSays:e=>`${e} says`,statusWaitingForAgent:`Waiting for a person`,statusWithAgent:e=>`${e} from our team`,openTickets:`Your open tickets`,ticketAria:e=>`Ticket ${e}`,ticketView:`View ticket`,ticketStatus:e=>i[e]??``,table:`Table`,tableShowAll:e=>`Show all ${e} rows`,tableEmpty:`No rows to show.`,chart:`Chart`,chartEmpty:`No data to show.`,chartShowTable:`Show as table`,chartShowChart:`Show as chart`,chartLoadFailed:`This chart could not be drawn.`,chartLow:e=>`Low ${e}`,chartHigh:e=>`High ${e}`,figures:`Key figures`,figureStatus:e=>a[e]??``,recordOpen:`Open`,recordOpenFor:e=>`Open ${e}`,imageLoading:`Loading image`,imageFailed:`This image could not be loaded.`,imageViewer:`Image viewer`,imageOpen:e=>`View image: ${e}`,dictate:`Dictate`,dictateStop:`Stop dictating`,dictateListening:`Listening`,dictateTranscribing:`Turning your voice into text`,dictationBlocked:`The microphone is blocked. Allow it in your settings to dictate.`,dictationNoMicrophone:`No microphone was found. Connect one and try again.`,dictationNotHeard:`Nothing was heard. Check your microphone and try again.`,dictationFailed:`Dictation stopped working. Try again.`,dictationUnavailable:`Dictation is not available here.`,dictateOpenSettings:`Open Settings`,readAloud:`Read aloud`,readAloudStop:`Stop reading`,readAloudFailed:`This could not be read aloud.`,voiceClip:`Voice message`,voiceClipPlay:`Play voice message`,voiceClipPause:`Pause voice message`,voiceClipFailed:`This voice message could not be played.`,voiceClipShowTranscript:`Show transcript`,voiceClipHideTranscript:`Hide transcript`,voiceClipTime:(e,t)=>`${e} of ${t}`,shareConversation:`Share this conversation`,printConversation:`Print this conversation`,shareFailed:`Could not share. Try again.`,printFailed:`Could not open the print view. Try again.`,printedOn:e=>`Printed on ${e}`}),s=e=>e?{...o,...e}:o,c=e=>{let t=``,n=t=>{let n=`message`,r=[];for(let e of t.split(`
2
+ `)){if(e===``||e.startsWith(`:`))continue;let t=e.indexOf(`:`),i=t===-1?e:e.slice(0,t),a=t===-1?``:e.slice(t+1);a.startsWith(` `)&&(a=a.slice(1)),i===`event`?n=a:i===`data`&&r.push(a)}if(r.length===0)return;let i;try{i=JSON.parse(r.join(`
3
+ `))}catch{e({name:`error`,data:{code:`invalid-response`,message:null}});return}e({name:n,data:i})};return{push(e){if(!e)return;t=(t+e).replace(/\r\n/g,`
4
+ `).replace(/\r(?!$)/g,`
5
+ `);let r=t.split(`
6
+
7
+ `);t=r.pop()??``;for(let e of r)n(e)},end(){let e=t.replace(/\r$/,``);t=``,e.trim()&&n(e)}}},l=new Set([`messageStarted`,`partStarted`,`partDelta`,`partCompleted`,`messageReset`,`step`,`messageCompleted`,`conversationUpdated`,`typing`,`error`]),u=e=>typeof e==`object`&&e?e:{},d=e=>{let t=null,n=null,r=c(({name:r,data:i})=>{if(n||!l.has(r))return;if(r===`error`){let e=u(i);n={code:typeof e.code==`string`?e.code:``,message:typeof e.message==`string`?e.message:``};return}let a={name:r,data:i};a.name===`messageCompleted`&&(t=a.data.message),e?.(a)});return{push:e=>r.push(e),end:()=>r.end(),get last(){return t},get failure(){return n}}},f=class extends Error{code;status;resetsDateTimeUtc;errors;constructor(e,t,n,r=null,i=null){super(t),this.name=`ChatApiError`,this.code=e,this.status=n,this.resetsDateTimeUtc=r,this.errors=i}},p=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return null}return e??null},m=e=>{if(typeof e!=`object`||!e||Array.isArray(e))return null;let t={};for(let[n,r]of Object.entries(e))Array.isArray(r)&&typeof r[0]==`string`&&(t[n]=r[0]);return Object.keys(t).length>0?t:null},h=(e,t)=>!!t?.aborted||e?.code===`ERR_CANCELED`||e?.name===`CanceledError`||e?.name===`AbortError`,g=(e,t)=>{if(e instanceof f)return e;let n=e;if(h(n,t))return new f(`aborted`,`The request was cancelled.`);let r=n?.response;if(!r)return new f(`network`,o.errorGeneric);let i=p(r.data),a=typeof i?.code==`string`&&i.code?i.code:`unknown`,s=typeof i?.detail==`string`&&i.detail?i.detail:o.errorGeneric,c=typeof i?.resetsDateTimeUtc==`string`?i.resetsDateTimeUtc:null;return new f(a,s,typeof r.status==`number`?r.status:void 0,c,m(i?.errors))},_=async e=>{try{return(await e()).data}catch(e){throw g(e)}},v=e=>{let t=e?.event?.target;if(t&&typeof t.responseText==`string`&&!(typeof t.status==`number`&&(t.status<200||t.status>=300)))return t.responseText},y=()=>{let e=globalThis.FormData;if(!e)throw Error(`FormData is not available.`);return new e},b=e=>typeof e.uri==`string`,x=(e,t)=>{if(b(t)){e.append(`file`,t);return}let n=t.name;if(typeof n!=`string`||n===``)throw Error(`The file needs a name.`);e.append(`file`,t,n)},S=()=>{let e=globalThis.crypto;return e?.randomUUID?e.randomUUID():`${Date.now().toString(36)}${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`},C=e=>{let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t},w=globalThis,T=e=>{let t=``,n=null;return r=>{let i=(t+r).split(`
8
+ `);t=i.pop()??``;for(let t of i){let r=t.endsWith(`\r`)?t.slice(0,-1):t;if(!r.startsWith(`id:`))continue;let i=r.slice(3).replace(/^ /,``);if(!/^\d+$/.test(i))continue;let a=Number(i);(n===null||a>n)&&(n=a,e?.(a))}}},E=(e,{base:t})=>{if(typeof t!=`string`||t.trim()===``)throw TypeError(`createChatClient needs a base path, e.g. { base: "/api/assistant" }.`);let n=t.replace(/\/+$/,``),r={"Chat-Contract":`4`},i=e=>`${n}/conversations/${encodeURIComponent(e)}`,a=e=>`${n}/attachments/${encodeURIComponent(e)}`,s=e=>`${n}/actions/${encodeURIComponent(e)}`,c=new Map,l=async t=>{let i=t===void 0?``:`?screen=${encodeURIComponent(t)}`;try{let t=await _(()=>e.get(`${n}/profile${i}`,{headers:r}));if(typeof t?.contractVersion!=`number`||t.contractVersion<4)throw new f(`assistant_outdated`,o.assistantOutdated);return t}catch(e){throw e instanceof f&&e.status===404?new f(`assistant_outdated`,o.assistantOutdated,404):e}},u=e=>{let t=e??``,n=c.get(t);return n||(n=l(e).catch(e=>{throw c.delete(t),e}),c.set(t,n)),n},p=async(t,n,r)=>{let i=d(r.onEvent),a=0,s=e=>{typeof e!=`string`||e.length<=a||(i.push(e.slice(a)),a=e.length)},c;try{c=await e.post(t,n,{responseType:`text`,headers:r.headers,signal:r.signal,onDownloadProgress:e=>s(v(e))})}catch(e){throw g(e,r.signal)}s(c.data),i.end();let l=i.failure;if(l)throw new f(l.code||`unknown`,l.message||o.errorGeneric);let u=i.last;if(!u)throw new f(`invalid-response`,o.errorGeneric,c.status);return u};return{getProfile:u,send:(e,t={})=>{let i=C({conversationId:e.conversationId,text:e.text,quickReplyId:e.quickReplyId,attachmentIds:e.attachmentIds&&e.attachmentIds.length>0?e.attachmentIds:void 0,replacesMessageId:e.replacesMessageId,pageContext:e.pageContext,captchaToken:e.captchaToken});return p(`${n}/messages`,i,{signal:t.signal,onEvent:t.onEvent,headers:{...r,Accept:`text/event-stream`,"Idempotency-Key":S()}})},answerInput:(e,t,i={})=>{let a=C({values:t.values,captchaToken:t.captchaToken,codes:t.codes,attribution:t.attribution});return p(`${n}/inputs/${encodeURIComponent(e)}`,a,{signal:i.signal,onEvent:i.onEvent,headers:{...r,Accept:`text/event-stream`,"Idempotency-Key":S()}})},confirmAction:t=>_(()=>e.post(`${s(t)}/confirm`,{},{headers:r})),rejectAction:(t,n)=>_(()=>e.post(`${s(t)}/reject`,n===void 0?{}:{reason:n},{headers:r})),listConversations:(t={})=>{let i=[];t.page!==void 0&&i.push(`page=${encodeURIComponent(String(t.page))}`),t.pageSize!==void 0&&i.push(`pageSize=${encodeURIComponent(String(t.pageSize))}`);let a=i.join(`&`),o=a?`${n}/conversations?${a}`:`${n}/conversations`;return _(()=>e.get(o,{headers:r}))},getConversation:(t,n)=>{let a=n===void 0?i(t):`${i(t)}?afterSequence=${n}`;return _(()=>e.get(a,{headers:r}))},renameConversation:async(t,n)=>{await _(()=>e.put(`${i(t)}/title`,{title:n},{headers:r}))},deleteConversation:async t=>{await _(()=>e.delete(i(t),{headers:r}))},rateMessage:async(t,i)=>{let a=typeof i.note==`string`?i.note.trim():``;await _(()=>e.put(`${n}/messages/${encodeURIComponent(t)}/rating`,{rating:i.rating,note:a||null},{headers:r}))},uploadAttachment:(t,i={})=>{let a=y();return x(a,t),_(()=>e.post(`${n}/attachments`,a,{headers:{...r,"Content-Type":`multipart/form-data`},timeout:3e5,signal:i.signal,onUploadProgress:({loaded:e,total:t})=>{i.onProgress&&t&&i.onProgress((e??0)/t)}}))},deleteAttachment:async t=>{await _(()=>e.delete(a(t),{headers:r}))},getAttachment:t=>_(()=>e.get(a(t),{headers:r,responseType:`arraybuffer`})),sendOtp:async(t,i)=>{await _(()=>e.post(`${n}/inputs/${encodeURIComponent(t)}/otp`,i,{headers:r}))},requestHandoff:(e,t={})=>{let i=typeof e.reason==`string`&&e.reason.trim()!==``?e.reason:void 0;return p(`${n}/handoff`,C({conversationId:e.conversationId,reason:i}),{signal:t.signal,onEvent:t.onEvent,headers:{...r,Accept:`text/event-stream`,"Idempotency-Key":S()}})},watchConversation:async(t,n)=>{let a=new w.AbortController,s=()=>a.abort();n.signal?.aborted&&a.abort(),n.signal?.addEventListener(`abort`,s);let c=!1,l=null,u=()=>{l!==null&&w.clearTimeout(l),l=w.setTimeout(()=>{c=!0,a.abort()},n.stallTimeoutMs??9e4)},p=T(n.onCursor),m=d(n.onEvent),h=0,_=e=>{if(typeof e!=`string`||e.length<=h)return;let t=e.slice(h);h=e.length,p(t),m.push(t)},y={...r,Accept:`text/event-stream`};typeof n.afterSequence==`number`&&Number.isFinite(n.afterSequence)&&(y[`Last-Event-ID`]=String(n.afterSequence)),u();try{_((await e.get(`${i(t)}/events`,{headers:y,responseType:`text`,timeout:0,signal:a.signal,onDownloadProgress:e=>{let t=v(e);t!==void 0&&(u(),_(t))}})).data),p(`
9
+ `),m.end();let n=m.failure;if(n)throw new f(n.code||`unknown`,n.message||o.errorGeneric)}catch(e){if(n.signal?.aborted)return;throw c?new f(`stalled`,o.errorGeneric):g(e,a.signal)}finally{l!==null&&w.clearTimeout(l),n.signal?.removeEventListener(`abort`,s)}},sendTyping:async t=>{await _(()=>e.post(`${i(t)}/typing`,void 0,{headers:r}))},listOpenTickets:async()=>{let t=await _(()=>e.get(`${n}/tickets/open`,{headers:r}));if(!Array.isArray(t))throw new f(`invalid-response`,o.errorGeneric);return t},getSpeechToken:()=>_(()=>e.post(`${n}/speech/token`,void 0,{headers:r}))}},D=20,O=e=>e instanceof f?{code:e.code,message:e.message||o.loadFailed,resetsDateTimeUtc:e.resetsDateTimeUtc}:{code:`unknown`,message:o.loadFailed,resetsDateTimeUtc:null},k=e=>{let t=e.client,n=e.pageSize??D,r=new Set,i={items:[],totalCount:null,loading:!1,error:null,hasMore:!1},a=0,o=!1,s=e=>{if(!o){i={...i,...e};for(let e of r)e()}};return{getState:()=>i,subscribe:e=>(r.add(e),()=>{r.delete(e)}),load:async()=>{a+=1;let e=a;s({loading:!0,error:null});try{let r=await t.listConversations({page:1,pageSize:n});if(o||e!==a)return;s({items:r.items,totalCount:r.totalCount,hasMore:r.page<r.totalPages,loading:!1})}catch(t){if(o||e!==a)return;s({loading:!1,error:O(t)})}},loadMore:async()=>{if(i.loading||!i.hasMore)return;let e=a,r=Math.floor(i.items.length/n)+1;s({loading:!0,error:null});try{let c=await t.listConversations({page:r,pageSize:n});if(o||e!==a)return;let l=new Set(i.items.map(e=>e.publicId)),u=c.items.filter(e=>!l.has(e.publicId));s({items:[...i.items,...u],totalCount:c.totalCount,hasMore:c.page<c.totalPages,loading:!1})}catch(t){if(o||e!==a)return;s({loading:!1,error:O(t)})}},rename:async(e,n)=>{let r=n.trim();if(await t.renameConversation(e,r),o)return;let a=r.replace(/\s+/g,` `);s({items:i.items.map(t=>t.publicId===e?{...t,title:a}:t)})},remove:async e=>{await t.deleteConversation(e),o||s({items:i.items.filter(t=>t.publicId!==e),totalCount:i.totalCount===null?null:i.totalCount-1})},dispose:()=>{o=!0,r.clear()}}},A=class extends Error{code;constructor(e,t){super(t??e),this.name=`ChatSpeechError`,this.code=e}},j=`×`,ee=`[-+\\u2212]?\\d{1,3}`,te=new Map([[`times`,j],[`cdot`,`·`],[`sum`,`∑`],[`leq`,`≤`],[`le`,`≤`],[`geq`,`≥`],[`ge`,`≥`],[`neq`,`≠`],[`approx`,`≈`],[`pm`,`±`],[`rightarrow`,`→`],[`to`,`→`],[`alpha`,`α`],[`beta`,`β`],[`gamma`,`γ`],[`delta`,`δ`],[`lambda`,`λ`],[`mu`,`μ`],[`pi`,`π`],[`rho`,`ρ`],[`sigma`,`σ`],[`tau`,`τ`],[`Delta`,`Δ`],[`Omega`,`Ω`]]),ne=/\\\((.*?)\\\)|\\\[(.*?)\\\]|\$\$(.*?)\$\$/gs,re=/`[^`]+`/g,ie=/([_^])(\{[^}]*\}|[A-Za-z0-9])/g,ae=e=>`(?<${e}>\\{\\s*${ee}\\s*\\}|\\(\\s*${ee}\\s*\\)|${ee})`,oe=`(?<tensMantissa>\\d+(?:\\.\\d+)?) *[xX*] *10 ?\\^ ?${ae(`tensExp`)}`,se=`\\b10 ?\\^ ?${ae(`powExp`)}`,ce=`(?<![A-Za-z0-9_.#-])(?<etoken>\\d+(?:\\.\\d+)?[eE]${ee})(?![A-Za-z0-9_.-])`,le=RegExp(`${oe}|${se}|${ce}|(?<![A-Za-z0-9_])(?<symLetter>[A-Za-z])_(?<symSub>[A-Za-z0-9]+)(?<symPrime>')?(?![A-Za-z0-9_])`,`g`),ue=e=>e.replace(/\\(?:left|right)\b/g,``).replace(/\\(?:text|mathrm|mathbf|mathit|operatorname)\{([^{}]*)\}/g,`$1`).replace(/\\frac\{([^{}]*)\}\{([^{}]*)\}/g,`($1)/($2)`).replace(/\\sqrt\{([^{}]*)\}/g,`√($1)`).replace(/\\[,;:! ]/g,` `).replace(/\\([A-Za-z]+)/g,(e,t)=>te.get(t)??t),de=e=>{let t=e.replace(/^[{(]\s*/,``).replace(/\s*[})]$/,``).trim().replace(/\u2212/g,`-`),n=``;return t.startsWith(`-`)?(n=`-`,t=t.slice(1)):t.startsWith(`+`)&&(t=t.slice(1)),t=t.replace(/^0+(?=\d)/,``),t===`0`?`0`:n+t},fe=e=>{if(!Number.isFinite(e))return[{kind:`text`,text:String(e)}];if(e===0)return[{kind:`text`,text:`0`}];if(e<0)return[{kind:`text`,text:`-`},...fe(-e)];let t=Math.floor(Math.log10(e)),n=e/10**t;Number(n.toFixed(2))>=10&&(n/=10,t+=1);let r=Math.abs(n-Math.round(n))<1e-9?String(Math.round(n)):String(Number(n.toFixed(2)));return t===0?[{kind:`text`,text:r}]:[{kind:`text`,text:`${r} ${j} 10`},{kind:`sup`,text:String(t)}]},pe=(e,t)=>{let n=t.replace(/[{}]/g,``);n!==``&&e.push({kind:`text`,text:n})},me=e=>{let t=[],n=0;for(let r of e.matchAll(ie)){let i=r.index??0;pe(t,e.slice(n,i));let a=r[2].startsWith(`{`)?r[2].slice(1,-1):r[2];t.push({kind:r[1]===`_`?`sub`:`sup`,text:a}),n=i+r[0].length}return pe(t,e.slice(n)),t},he=e=>{let t=[],n=0;for(let r of e.matchAll(le)){let i=r.index??0;i>n&&t.push({kind:`text`,text:e.slice(n,i)});let a=r.groups??{};a.tensMantissa===void 0?a.powExp===void 0?a.etoken===void 0?(t.push({kind:`text`,text:a.symLetter??``}),t.push({kind:`sub`,text:a.symSub??``}),a.symPrime!==void 0&&t.push({kind:`text`,text:`'`})):t.push(...fe(Number(a.etoken.replace(/\u2212/g,`-`)))):(t.push({kind:`text`,text:`10`}),t.push({kind:`sup`,text:de(a.powExp)})):(t.push({kind:`text`,text:`${a.tensMantissa} ${j} 10`}),t.push({kind:`sup`,text:de(a.tensExp??``)})),n=i+r[0].length}return n<e.length&&t.push({kind:`text`,text:e.slice(n)}),t},ge=e=>{let t=[],n=0;for(let r of e.matchAll(re)){let i=r.index??0;t.push(...he(e.slice(n,i))),t.push({kind:`text`,text:r[0]}),n=i+r[0].length}return t.push(...he(e.slice(n))),t},M=e=>{let t=[];for(let n of e){if(n.text===``)continue;let e=t.at(-1);n.kind===`text`&&e?.kind===`text`?t[t.length-1]={kind:`text`,text:e.text+n.text}:t.push(n)}return t};function _e(e){if(typeof e!=`string`||e===``)return[];let t=[],n=0;for(let r of e.matchAll(ne)){let i=r.index??0;t.push(...ge(e.slice(n,i)));let a=r[1]??r[2]??r[3]??``;t.push(...me(ue(a))),n=i+r[0].length}return t.push(...ge(e.slice(n))),M(t)}function ve(e){return _e(e).map(e=>e.kind===`sup`?`^${e.text}`:e.text).join(``)}function ye(e){return Number.isFinite(e)&&e!==0&&Math.abs(e)<.001?fe(e):Number.isFinite(e)?[{kind:`text`,text:new Intl.NumberFormat(`en-IN`,{maximumFractionDigits:10}).format(e)}]:[{kind:`text`,text:String(e)}]}var be=/\[([^[\]\n]+)\](?!\()/g,xe=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`),Se=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,Ce=/!\[([^\]\n]*)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,we=new RegExp(be.source,`y`),Te=e=>/[\p{L}\p{N}]/u.test(e);function Ee(e,t){let n=0;for(let r=t-1;r>=0&&e.charAt(r)===`\\`;--r)n+=1;return n%2==1}function De(e,t,n){let r=n.length===1;for(let i=e.indexOf(n,t);i!==-1;i=e.indexOf(n,i+1)){let a=i>t&&!/\s/.test(e.charAt(t))&&!/\s/.test(e.charAt(i-1)),o=r&&(e.charAt(i+1)===n||e.charAt(i-1)===n),s=n===`_`&&Te(e.charAt(i+n.length));if(a&&!o&&!s&&!Ee(e,i))return i}return-1}function Oe(e,t){let n=t?.isCitation,r=[],i=``,a=()=>{i&&=(r.push({type:`text`,text:i}),``)},o=0;for(;o<e.length;){let s=e.charAt(o),c=e.charAt(o+1);if(s===`\\`&&xe.has(c)){i+=c,o+=2;continue}if(s==="`"){let t=e.indexOf("`",o+1);if(t>o+1){a(),r.push({type:`code`,text:e.slice(o+1,t)}),o=t+1;continue}}let l=s+c;if(l===`**`||l===`__`||l===`~~`){let n=De(e,o+2,l);if(n!==-1&&!(l===`__`&&Te(e.charAt(o-1)))){a();let i=Oe(e.slice(o+2,n),t);l===`~~`?r.push({type:`strike`,children:i}):r.push({type:`strong`,children:i}),o=n+2;continue}i+=l,o+=2}else{if(s===`*`||s===`_`){let n=De(e,o+1,s);if(n!==-1&&!(s===`_`&&Te(e.charAt(o-1)))){a(),r.push({type:`em`,children:Oe(e.slice(o+1,n),t)}),o=n+1;continue}}if(s===`[`){Se.lastIndex=o;let t=Se.exec(e);if(t){a(),r.push({type:`link`,href:t[2],children:Oe(t[1])}),o+=t[0].length;continue}if(n){we.lastIndex=o;let t=we.exec(e);if(t&&n(t[1])){a(),r.push({type:`citation`,text:t[1]}),o+=t[0].length;continue}}}if(s===`!`){Ce.lastIndex=o;let t=Ce.exec(e);if(t){a(),r.push({type:`image`,children:Oe(t[1])}),o+=t[0].length;continue}}i+=s,o+=1}}return a(),r.map((e,t)=>({...e,key:t}))}var ke=/^[a-z][a-z0-9+.-]*:[a-z0-9_-]+\/[a-z0-9_.~-]+$/i,Ae=/^https?:/i,je=/^(mailto|tel):/i,Me=/^(?:\/(?![/\\])|#|\?|\.{1,2}\/)/;function Ne(e,t,n,r){if(n&&(t===`page`||ke.test(e))){let t=n(e);if(t!=null)return{kind:`app`,target:t}}return t===`app`?null:Me.test(e)?{kind:`page`,href:e}:t===`page`&&!(Ae.test(e)&&r&&Pe(e,r))?null:Ae.test(e)?{kind:r&&Pe(e,r)?`page`:`web`,href:e}:je.test(e)?{kind:`contact`,href:e}:null}function Pe(e,t){if(e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let n=e[t.length];return n===void 0||n===`/`||n===`?`||n===`#`}var Fe=/^\s*```/,Ie=/^\s*```\s*(\S*)/,Le=/^\s{0,3}(#{1,6})\s+(.*?)(?:\s+#+)?\s*$/,Re=/^\s*([-*_])(\s*\1){2,}\s*$/,ze=/^(\s*)[-*+]\s+(.*)$/,Be=/^(\s*)(\d{1,9})[.)]\s+(.*)$/,Ve=/^\s*>\s?(.*)$/,He=/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/,Ue=e=>e.includes(`|`);function We(e){let t=e.trim();return t.startsWith(`|`)&&(t=t.slice(1)),t.endsWith(`|`)&&(t=t.slice(0,-1)),t.split(`|`).map(e=>e.trim())}function Ge(e,t){return Ue(e[t])&&t+1<e.length&&e[t+1].includes(`|`)&&He.test(e[t+1])}function Ke(e,t){let n=e[t];return Fe.test(n)||Ve.test(n)||ze.test(n)||Be.test(n)||Le.test(n)||Re.test(n)||Ge(e,t)}function qe(e){let t=e.replace(/\t/g,` `).length;return Math.min(Math.floor(t/2),4)}function Je(e){let t=Be.exec(e);if(t)return{text:t[3],depth:qe(t[1]),ordered:!0,number:Number(t[2])};let n=ze.exec(e);return n?{text:n[2],depth:qe(n[1]),ordered:!1,number:0}:null}function Ye(e){let t=(e??``).replace(/\r\n?/g,`
10
+ `).split(`
11
+ `),n=[],r=0;for(;r<t.length;){let e=t[r];if(!e.trim()){r+=1;continue}if(Fe.test(e)){let i=Ie.exec(e)?.[1]||null,a=[];for(r+=1;r<t.length&&!Fe.test(t[r]);)a.push(t[r]),r+=1;r+=1,n.push({type:`code`,text:a.join(`
12
+ `),language:i});continue}if(Ge(t,r)){let i=We(e),a=[];for(r+=2;r<t.length&&t[r].trim()&&Ue(t[r]);)a.push(We(t[r])),r+=1;n.push({type:`table`,header:i,rows:a});continue}if(Re.test(e)){n.push({type:`rule`}),r+=1;continue}let i=Le.exec(e);if(i){n.push({type:`heading`,level:i[1].length,text:i[2]}),r+=1;continue}if(Ve.test(e)){let e=[];for(;r<t.length;){let n=Ve.exec(t[r]);if(!n)break;e.push(n[1]),r+=1}n.push({type:`quote`,lines:e});continue}let a=Je(e);if(a){let e=[];for(;r<t.length&&t[r].trim();){let n=Je(t[r]);if(n){if(n.depth===0&&n.ordered!==a.ordered)break;e.push(n)}else if(Ke(t,r))break;else e[e.length-1].text+=` ${t[r].trim()}`;r+=1}n.push({type:`list`,ordered:a.ordered,start:a.ordered?a.number:1,items:e});continue}let o=[e];for(r+=1;r<t.length&&t[r].trim()&&!Ke(t,r);)o.push(t[r]),r+=1;n.push({type:`paragraph`,lines:o})}return n.map((e,t)=>({...e,key:t}))}var Xe=e=>e.map(e=>e.type===`text`||e.type===`code`||e.type===`citation`?e.text:Xe(e.children)).join(``),Ze=e=>Xe(Oe(e));function Qe(e){switch(e.type){case`paragraph`:case`quote`:return Ze(e.lines.join(` `));case`heading`:return Ze(e.text);case`list`:return e.items.map(e=>Ze(e.text)).join(`. `);case`table`:return[e.header,...e.rows].map(e=>e.map(Ze).join(`, `)).join(`. `);case`code`:return e.text;case`rule`:return``}}function $e(e){return Ye(e).map(Qe).filter(Boolean).join(`
13
+ `)}var et=[`KB`,`MB`,`GB`],tt=e=>{if(e<1024)return`${e} B`;let t=e/1024,n=0;for(;t>=1024&&n<et.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${et[n]}`},nt=new Intl.DateTimeFormat(`en-GB`,{timeZone:`Asia/Kolkata`,day:`2-digit`,month:`short`,year:`numeric`}),rt=e=>nt.format(new Date(e)).replace(/ /g,`-`),it=e=>e.flatMap(e=>e.kind===`Text`?[$e(e.text)]:e.kind===`Notice`?[e.text]:[]).filter(e=>e!==``).join(`
14
+
15
+ `).trim(),at=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],ot=`-`,st=new Intl.DateTimeFormat(`en-IN`,{timeZone:`Asia/Kolkata`,day:`2-digit`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}),ct=e=>{let t=Date.parse(e);if(Number.isNaN(t))return ot;let n=st.formatToParts(t),r=e=>n.find(t=>t.type===e)?.value??``;return`${r(`day`)}-${at[Number(r(`month`))-1]}-${r(`year`)}, ${r(`hour`)}:${r(`minute`)} ${r(`dayPeriod`).toUpperCase()}`},lt=new Intl.NumberFormat(`en-IN`,{maximumFractionDigits:0}),ut=new Intl.NumberFormat(`en-IN`,{maximumFractionDigits:3}),dt=new Intl.NumberFormat(`en-IN`,{maximumFractionDigits:2}),ft=new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:2,maximumFractionDigits:2}),pt=/^\d{4}-\d{2}-\d{2}$/,mt=e=>pt.test(e)?Date.parse(`${e}T00:00:00+05:30`):Date.parse(e),ht=e=>e.map(e=>e.kind===`sup`?`^${e.text}`:e.text).join(``),gt=(e,t)=>{if(t===null)return ft.format(e/100);try{let n=new Intl.NumberFormat(`en-IN`,{style:`currency`,currency:t}),r=n.resolvedOptions().maximumFractionDigits;if(r===void 0)throw Error(`No fraction digits resolved for currency ${t}.`);return n.format(e/10**r)}catch(n){if(!(n instanceof RangeError))throw n;return`${ft.format(e/100)} ${t.toUpperCase()}`}},_t=(e,t,n)=>{if(e==null||e===``)return ot;if(t===`Text`)return String(e);if(t===`Date`){let t=mt(String(e));return Number.isNaN(t)?ot:nt.format(t).replace(/ /g,`-`)}if(t===`DateTimeUtc`)return ct(String(e));let r=Number(e);return Number.isFinite(r)?t===`Integer`?lt.format(r):t===`Decimal`?r!==0&&Math.abs(r)<.001?ht(ye(r)):ut.format(r):t===`Percent`?`${dt.format(r)}%`:gt(r,n):String(e)},vt=/^https?:\/\/([^@/?#:]+)(?::\d+)?(?=[/?#]|$)/i;function yt(e,t){if(typeof e!=`string`||e===``||/[\t\n\r]/.test(e))return!1;if(e[0]===`/`)return e[1]!==`/`&&e[1]!==`\\`;if(t===void 0||t.length===0)return!1;let n=vt.exec(e);if(n===null)return!1;let r=n[1].toLowerCase();return t.some(e=>e.toLowerCase()===r)}var bt={launcher:{style:`Round`,entrance:`SlideUp`,idle:`None`,labelReveal:`Bubble`,compact:!1},panel:{motion:`Spring`,widthPx:420,maxHeightPx:650,bottomGapPx:80},phone:{maxWidthPx:768,mode:`FullScreen`,sheetHeightDvh:85,sheetMaxHeightPx:640},input:{ring:!0,sendReveal:`OnText`},avoid:{liftSelectors:[`footer`,`.form-actions-sticky`,`.wui-tabbar`],menuSelectors:[`.offcanvas.show`,`wui-drawer[open]`,`[data-menu-open]`],darkSelectors:[`[data-theme='dark']`,`[data-bs-theme='dark']`],autoOpenOptOutSelector:`[data-chat-no-autoopen]`,autoOpenBusySelectors:[`[data-chat-busy]`]},motion:`On`};function xt(e){let t=e??{};return{launcher:{...bt.launcher,...t.launcher},panel:{...bt.panel,...t.panel},phone:{...bt.phone,...t.phone},input:{...bt.input,...t.input},avoid:{...bt.avoid,...t.avoid},motion:t.motion??bt.motion}}var St=(e,t,n)=>n||!t.typingPause?0:Math.min(t.pauseBaseMs+t.pausePerCharMs*e.length,t.pauseMaxMs),Ct=Object.freeze(`VisitorChat.Starters.Nudges.ResumeLast.OpenTickets.History.Rename.Delete.SuggestedReplies.Stop.Retry.Edit.Regenerate.Sources.Rating.Copy.Share.Print.Attachments.RichAnswers.InputRequests.LeadCapture.Booking.Scripts.AiAnswers.HumanHandoff.Dictation.ReadAloud.VoiceClips.Sounds.AutoOpen.BehaviourStarters.LeadShortcuts.LeadRecap.FigureText.LinkHandoff.Explain.PanelSwitch`.split(`.`)),wt=()=>{let e={};for(let t of Ct)e[t]=!1;return e},Tt=(e,t)=>{let n={};for(let r of Ct)n[r]=e.features[r]===!0&&t?.[r]!==!1;return Object.freeze(n)},Et=(e,t)=>e===`/`||t===e||t.startsWith(`${e}/`),Dt=(e,{pathname:t,returning:n})=>{let r=e.start,i=r.greeting,a=r.starters;n&&(i=r.returningGreeting??i,a=r.returningStarters??a);let o=null;for(let e of r.pageRules)Et(e.pathPrefix,t)&&(o===null||e.pathPrefix.length>o.pathPrefix.length)&&(o=e);return o&&(i=o.greeting??i,a=o.starters??a),{greeting:i,starters:a}},Ot=(e,t)=>t.Nudges&&e.start.nudge?e.start.nudge:null,kt=e=>e.captcha.mode!==`Off`&&typeof e.captcha.siteKey==`string`&&e.captcha.siteKey!==``,At=(e,t,n,r)=>{let i=n.length>0?n:[o.thinking],a=i[(r%i.length+i.length)%i.length],s=t.length>0?t[t.length-1]:void 0;return e===`Phrases`?{label:a,steps:[],activeIndex:-1}:e===`Steps`?{label:s??a,steps:t.length>0?[...t]:[a],activeIndex:t.length>0?t.length-1:0}:{label:s??a,steps:[],activeIndex:-1}},jt=globalThis,Mt=new Set([`stalled`,`network`,`invalid-response`,`stream_ended`]),Nt=e=>!(e instanceof f)||Mt.has(e.code)?!0:e.status===408||e.status===429||e.status!==void 0&&e.status>=500;function Pt(e){let t=e.baseDelayMs??1e3,n=e.maxDelayMs??3e4,r=e.maxFailedAttempts??10,i=!1,a=null,s=null,c=null,l=0,u=0,d=0,p=e=>new Promise(t=>{c=t,s=jt.setTimeout(()=>{s=null,c=null,t()},e)});return(async()=>{for(;!i;){if(d>0&&(await e.beforeReconnect().catch(()=>void 0),i))return;e.onStatus(`Connecting`);let s=new jt.AbortController;a=s;let c=!1,m=!1,h=()=>{i||(c=!0,l=0,u=0,m||(m=!0,e.onStatus(`Live`)))};try{await e.watch(e.getCursor(),s.signal,h)}catch(t){if(i)return;if(!Nt(t)){e.onError(t),e.onStatus(`Lost`);return}}if(i)return;a=null;let g=Math.min(n,t*2**u);if(c||(l+=1,u+=1),l>=r){e.onError(new f(`connection_lost`,o.errorGeneric)),e.onStatus(`Lost`);return}await p(g),d+=1}})().catch(t=>e.onError(t)),{stop(){i||(i=!0,a?.abort(),a=null,s!==null&&(jt.clearTimeout(s),s=null),c?.(),c=null)}}}var Ft=e=>e.replace(/[-_]+/g,` `).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/\s+/g,` `).trim(),It=(e,t)=>e===`/`||t===e||t.startsWith(`${e}/`),Lt=(e,t)=>{let n=e.starters,r=null;for(let n of e.pageRules)It(n.pathPrefix,t.pathname)&&(r===null||n.pathPrefix.length>r.pathPrefix.length)&&(r=n);r?.starters&&(n=r.starters),t.returning&&e.returningStarters&&(n=e.returningStarters);let i=t.behaviour;if(t.behaviourStarters&&i&&e.rules){let t=e.rules.find(e=>(e.minTimeOnSiteSeconds===null||i.timeOnSiteSeconds>=e.minTimeOnSiteSeconds)&&(e.minScrollPercent===null||i.scrollPercent>=e.minScrollPercent)&&(e.minPagesViewed===null||i.pagesViewed>=e.minPagesViewed)&&(e.minServicesViewed===null||i.viewedServices.length>=e.minServicesViewed));t&&(n=[...t.starters,...n.slice(0,t.keepPageStarters)])}let a=e.behaviour?.recentServiceStarter,o=i?.viewedServices[i.viewedServices.length-1];if(t.behaviourStarters&&i&&a&&o!==void 0){let e=Ft(o),t=e.toLowerCase(),r=n.some(e=>e.label.toLowerCase().includes(t));if(e!==``&&!r){let t=a.replace(/\{service\}/g,e);n=[{id:`recent-service`,label:t,message:t,icon:null,variant:null},...n]}}let s=e.behaviour?.maxStarters;return s===void 0?[...n]:n.slice(0,s)},Rt=globalThis,zt=5e3,Bt=3e3,Vt=300,Ht=1200,Ut=e=>{if(Rt.requestAnimationFrame&&Rt.cancelAnimationFrame){let t=Rt.requestAnimationFrame(()=>e());return()=>Rt.cancelAnimationFrame?.(t)}let t=Rt.setTimeout(e,16);return()=>Rt.clearTimeout(t)},Wt=e=>typeof e==`object`&&e&&!Array.isArray(e)?e:{},Gt=e=>{let t=Wt(e);return{code:typeof t.code==`string`&&t.code?t.code:`unknown`,message:typeof t.message==`string`&&t.message?t.message:o.errorGeneric,resetsDateTimeUtc:typeof t.resetsDateTimeUtc==`string`?t.resetsDateTimeUtc:null}},Kt=(e,t)=>({id:e.publicId,author:e.author,createdDateTimeUtc:e.createdDateTimeUtc,parts:e.parts,sequence:e.sequence,rating:e.rating,ratingNote:e.ratingNote,streaming:!1,stored:!0,restored:t}),qt=(e,t)=>{let n=e.findIndex(e=>e.id===t.id);return n<0?[...e,t]:e.map((e,r)=>r===n?t:e)},Jt=(e,t)=>{for(let n=e.length-1;n>=0;--n)if(t(e[n]))return n;return-1},Yt=e=>e.flatMap(e=>e.kind===`Text`?[e.text]:[]).join(`
16
+
17
+ `),Xt=e=>e.flatMap(e=>e.kind===`File`?[{publicId:e.attachmentId,fileName:e.fileName,contentType:e.contentType,length:e.length}]:[]),Zt=e=>{let t=Wt(e);return{fileName:typeof t.name==`string`?t.name:``,contentType:typeof t.type==`string`?t.type:``,length:typeof t.size==`number`?t.size:null}},Qt=(e,t)=>e.length===t.length&&e.every((e,n)=>e.id===t[n].id&&e.label===t[n].label&&e.message===t[n].message),$t=e=>{for(let t of e){if(!t.startsWith(`Enquiry type:`))continue;let e=t.slice(13).trim();return e===``?null:e}return null},en=(e,t)=>{if(t!==`WithAgent`)return null;for(let t=e.length-1;t>=0;--t){let n=e[t];for(let e=n.parts.length-1;e>=0;--e){let t=n.parts[e];if(t.kind===`Handoff`){if(t.state===`Left`||t.state===`Ended`)return null;if(t.state===`Joined`&&t.agent)return t.agent}}if(n.author.kind===`Agent`)return{displayName:n.author.displayName??``,avatarUrl:n.author.avatarUrl}}return null},tn=(e,t)=>{(e.cursor===null||t>e.cursor)&&(e.cursor=t)},nn=(e,t)=>{let n=[];e!==``&&n.push({kind:`Text`,text:e});for(let e of t)n.push({kind:`File`,attachmentId:e.publicId,fileName:e.fileName,contentType:e.contentType,length:e.length});return n},rn=e=>{let t=Yt(e.parts);return{wireText:t===``?null:t,displayText:t,quickReplyId:null,replacesMessageId:null,attachments:Xt(e.parts)}},an=e=>({profile:null,profileError:null,features:wt(),conversationId:null,conversationState:`Open`,title:null,continuesConversationId:null,messages:[],thinking:!1,steps:[],streaming:!1,loading:!1,loadError:null,turnError:null,stopped:!1,messagesLeftToday:null,editing:null,attachments:[],lastConversation:null,open:!1,muted:e?.get(`wchat:muted`)===`1`,greeting:null,starters:[],pending:null,agent:null,agentTyping:null,live:`Off`,handoffPending:!1,handoffPause:!1,openTickets:[],draft:null}),on=(e,t)=>{let n=s(t.labels),r=t.schedule??Ut,i=t.prefs,a=new Set,c=an(i),l=0,u=null,d=null,p=0,m=0,h=null,g=null,_=new Map,v=new Set,y=new Map,b=new Set,x=new Map,S={name:null,email:null,phone:null},C=new Set,w=null,T=null,E=null,D=null,O=null,k=!0,A=!1,j=new Set,ee=new Map,te=Promise.resolve(),ne=0,re=()=>t.pathname?.()??Rt.location?.pathname??`/`,ie=()=>t.reducedMotion?.()===!0||c.profile?.experience.motion===!1,ae=()=>c.streaming||c.thinking,oe=e=>{if(!e.profile)return{...e,greeting:null,starters:[]};let n=re(),r=e.lastConversation!==null,i=Dt(e.profile,{pathname:n,returning:r}).greeting,a=Lt(e.profile.start,{pathname:n,returning:r,behaviour:t.behaviour?.()??null,behaviourStarters:e.features.BehaviourStarters});return{...e,greeting:i,starters:Qt(e.starters,a)?e.starters:a}},se=()=>{w!==null&&(Rt.clearTimeout(w),w=null)},ce=()=>{E!==null&&(Rt.clearTimeout(E),E=null)},le=e=>e.flatMap(e=>e.parts.flatMap(e=>e.kind===`Action`&&e.actionKind===`ChatLeadCapture`&&e.state===`Done`?[{actionId:e.actionId,leadType:$t(e.lines)}]:[])),ue=()=>{S.name=null,S.email=null,S.phone=null,C.clear()},de=e=>{for(let t of le(e))C.add(t.actionId)},fe=()=>{for(let e of le(c.messages))C.has(e.actionId)||(C.add(e.actionId),t.onEvent?.(`leadSubmitted`,{conversationId:c.conversationId,fields:{name:S.name,email:S.email,phone:S.phone},leadType:e.leadType}))},pe=(e,t)=>{let n=c.messages.flatMap(e=>e.parts).find(t=>t.kind===`InputRequest`&&t.requestId===e);if(n)for(let e of n.fields){let n=t[e.key];typeof n==`string`&&n.trim()!==``&&(e.type===`Email`?S.email=n.trim():e.type===`Phone`?S.phone=n.trim():(e.type===`Name`||e.key.toLowerCase()===`name`)&&(S.name=n.trim()))}},me=e=>{let t=O;t!==null&&(O=null,t.handle?.stop(),e!==null&&M({live:e}))},he=()=>!A&&k&&c.features.HumanHandoff&&c.conversationId!==null&&(c.conversationState===`WaitingForAgent`||c.conversationState===`WithAgent`),ge=()=>{if(!he()){O!==null&&me(`Off`);return}let t=c.conversationId;if(t===null||O!==null&&O.conversationId===t)return;me(null);let n={conversationId:t,cursor:null,handle:null};O=n;let r=Pt({watch:(r,i,a)=>e.watchConversation(t,{afterSequence:r,signal:i,onCursor:e=>tn(n,e),onEvent:e=>{a(),O===n&&(e.name===`messageCompleted`&&tn(n,e.data.message.sequence),Ie(e,`live`,()=>O===n))}}),beforeReconnect:()=>Le(),getCursor:()=>{let e=n.cursor;for(let t of c.messages)t.sequence!==null&&(e===null||t.sequence>e)&&(e=t.sequence);return e},onStatus:e=>{O===n&&c.live!==e&&M({live:e})},onError:e=>Se(e)});n.handle=r,O!==n&&r.stop()},M=e=>{let t={...c,...e};c.conversationState===`WithAgent`&&t.conversationState!==`WithAgent`&&t.agentTyping!==null&&(se(),t.agentTyping=null),(e.messages!==void 0||e.conversationState!==void 0)&&(t.agent=en(t.messages,t.conversationState)),c=oe(t);for(let e of a)e();e.messages!==void 0&&fe(),ge()},_e=(e,t)=>M({attachments:c.attachments.map(n=>n.key===e?{...n,...t}:n)}),ve=()=>{if(_.size===0)return;let e=[..._.values()];_.clear(),M({messages:c.messages.map(t=>{let n=e.filter(e=>e.messageId===t.id);if(n.length===0)return t;let r=t.parts.map((e,t)=>{let r=n.filter(e=>e.index===t).map(e=>e.text).join(``);return e.kind===`Text`&&r!==``?{...e,text:e.text+r}:e});return{...t,parts:r}})})},ye=()=>{_.clear(),d?.(),d=null},be=(e,t,n)=>{let i=`${e}#${t}`,a=_.get(i);_.set(i,{messageId:e,index:t,text:(a?.text??``)+n}),d||=r(()=>{d=null,ve()})},xe=()=>{ve(),l+=1,u?.abort(),u=null},Se=e=>{if(t.onError)t.onError(e);else throw e},Ce=()=>{for(let e of x.values())e.abort();x.clear();for(let t of b){let n=y.get(t);n&&e.deleteAttachment(n.publicId).catch(Se)}b.clear(),y.clear()},we=e=>{let t=y.get(e);if(!t)throw Error(`No uploaded file for composer attachment ${e}.`);return t},Te=async(t,r)=>{let i=new Rt.AbortController;x.set(t,i);let a;try{a=await e.uploadAttachment(r,{signal:i.signal,onProgress:e=>{x.get(t)===i&&_e(t,{progress:e})}})}catch{x.get(t)===i&&(x.delete(t),_e(t,{status:`Failed`,progress:null,error:n.attachmentFailed}));return}x.get(t)===i?(x.delete(t),y.set(t,a),b.add(t),_e(t,{status:`Ready`,progress:null})):e.deleteAttachment(a.publicId).catch(Se)},Ee=e=>{let n={...Wt(t.pageContext?.()),path:re(),behaviour:t.behaviour?.()??null};return e&&(n.attribution=t.attribution?.()??null),n},De=async()=>{let e=c.profile?.captcha;if(!e||!t.getCaptchaToken||e.mode===`Off`&&!e.siteKey)return null;let r=null;try{r=await t.getCaptchaToken(e.action)}catch{}if(!r)throw new f(`captcha_unavailable`,n.captchaUnavailable);return r},Oe=(e,t,n)=>{let r=qt(c.messages,Kt(e,!1));M(n?{messages:r,messagesLeftToday:t??c.messagesLeftToday,steps:[],thinking:!1}:{messages:r})},ke=e=>{let t=c.profile?.experience.pacing;return!t||v.has(e.publicId)||e.author.kind!==`Assistant`&&e.author.kind!==`Script`?0:St(it(e.parts),t,ie())},Ae=(e,t,n,r,i)=>{ne+=1,M({pending:{typing:!0,authorKind:e.author.kind}}),te=te.then(()=>new Promise(e=>Rt.setTimeout(e,n))).then(()=>{--ne,r()&&Oe(e,t,i),ne===0&&M({pending:null})})},je=(e,t,n)=>{let r=[...e];return r[t]=n,r},Me=(e,t)=>c.messages.map(n=>n.id===e?t(n):n),Ne=e=>c.messages.some(t=>t.id===e),Pe=()=>{se(),c.agentTyping!==null&&M({agentTyping:null})},Fe=e=>{se(),w=Rt.setTimeout(()=>{w=null,M({agentTyping:null})},zt),M({agentTyping:{displayName:e}})},Ie=(e,t,n)=>{if(!n())return;let r=t===`turn`;if(e.name===`partDelta`)v.add(e.data.messageId),be(e.data.messageId,e.data.index,e.data.text);else switch(ve(),e.name){case`messageStarted`:{let t=e.data.message;if(t.author.kind===`Agent`&&Pe(),Ne(t.publicId))break;M({messages:[...c.messages,{id:t.publicId,author:t.author,createdDateTimeUtc:t.createdDateTimeUtc,parts:[...t.parts],sequence:t.sequence,rating:t.rating,ratingNote:t.ratingNote,streaming:!0,stored:!1,restored:!1}]});break}case`partStarted`:{let{messageId:t,index:n,part:i}=e.data;if(!Ne(t))break;M({messages:Me(t,e=>({...e,parts:je(e.parts,n,i)})),...r?{thinking:!1}:{}});break}case`partCompleted`:{let{messageId:t,index:n,part:r}=e.data;if(!Ne(t))break;M({messages:Me(t,e=>({...e,parts:je(e.parts,n,r)}))});break}case`messageReset`:{let{messageId:t}=e.data;if(!Ne(t))break;for(let e of[..._.keys()])_.get(e)?.messageId===t&&_.delete(e);M({messages:Me(t,e=>({...e,parts:[]})),...r?{thinking:!0,steps:[]}:{}});break}case`step`:{if(!r)break;let t=e.data.label;c.steps[c.steps.length-1]!==t&&M({steps:[...c.steps,t]});break}case`messageCompleted`:{let{message:t,messagesLeftToday:i}=e.data;t.author.kind===`Agent`&&Pe();let a=ke(t);a>0||ne>0?Ae(t,i,a,n,r):Oe(t,i,r);break}case`conversationUpdated`:{let t=e.data;M({conversationId:t.conversationId,conversationState:t.state,title:t.title,continuesConversationId:t.continuesConversationId});break}case`typing`:e.data.authorKind===`Agent`&&Fe(e.data.displayName)}},Le=async()=>{let t=c.conversationId;if(t===null)return;let n=l;try{let r=await e.getConversation(t);if(n!==l)return;let i=new Set(c.messages.filter(e=>e.restored).map(e=>e.id));M({messages:r.messages.map(e=>Kt(e,i.has(e.publicId))),title:r.title,conversationState:r.state,continuesConversationId:r.continuesConversationId})}catch(e){Se(e)}},Re=async(n,r,i)=>{let a=l,o=new Rt.AbortController,s=()=>a===l&&!o.signal.aborted;u=o;let d=c.conversationId===null;p+=1;let f={id:`local-${p}`,author:{kind:`Visitor`,displayName:null,avatarUrl:null},createdDateTimeUtc:new Date().toISOString(),parts:nn(n.displayText,n.attachments),sequence:null,rating:null,ratingNote:null,streaming:!1,stored:!1,restored:!1};i&&(b.clear(),y.clear()),M({messages:[...r,f],thinking:!0,streaming:!0,steps:[],turnError:null,stopped:!1,...i?{editing:null,attachments:[]}:{}});try{let t=await De();await e.send({conversationId:c.conversationId,text:n.wireText,quickReplyId:n.quickReplyId,attachmentIds:n.attachments.map(e=>e.publicId),replacesMessageId:n.replacesMessageId,pageContext:Ee(d),captchaToken:t},{signal:o.signal,onEvent:e=>Ie(e,`turn`,s)})}catch(e){if(ve(),!s())return;let t=Gt(e);M({messages:c.messages.filter(e=>!e.streaming),thinking:!1,streaming:!1,turnError:t,...t.code===`daily_limit`?{messagesLeftToday:0}:{},...t.code===`conversation_not_found`?{conversationId:null}:{}});return}finally{u===o&&(u=null)}if(await te,!s())return;ve(),M({thinking:!1,streaming:!1}),await Le();let m=c.conversationId;d&&m!==null&&m!==h&&(h=m,t.onEvent?.(`chatStarted`,{conversationId:m}))},ze=e=>M({messages:c.messages.map(t=>({...t,parts:t.parts.map(t=>t.kind===`Action`&&t.actionId===e.actionId?{...t,state:e.state,decidedDateTimeUtc:e.decidedDateTimeUtc,note:e.note}:t)}))}),Be=async()=>{try{M({openTickets:await e.listOpenTickets()})}catch{}},Ve=async()=>{let n;try{n=await e.getProfile(t.screen)}catch(e){M({profileError:Gt(e)});return}let r=Tt(n,t.narrow);if(M({profile:n,profileError:null,features:r,messagesLeftToday:n.messagesLeftToday}),r.OpenTickets&&Be(),r.ResumeLast&&r.History)try{let t=await e.listConversations({page:1,pageSize:1});M({lastConversation:t.items[0]??null})}catch{}t.conversationId&&await tt(t.conversationId)},He=()=>(g||=Ve(),g),Ue=async e=>{let t=typeof e==`string`?e.trim():``,n=c.attachments.filter(e=>e.status===`Ready`);if(t===``&&n.length===0||c.streaming||c.attachments.some(e=>e.status===`Uploading`))return;let r=c.messages,i=null;if(c.editing){let e=c.messages.findIndex(e=>e.id===c.editing?.messageId),t=c.messages[e];if(!t?.stored)return;i=t.id,r=c.messages.slice(0,e)}let a=n.map(e=>we(e.key));await Re({wireText:t===``?null:t,displayText:t,quickReplyId:null,replacesMessageId:i,attachments:a},r,!0)},We=async e=>{e.action!==`Send`||ae()||(e.id===`handoff.request`&&c.features.HumanHandoff&&c.conversationId!==null&&!c.handoffPending?await pt():await Re({wireText:null,displayText:e.label,quickReplyId:e.id,replacesMessageId:null,attachments:[]},c.messages,!1))},Ge=async(r,i,a=null)=>{if(c.streaming)return{ok:!1,errors:{},message:n.errorGeneric};let o=l,s=new Rt.AbortController,d=()=>o===l&&!s.signal.aborted;u=s,pe(r,i),M({streaming:!0,thinking:!0});try{let n=await De();await e.answerInput(r,{values:i,codes:a,captchaToken:n,attribution:t.attribution?.()??null},{signal:s.signal,onEvent:e=>Ie(e,`turn`,d)})}catch(e){return ve(),M({thinking:!1,streaming:!1}),s.signal.aborted?{ok:!1,errors:{},message:n.errorGeneric}:e instanceof f&&e.code===`validation_failed`?{ok:!1,errors:e.errors??{},message:e.message}:e instanceof f&&e.code===`input_request_closed`?(await Le(),{ok:!1,errors:{},message:e.message}):{ok:!1,errors:{},message:Gt(e).message}}finally{u===s&&(u=null)}return await te,d()&&(ve(),M({thinking:!1,streaming:!1}),t.onEvent?.(`inputSubmitted`,{requestId:r}),await Le()),{ok:!0}},Ke=async n=>{let r=await e.confirmAction(n);ze(r),t.onEvent?.(`chatActionConfirmed`,{actionId:r.actionId,kind:r.actionKind}),await Le()},qe=async(t,n)=>{ze(await e.rejectAction(t,n)),await Le()},Je=()=>{if(!c.streaming)return;ye();let e=u;u=null,e?.abort(),M({messages:c.messages.filter(e=>!e.streaming),thinking:!1,streaming:!1,stopped:!0,steps:[],pending:null})},Ye=async()=>{if(c.streaming||c.turnError===null&&!c.stopped)return;let e=Jt(c.messages,e=>e.author.kind===`Visitor`);e<0||await Re(rn(c.messages[e]),c.messages.slice(0,e),!1)},Xe=async()=>{if(ae())return;let e=Jt(c.messages,e=>e.author.kind===`Visitor`&&e.stored);if(e<0)return;let t=c.messages[e];await Re({...rn(t),replacesMessageId:t.id},c.messages.slice(0,e),!1)},Ze=e=>{let t=c.messages.find(t=>t.id===e);t?.stored&&t.author.kind===`Visitor`&&(Ce(),M({editing:{messageId:e,text:Yt(t.parts)},attachments:[]}))},Qe=()=>{c.editing&&(Ce(),M({editing:null,attachments:[]}))},$e=async e=>{let t=c.profile;if(!t||!c.features.Attachments)return;let r=t.limits,i=r.maxAttachments-c.attachments.filter(e=>e.status!==`Failed`).length,a=[],o=[];for(let t of e){let e=Zt(t);m+=1;let s=`file-${m}`,c={key:s,fileName:e.fileName,contentType:e.contentType,length:e.length??0};i<=0?a.push({...c,status:`Failed`,progress:null,error:n.attachmentLimit(r.maxAttachments)}):e.length!==null&&e.length>r.maxFileBytes||!r.contentTypes.includes(e.contentType)?a.push({...c,status:`Failed`,progress:null,error:n.attachmentFailed}):(--i,a.push({...c,status:`Uploading`,progress:0,error:null}),o.push({key:s,file:t}))}M({attachments:[...c.attachments,...a]}),await Promise.all(o.map(({key:e,file:t})=>Te(e,t)))},et=async t=>{let n=x.get(t);n&&(x.delete(t),n.abort());let r=b.has(t)?y.get(t):void 0;r&&await e.deleteAttachment(r.publicId),b.delete(t),y.delete(t),M({attachments:c.attachments.filter(e=>e.key!==t)})};async function tt(t){xe();let n=l;M({messages:[],conversationId:null,loadError:null,loading:!0,editing:null,thinking:!1,streaming:!1,steps:[],turnError:null,stopped:!1});try{let r=await e.getConversation(t);if(n!==l)return;let i=r.messages.map(e=>Kt(e,!0));ue(),de(i),M({messages:i,conversationId:r.publicId,title:r.title,conversationState:r.state,continuesConversationId:r.continuesConversationId})}catch(e){if(n!==l)return;M({loadError:Gt(e)})}finally{n===l&&M({loading:!1})}}let nt=async()=>{let e=c.lastConversation;e&&await tt(e.publicId)},rt=()=>{Ce(),xe(),ye(),ue(),M({messages:[],conversationId:null,title:null,conversationState:`Open`,continuesConversationId:null,loadError:null,loading:!1,editing:null,attachments:[],thinking:!1,streaming:!1,steps:[],turnError:null,stopped:!1,pending:null}),c.features.OpenTickets&&Be()},at=(e,t,n)=>{M({messages:Me(e,e=>({...e,rating:t,ratingNote:n}))})},ot=async(n,r,i)=>{let a=c.messages.find(e=>e.id===n);if(!a?.stored)throw Error(`Only a stored reply can be rated.`);let o={rating:a.rating,ratingNote:a.ratingNote},s=typeof i==`string`&&i.trim()?i.trim():null;at(n,r,s);try{await e.rateMessage(n,{rating:r,note:s})}catch(e){throw at(n,o.rating,o.ratingNote),e}t.onEvent?.(`rated`,{messageId:n,rating:r})},st=e=>{let n=c.open,r=e?.trigger??`manual`,a=e?.draft,o={open:!0};typeof a==`string`&&a.trim()!==``&&(o.draft=a),!n&&r===`auto`&&i?.set(`wchat:auto-opened`,`1`),M(o),n||t.onEvent?.(`chatOpened`,{layout:t.layout??null,trigger:r})},ct=e=>{c.open&&(i?.set(`wchat:dismissed`,`1`),M({open:!1}),t.onEvent?.(`chatClosed`,{layout:t.layout??null,reason:e}))},lt=e=>{i?.set(`wchat:muted`,e?`1`:`0`),M({muted:e}),t.onEvent?.(`chatSoundToggled`,{muted:e})},ut=async e=>{ae()||(t.onEvent?.(`chatLeadSkipped`,{requestId:e}),await Re({wireText:null,displayText:n.skip,quickReplyId:`lead.skip`,replacesMessageId:null,attachments:[]},c.messages,!1))},dt=async()=>{ae()||(t.onEvent?.(`chatLeadCancelled`,{}),await Re({wireText:null,displayText:n.cancel,quickReplyId:`lead.cancel`,replacesMessageId:null,attachments:[]},c.messages,!1))},ft=async(e,t)=>{ae()||c.messages.some(t=>t.parts.some(t=>t.kind===`Action`&&t.actionId===e))&&await Re({wireText:null,displayText:n.editSomething,quickReplyId:`lead.edit:${t}`,replacesMessageId:null,attachments:[]},c.messages,!1)},pt=async n=>{if(!c.features.HumanHandoff)throw new f(`chat_feature_off`,o.errorGeneric,403);let r=c.conversationId;if(r===null)throw new f(`conversation_required`,o.errorGeneric);if(c.streaming||c.handoffPending)throw new f(`busy`,o.errorGeneric);let i=new Rt.AbortController;D=i,M({handoffPending:!0}),t.onEvent?.(`chatHandoffRequested`,{conversationId:r});try{await e.requestHandoff({conversationId:r,reason:n??null},{signal:i.signal,onEvent:e=>Ie(e,`handoff`,()=>!i.signal.aborted)})}catch(e){throw M({messages:c.messages.filter(e=>!e.streaming),handoffPending:!1}),e}finally{D===i&&(D=null)}M({handoffPending:!1}),await Le(),t.onEvent?.(`chatHandoff`,{destination:`person`})},mt=()=>{let t=c.conversationId;if(!c.features.HumanHandoff||t===null||c.conversationState!==`WithAgent`)return;let n=Date.now();T!==null&&n-T<Bt||(T=n,e.sendTyping(t).catch(()=>void 0))},ht=e=>{k=e,ge()},gt=()=>{c.live===`Lost`&&he()&&(me(null),ge())},_t=e=>{if(t.reducedMotion?.()===!0)return Vt;let n=e.navigateAfterMs;if(typeof n==`number`&&Number.isFinite(n)&&n>=0)return n;let r=c.profile?.experience.pacing.handoffPauseMs;return typeof r==`number`&&Number.isFinite(r)?r:Ht},vt=()=>{ce(),c.handoffPause&&M({handoffPause:!1})};return{client:e,getState:()=>c,subscribe:e=>(a.add(e),g||He(),()=>{a.delete(e)}),load:He,submit:Ue,chooseQuickReply:We,answerInput:Ge,confirmAction:Ke,rejectAction:qe,stop:Je,retry:Ye,regenerate:Xe,startEdit:Ze,cancelEdit:Qe,attach:$e,removeAttachment:et,openConversation:tt,resumeLast:nt,newConversation:rt,rate:ot,open:st,close:ct,setMuted:lt,skipField:ut,cancelLead:dt,editLeadField:ft,requestHandoff:pt,notifyTyping:mt,setLiveActive:ht,resumeLive:gt,beginHandoff:(e,n)=>{c.handoffPause||(M({handoffPause:!0}),t.onEvent?.(`chatHandoff`,{destination:e.id}),E=Rt.setTimeout(()=>{E=null;try{n()}catch(e){vt(),Se(e)}},_t(e)))},endHandoffPause:vt,consumeDraft:()=>{c.draft!==null&&M({draft:null})},loadAttachmentUrl:t=>{let r=ee.get(t);if(r)return r;let i=(async()=>{let r=Rt.Blob,i=Rt.URL;if(!r||typeof i?.createObjectURL!=`function`)throw new f(`unsupported`,n.errorGeneric);let a=await e.getAttachment(t);if(A)throw new f(`aborted`,n.errorGeneric);let o=i.createObjectURL(new r([a]));return j.add(o),o})();return ee.set(t,i),i.catch(()=>{ee.get(t)===i&&ee.delete(t)}),i},reset:()=>{Ce(),ye(),xe(),g=null,te=Promise.resolve(),ne=0,v.clear(),h=null,ue(),se(),ce(),M(an(i))},dispose:()=>{a.clear(),A=!0,l+=1;let e=u;u=null,e?.abort(),D?.abort(),D=null,ce(),se(),me(null),Ce(),ye();for(let e of j)Rt.URL?.revokeObjectURL?.(e);j.clear(),ee.clear(),M({attachments:[],editing:null,agentTyping:null})}}},sn=e=>{let t=-1;for(let n=e.length-1;n>=0;--n)if(e[n].parts.some(e=>e.kind===`Handoff`)){t=n;break}let n=new Set;for(let r=0;r<t;r+=1)n.add(e[r].id);return n},cn=(e,t)=>({get features(){return e.getState().features},labels:t.labels,get isLast(){let n=e.getState().messages;return n[n.length-1]?.id===t.messageId},get busy(){let t=e.getState();return t.streaming||t.thinking},get handoffPause(){return e.getState().handoffPause},get handoffSettled(){return sn(e.getState().messages).has(t.messageId)},chooseQuickReply(t){e.chooseQuickReply(t)},skipInput(t){e.skipField(t)},cancelLead(){e.cancelLead()},answerInput:(t,n,r)=>e.answerInput(t,n,r),uploadInputFile:async(t,n)=>(await e.client.uploadAttachment(t,n?{onProgress:n}:{})).publicId,sendOtp:(t,n)=>e.client.sendOtp(t,n),confirmAction:t=>e.confirmAction(t),rejectAction:(t,n)=>e.rejectAction(t,n),requestHandoff:t=>e.requestHandoff(t),beginHandoff:(t,n)=>e.beginHandoff(t,n),readAttachment:t=>e.client.getAttachment(t),loadAttachmentUrl:t=>e.loadAttachmentUrl(t),...t.openAttachment?{openAttachment:t.openAttachment}:{},...t.openRecord?{openRecord:t.openRecord}:{},...t.openTicket?{openTicket:t.openTicket}:{},...t.attachmentUrl?{attachmentUrl:t.attachmentUrl}:{},...t.handoffHosts?{handoffHosts:t.handoffHosts}:{},...t.openCitation?{openCitation:t.openCitation}:{},...t.isCitation?{isCitation:t.isCitation}:{},...t.openTarget?{openTarget:t.openTarget}:{},...t.onNavigate?{onNavigate:t.onNavigate}:{}}),ln=e=>e;function un(e){return e!=null&&e.trim()!==``}function dn(e){return{kind:`paragraph`,text:e}}function fn(e){return e.split(/\n\s*\n/).map(e=>e.trim()).filter(e=>e!==``).map(dn)}function pn(e){return e.url!==null&&(e.url.startsWith(`http://`)||e.url.startsWith(`https://`))?`${e.title} (${e.url})`:e.title}function mn(e,t){return t===null?e:`${e??``} (${t})`.trim()}function hn(e){let t=[],n=new Set,r=e.map(e=>{let r=new Map;for(let i of e.points)r.set(i.label,i.value),n.has(i.label)||(n.add(i.label),t.push(i.label));return r});return t.map(e=>[e,...r.map(t=>{let n=t.get(e);return n===void 0?``:_t(n,`Decimal`,null)})])}function gn(e){return e.map(e=>e.kind===`sup`?`^${e.text}`:e.text).join(``)}function _n(e){return Math.abs(e)<.001&&e!==0?gn(ye(e)):_t(e,`Decimal`,null)}function vn(e,t){switch(e.kind){case`Text`:case`Notice`:return fn(it([e]));case`Sources`:return e.sources.length===0?[]:[dn(t.sources),{kind:`list`,ordered:!0,items:e.sources.map(pn)}];case`QuickReplies`:case`Handoff`:return[];case`InputRequest`:return e.state!==`Answered`||!un(e.answeredSummary)?[]:[dn(e.title===null?e.answeredSummary:`${e.title}: ${e.answeredSummary}`)];case`Action`:{let t=[dn(e.title)];return e.lines.length>0&&t.push({kind:`list`,ordered:!1,items:[...e.lines]}),t}case`Table`:return[{kind:`table`,title:e.title,head:e.columns.map(e=>e.label),rows:e.rows.map(t=>e.columns.map((n,r)=>_t(t[r],n.type,e.currency)))}];case`Chart`:return e.series.length===0?[]:[{kind:`table`,title:mn(e.title,e.unit),head:[``,...e.series.map(e=>e.name)],rows:hn(e.series)}];case`Figures`:return e.figures.length===0?[]:[{kind:`table`,title:null,head:[],rows:e.figures.map(e=>[e.label,_n(e.value)+(un(e.unit)?` ${e.unit}`:``)])}];case`RecordCard`:{let t=[dn(e.subtitle===null?e.title:`${e.title} ${e.subtitle}`)];return e.fields.length>0&&t.push({kind:`table`,title:null,head:[],rows:e.fields.map(e=>[e.label,_t(e.value,e.type,null)])}),t}case`Image`:return un(e.alt)?[dn(e.alt)]:[];case`File`:return[dn(`${e.fileName} (${tt(e.length)})`)];case`Ticket`:return[dn(`${e.number} ${e.subject}`)];case`VoiceClip`:return un(e.transcript)?[dn(e.transcript)]:[];default:return[]}}function yn(e,t){switch(e.kind){case`paragraph`:return{kind:`paragraph`,text:t(e.text)};case`list`:return{kind:`list`,ordered:e.ordered,items:e.items.map(e=>t(e))};case`table`:return{kind:`table`,title:e.title===null?null:t(e.title),head:e.head.map(e=>t(e)),rows:e.rows.map(e=>e.map(e=>t(e)))}}}function bn(e,t){switch(e.kind){case`Visitor`:case`Customer`:return t.you;case`Agent`:return un(e.displayName)?e.displayName:t.agent;case`Assistant`:case`Script`:return t.assistant;case`System`:throw Error(`A System message has no speaker: buildTranscript skips it.`)}}function xn(e,t){let n=t.figureText?ve:ln,r=[],i=null;for(let a of e){if(a.streaming||a.author.kind===`System`)continue;let e=a.parts.flatMap(e=>vn(e,t.labels)).map(e=>yn(e,n));e.length!==0&&(r.push({speaker:bn(a.author,t.labels),blocks:e}),i===null&&(i=rt(a.createdDateTimeUtc)))}return{title:un(t.title)?t.title:t.labels.untitled,dateText:i,entries:r}}function Sn(e){switch(e.kind){case`paragraph`:return[e.text];case`list`:return e.items.map((t,n)=>e.ordered?`${n+1}. ${t}`:`- ${t}`);case`table`:{let t=[];e.title!==null&&t.push(e.title),e.head.length>0&&t.push(e.head.join(` | `));for(let n of e.rows)t.push(n.join(` | `));return t}}}function Cn(e,t){let n=[];t.heading&&n.push([e.title,...e.dateText===null?[]:[e.dateText]].join(`
18
+ `));for(let r of e.entries){let e=t.speakers?[`${r.speaker}:`]:[];for(let t of r.blocks)e.push(...Sn(t));n.push(e.join(`
19
+ `))}return n.join(`
20
+
21
+ `)}var wn=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0},Tn=e=>{let t=e;return()=>{t=t+1831565813|0;let e=Math.imul(t^t>>>15,1|t);return e=e+Math.imul(e^e>>>7,61|e)^e,((e^e>>>14)>>>0)/4294967296}};function En(e,t){if(!Number.isInteger(t)||t<1||t>200)throw RangeError(`count is a whole number from 1 to 200.`);let n=Tn(wn(e));return Array.from({length:t},()=>.2+n()*.8)}function Dn(e){if(!Number.isFinite(e)||e<0)return`0:00`;let t=Math.round(e);return`${Math.floor(t/60)}:${String(t%60).padStart(2,`0`)}`}var On=2e3;async function kn(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),!!n}catch{return!1}}Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`});var An=`−`,jn=(e,t)=>Number.isInteger(e)&&e>=0&&e<=20?e:t,Mn=new Map,Nn=e=>(Mn.has(e)||Mn.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:0,maximumFractionDigits:e})),Mn.get(e)),Pn=e=>typeof e==`number`&&Number.isFinite(e),Fn=e=>e<0&&!Object.is(Math.abs(e),0)?An:``;function In(e,{decimals:t}={}){if(!Pn(e))return`-`;let n=Nn(jn(t,2)).format(Math.abs(e));return n===`0`?`0`:Fn(e)+n}var Ln={activity:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.33 14.49 2.38-3.09c.34-.44.97-.52 1.41-.18l1.83 1.44c.44.34 1.07.26 1.41-.17l2.31-2.98" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,add:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"add-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,alarm:`<path d="M2 22h20M12 6a9 9 0 0 0-9 9v7h18v-7a9 9 0 0 0-9-9ZM12 2v1M4 4l1 1M20 4l-1 1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-circle":`<path d="M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"alert-triangle":`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"arrow-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 14.43L12 20.5l-6.07-6.07M12 3.5v16.83"></path>`,"arrow-down-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17"></path>`,"arrow-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.57 5.93L3.5 12l6.07 6.07M20.5 12H3.67"></path>`,"arrow-left-2":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08"></path>`,"arrow-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83"></path>`,"arrow-right-2":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08"></path>`,"arrow-swap-horizontal":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M20.5 14.99l-5.01 5.02M3.5 14.99h17M3.5 9.01l5.01-5.02M20.5 9.01h-17"></path>`,"arrow-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M18.07 9.57L12 3.5 5.93 9.57M12 20.5V3.67"></path>`,"arrow-up-right":`<g transform="rotate(-45 12 12)"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M14.43 5.93L20.5 12l-6.07 6.07M3.5 12h16.83"></path></g>`,at:`<path d="M16 12a4 4 0 1 1-8 0 4 4 0 1 1 8 0M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7.13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"badge-check":`<path d="m8.38 12 2.41 2.42 4.83-4.84" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.75 2.45c.69-.59 1.82-.59 2.52 0l1.58 1.36c.3.26.86.47 1.26.47h1.7c1.06 0 1.93.87 1.93 1.93v1.7c0 .39.21.96.47 1.26l1.36 1.58c.59.69.59 1.82 0 2.52l-1.36 1.58c-.26.3-.47.86-.47 1.26v1.7c0 1.06-.87 1.93-1.93 1.93h-1.7c-.39 0-.96.21-1.26.47l-1.58 1.36c-.69.59-1.82.59-2.52 0l-1.58-1.36c-.3-.26-.86-.47-1.26-.47H6.18c-1.06 0-1.93-.87-1.93-1.93V16.1c0-.39-.21-.95-.46-1.25l-1.35-1.59c-.58-.69-.58-1.81 0-2.5l1.35-1.59c.25-.3.46-.86.46-1.25V6.2c0-1.06.87-1.93 1.93-1.93h1.73c.39 0 .96-.21 1.26-.47l1.58-1.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,ban:`<path d="M14.9 2H9.1c-.68 0-1.64.4-2.12.88l-4.1 4.1C2.4 7.46 2 8.42 2 9.1v5.8c0 .68.4 1.64.88 2.12l4.1 4.1c.48.48 1.44.88 2.12.88h5.8c.68 0 1.64-.4 2.12-.88l4.1-4.1c.48-.48.88-1.44.88-2.12V9.1c0-.68-.4-1.64-.88-2.12l-4.1-4.1C16.54 2.4 15.58 2 14.9 2ZM8.5 15.5l7-7M15.5 15.5l-7-7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,bank:`<path d="m12.37 2.15 9 3.6c.35.14.63.56.63.93V10c0 .55-.45 1-1 1H3c-.55 0-1-.45-1-1V6.68c0-.37.28-.79.63-.93l9-3.6c.2-.08.54-.08.74 0ZM22 22H2v-3c0-.55.45-1 1-1h18c.55 0 1 .45 1 1v3ZM4 18v-7M8 18v-7M12 18v-7M16 18v-7M20 18v-7M1 22h22" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 8.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bell:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,book:`<path d="M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,bookmark:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 2.44v9.98c0 1.97-1.41 2.74-3.14 1.7l-1.32-.79c-.3-.18-.78-.18-1.08 0l-1.32.79C8.41 15.15 7 14.39 7 12.42V2.44" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 2.44v9.98c0 1.97-1.41 2.74-3.14 1.7l-1.32-.79c-.3-.18-.78-.18-1.08 0l-1.32.79C8.41 15.15 7 14.39 7 12.42V2.44" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"box-seam":`<path d="M3.17 7.44 12 12.55l8.77-5.08M12 21.61v-9.07" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.93 2.48 4.59 5.45c-1.21.67-2.2 2.35-2.2 3.73v5.65c0 1.38.99 3.06 2.2 3.73l5.34 2.97c1.14.63 3.01.63 4.15 0l5.34-2.97c1.21-.67 2.2-2.35 2.2-3.73V9.18c0-1.38-.99-3.06-2.2-3.73l-5.34-2.97c-1.15-.64-3.01-.64-4.15 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.24V9.58L7.51 4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,briefcase:`<path d="M8 22h8c4.02 0 4.74-1.61 4.95-3.57l.75-8C21.97 7.99 21.27 6 17 6H7c-4.27 0-4.97 1.99-4.7 4.43l.75 8C3.26 20.39 3.98 22 8 22ZM8 6v-.8C8 3.43 8 2 11.2 2h1.6C16 2 16 3.43 16 5.2V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14 13v1.02c0 1.09-.01 1.98-2 1.98-1.98 0-2-.88-2-1.97V13c0-1 0-1 1-1h2c1 0 1 0 1 1ZM21.65 11A16.484 16.484 0 0 1 14 14.02M2.62 11.27c2.25 1.54 4.79 2.47 7.38 2.76" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bug:`<path d="M12 8.5c-3.3 0-5.5 2.6-5.5 6s2.2 6 5.5 6 5.5-2.6 5.5-6-2.2-6-5.5-6ZM12 10v10.5M9.6 6.8 8 4.5M14.4 6.8 16 4.5M6.5 12.5H3.8M6.8 16.5l-2.3 1.3M17.5 12.5h2.7M17.2 16.5l2.3 1.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,building:`<path d="M12.5 22H4.08c-1.16 0-2.11-.93-2.11-2.07V5.09c0-2.62 1.95-3.81 4.34-2.64l4.44 2.18c.96.47 1.75 1.72 1.75 2.78V22ZM21.97 15.06v3.78c0 2.16-1 3.16-3.16 3.16H12.5V10.42l.47.1 4.5 1.01 2.03.45c1.32.29 2.4.97 2.46 2.89.01.06.01.12.01.19ZM5.5 9h3.47M5.5 13h3.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.47 11.53v3.22c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25v-4.23l4.5 1.01ZM21.96 14.87A2.249 2.249 0 0 1 19.72 17c-1.24 0-2.25-1.01-2.25-2.25v-3.22l2.03.45c1.32.29 2.4.97 2.46 2.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"building-2":`<path d="M6.7 18H4.15C2.72 18 2 17.28 2 15.85V4.15C2 2.72 2.72 2 4.15 2h4.3c1.43 0 2.15.72 2.15 2.15V6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.37 8.42v11.16c0 1.61-.8 2.42-2.41 2.42H9.12c-1.61 0-2.42-.81-2.42-2.42V8.42C6.7 6.81 7.51 6 9.12 6h5.84c1.61 0 2.41.81 2.41 2.42Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M13.4 6V4.15c0-1.43.72-2.15 2.15-2.15h4.3C21.28 2 22 2.72 22 4.15v11.7c0 1.43-.72 2.15-2.15 2.15h-2.48M10 11h4M10 14h4M12 22v-3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,bullseye:`<path d="M12 19.5a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM12 4V2M4 12H2M12 20v2M20 12h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cake:`<path d="M2 22h20M3.11 22v-9c0-1.66 1.49-3 3.33-3h11.11c1.84 0 3.33 1.34 3.33 3v9M5.56 10V7.17C5.56 5.97 6.64 5 7.98 5h8.05c1.33 0 2.41.97 2.41 2.17V10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m3.53 13.98.37.01c.74.01 1.33.61 1.33 1.35v.33a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31a1.35 1.35 0 0 1 2.7 0v.31a1.35 1.35 0 0 0 2.7 0v-.31c0-.74.6-1.35 1.35-1.35h.45M8 5V3M16 5V3M12 5V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,calculator:`<path d="M10 22h4c5 0 7-2 7-7V9c0-5-2-7-7-7h-4C5 2 3 4 3 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 7.58v1c0 .82-.67 1.5-1.5 1.5H9c-.82 0-1.5-.67-1.5-1.5v-1c0-.82.67-1.5 1.5-1.5h6c.83 0 1.5.67 1.5 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.136 14h.012M11.995 14h.012M15.854 14h.012M8.136 17.5h.012M11.995 17.5h.012M15.854 17.5h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,calendar:`<path d="M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-1":`<path d="M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z" fill="currentColor"></path>`,"calendar-add":`<path d="M8 2v3M16 2v3M3.5 9.09h17M18 23a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM19.49 19.05h-2.98M18 17.59v2.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-check":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"calendar-dots":`<path d="M8 2v3M16 2v3M16 3.5c3.33.18 5 1.45 5 6.15v6.18c0 4.12-1 6.18-6 6.18H9c-5 0-6-2.06-6-6.18V9.65c0-4.7 1.67-5.96 5-6.15h8ZM20.75 17.6H3.25" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z" fill="currentColor"></path>`,"calendar-tick":`<path d="M8 2v3M16 2v3M3.5 9.09h17M22 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 18 23c-1.01 0-1.93-.37-2.63-1-.31-.26-.58-.58-.79-.94A3.92 3.92 0 0 1 14 19c0-2.21 1.79-4 4-4 1.2 0 2.27.53 3 1.36A4 4 0 0 1 22 19Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m16.44 19 .99.99 2.13-1.97" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 8.5v7.86c-.73-.83-1.8-1.36-3-1.36-2.21 0-4 1.79-4 4 0 .75.21 1.46.58 2.06.21.36.48.68.79.94H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 13.7h.01M8.294 13.7h.01M8.294 16.7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,camera:`<path d="M6.76 22h10.48c2.76 0 3.86-1.69 3.99-3.75l.52-8.26A3.753 3.753 0 0 0 18 6c-.61 0-1.17-.35-1.45-.89l-.72-1.45C15.37 2.75 14.17 2 13.15 2h-2.29c-1.03 0-2.23.75-2.69 1.66l-.72 1.45C7.17 5.65 6.61 6 6 6 3.83 6 2.11 7.83 2.25 9.99l.52 8.26C2.89 20.31 4 22 6.76 22ZM10.5 8h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 18c1.79 0 3.25-1.46 3.25-3.25S13.79 11.5 12 11.5s-3.25 1.46-3.25 3.25S10.21 18 12 18Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"cash-stack":`<path d="M19.3 7.92v5.15c0 3.08-1.76 4.4-4.4 4.4H6.11c-.45 0-.88-.04-1.28-.13-.25-.04-.49-.11-.71-.19-1.5-.56-2.41-1.86-2.41-4.08V7.92c0-3.08 1.76-4.4 4.4-4.4h8.79c2.24 0 3.85.95 4.28 3.12.07.4.12.81.12 1.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22.301 10.92v5.15c0 3.08-1.76 4.4-4.4 4.4h-8.79c-.74 0-1.41-.1-1.99-.32-1.19-.44-2-1.35-2.29-2.81.4.09.83.13 1.28.13h8.79c2.64 0 4.4-1.32 4.4-4.4V7.92c0-.47-.04-.89-.12-1.28 1.9.4 3.12 1.74 3.12 4.28Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.498 13.14a2.64 2.64 0 1 0 0-5.28 2.64 2.64 0 0 0 0 5.28ZM4.78 8.3v4.4M16.222 8.3v4.4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,chart:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.5 18.5c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2s-2 .9-2 2v9a2 2 0 0 0 2 2ZM8.5 18.5c1.1 0 2-.9 2-2V13c0-1.1-.9-2-2-2s-2 .9-2 2v3.5a2 2 0 0 0 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"chart-column":`<path d="M3 22h18M5.6 8.38H4c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V9.38c0-.55-.45-1-1-1ZM12.8 5.19h-1.6c-.55 0-1 .45-1 1V18c0 .55.45 1 1 1h1.6c.55 0 1-.45 1-1V6.19c0-.55-.45-1-1-1ZM20 2h-1.6c-.55 0-1 .45-1 1v15c0 .55.45 1 1 1H20c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,chat:`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"chat-dots":`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 8h10M7 13h6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,check:`<path d="m5 12.75 4.5 4.5L19 7.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"check-check":`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"check-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"chevron-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95"></path>`,"chevron-left":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08"></path>`,"chevron-right":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08"></path>`,"chevron-up":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M19.92 15.05L13.4 8.53c-.77-.77-2.03-.77-2.8 0l-6.52 6.52"></path>`,"chevrons-left":`<path d="M12.7071 6.70711C13.0976 6.31658 13.0976 5.68342 12.7071 5.29289C12.3166 4.90237 11.6834 4.90237 11.2929 5.29289L5.29289 11.2929C4.91431 11.6715 4.90107 12.2811 5.26285 12.6757L10.7628 18.6757C11.136 19.0828 11.7686 19.1103 12.1757 18.7372C12.5828 18.364 12.6103 17.7314 12.2372 17.3243L7.38414 12.0301L12.7071 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M19.7071 6.70711C20.0976 6.31658 20.0976 5.68342 19.7071 5.29289C19.3166 4.90237 18.6834 4.90237 18.2929 5.29289L12.2929 11.2929C11.9143 11.6715 11.9011 12.2811 12.2628 12.6757L17.7628 18.6757C18.136 19.0828 18.7686 19.1103 19.1757 18.7372C19.5828 18.364 19.6103 17.7314 19.2372 17.3243L14.3841 12.0301L19.7071 6.70711Z" fill="currentColor"/>`,"chevrons-right":`<path d="M11.2929 6.70711C10.9024 6.31658 10.9024 5.68342 11.2929 5.29289C11.6834 4.90237 12.3166 4.90237 12.7071 5.29289L18.7071 11.2929C19.0857 11.6715 19.0989 12.2811 18.7372 12.6757L13.2372 18.6757C12.864 19.0828 12.2314 19.1103 11.8243 18.7372C11.4172 18.364 11.3897 17.7314 11.7628 17.3243L16.6159 12.0301L11.2929 6.70711Z" fill="currentColor"/><path opacity="0.3" d="M4.29289 6.70711C3.90237 6.31658 3.90237 5.68342 4.29289 5.29289C4.68342 4.90237 5.31658 4.90237 5.70711 5.29289L11.7071 11.2929C12.0857 11.6715 12.0989 12.2811 11.7372 12.6757L6.23715 18.6757C5.86396 19.0828 5.23139 19.1103 4.82428 18.7372C4.41716 18.364 4.38965 17.7314 4.76285 17.3243L9.61586 12.0301L4.29289 6.70711Z" fill="currentColor"/>`,"chevrons-up-down":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.01 20.5l-5.02-5.01M9.01 3.5v17M14.99 3.5l5.02 5.01M14.99 20.5v-17"></path>`,circle:`<path d="M11.97 22c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.23a4.23 4.23 0 1 0 0-8.46 4.23 4.23 0 0 0 0 8.46Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"circle-help":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-check":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-text":`<path d="M8 12.2h7M8 16.2h4.38M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"clipboard-tick":`<path d="m9.31 14.7 1.5 1.5 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 6h4c2 0 2-1 2-2 0-2-1-2-2-2h-4C9 2 8 2 8 4s1 2 2 2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16 4.02c3.33.18 5 1.41 5 5.98v6c0 4-1 6-6 6H9c-5 0-6-2-6-6v-6c0-4.56 1.67-5.8 5-5.98" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,clock:`<path d="M22 12c0 5.52-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2s10 4.48 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m15.71 15.18-3.1-1.85c-.54-.32-.98-1.09-.98-1.72v-4.1" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"close-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cloud:`<path d="M7.27 13.01a3.79 3.79 0 0 0-1.72-.41c-4.68.33-4.68 7.14 0 7.47h11.09c1.35.01 2.65-.49 3.64-1.4 3.29-2.87 1.53-8.64-2.8-9.19C15.92.11 2.39 3.67 5.6 12.6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.85 9.92c.52-.26 1.09-.4 1.67-.41" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,code:`<path d="M9 13c-.66.33-1.21.82-1.62 1.43-.23.35-.23.79 0 1.14.41.61.96 1.1 1.62 1.43M15.21 13c.66.33 1.21.82 1.62 1.43.23.35.23.79 0 1.14-.41.61-.96 1.1-1.62 1.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM2.23 8.01 21.45 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"code-circle":`<path d="m8 10-2 2 2 2M16 10l2 2-2 2" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10ZM13 9.67l-2 4.66" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,coins:`<path d="M18.5 12.65v3.7c0 3.12-2.91 5.65-6.5 5.65s-6.5-2.53-6.5-5.65v-3.7C5.5 15.77 8.41 18 12 18s6.5-2.23 6.5-5.35Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65c0 .91-.25 1.75-.69 2.47C16.74 11.88 14.54 13 12 13c-2.54 0-4.74-1.12-5.81-2.88-.44-.72-.69-1.56-.69-2.47 0-1.56.73-2.97 1.9-3.99C8.58 2.63 10.2 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.5 7.65v5c0 3.12-2.91 5.35-6.5 5.35s-6.5-2.23-6.5-5.35v-5C5.5 4.53 8.41 2 12 2c1.8 0 3.42.63 4.6 1.65 1.17 1.03 1.9 2.44 1.9 4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,comment:`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,contact:`<path d="M17 21H7c-4 0-5-1-5-5V8c0-4 1-5 5-5h10c4 0 5 1 5 5v8c0 4-1 5-5 5ZM14 8h5M15 12h4M17 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.5 11.29a1.81 1.81 0 1 0 0-3.62 1.81 1.81 0 0 0 0 3.62ZM12 16.33a3.02 3.02 0 0 0-2.74-2.72 7.72 7.72 0 0 0-1.52 0A3.03 3.03 0 0 0 5 16.33" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,copy:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M16 12.9v4.2c0 3.5-1.4 4.9-4.9 4.9H6.9C3.4 22 2 20.6 2 17.1v-4.2C2 9.4 3.4 8 6.9 8h4.2c3.5 0 4.9 1.4 4.9 4.9z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 6.9v4.2c0 3.5-1.4 4.9-4.9 4.9H16v-3.1C16 9.4 14.6 8 11.1 8H8V6.9C8 3.4 9.4 2 12.9 2h4.2C20.6 2 22 3.4 22 6.9z"></path>`,cpu:`<path d="M9.6 20h4.8c4 0 5.6-1.6 5.6-5.6V9.6c0-4-1.6-5.6-5.6-5.6H9.6C5.6 4 4 5.6 4 9.6v4.8c0 4 1.6 5.6 5.6 5.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.5 17h3c2.5 0 3.5-1 3.5-3.5v-3C17 8 16 7 13.5 7h-3C8 7 7 8 7 10.5v3C7 16 8 17 10.5 17ZM8.01 4V2M12 4V2M16 4V2M20 8h2M20 12h2M20 16h2M16 20v2M12.01 20v2M8.01 20v2M2 8h2M2 12h2M2 16h2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"credit-card":`<path d="M2 8.505h20M6 16.505h2M10.5 16.505h4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.44 3.505h11.11c3.56 0 4.45.88 4.45 4.39v8.21c0 3.51-.89 4.39-4.44 4.39H6.44c-3.55.01-4.44-.87-4.44-4.38v-8.22c0-3.51.89-4.39 4.44-4.39Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,cursor:`<path d="m16.15 12.83-1.73.58c-.48.16-.85.53-1.01 1.01l-.58 1.73c-.49 1.49-2.59 1.46-3.05-.03L7.83 9.84c-.38-1.25.77-2.4 2-2.02l6.29 1.95c1.49.47 1.51 2.57.03 3.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,danger:`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"diagram-3":`<path d="M5 15V8M5.25 22a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM5.13 15a4.058 4.058 0 0 1 3.94-3.04l3.43.01c2.62.01 4.85-1.67 5.67-4.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,display:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,document:`<path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"document-download":`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"document-text":`<path d="M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,download:`<path d="M9 11v6l2-2M9 17l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,edit:`<path d="m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"edit-2":`<path d="m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"emoji-smile":`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.5 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.5 9.75a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM8.4 13.3h7.2c.5 0 .9.4.9.9 0 2.49-2.01 4.5-4.5 4.5s-4.5-2.01-4.5-4.5c0-.5.4-.9.9-.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,export:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M9.32 6.5l2.56-2.56 2.56 2.56M11.88 14.18V4.01M4 12c0 4.42 3 8 8 8s8-3.58 8-8"></path>`,"external-link":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13 11l8.2-8.2M22 6.8V2h-4.8M11 2H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7v-2"></path>`,eye:`<path d="M15.58 12c0 1.98-1.6 3.58-3.58 3.58S8.42 13.98 8.42 12s1.6-3.58 3.58-3.58 3.58 1.6 3.58 3.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 20.27c3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-2.29-3.6-5.58-5.68-9.11-5.68-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19 2.29 3.6 5.58 5.68 9.11 5.68Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"eye-off":`<path d="m14.53 9.47-5.06 5.06a3.576 3.576 0 1 1 5.06-5.06Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.82 5.77C16.07 4.45 14.07 3.73 12 3.73c-3.53 0-6.82 2.08-9.11 5.68-.9 1.41-.9 3.78 0 5.19.79 1.24 1.71 2.31 2.71 3.17M8.42 19.53c1.14.48 2.35.74 3.58.74 3.53 0 6.82-2.08 9.11-5.68.9-1.41.9-3.78 0-5.19-.33-.52-.69-1.01-1.06-1.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.51 12.7a3.565 3.565 0 0 1-2.82 2.82M9.47 14.53 2 22M22 2l-7.47 7.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,facebook:`<path d="M14 9.3v2.9h2.6c.2 0 .3.2.3.4l-.4 1.9c0 .1-.2.2-.3.2H14V22h-3v-7.2H9.3c-.2 0-.3-.1-.3-.3v-1.9c0-.2.1-.3.3-.3H11V9c0-1.7 1.3-3 3-3h2.7c.2 0 .3.1.3.3v2.4c0 .2-.1.3-.3.3h-2.4c-.2 0-.3.1-.3.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M15 22H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7v6c0 5-2 7-7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,factory:`<path d="M13 22H5c-2 0-3-1-3-3v-8c0-2 1-3 3-3h5v11c0 2 1 3 3 3ZM10.11 4c-.08.3-.11.63-.11 1v3H5V6c0-1.1.9-2 2-2h3.11ZM14 8v5M18 8v5M17 17h-2c-.55 0-1 .45-1 1v4h4v-4c0-.55-.45-1-1-1ZM6 13v4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10 19V5c0-2 1-3 3-3h6c2 0 3 1 3 3v14c0 2-1 3-3 3h-6c-2 0-3-1-3-3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"file-plus-2":`<path d="M9.56 18v-5M12 15.5H7M8 2v3M16 2v3M15.81 3.42c3.34.12 5.03 1.35 5.13 6.05l.13 6.17c.08 4.12-.87 6.19-5.87 6.3l-6 .12c-5 .1-6.04-1.94-6.12-6.05l-.14-6.18c-.1-4.7 1.55-6 4.87-6.25l8-.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"file-text":`<path d="M21 7v10c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V7c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 4.5v2c0 1.1.9 2 2 2h2M8 13h4M8 17h8" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,files:`<path d="M17 13.4v3c0 4-1.6 5.6-5.6 5.6H7.6c-4 0-5.6-1.6-5.6-5.6v-3.8C2 8.6 3.6 7 7.6 7h3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 13.4h-3.2c-2.4 0-3.2-.8-3.2-3.2V7l6.4 6.4ZM11.6 2h4M7 5c0-1.66 1.34-3 3-3h2.62M22 8v6.19c0 1.55-1.26 2.81-2.81 2.81M22 8h-3c-2.25 0-3-.75-3-3V2l6 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,filter:`<path d="M5.4 2.1h13.2c1.1 0 2 .9 2 2v2.2c0 .8-.5 1.8-1 2.3l-4.3 3.8c-.6.5-1 1.5-1 2.3V19c0 .6-.4 1.4-.9 1.7l-1.4.9c-1.3.8-3.1-.1-3.1-1.7v-5.3c0-.7-.4-1.6-.8-2.1l-3.8-4c-.5-.5-.9-1.4-.9-2V4.2c0-1.2.9-2.1 2-2.1ZM10.93 2.1 6 10" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,flag:`<path d="M5.15 2v20M5.15 4h11.2c2.7 0 3.3 1.5 1.4 3.4l-1.2 1.2c-.8.8-.8 2.1 0 2.8l1.2 1.2c1.9 1.9 1.2 3.4-1.4 3.4H5.15" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,flame:`<path d="M12 21C8.69 21 6 18.5 6 15.2C6 12.2 7.8 9.8 9.6 7.4L11 3C11.6 6.2 13.2 8 15 10.2C16.7 12.2 18 13.4 18 15.4C18 18.6 15.31 21 12 21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 19C10.7 19 9.7 18.1 9.7 16.9C9.7 15.7 10.5 14.9 11.3 13.6L12 12.5L12.7 13.6C13.5 14.9 14.3 15.7 14.3 16.9C14.3 18.1 13.3 19 12 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,flash:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,folder:`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,"folder-2":`<path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M8 2h9c2 0 3 1 3 3v1.38" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-kanban":`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-open":`<path d="m21.67 14.3-.4 5c-.15 1.53-.27 2.7-2.98 2.7H5.71C3 22 2.88 20.83 2.73 19.3l-.4-5c-.08-.83.18-1.6.65-2.19l.02-.02C3.55 11.42 4.38 11 5.31 11h13.38c.93 0 1.75.42 2.29 1.07.01.01.02.02.02.03.49.59.76 1.36.67 2.2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M3.5 11.43V6.28c0-3.4.85-4.25 4.25-4.25h1.27c1.27 0 1.56.38 2.04 1.02l1.27 1.7c.32.42.51.68 1.36.68h2.55c3.4 0 4.25.85 4.25 4.25v1.79M9.43 17h5.14" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"folder-plus":`<path d="M12.06 16.5v-5M14.5 14h-5" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 11v6c0 4-1 5-5 5H7c-4 0-5-1-5-5V7c0-4 1-5 5-5h1.5c1.5 0 1.83.44 2.4 1.2l1.5 2c.38.5.6.8 1.6.8h3c4 0 5 1 5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,gauge:`<path d="M19.14 19.5a9.964 9.964 0 0 0 2.86-7c0-5.52-4.48-10-10-10S2 6.98 2 12.5c0 2.72 1.08 5.18 2.84 6.99" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 21.5a3.38 3.38 0 1 0 0-6.76 3.38 3.38 0 0 0 0 6.76ZM15.25 12H16c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.67-1.5 1.5v.75c0 .41.34.75.75.75Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,gift:`<path d="M19.97 10h-16v8c0 3 1 4 4 4h8c3 0 4-1 4-4v-8ZM21.5 7v1c0 1.1-.53 2-2 2h-15c-1.53 0-2-.9-2-2V7c0-1.1.47-2 2-2h15c1.47 0 2 .9 2 2ZM11.64 5H6.12a.936.936 0 0 1 .03-1.3l1.42-1.42a.96.96 0 0 1 1.35 0L11.64 5ZM17.87 5h-5.52l2.72-2.72a.96.96 0 0 1 1.35 0l1.42 1.42c.36.36.37.93.03 1.3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.94 10v5.14c0 .8.88 1.27 1.55.84l.94-.62a1 1 0 0 1 1.1 0l.89.6a.997.997 0 0 0 1.55-.83V10H8.94Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,github:`<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 4.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" fill="currentColor"/>`,globe:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,globe2:`<path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8 3h1a28.424 28.424 0 0 0 0 18H8M15 3a28.424 28.424 0 0 1 0 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3 16v-1a28.424 28.424 0 0 0 18 0v1M3 9a28.424 28.424 0 0 1 18 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,google:`<path d="M21.6 10.2h-9.4v3.7h5.5c-.1.9-.7 2.3-2 3.2-.8.6-2 1-3.5 1-2.6 0-4.9-1.7-5.7-4.2-.2-.6-.3-1.3-.3-2s.1-1.4.3-2c.1-.2.1-.4.2-.5.9-2.1 3-3.6 5.5-3.6 1.9 0 3.1.8 3.9 1.5l2.8-2.8C17.2 3 14.9 2 12.2 2 8.3 2 4.9 4.2 3.3 7.5c-.7 1.4-1.1 2.9-1.1 4.5s.4 3.1 1.1 4.5c1.6 3.3 5 5.5 8.9 5.5 2.7 0 5-.9 6.6-2.4 1.9-1.7 3-4.3 3-7.4 0-.8-.1-1.4-.2-2Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,grid:`<path d="M22 8.52V3.98C22 2.57 21.36 2 19.77 2h-4.04c-1.59 0-2.23.57-2.23 1.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM22 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23h-4.04c-1.59 0-2.23.64-2.23 2.23v4.04c0 1.59.64 2.23 2.23 2.23h4.04c1.59 0 2.23-.64 2.23-2.23ZM10.5 8.52V3.98C10.5 2.57 9.86 2 8.27 2H4.23C2.64 2 2 2.57 2 3.98v4.53c0 1.42.64 1.98 2.23 1.98h4.04c1.59.01 2.23-.56 2.23-1.97ZM10.5 19.77v-4.04c0-1.59-.64-2.23-2.23-2.23H4.23c-1.59 0-2.23.64-2.23 2.23v4.04C2 21.36 2.64 22 4.23 22h4.04c1.59 0 2.23-.64 2.23-2.23Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,hand:`<path d="M8 13V5.5a1.5 1.5 0 0 1 3 0V12m0-.5v-7a1.5 1.5 0 0 1 3 0V12m0-5.5a1.5 1.5 0 0 1 3 0V12m0-3.5a1.5 1.5 0 0 1 3 0V15a6 6 0 0 1-6 6h-1.5a6 6 0 0 1-4.6-2.2l-2.2-2.9a1.6 1.6 0 0 1 2.4-2.1L8 15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,headphone:`<path d="M5.46 18.49v-2.92c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v2.81c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.63-3.57-3.57v-6.16C1.89 6.6 6.33 2.05 11.95 2.05 17.57 2.05 22 6.6 22 12.11v6.16c0 1.95-1.62 3.57-3.57 3.57-1.95 0-3.57-1.62-3.57-3.57v-2.81c0-.97.76-1.84 1.84-1.84.97 0 1.84.76 1.84 1.84v3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,health:`<path d="M8.97 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m1.97 12.7 6-.02c.75 0 1.59.57 1.87 1.27l1.14 2.88c.26.65.67.65.93 0l2.29-5.81c.22-.56.63-.58.91-.05l1.04 1.97c.31.59 1.11 1.07 1.77 1.07h4.06" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,heart:`<path d="M12.62 20.81c-.34.12-.9.12-1.24 0C8.48 19.82 2 15.69 2 8.69 2 5.6 4.49 3.1 7.56 3.1c1.82 0 3.43.88 4.44 2.24a5.53 5.53 0 0 1 4.44-2.24C19.51 3.1 22 5.6 22 8.69c0 7-6.48 11.13-9.38 12.12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,hierarchy:`<path d="M5 9v7M5.25 8.5a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM5 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM19 22a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.13 9a4.058 4.058 0 0 0 3.94 3.04l3.43-.01a5.989 5.989 0 0 1 5.67 4.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,history:`<path d="M20.75 13.25c0 4.83-3.92 8.75-8.75 8.75s-8.75-3.92-8.75-8.75S7.17 4.5 12 4.5s8.75 3.92 8.75 8.75ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 2h6" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"home-2":`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,house:`<path d="m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12ZM12 17.99v-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,image:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM2.67 18.95l4.93-3.31c.79-.53 1.93-.47 2.64.14l.33.29c.78.67 2.04.67 2.82 0l4.16-3.57c.78-.67 2.04-.67 2.82 0L22 13.9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,inbox:`<path d="M12 2v7l2-2M12 9l-2-2M1.98 13h4.41c.38 0 .72.21.89.55l1.17 2.34A2 2 0 0 0 10.24 17h3.53a2 2 0 0 0 1.79-1.11l1.17-2.34a1 1 0 0 1 .89-.55h4.36" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 4.13c-3.54.52-5 2.6-5 6.87v4c0 5 2 7 7 7h6c5 0 7-2 7-7v-4c0-4.27-1.46-6.35-5-6.87" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,info:`<g transform="rotate(180 12 12)"><path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>`,"info-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM12 8v5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 16h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,instagram:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.636 7h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,kanban:`<path d="M10.5 19.9V4.1c0-1.5-.64-2.1-2.23-2.1H4.23C2.64 2 2 2.6 2 4.1v15.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1ZM22 12.9V4.1c0-1.5-.64-2.1-2.23-2.1h-4.04c-1.59 0-2.23.6-2.23 2.1v8.8c0 1.5.64 2.1 2.23 2.1h4.04c1.59 0 2.23-.6 2.23-2.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,key:`<path d="M19.79 14.93a7.575 7.575 0 0 1-7.6 1.87l-4.71 4.7c-.34.35-1.01.56-1.49.49l-2.18-.3c-.72-.1-1.39-.78-1.5-1.5l-.3-2.18c-.07-.48.16-1.15.49-1.49l4.7-4.7c-.8-2.6-.18-5.55 1.88-7.6 2.95-2.95 7.74-2.95 10.7 0 2.96 2.95 2.96 7.76.01 10.71ZM6.89 17.49l2.3 2.3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,layer:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.01 2.92l5.9 2.62c1.7.75 1.7 1.99 0 2.74l-5.9 2.62c-.67.3-1.77.3-2.44 0l-5.9-2.62c-1.7-.75-1.7-1.99 0-2.74l5.9-2.62c.67-.3 1.77-.3 2.44 0z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 11c0 .84.63 1.81 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.77-.34 1.4-1.31 1.4-2.15"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3 16c0 .93.55 1.77 1.4 2.15l6.79 3.02c.52.23 1.11.23 1.62 0l6.79-3.02c.85-.38 1.4-1.22 1.4-2.15"></path>`,"layout-dashboard":`<path d="M5 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3H5C3 2 2 3 2 5v2c0 2 1 3 3 3ZM17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM17 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"layout-grid":`<path d="M17 10h2c2 0 3-1 3-3V5c0-2-1-3-3-3h-2c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM5 22h2c2 0 3-1 3-3v-2c0-2-1-3-3-3H5c-2 0-3 1-3 3v2c0 2 1 3 3 3ZM6 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM18 22a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,lightbulb:`<path d="M20.78 13.65v4.94H3.22v-4.94c0-4.82 3.9-8.72 8.72-8.72h.12c4.82 0 8.72 3.9 8.72 8.72ZM12 2v2.93M15.65 18.59A3.661 3.661 0 0 1 12 22c-1.93 0-3.52-1.5-3.65-3.41h7.3Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,linkedin:`<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286ZM5.337 7.433a2.062 2.062 0 1 1 0-4.125 2.062 2.062 0 0 1 0 4.125Zm1.782 13.019H3.555V9h3.564v11.452Z" fill="currentColor"/>`,list:`<path d="M3 4.5h18M3 9.5h9.47M3 14.5h18M3 19.5h9.47" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,lock:`<path d="M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"lock-1":`<path d="M6 10V8c0-3.31 1-6 6-6s6 2.69 6 6v2M12 18.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 22H7c-4 0-5-1-5-5v-2c0-4 1-5 5-5h10c4 0 5 1 5 5v2c0 4-1 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"log-out":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,login:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M11.68 14.62l2.56-2.56-2.56-2.56M4 12.06h10.17"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M12 4c4.42 0 8 3 8 8s-3.58 8-8 8"></path>`,logout:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.44 14.62L20 12.06 17.44 9.5M9.76 12.06h10.17M11.76 20c-4.42 0-8-3-8-8s3.58-8 8-8"></path>`,mail:`<path d="M17 20.5H7c-3 0-5-1.5-5-5v-7c0-3.5 2-5 5-5h10c3 0 5 1.5 5 5v7c0 3.5-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m17 9-3.13 2.5c-1.03.82-2.72.82-3.75 0L7 9" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"map-pin":`<path d="M12 13.43a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z" stroke="currentColor" stroke-width="1.5"></path><path d="M3.62 8.49c1.97-8.66 14.8-8.65 16.76.01 1.15 5.08-2.01 9.38-4.78 12.04a5.193 5.193 0 0 1-7.21 0c-2.76-2.66-5.92-6.97-4.77-12.05Z" stroke="currentColor" stroke-width="1.5"></path>`,"maximize-4":`<path d="M21 9V3h-6M3 15v6h6M21 3l-7.5 7.5M10.5 13.5 3 21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,menu:`<path d="M3 7h18M3 12h18M3 17h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,"message-question":`<path d="M17 18.43h-4l-4.45 2.96A.997.997 0 0 1 7 20.56v-2.13c-3 0-5-2-5-5v-6c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 11.36v-.21c0-.68.42-1.04.84-1.33.41-.28.82-.64.82-1.3 0-.92-.74-1.66-1.66-1.66-.92 0-1.66.74-1.66 1.66M11.995 13.75h.01" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"message-square":`<path d="M8.5 19H8c-4 0-6-1-6-6V8c0-4 2-6 6-6h8c4 0 6 2 6 6v5c0 4-2 6-6 6h-.5c-.31 0-.61.15-.8.4l-1.5 2c-.66.88-1.74.88-2.4 0l-1.5-2c-.16-.22-.53-.4-.8-.4Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.996 11h.01M11.995 11h.01M7.995 11h.008" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"message-text":`<path d="M16 2H8C4 2 2 4 2 8v13c0 .55.45 1 1 1h13c4 0 6-2 6-6V8c0-4-2-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 9.5h10M7 14.5h7" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,microsoft:`<rect width="11" height="11" fill="#F25022"/><rect x="13" width="11" height="11" fill="#7FBA00"/><rect y="13" width="11" height="11" fill="#00A4EF"/><rect x="13" y="13" width="11" height="11" fill="#FFB900"/>`,minus:`<path d="M6 12h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"minus-circle":`<path d="M11.92 22c5.5 0 10-4.5 10-10s-4.5-10-10-10-10 4.5-10 10 4.5 10 10 10ZM7.92 12h8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,mobile:`<path d="M17 6v10c0 4-1 5-5 5H6c-4 0-5-1-5-5V6c0-4 1-5 5-5h6c4 0 5 1 5 5ZM11 4.5H7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 18.1A1.55 1.55 0 1 0 9 15a1.55 1.55 0 0 0 0 3.1Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,monitor:`<path d="M6.44 2h11.11C21.11 2 22 2.89 22 6.44v6.33c0 3.56-.89 4.44-4.44 4.44H6.44C2.89 17.22 2 16.33 2 12.78V6.44C2 2.89 2.89 2 6.44 2ZM12 17.22V22M2 13h20M7.5 22h9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,moon:`<path d="M2.03 12.42c.36 5.15 4.73 9.34 9.96 9.57 3.69.16 6.99-1.56 8.97-4.27.82-1.11.38-1.85-.99-1.6-.67.12-1.36.17-2.08.14C13 16.06 9 11.97 8.98 7.14c-.01-1.3.26-2.53.75-3.65.54-1.24-.11-1.83-1.36-1.3C4.41 3.86 1.7 7.85 2.03 12.42Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"more-horizontal":`<path d="M5 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM19 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2ZM12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2Z" stroke="currentColor" stroke-width="1.5"></path>`,music:`<path d="M6.28 22a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M20.84 16.8V4.6c0-2.6-1.63-2.96-3.28-2.51l-6.24 1.7C10.18 4.1 9.4 5 9.4 6.3v12.57" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.72 19.92a3.12 3.12 0 1 0 0-6.24 3.12 3.12 0 0 0 0 6.24ZM9.4 9.52 20.84 6.4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,notification:`<path d="M12.02 2.91c-3.31 0-6 2.69-6 6v2.89c0 .61-.26 1.54-.57 2.06L4.3 15.77c-.71 1.18-.22 2.49 1.08 2.93 4.31 1.44 8.96 1.44 13.27 0 1.21-.4 1.74-1.83 1.08-2.93l-1.15-1.91c-.3-.52-.56-1.45-.56-2.06V8.91c0-3.3-2.7-6-6-6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"></path><path d="M13.87 3.2a6.754 6.754 0 0 0-3.7 0c.29-.74 1.01-1.26 1.85-1.26.84 0 1.56.52 1.85 1.26Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.02 19.06c0 1.65-1.35 3-3 3-.82 0-1.58-.34-2.12-.88a3.01 3.01 0 0 1-.88-2.12" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,palette:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10 4.5V18c0 1.08-.44 2.07-1.14 2.79l-.04.04c-.09.09-.19.18-.28.25-.3.26-.64.46-.99.6-.11.05-.22.09-.33.13-.39.13-.81.19-1.22.19-.27 0-.54-.03-.8-.08-.13-.03-.26-.06-.39-.1-.16-.05-.31-.1-.46-.17 0-.01 0-.01-.01 0-.28-.14-.55-.3-.8-.49l-.01-.01c-.13-.1-.25-.2-.36-.32-.11-.12-.22-.24-.33-.37-.19-.25-.35-.52-.49-.8.01-.01.01-.01 0-.01 0 0 0-.01-.01-.02-.06-.14-.11-.29-.16-.44a5.58 5.58 0 01-.1-.39c-.05-.26-.08-.53-.08-.8V4.5C2 3 3 2 4.5 2h3C9 2 10 3 10 4.5z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 16.5v3c0 1.5-1 2.5-2.5 2.5H6c.41 0 .83-.06 1.22-.19.11-.04.22-.08.33-.13.35-.14.69-.34.99-.6.09-.07.19-.16.28-.25l.04-.04 6.8-6.79h3.84c1.5 0 2.5 1 2.5 2.5zM4.81 21.82c-.6-.18-1.17-.51-1.64-.99-.48-.47-.81-1.04-.99-1.64a4.02 4.02 0 002.63 2.63z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M18.37 11.29L15.66 14l-6.8 6.79C9.56 20.07 10 19.08 10 18V8.34l2.71-2.71c1.06-1.06 2.48-1.06 3.54 0l2.12 2.12c1.06 1.06 1.06 2.48 0 3.54zM6 19a1 1 0 100-2 1 1 0 000 2z"></path>`,"panel-left-close":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM7.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.97 9.44 12.41 12l2.56 2.56" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"panel-left-open":`<path d="M21.97 15V9c0-5-2-7-7-7h-6c-5 0-7 2-7 7v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM14.97 2v20" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.97 9.44 10.53 12l-2.56 2.56" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,paperclip:`<path d="m12.33 12.15-2.47 2.47a3.495 3.495 0 0 0 0 4.95 3.495 3.495 0 0 0 4.95 0l3.89-3.89a7.007 7.007 0 0 0 0-9.9 7.007 7.007 0 0 0-9.9 0l-4.24 4.24c-2.34 2.34-2.34 6.14 0 8.49" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,pause:`<path d="M10.65 19.11V4.89c0-1.35-.57-1.89-2.01-1.89H5.01C3.57 3 3 3.54 3 4.89v14.22C3 20.46 3.57 21 5.01 21h3.63c1.44 0 2.01-.54 2.01-1.89ZM21 19.11V4.89C21 3.54 20.43 3 18.99 3h-3.63c-1.43 0-2.01.54-2.01 1.89v14.22c0 1.35.57 1.89 2.01 1.89h3.63c1.44 0 2.01-.54 2.01-1.89Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"pen-tool":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.75 22.5h2.52c.96 0 1.58-.68 1.4-1.51l-.41-1.81h-4.5l-.41 1.81c-.18.78.5 1.51 1.4 1.51zM14.26 19.17l1.73-1.54c.97-.86 1.01-1.46.24-2.43l-3.05-3.87c-.64-.81-1.69-.81-2.33 0L7.8 15.2c-.77.97-.77 1.6.24 2.43l1.73 1.54M12.01 11.12v2.53"></path><g><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12.52 5h-1c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM3.27 14.17h1c.55 0 1-.45 1-1v-1c0-.55-.45-1-1-1h-1c-.55 0-1 .45-1 1v1c0 .55.45 1 1 1zM20.73 14.17h-1c-.55 0-1-.45-1-1v-1c0-.55.45-1 1-1h1c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1zM10.52 3.56c-3.81.45-6.77 3.68-6.77 7.61M20.25 11.17c0-3.92-2.94-7.14-6.73-7.61"></path></g>`,pencil:`<path d="m13.26 3.6-8.21 8.69c-.31.33-.61.98-.67 1.43l-.37 3.24c-.13 1.17.71 1.97 1.87 1.77l3.22-.55c.45-.08 1.08-.41 1.39-.75l8.21-8.69c1.42-1.5 2.06-3.21-.15-5.3-2.2-2.07-3.87-1.34-5.29.16Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.89 5.05a6.126 6.126 0 0 0 5.45 5.15M3 22h18" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,people:`<path d="M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,phone:`<path d="M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,play:`<path d="M4 12V8.44c0-4.42 3.13-6.23 6.96-4.02l3.09 1.78 3.09 1.78c3.83 2.21 3.83 5.83 0 8.04l-3.09 1.78-3.09 1.78C7.13 21.79 4 19.98 4 15.56V12Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,plug:`<path d="M10.5 16h3c2.5 0 4-1.8 4-4V6.91c0-1.05-.86-1.91-1.91-1.91H8.42c-1.05 0-1.91.86-1.91 1.91V12C6.5 14.2 8 16 10.5 16ZM9.5 2v3M14.5 2v3M12 22v-6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,plus:`<path d="M6 12h12M12 18V6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"plus-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM8 12h8M12 16V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,printer:`<path d="M7.25 7h9.5V5c0-2-.75-3-3-3h-3.5c-2.25 0-3 1-3 3v2ZM16 15v4c0 2-1 3-3 3h-2c-2 0-3-1-3-3v-4h8Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M21 10v5c0 2-1 3-3 3h-2v-3H8v3H6c-2 0-3-1-3-3v-5c0-2 1-3 3-3h12c2 0 3 1 3 3ZM17 15H7M7 11h3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"profile-circle":`<path d="M12.12 12.78a.963.963 0 0 0-.24 0 3.27 3.27 0 0 1-3.16-3.27c0-1.81 1.46-3.28 3.28-3.28a3.276 3.276 0 0 1 .12 6.55ZM18.74 19.38A9.934 9.934 0 0 1 12 22c-2.6 0-4.96-.99-6.74-2.62.1-.94.7-1.86 1.77-2.58 2.74-1.82 7.22-1.82 9.94 0 1.07.72 1.67 1.64 1.77 2.58Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,ranking:`<path d="m13.3 8.11 1.32 2.64c.18.36.66.72 1.06.78l2.39.4c1.53.26 1.89 1.36.79 2.46L17 16.25c-.31.31-.49.92-.39 1.36l.53 2.31c.42 1.82-.55 2.53-2.16 1.58l-2.24-1.33c-.41-.24-1.07-.24-1.48 0L9.02 21.5c-1.61.95-2.58.24-2.16-1.58l.53-2.31c.1-.43-.08-1.04-.39-1.36l-1.86-1.86c-1.1-1.1-.74-2.21.79-2.46l2.39-.4c.4-.07.88-.42 1.06-.78l1.32-2.64c.71-1.43 1.89-1.43 2.6 0ZM6 9V2M18 9V2M12 4V2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,receipt:`<path d="M6.73 19.7c.82-.88 2.07-.81 2.79.15l1.01 1.35c.81 1.07 2.12 1.07 2.93 0l1.01-1.35c.72-.96 1.97-1.03 2.79-.15 1.78 1.9 3.23 1.27 3.23-1.39V7.04C20.5 3.01 19.56 2 15.78 2H8.22C4.44 2 3.5 3.01 3.5 7.04V18.3c0 2.67 1.46 3.29 3.23 1.4Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 11h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 11h5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M8.096 7h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.898 7h5.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"receipt-text":`<path d="M22 6v2.42C22 10 21 11 19.42 11H16V4.01C16 2.9 16.91 2 18.02 2c1.09.01 2.09.45 2.81 1.17C21.55 3.9 22 4.9 22 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 7v14c0 .83.94 1.3 1.6.8l1.71-1.28c.4-.3.96-.26 1.32.1l1.66 1.67c.39.39 1.03.39 1.42 0l1.68-1.68c.35-.35.91-.39 1.3-.09l1.71 1.28c.66.49 1.6.02 1.6-.8V4c0-1.1.9-2 2-2H6C3 2 2 3.79 2 6v1Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6 9h6M6.75 13h4.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,reddit:`<path d="M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z" fill="currentColor"/>`,refresh:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M22 12c0 5.52-4.48 10-10 10s-8.89-5.56-8.89-5.56m0 0h4.52m-4.52 0v5M2 12C2 6.48 6.44 2 12 2c6.67 0 10 5.56 10 5.56m0 0v-5m0 5h-4.44"></path>`,"refresh-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.55 21.67C18.84 20.54 22 16.64 22 12c0-5.52-4.44-10-10-10C5.33 2 2 7.56 2 7.56m0 0V3m0 4.56H6.44"></path><path stroke="currentColor" stroke-dasharray="3 3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2 12c0 5.52 4.48 10 10 10"></path>`,repeat:`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M3.58 5.16h13.84c1.66 0 3 1.34 3 3v3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M6.74 2L3.58 5.16l3.16 3.16M20.42 18.84H6.58c-1.66 0-3-1.34-3-3v-3.32"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="1.5" d="M17.26 22l3.16-3.16-3.16-3.16"></path>`,robot:`<path d="M12 3.5V6M7.5 6h9A3 3 0 0 1 19.5 9v7a3 3 0 0 1-3 3h-9A3 3 0 0 1 4.5 16V9a3 3 0 0 1 3-3ZM2.5 12v2.5M21.5 12v2.5M9 12v1.5M15 12v1.5M9.5 16.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"rotate-ccw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9.11 5.08c.87-.26 1.83-.43 2.89-.43 4.79 0 8.67 3.88 8.67 8.67s-3.88 8.67-8.67 8.67-8.67-3.88-8.67-8.67c0-1.78.54-3.44 1.46-4.82M7.87 5.32L10.76 2M7.87 5.32l3.37 2.46"></path>`,"rotate-cw":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14.89 5.08c-.87-.26-1.83-.43-2.89-.43-4.79 0-8.67 3.88-8.67 8.67C3.33 18.12 7.21 22 12 22s8.67-3.88 8.67-8.67c0-1.78-.54-3.44-1.46-4.82M16.13 5.32L13.24 2M16.13 5.32l-3.37 2.46"></path>`,routing:`<path d="M2.07 4.6c.8-3.46 6.01-3.46 6.8 0 .47 2.03-.82 3.75-1.94 4.82-.82.78-2.11.77-2.93 0C2.89 8.35 1.6 6.63 2.07 4.6ZM15.07 16.6c.8-3.46 6.04-3.46 6.84 0 .47 2.03-.82 3.75-1.95 4.82-.82.78-2.12.77-2.94 0-1.13-1.07-2.42-2.79-1.95-4.82Z" stroke="currentColor" stroke-width="1.5"></path><path d="M12 5h2.68c1.85 0 2.71 2.29 1.32 3.51L8.01 15.5C6.62 16.71 7.48 19 9.32 19H12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M5.486 5.5h.012M18.486 17.5h.012" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,search:`<path d="M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"search-normal":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,send:`<path d="m7.4 6.32 8.49-2.83c3.81-1.27 5.88.81 4.62 4.62l-2.83 8.49c-1.9 5.71-5.02 5.71-6.92 0l-.84-2.52-2.52-.84c-5.71-1.9-5.71-5.01 0-6.92ZM10.11 13.65l3.58-3.59" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,server:`<path d="M19.32 10H4.69c-1.48 0-2.68-1.21-2.68-2.68V4.69c0-1.48 1.21-2.68 2.68-2.68h14.63C20.8 2.01 22 3.22 22 4.69v2.63C22 8.79 20.79 10 19.32 10ZM19.32 22H4.69c-1.48 0-2.68-1.21-2.68-2.68v-2.63c0-1.48 1.21-2.68 2.68-2.68h14.63c1.48 0 2.68 1.21 2.68 2.68v2.63c0 1.47-1.21 2.68-2.68 2.68ZM6 5v2M10 5v2M6 17v2M10 17v2M14 6h4M14 18h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"setting-2":`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,settings:`<path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M2 12.88v-1.76c0-1.04.85-1.9 1.9-1.9 1.81 0 2.55-1.28 1.64-2.85-.52-.9-.21-2.07.7-2.59l1.73-.99c.79-.47 1.81-.19 2.28.6l.11.19c.9 1.57 2.38 1.57 3.29 0l.11-.19c.47-.79 1.49-1.07 2.28-.6l1.73.99c.91.52 1.22 1.69.7 2.59-.91 1.57-.17 2.85 1.64 2.85 1.04 0 1.9.85 1.9 1.9v1.76c0 1.04-.85 1.9-1.9 1.9-1.81 0-2.55 1.28-1.64 2.85.52.91.21 2.07-.7 2.59l-1.73.99c-.79.47-1.81.19-2.28-.6l-.11-.19c-.9-1.57-2.38-1.57-3.29 0l-.11.19c-.47.79-1.49 1.07-2.28.6l-1.73-.99a1.899 1.899 0 0 1-.7-2.59c.91-1.57.17-2.85-1.64-2.85-1.05 0-1.9-.86-1.9-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,share:`<path d="M16.96 6.17c2 1.39 3.38 3.6 3.66 6.15M3.49 12.37a8.601 8.601 0 0 1 3.6-6.15M8.19 20.94c1.16.59 2.48.92 3.87.92 1.34 0 2.6-.3 3.73-.85M12.06 7.7a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM4.83 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM19.17 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"share-2":`<path d="M16.96 6.17c2 1.39 3.38 3.6 3.66 6.15M3.49 12.37a8.601 8.601 0 0 1 3.6-6.15M8.19 20.94c1.16.59 2.48.92 3.87.92 1.34 0 2.6-.3 3.73-.85M12.06 7.7a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM4.83 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56ZM19.17 19.92a2.78 2.78 0 1 0 0-5.56 2.78 2.78 0 0 0 0 5.56Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shield:`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-check":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-cross":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.15 13.44 9.9 9.19M14.1 9.24l-4.25 4.25" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-lock":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-plus":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 12.5v3" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"shield-tick":`<path d="M10.49 2.23 5.5 4.11c-1.15.43-2.09 1.79-2.09 3.01v7.43c0 1.18.78 2.73 1.73 3.44l4.3 3.21c1.41 1.06 3.73 1.06 5.14 0l4.3-3.21c.95-.71 1.73-2.26 1.73-3.44V7.12c0-1.23-.94-2.59-2.09-3.02l-4.99-1.87c-.85-.31-2.21-.31-3.04 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m9.05 11.87 1.61 1.61 4.3-4.3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,shop:`<path d="M3.01 11.22v4.49C3.01 20.2 4.81 22 9.3 22h5.39c4.49 0 6.29-1.8 6.29-6.29v-4.49" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 12c1.83 0 3.18-1.49 3-3.32L14.34 2H9.67L9 8.68C8.82 10.51 10.17 12 12 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.31 12c2.02 0 3.5-1.64 3.3-3.65l-.28-2.75C20.97 3 19.97 2 17.35 2H14.3l.7 7.01c.17 1.65 1.66 2.99 3.31 2.99ZM5.64 12c1.65 0 3.14-1.34 3.3-2.99l.22-2.21.48-4.8H6.59C3.97 2 2.97 3 2.61 5.6l-.27 2.75C2.14 10.36 3.62 12 5.64 12ZM12 17c-1.67 0-2.5.83-2.5 2.5V22h5v-2.5c0-1.67-.83-2.5-2.5-2.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,snowflake:`<path d="M16.61 20c1.34.01 2.63-.49 3.62-1.39 3.27-2.86 1.52-8.6-2.79-9.14C15.9.13 2.43 3.67 5.62 12.56" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.28 12.97c-.53-.27-1.12-.41-1.71-.4-4.66.33-4.65 7.11 0 7.44M15.82 9.89c.52-.26 1.08-.4 1.66-.41" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12.995 18.5h.01M8.995 18.5h.01M10.995 21.5h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,sort:`<path d="M3 7h18M6 12h12M10 17h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path>`,sparkles:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,star:`<path d="m13.73 3.51 1.76 3.52c.24.49.88.96 1.42 1.05l3.19.53c2.04.34 2.52 1.82 1.05 3.28l-2.48 2.48c-.42.42-.65 1.23-.52 1.81l.71 3.07c.56 2.43-.73 3.37-2.88 2.1l-2.99-1.77c-.54-.32-1.43-.32-1.98 0l-2.99 1.77c-2.14 1.27-3.44.32-2.88-2.1l.71-3.07c.13-.58-.1-1.39-.52-1.81l-2.48-2.48c-1.46-1.46-.99-2.94 1.05-3.28l3.19-.53c.53-.09 1.17-.56 1.41-1.05l1.76-3.52c.96-1.91 2.52-1.91 3.47 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,stars:`<path d="m17.29 4.14-.07 3.79c-.01.52.32 1.21.74 1.52l2.48 1.88c1.59 1.2 1.33 2.67-.57 3.27l-3.23 1.01c-.54.17-1.11.76-1.25 1.31l-.77 2.94c-.61 2.32-2.13 2.55-3.39.51l-1.76-2.85c-.32-.52-1.08-.91-1.68-.88l-3.34.17c-2.39.12-3.07-1.26-1.51-3.08l1.98-2.3c.37-.43.54-1.23.37-1.77L4.28 6.43c-.59-1.9.47-2.95 2.36-2.33l2.95.97c.5.16 1.25.05 1.67-.26l3.08-2.22c1.66-1.2 2.99-.5 2.95 1.55ZM21.91 22l-3.03-3.03" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,stop:`<path d="M9.3 21h5.4c4.5 0 6.3-1.8 6.3-6.3V9.3C21 4.8 19.2 3 14.7 3H9.3C4.8 3 3 4.8 3 9.3v5.4C3 19.2 4.8 21 9.3 21Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,subtitle:`<path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM17.5 17.08h-1.85M12.97 17.08H6.5M17.5 13.32h-5.53M9.27 13.32H6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,sun:`<path d="M12 18.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.14 19.14-.13-.13m0-14.02.13-.13-.13.13ZM4.86 19.14l.13-.13-.13.13ZM12 2.08V2v.08ZM12 22v-.08.08ZM2.08 12H2h.08ZM22 12h-.08.08ZM4.99 4.99l-.13-.13.13.13Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,tag:`<path d="m4.405 15.526 4.53 4.53a4.78 4.78 0 0 0 6.75 0l4.39-4.39a4.78 4.78 0 0 0 0-6.75l-4.54-4.52a4.75 4.75 0 0 0-3.6-1.39l-5 .24c-2 .09-3.59 1.68-3.69 3.67l-.24 5c-.06 1.35.45 2.66 1.4 3.61Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.735 12.226a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path><path d="m13.235 17.226 4-4" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,task:`<path d="M11 19.5h10M11 12.5h10M11 5.5h10M3 5.5l1 1 3-3M3 12.5l1 1 3-3M3 19.5l1 1 3-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"task-square":`<path d="M12.37 8.88h5.25M6.38 8.88l.75.75 2.25-2.25M12.37 15.88h5.25M6.38 15.88l.75.75 2.25-2.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,telephone:`<path d="M21.97 18.33c0 .36-.08.73-.25 1.09-.17.36-.39.7-.68 1.02-.49.54-1.03.93-1.64 1.18-.6.25-1.25.38-1.95.38-1.02 0-2.11-.24-3.26-.73s-2.3-1.15-3.44-1.98a28.75 28.75 0 0 1-3.28-2.8 28.414 28.414 0 0 1-2.79-3.27c-.82-1.14-1.48-2.28-1.96-3.41C2.24 8.67 2 7.58 2 6.54c0-.68.12-1.33.36-1.93.24-.61.62-1.17 1.15-1.67C4.15 2.31 4.85 2 5.59 2c.28 0 .56.06.81.18.26.12.49.3.67.56l2.32 3.27c.18.25.31.48.4.7.09.21.14.42.14.61 0 .24-.07.48-.21.71-.13.23-.32.47-.56.71l-.76.79c-.11.11-.16.24-.16.4 0 .08.01.15.03.23.03.08.06.14.08.2.18.33.49.76.93 1.28.45.52.93 1.05 1.45 1.58.54.53 1.06 1.02 1.59 1.47.52.44.95.74 1.29.92.05.02.11.05.18.08.08.03.16.04.25.04.17 0 .3-.06.41-.17l.76-.75c.25-.25.49-.44.72-.56.23-.14.46-.21.71-.21.19 0 .39.04.61.13.22.09.45.22.7.39l3.31 2.35c.26.18.44.39.55.64.1.25.16.5.16.78Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,text:`<path d="M2.67 7.17V5.35c0-1.15.93-2.07 2.07-2.07h14.52c1.15 0 2.07.93 2.07 2.07v1.82M12 20.72V4.11M8.06 20.72h7.88" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"thumbs-down":`<path d="m16.52 5.65-3.1-2.4c-.4-.4-1.3-.6-1.9-.6h-3.8c-1.2 0-2.5.9-2.8 2.1l-2.4 7.3c-.5 1.4.4 2.6 1.9 2.6h4c.6 0 1.1.5 1 1.2l-.5 3.2c-.2.9.4 1.9 1.3 2.2.8.3 1.8-.1 2.2-.7l4.1-6.1" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M21.62 5.65v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"thumbs-up":`<path d="m7.48 18.35 3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l2.4-7.3c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path><path d="M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"tick-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m7.75 12 2.83 2.83 5.67-5.66" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,trash:`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trash-2":`<path d="M21 5.98c-3.33-.33-6.68-.5-10.02-.5-1.98 0-3.96.1-5.94.3L3 5.98M8.5 4.97l.22-1.31C8.88 2.71 9 2 10.69 2h2.62c1.69 0 1.82.75 1.97 1.67l.22 1.3M18.85 9.14l-.65 10.07C18.09 20.78 18 22 15.21 22H8.79C6 22 5.91 20.78 5.8 19.21L5.15 9.14M10.33 16.5h3.33M9.5 12.5h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"trending-up":`<path d="m16.5 9.5-4.2 4.2-1.6-2.4-3.2 3.2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M14.5 9.5h2v2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,triangle:`<path d="M12 9v5M12 21.41H5.94c-3.47 0-4.92-2.48-3.24-5.51l3.12-5.62L8.76 5c1.78-3.21 4.7-3.21 6.48 0l2.94 5.29 3.12 5.62c1.68 3.03.22 5.51-3.24 5.51H12v-.01Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11.995 17h.009" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,"two-page":`<path d="M22 16.74V4.67c0-1.2-.98-2.09-2.17-1.99h-.06c-2.1.18-5.29 1.25-7.07 2.37l-.17.11c-.29.18-.77.18-1.06 0l-.25-.15C9.44 3.9 6.26 2.84 4.16 2.67 2.97 2.57 2 3.47 2 4.66v12.08c0 .96.78 1.86 1.74 1.98l.29.04c2.17.29 5.52 1.39 7.44 2.44l.04.02c.27.15.7.15.96 0 1.92-1.06 5.28-2.17 7.46-2.46l.33-.04c.96-.12 1.74-1.02 1.74-1.98ZM12 5.49v15M7.75 8.49H5.5M8.5 11.49h-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,upload:`<path d="M9 17v-6l-2 2M9 11l2 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10v5c0 5-2 7-7 7H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M22 10h-4c-3 0-4-1-4-4V2l8 8Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,user:`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10ZM20.59 22c0-3.87-3.85-7-8.59-7s-8.59 3.13-8.59 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-check":`<path d="m14.44 19.05 1.52 1.52L19 17.53M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-edit":`<path d="M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="m19.21 15.74-3.54 3.54c-.14.14-.27.4-.3.59l-.19 1.35c-.07.49.27.83.76.76l1.35-.19c.19-.03.46-.16.59-.3l3.54-3.54c.61-.61.9-1.32 0-2.22-.89-.89-1.6-.6-2.21.01Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M18.7 16.25c.3 1.08 1.14 1.92 2.22 2.22" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.41 22c0-3.87 3.85-7 8.59-7 1.04 0 2.04.15 2.97.43" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-minus":`<path d="M19.5 19h-4M12.15 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43C7.55 3.99 9.53 2 11.99 2a4.435 4.435 0 0 1 .16 8.87ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"user-plus":`<path d="M18.5 19.5h-4M16.5 21.5v-4M12.16 10.87c-.1-.01-.22-.01-.33 0a4.42 4.42 0 0 1-4.27-4.43A4.428 4.428 0 0 1 11.99 2c2.45 0 4.44 1.99 4.44 4.44 0 2.4-1.9 4.35-4.27 4.43ZM11.99 21.81c-1.82 0-3.63-.46-5.01-1.38-2.42-1.62-2.42-4.26 0-5.87 2.75-1.84 7.26-1.84 10.01 0" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,users:`<path d="M18 7.16a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58A2.589 2.589 0 0 1 18 7.16ZM16.97 14.44c1.37.23 2.88-.01 3.94-.72 1.41-.94 1.41-2.48 0-3.42-1.07-.71-2.6-.95-3.97-.71M5.97 7.16c.06-.01.13-.01.19 0a2.573 2.573 0 0 0 2.48-2.58C8.64 3.15 7.49 2 6.06 2a2.58 2.58 0 0 0-2.58 2.58c.01 1.4 1.11 2.53 2.49 2.58ZM7 14.44c-1.37.23-2.88-.01-3.94-.72-1.41-.94-1.41-2.48 0-3.42 1.07-.71 2.6-.95 3.97-.71M12 14.63a.605.605 0 0 0-.19 0 2.573 2.573 0 0 1-2.48-2.58c0-1.43 1.15-2.58 2.58-2.58a2.58 2.58 0 0 1 2.58 2.58c-.01 1.4-1.11 2.54-2.49 2.58ZM9.09 17.78c-1.41.94-1.41 2.48 0 3.42 1.6 1.07 4.22 1.07 5.82 0 1.41-.94 1.41-2.48 0-3.42-1.59-1.06-4.22-1.06-5.82 0Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-high":`<path d="M2 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z" stroke="currentColor" stroke-width="1.5"></path><path d="M18 8a6.66 6.66 0 0 1 0 8M19.83 5.5a10.83 10.83 0 0 1 0 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-mute":`<path d="M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"volume-slash":`<path d="M15 8.37v-.96c0-2.98-2.07-4.12-4.59-2.54L7.49 6.7c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3v4c0 2 1 3 3 3h2M10.41 19.13c2.52 1.58 4.59.43 4.59-2.54v-3.64M18.81 9.42c.9 2.15.63 4.66-.81 6.58M21.15 7.8a10.82 10.82 0 0 1-1.32 10.7M22 2 2 22" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,wallet2:`<path d="M13 9H7M22 10.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6H21c.56.02 1 .47 1 1.02Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17.48 10.55c-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87H21v1.45c0 3-2 5-5 5H7c-3 0-5-2-5-5v-7c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h9c.26 0 .51.01.75.05C19.33 3.85 21 5.76 21 8.5v1.45h-2.08c-.56 0-1.07.22-1.44.6Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"wand-sparkles":`<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.5 20.5c.83.83 2.17.83 3 0l13-13c.83-.83.83-2.17 0-3-.83-.83-2.17-.83-3 0l-13 13c-.83.83-.83 2.17 0 3zM18.01 8.99l-3-3"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.5 2.44L10 2l-.44 1.5L10 5l-1.5-.44L7 5l.44-1.5L7 2l1.5.44zM4.5 8.44L6 8l-.44 1.5L6 11l-1.5-.44L3 11l.44-1.5L3 8l1.5.44zM19.5 13.44L21 13l-.44 1.5L21 16l-1.5-.44L18 16l.44-1.5L18 13l1.5.44z"></path>`,"warning-2":`<path d="M12 7.75V13M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 16.2v.1" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>`,whatsapp:`<path d="M6.9 20.6c1.5.9 3.3 1.4 5.1 1.4 5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12c0 1.8.5 3.5 1.3 5l-.86 3.306a1 1 0 0 0 1.243 1.213L6.9 20.6Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="M16.5 14.848c0 .162-.036.329-.113.491a1.856 1.856 0 0 1-.306.459c-.221.243-.464.418-.74.531-.27.113-.563.171-.878.171-.46 0-.951-.108-1.47-.328a7.922 7.922 0 0 1-1.55-.892 12.95 12.95 0 0 1-1.478-1.26 12.79 12.79 0 0 1-1.257-1.471 8.02 8.02 0 0 1-.884-1.534C7.608 10.5 7.5 10.01 7.5 9.543c0-.306.054-.598.162-.868.108-.275.28-.527.519-.752.288-.284.603-.423.937-.423.126 0 .252.027.365.081.117.054.22.135.302.252l1.046 1.472c.08.112.14.216.18.315.04.094.063.189.063.274a.61.61 0 0 1-.095.32 1.53 1.53 0 0 1-.252.319l-.343.356a.24.24 0 0 0-.072.18c0 .035.005.067.014.103.013.036.027.063.036.09.08.149.22.342.419.576.203.234.419.473.653.711.244.239.478.459.717.662.234.197.428.332.581.413l.082.037a.311.311 0 0 0 .112.018.248.248 0 0 0 .185-.077l.342-.338c.113-.112.221-.197.325-.252a.6.6 0 0 1 .32-.094.72.72 0 0 1 .275.059c.099.04.203.098.315.175l1.492 1.058a.683.683 0 0 1 .248.287.921.921 0 0 1 .072.351Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10"></path>`,x:`<path d="M6.4 6.4l11.2 11.2M17.6 6.4 6.4 17.6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>`,"x-circle":`<path d="M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10ZM9.17 14.83l5.66-5.66M14.83 14.83 9.17 9.17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,youtube:`<path d="M17 20H7c-3 0-5-2-5-5V9c0-3 2-5 5-5h10c3 0 5 2 5 5v6c0 3-2 5-5 5Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path><path d="m11.4 9.5 2.5 1.5c.9.6.9 1.5 0 2.1l-2.5 1.5c-1 .6-1.8.1-1.8-1v-3c0-1.3.8-1.7 1.8-1.1Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,zap:`<path d="M6.09 13.28h3.09v7.2c0 1.68.91 2.02 2.02.76l7.57-8.6c.93-1.05.54-1.92-.87-1.92h-3.09v-7.2c0-1.68-.91-2.02-2.02-.76l-7.57 8.6c-.92 1.06-.53 1.92.87 1.92Z" stroke="currentColor" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path>`,"zoom-in":`<path d="M11 20a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM8.5 11h5M11 13.5v-5M18.93 20.69c.53 1.6 1.74 1.76 2.67.36.85-1.28.29-2.33-1.25-2.33-1.14-.01-1.78.88-1.42 1.97Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`,"zoom-out":`<path d="M9 11.7h5M11.5 21a9.5 9.5 0 1 0 0-19 9.5 9.5 0 0 0 0 19ZM22 22l-2-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>`};Object.keys(Ln);function Rn(e,{size:t=16,className:n=``}={}){let r=Ln[e];return r?`<svg class="${n?`wui-icon ${n}`:`wui-icon`}" data-icon="${e}" width="${t}" height="${t}" viewBox="0 0 24 24" fill="none" aria-hidden="true">${r}</svg>`:``}Object.freeze({label:`Notifications`,empty:`You are all caught up.`,markAll:`Mark all read`,viewAll:`View all`,unreadPrefix:`Unread: `,today:`Today`,yesterday:`Yesterday`,allRead:`All notifications marked as read.`,noneUnread:`No unread notifications`,failed:Object.freeze({forbidden:`You do not have permission to mark these as read.`,client:`These could not be marked as read. Refresh the page and try again.`,validation:`These could not be marked as read. Refresh the page and try again.`,server:`Something went wrong on our side, so these were not marked as read. Try again in a moment.`,network:`Could not reach the server, so these were not marked as read. Check your connection and try again.`})});var zn=typeof HTMLElement>`u`?class{}:HTMLElement,Bn=class extends zn{#e=null;#t=null;#n=null;#r=!1;get part(){return this.#e}set part(e){this.#e=e,this.#i()}get message(){return this.#t}set message(e){this.#t=e,this.#i()}get turn(){return this.#n}set turn(e){this.#n=e,this.#i()}connectedCallback(){this.#r=!0,this.#i()}disconnectedCallback(){this.#r=!1,queueMicrotask(()=>{this.isConnected||this.disposePart()})}#i(){this.#r&&this.#e&&this.#t&&this.#n&&this.renderPart(this.#e,this.#t,this.#n)}renderPart(){throw Error(`${this.localName} must override renderPart`)}disposePart(){}};function Vn(e,t){typeof customElements>`u`||customElements.get(e)||customElements.define(e,t)}function N(e,t,n=null,r=null){let i=e.createElement(t);return n&&(i.className=n),r!==null&&(i.textContent=r),i}function Hn(e,t,n){let r=Rn(t,{size:n});if(!r)return null;let i=new DOMParser().parseFromString(r,`text/html`);return e.importNode(i.body.firstElementChild,!0)}var Un={Confirmed:`actionConfirmed`,Rejected:`actionRejected`,Expired:`actionExpired`,Failed:`actionFailed`},Wn=/^https?:\/\//i,Gn={strong:`strong`,em:`em`,strike:`s`};function Kn(e,t,n){let r=document.createElement(e);return t&&(r.className=t),n!=null&&(r.textContent=n),r}function qn(e,t){return{id:e,label:t,action:`Send`,target:null,navigateAfterMs:null,icon:null,variant:null}}function Jn(e,t){for(let n of t)if(n.type===`text`||n.type===`citation`)e.append(document.createTextNode(n.text));else if(n.type===`link`){if(Wn.test(n.href)){let t=Kn(`a`);t.href=n.href,t.target=`_blank`,t.rel=`noopener noreferrer`,Jn(t,n.children),e.append(t)}else Jn(e,n.children)}else if(n.type in Gn){let t=Kn(Gn[n.type]);Jn(t,n.children),e.append(t)}else n.type===`code`&&e.append(Kn(`code`,null,n.text))}function Yn(e){let t=Kn(`p`,`wui-chat-action-consent`);return Jn(t,Oe(e)),t}function Xn(e){let t=Kn(`ul`,`wui-chat-action-lines`);for(let n of e)t.append(Kn(`li`,null,n));return t}function Zn(e){let t=Kn(`dl`,`wui-chat-action-lines`);for(let n of e){let e=Kn(`div`,`wui-chat-action-line`),r=n.indexOf(`: `);r===-1?e.append(Kn(`dt`,null,n)):e.append(Kn(`dt`,null,n.slice(0,r)),Kn(`dd`,null,n.slice(r+2))),t.append(e)}return t}Vn(`wui-chat-part-action`,class extends Bn{constructor(){super(),this._part=null,this._turn=null,this._working=null,this._error=null,this._menuOpen=!1}renderPart(e,t,n){this._part?.actionId!==e.actionId&&(this._working=null,this._error=null,this._menuOpen=!1),this._part=e,this._turn=n,this._paint()}_paint(e=null){this.replaceChildren(this._view()),e===`first`?this.querySelector(`[role="menuitem"]`)?.focus():e===`edit`&&this.querySelector(`.wui-chat-action-edit`)?.focus()}async _run(e){let t=this._part.actionId;this._working=e,this._error=null,this._paint();try{e===`confirm`?await this._turn.confirmAction(t):await this._turn.rejectAction(t),this._working=null}catch(e){if(this._part.actionId!==t)return;this._working=null,this._error=e?.message||this._turn.labels.actionFailed,this._paint()}}_view(){let{part:e,turn:t}=this,n=t.labels,r=e.state===`Pending`,i=t.features.LeadRecap&&e.actionKind===`ChatLeadCapture`,a=i&&e.editFields?.length>0,o=Kn(`div`,`wui-chat-action wui-chat-action--${e.state.toLowerCase()}`);if(o.append(Kn(`strong`,`wui-chat-action-title`,e.title)),e.lines.length>0&&o.append(i?Zn(e.lines):Xn(e.lines)),i&&e.consentText&&o.append(Yn(e.consentText)),e.note&&o.append(Kn(`p`,`wui-chat-action-note`,e.note)),r||o.append(this._status(e,n)),(r||a)&&o.append(this._buttons(e,n,i,r,a)),a&&this._menuOpen&&o.append(this._menu(e.editFields,n)),this._error){let e=Kn(`p`,`wui-chat-action-error`,this._error);e.setAttribute(`role`,`alert`),o.append(e)}return o}_status(e,t){let n=Kn(`p`,`wui-chat-action-status wui-chat-action-status--${e.state.toLowerCase()}`);if(e.state===`Repeat`)n.textContent=e.decidedDateTimeUtc?t.actionRepeat(rt(e.decidedDateTimeUtc)):t.actionDone;else if(e.state===`Done`){if(n.append(t.actionDone),e.decidedDateTimeUtc){let t=Kn(`time`,null,rt(e.decidedDateTimeUtc));t.dateTime=e.decidedDateTimeUtc,n.append(` `,t)}}else n.textContent=t[Un[e.state]]??``;return n}_buttons(e,t,n,r,i){let a=Kn(`div`,`wui-chat-action-buttons`),o=this._working;if(r){let r=n&&e.confirmLabel||t.actionConfirm,i=n&&e.rejectLabel||t.actionDismiss,s=Kn(`button`,`btn btn-primary btn-sm`,o===`confirm`?t.actionWorking:r);s.type=`button`,s.disabled=o!==null,s.addEventListener(`click`,()=>this._run(`confirm`));let c=Kn(`button`,`btn btn-soft-primary btn-sm`,i);c.type=`button`,c.disabled=o!==null,c.addEventListener(`click`,()=>this._run(`dismiss`)),a.append(s,c)}if(i){let e=Kn(`button`,`btn btn-soft-primary btn-sm wui-chat-action-edit`,t.editSomething);e.type=`button`,e.setAttribute(`aria-haspopup`,`menu`),e.setAttribute(`aria-expanded`,String(this._menuOpen)),e.disabled=!r||o!==null,e.addEventListener(`click`,()=>{this._menuOpen=!this._menuOpen,this._paint(this._menuOpen?`first`:`edit`)}),a.append(e)}return a}_menu(e,t){let n=Kn(`ul`,`list-group wui-chat-action-menu`);n.setAttribute(`role`,`menu`),n.setAttribute(`aria-label`,t.editSomething),n.addEventListener(`keydown`,e=>this._onMenuKey(e));for(let t of e){let e=Kn(`li`);e.setAttribute(`role`,`none`);let r=Kn(`button`,`list-group-item list-group-item-action wui-chat-action-menu-item`,t.label);r.type=`button`,r.setAttribute(`role`,`menuitem`),r.addEventListener(`click`,()=>{this._menuOpen=!1,this._turn.chooseQuickReply(qn(`lead.edit:${t.id}`,t.label)),this._paint(`edit`)}),e.append(r),n.append(e)}return n}_onMenuKey(e){if(e.key===`Escape`){e.preventDefault(),this._menuOpen=!1,this._paint(`edit`);return}let t=[...e.currentTarget.querySelectorAll(`[role="menuitem"]`)],n=t.indexOf(document.activeElement),r=t.length-1,i={ArrowDown:n<r?n+1:0,ArrowUp:n>0?n-1:r,Home:0,End:r};e.key in i&&(e.preventDefault(),t[i[e.key]].focus())}});var Qn=n({CHART_STATES:()=>lZ,CHART_TYPES:()=>aZ,CHART_VIEWS:()=>uZ,MAX_SERIES:()=>8,MAX_SLICES:()=>6,RENDERERS:()=>cZ,STACK_MODES:()=>oZ,WuiChart:()=>UQ,X_KINDS:()=>sZ,formatValue:()=>G,normalizeSpec:()=>DA});function P(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);eM(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function $n(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)-nM)/rM}return t}function er(){return vM>=yM&&(vM=0),vM++}function tr(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function F(e){if(typeof e!=`object`||!e)return e;var t=e,n=lM.call(e);if(n===`[object Array]`){if(!Ar(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=F(e[r])}}else if(cM[n]){if(!Ar(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(!sM[n]&&!Ar(e)&&!yr(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==_M&&(t[o]=F(e[o]));return t}function nr(e,t,n){if(!H(t)||!H(e))return n?F(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==_M){var i=e[r],a=t[r];H(a)&&H(i)&&!z(a)&&!z(i)&&!yr(a)&&!yr(i)&&!_r(a)&&!_r(i)&&!Ar(a)&&!Ar(i)?nr(i,a,n):(n||!(r in e))&&(e[r]=F(t[r]))}return e}function I(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==_M&&(e[n]=t[n]);return e}function rr(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function ir(e,t,n){for(var r=fr(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}function ar(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 or(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 sr(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 ir(e,t,n)}function cr(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function L(e,t,n){if(e&&t){if(e.forEach&&e.forEach===dM)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 R(e,t,n){if(!e)return[];if(!t)return Tr(e);if(e.map&&e.map===mM)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 lr(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 ur(e,t,n){if(!e)return[];if(!t)return Tr(e);if(e.filter&&e.filter===fM)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 dr(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function fr(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 pr(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(pM.call(arguments)))}}function mr(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(pM.call(arguments)))}}function z(e){return Array.isArray?Array.isArray(e):lM.call(e)===`[object Array]`}function B(e){return typeof e==`function`}function V(e){return typeof e==`string`}function hr(e){return lM.call(e)===`[object String]`}function gr(e){return typeof e==`number`}function H(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function _r(e){return!!sM[lM.call(e)]}function vr(e){return!!cM[lM.call(e)]}function yr(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function br(e){return e.colorStops!=null}function xr(e){return e.image!=null}function Sr(e){return e!==e}function Cr(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function U(e,t){return e??t}function wr(e,t,n){return e??t??n}function Tr(e){var t=[...arguments].slice(1);return pM.apply(e,t)}function Er(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 Dr(e,t){if(!e)throw Error(t)}function Or(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}function kr(e){e[bM]=!0}function Ar(e){return e[bM]}function jr(){return SM?new Map:new xM}function W(e){return new CM(e)}function Mr(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 Nr(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&I(n,t),n}function Pr(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Fr(e,t){return e.hasOwnProperty(t)}function Ir(){}function Lr(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}function Rr(e){var t={main:``,sub:``};if(e){var n=e.split(DM);t.main=n[0]||``,t.sub=n[1]||``}return t}function zr(e){Dr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Br(e){return!!(e&&e[kM])}function Vr(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Hr(t)?n=function(e){P(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},or(n,this)),I(n.prototype,e),n[kM]=!0,n.extend=this.extend,n.superCall=Gr,n.superApply=Kr,n.superClass=t,n}}function Hr(e){return B(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ur(e,t){e.extend=t.extend}function Wr(e){var t=[`__\0is_clz`,AM++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Gr(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Kr(e,t,n){return this.superClass.prototype[t].apply(e,n)}function qr(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){zr(r),e.prototype.type=r;var i=Rr(r);if(!i.sub)t[i.main]=e;else if(i.sub!==OM){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[OM]&&(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=Rr(e),r=[],i=t[n.main];return i&&i[OM]?L(i,function(e,t){t!==OM&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Rr(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Rr(e).main];return n&&n[OM]};function n(e){var n=t[e.main];return n&&n[OM]||(n=t[e.main]={},n[OM]=!0),n}}function Jr(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&ar(r,s)>=0||i&&ar(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}function Yr(e){if(typeof e==`string`){var t=IM.get(e);return t&&t.image}return e}function Xr(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=IM.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Qr(t)&&a.pending.push(o)):(t=oM.loadImage(e,Zr,Zr),t.__zrImageSrc=e,IM.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function Zr(){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 Qr(e){return e&&e.width&&e.height}function $r(){return[1,0,0,1,0,0]}function ei(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ti(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 ni(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 ri(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 ii(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 ai(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 oi(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function si(e,t){return e??=0,t??=0,[e,t]}function ci(e,t){return e[0]=t[0],e[1]=t[1],e}function li(e){return[e[0],e[1]]}function ui(e,t,n){return e[0]=t,e[1]=n,e}function di(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function fi(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function pi(e){return Math.sqrt(mi(e))}function mi(e){return e[0]*e[0]+e[1]*e[1]}function hi(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function gi(e,t){var n=pi(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function _i(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function vi(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}function yi(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function bi(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 xi(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Si(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}function Ci(e,t,n,r,i,a,o,s){var c=VM(t-n),l=VM(r-e),u=zM(c,l),d=HM[i],f=HM[1-i],p=UM[i];t<n||r<e?c<l?(a&&(XM[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(XM[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=BM(e,n),o[p]=zM(t,r)-o[d]),a&&(u<ZM[0]||JM.useDir)&&(ZM[0]=zM(u,ZM[0]),(c<l||!JM.bidirectional)&&(YM[d]=c,YM[f]=0,JM.useDir&&JM.calcDirMTV()),(c>=l||!JM.bidirectional)&&(YM[d]=-l,YM[f]=0,JM.useDir&&JM.calcDirMTV())))}function wi(){var e=0,t=new J,n=new J,r={minTv:new J,maxTv:new J,useDir:!1,dirMinTv:new J,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=BM(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return VM(e)<1e-10}return r}function Ti(e){sN||=new FM(100),e||=`12px sans-serif`;var t=sN.get(e);return t||(t={font:e,strWidthCache:new FM(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:oM.measureText(`国`,e).width,asciiCharWidth:oM.measureText(`a`,e).width},sN.put(e,t)),t}function Ei(e){if(!(cN>=lN)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=oM.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?cN=lN:i>2&&cN++,t}}function Di(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Ei(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Oi(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=oM.measureText(t,e.font).width,n.put(t,r)),r}function ki(e,t,n,r){var i=Oi(Ti(t),e),a=Ni(t);return new Y(ji(0,i,n),Mi(0,a,r),i,a)}function Ai(e,t,n,r){var i=((e||``)+``).split(`
22
+ `);if(i.length===1)return ki(i[0],t,n,r);for(var a=new Y(0,0,0,0),o=0;o<i.length;o++){var s=ki(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function ji(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Mi(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Ni(e){return Ti(e).stWideCharWidth}function Pi(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Fi(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+=Pi(r[0],n.width),l+=Pi(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}function Ii(e,t,n,r,i,a){if(!n)e.text=``,e.isTruncated=!1;else{var o=(t+``).split(`
23
+ `);a=Li(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Ri(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
24
+ `),e.isTruncated=s}}function Li(e,t,n,r){r||={};var i=I({},r);n=U(n,`...`),i.maxIterations=U(r.maxIterations,2);var a=i.minChar=U(r.minChar,0),o=i.fontMeasureInfo=Ti(t),s=o.asciiCharWidth;i.placeholder=U(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Oi(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Ri(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r)e.textLine=``,e.isTruncated=!1;else{var o=Oi(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?zi(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Oi(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}}function zi(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Di(n,e.charCodeAt(i));return i}function Bi(e,t,n,r){var i=qi(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Ni(l),f=U(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?Gi(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
25
+ `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Li(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Ri(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Ti(l),S=0;S<_.length;S++)w=Math.max(Oi(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}function Vi(e,t,n,r,i){var a=new pN,o=qi(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=uN.lastIndex=0,h;(h=uN.exec(o))!=null;){var g=h.index;g>m&&Hi(a,o.substring(m,g),t,p),Hi(a,h[2],t,p,h[1]),m=uN.lastIndex}m<o.length&&Hi(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,ee=j?j[1]+j[3]:0,te=k.font=A.font||t.font;k.contentHeight=Ni(te);var ne=U(A.height,k.contentHeight);if(k.innerHeight=ne,j&&(ne+=j[0]+j[2]),k.height=ne,k.lineHeight=wr(A.lineHeight,t.lineHeight,ne),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var re=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<re;break outer}var ie=A.width,ae=ie==null||ie===`auto`;if(typeof ie==`string`&&ie.charAt(ie.length-1)===`%`)k.percentWidth=ie,_.push(k),k.contentWidth=Oi(Ti(te),k.text);else{if(ae){var oe=A.backgroundColor,se=oe&&oe.image;se&&(se=Yr(se),Qr(se)&&(k.width=Math.max(k.width,se.width*ne/se.height)))}var ce=b&&u!=null?u-D:null;ce!=null&&ce<k.width?!ae||ce<ee?(k.text=``,k.width=k.contentWidth=0):(Ii(S,k.text,ce-ee,te,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=Oi(Ti(te),k.text)):k.contentWidth=Oi(Ti(te),k.text)}k.width+=ee,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=U(u,y),a.outerHeight=a.height=U(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],le=k.percentWidth;k.width=parseInt(le,10)/100*a.width}return a}function Hi(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=Pi(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
26
+ `),l=!0),r.accumWidth=m}else{var h=Gi(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
27
+ `);for(var g=Ti(c),_=0;_<u.length;_++){var v=u[_],y=new dN;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,y.width=typeof o.width==`number`?o.width:d?d[_]:Oi(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new fN)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new fN([y]))}}function Ui(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}function Wi(e){return!Ui(e)||!!mN[e]}function Gi(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Ti(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
28
+ `)c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;else{var m=Di(d,p.charCodeAt(0)),h=!r&&!Wi(p);(a.length?u+m>n:i+u+m>n)?u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m)):(u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p))}}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Ki(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Y.set(hN,ji(n,o,i),Mi(r,s,a),o,s),Y.intersect(t,hN,null,gN);var c=gN.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=ji(c.x,c.width,i,!0),e.baseY=Mi(c.y,c.height,a,!0)}}function qi(e){return e==null?e=``:e+=``}function Ji(e){var t=qi(e.text),n=e.font;return Yi(e,Oi(Ti(n),t),Ni(n),null)}function Yi(e,t,n,r){var i=new Y(ji(e.x||0,t,e.textAlign),Mi(e.y||0,n,e.textBaseline),t,n),a=r??(Xi(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Xi(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}function Zi(e){return e>vN||e<-vN}function Qi(){return new CN}function $i(e,t){return rr(e,t,TN)}function ea(e){return e>-kN&&e<kN}function ta(e){return e>kN||e<-kN}function na(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 ra(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function ia(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(ea(u)&&ea(d)){if(ea(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(ea(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=ON(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-DN(-y,MN):DN(y,MN),b=b<0?-DN(-b,MN):DN(b,MN);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*ON(u*u*u)),S=Math.acos(x)/3,C=ON(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+jN*Math.sin(S)))/(3*o),T=(-s+C*(w-jN*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 aa(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(ea(o)){if(ta(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(ea(u))i[0]=-a/(2*o);else if(u>0){var d=ON(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 oa(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 sa(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;NN[0]=c,NN[1]=l;for(var v=0;v<1;v+=.05)PN[0]=na(e,n,i,o,v),PN[1]=na(t,r,a,s,v),g=RM(NN,PN),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<AN);y++)m=d-f,h=d+f,PN[0]=na(e,n,i,o,m),PN[1]=na(t,r,a,s,m),g=RM(PN,NN),m>=0&&g<p?(d=m,p=g):(FN[0]=na(e,n,i,o,h),FN[1]=na(t,r,a,s,h),_=RM(FN,NN),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=na(e,n,i,o,d),u[1]=na(t,r,a,s,d)),ON(p)}function ca(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=na(e,n,i,o,m),g=na(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function la(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function ua(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function da(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(ea(a)){if(ta(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(ea(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=ON(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 fa(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function pa(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 ma(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;NN[0]=o,NN[1]=s;for(var f=0;f<1;f+=.05){PN[0]=la(e,n,i,f),PN[1]=la(t,r,a,f);var p=RM(NN,PN);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<AN);m++){var h=l-u,g=l+u;PN[0]=la(e,n,i,h),PN[1]=la(t,r,a,h);var p=RM(PN,NN);if(h>=0&&p<d)l=h,d=p;else{FN[0]=la(e,n,i,g),FN[1]=la(t,r,a,g);var _=RM(FN,NN);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=la(e,n,i,l),c[1]=la(t,r,a,l)),ON(d)}function ha(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=la(e,n,i,f),m=la(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}function ga(e){var t=e&&IN.exec(e);if(t){var n=t[1].split(`,`),r=+Or(n[0]),i=+Or(n[1]),a=+Or(n[2]),o=+Or(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:ia(0,r,a,1,e,s)&&na(0,i,o,1,s[0])}}}function _a(e){return e=Math.round(e),e<0?0:e>255?255:e}function va(e){return e=Math.round(e),e<0?0:e>360?360:e}function ya(e){return e<0?0:e>1?1:e}function ba(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?_a(parseFloat(t)/100*255):_a(parseInt(t,10))}function xa(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ya(parseFloat(t)/100):ya(parseFloat(t))}function Sa(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 Ca(e,t,n){return e+(t-e)*n}function wa(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ta(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Ea(e,t){BN&&Ta(BN,t),BN=zN.put(e,BN||t.slice())}function Da(e,t){if(e){t||=[];var n=zN.get(e);if(n)return Ta(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in RN)return Ta(t,RN[r]),Ea(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)){wa(t,0,0,0,1);return}return wa(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),Ea(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){wa(t,0,0,0,1);return}return wa(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Ea(e,t),t}}else{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?wa(t,+l[0],+l[1],+l[2],1):wa(t,0,0,0,1);u=xa(l.pop());case`rgb`:if(l.length>=3)return wa(t,ba(l[0]),ba(l[1]),ba(l[2]),l.length===3?u:xa(l[3])),Ea(e,t),t;wa(t,0,0,0,1);return;case`hsla`:if(l.length!==4){wa(t,0,0,0,1);return}return l[3]=xa(l[3]),Oa(l,t),Ea(e,t),t;case`hsl`:if(l.length!==3){wa(t,0,0,0,1);return}return Oa(l,t),Ea(e,t),t;default:return}}wa(t,0,0,0,1)}}}function Oa(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=xa(e[1]),i=xa(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],wa(t,_a(Sa(o,a,n+1/3)*255),_a(Sa(o,a,n)*255),_a(Sa(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function ka(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Aa(e,t){var n=Da(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 Fa(n,n.length===4?`rgba`:`rgb`)}}function ja(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=_a(Ca(o[0],s[0],c)),n[1]=_a(Ca(o[1],s[1],c)),n[2]=_a(Ca(o[2],s[2],c)),n[3]=ya(Ca(o[3],s[3],c)),n}}function Ma(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Da(t[i]),s=Da(t[a]),c=r-i,l=Fa([_a(Ca(o[0],s[0],c)),_a(Ca(o[1],s[1],c)),_a(Ca(o[2],s[2],c)),ya(Ca(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Na(e,t,n,r){var i=Da(e);if(e)return i=ka(i),t!=null&&(i[0]=va(B(t)?t(i[0]):t)),n!=null&&(i[1]=xa(B(n)?n(i[1]):n)),r!=null&&(i[2]=xa(B(r)?r(i[2]):r)),Fa(Oa(i),`rgba`)}function Pa(e,t){var n=Da(e);if(n&&t!=null)return n[3]=ya(t),Fa(n,`rgba`)}function Fa(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 Ia(e,t){var n=Da(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function La(e){if(V(e)){var t=VN.get(e);return t||(t=Aa(e,-.1),VN.put(e,t)),t}if(br(e)){var n=I({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Aa(e.color,-.1)}}),n}return e}function Ra(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Da(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}function za(e){return e<UN&&e>-UN}function Ba(e){return HN(e*1e3)/1e3}function Va(e){return HN(e*1e4)/1e4}function Ha(e){return`matrix(`+Ba(e[0])+`,`+Ba(e[1])+`,`+Ba(e[2])+`,`+Ba(e[3])+`,`+Va(e[4])+`,`+Va(e[5])+`)`}function Ua(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Wa(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Ga(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function Ka(e){return e&&!!e.image}function qa(e){return e&&!!e.svgElement}function Ja(e){return Ka(e)||qa(e)}function Ya(e){return e.type===`linear`}function Xa(e){return e.type===`radial`}function Za(e){return e&&(e.type===`linear`||e.type===`radial`)}function Qa(e){return`url(#`+e+`)`}function $a(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function eo(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*wM,i=U(e.scaleX,1),a=U(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+HN(o*wM)+`deg, `+HN(s*wM)+`deg)`),c.join(` `)}function to(e,t,n){return(t-e)*n+e}function no(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=to(t[a],n[a],r);return e}function ro(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]=to(t[o][s],n[o][s],r)}return e}function io(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function ao(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 oo(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 so(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]:KN.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 co(e){if(cr(e)){var t=e.length;if(cr(e[0])){for(var n=[],r=0;r<t;r++)n.push(KN.call(e[r]));return n}return KN.call(e)}return e}function lo(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 uo(e){return cr(e&&e[0])?2:1}function fo(e){return e===ZN||e===QN}function po(e){return e===JN||e===YN}function mo(e,t,n,r,i){n||={};var a=[];bo(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 ho(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function go(e){return cr(e[0])}function _o(e,t,n){if(cr(t[n])){if(cr(e[n])||(e[n]=[]),vr(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),ho(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(go(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?ho(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else ho(a,i,o);a.length=i.length}}else e[n]=t[n]}function vo(e,t){return e===t||cr(e)&&cr(t)&&yo(e,t)}function yo(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 bo(e,t,n,r,i,a,o,s){for(var c=fr(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!H(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_])){if(H(v)&&!cr(v)&&!br(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}bo(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=ar(m,x);m.splice(S,1)}}if(i.force||(h=ur(h,function(e){return!vo(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[_]=co(n[_]),_o(n,r,_)}}var x=new nP(n,!1,!1,d?ur(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function xo(e,t,n,r){return!(n&&n.hoverLayer||r)||So(e)||t&&So(t)?0:1}function So(e){return e.type===`text`||e.type===`tspan`}function Co(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}function wo(e,t,n){return CP.copy(e.getBoundingRect()),e.transform&&CP.applyTransform(e.transform),wP.width=t,wP.height=n,!CP.intersect(wP)}function To(e,t,n,r,i,a){i[0]=TP(e,n),i[1]=TP(t,r),a[0]=EP(e,n),a[1]=EP(t,r)}function Eo(e,t,n,r,i,a,o,s,c,l){var u=aa,d=na,f=u(e,n,i,o,NP);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,NP[p]);c[0]=TP(m,c[0]),l[0]=EP(m,l[0])}f=u(t,r,a,s,PP);for(var p=0;p<f;p++){var h=d(t,r,a,s,PP[p]);c[1]=TP(h,c[1]),l[1]=EP(h,l[1])}c[0]=TP(e,c[0]),l[0]=EP(e,l[0]),c[0]=TP(o,c[0]),l[0]=EP(o,l[0]),c[1]=TP(t,c[1]),l[1]=EP(t,l[1]),c[1]=TP(s,c[1]),l[1]=EP(s,l[1])}function Do(e,t,n,r,i,a,o,s){var c=fa,l=la,u=EP(TP(c(e,n,i),1),0),d=EP(TP(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=TP(e,i,f),o[1]=TP(t,a,p),s[0]=EP(e,i,f),s[1]=EP(t,a,p)}function Oo(e,t,n,r,i,a,o,s,c){var l=xi,u=Si,d=Math.abs(i-a);if(d%kP<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(AP[0]=OP(i)*n+e,AP[1]=DP(i)*r+t,jP[0]=OP(a)*n+e,jP[1]=DP(a)*r+t,l(s,AP,jP),u(c,AP,jP),i%=kP,i<0&&(i+=kP),a%=kP,a<0&&(a+=kP),i>a&&!o?a+=kP:i<a&&o&&(i+=kP),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(MP[0]=OP(p)*n+e,MP[1]=DP(p)*r+t,l(s,MP,s),u(c,MP,c))}}function ko(e){return Math.round(e/qP*1e8)/1e8%2*qP}function Ao(e,t){var n=ko(e[0]);n<0&&(n+=JP);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=JP?i=n+JP:t&&n-i>=JP?i=n-JP:!t&&n>i?i=n+(JP-ko(n-i)):t&&n<i&&(i=n-(JP-ko(i-n))),e[0]=n,e[1]=i}function jo(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 Mo(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:sa(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function No(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:ma(e,t,n,r,i,a,s,c,null)<=l/2}function Po(e){return e%=QP,e<0&&(e+=QP),e}function Fo(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)%$P<1e-4)return!0;if(a){var d=r;r=Po(i),i=Po(d)}else r=Po(r),i=Po(i);r>i&&(i+=$P);var f=Math.atan2(c,s);return f<0&&(f+=$P),f>=r&&f<=i||f+$P>=r&&f+$P<=i}function Io(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}function Lo(e,t){return Math.abs(e-t)<nF}function Ro(){var e=iF[0];iF[0]=iF[1],iF[1]=e}function zo(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=ia(t,r,a,s,l,rF);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=rF[h],_=g===0||g===1?.5:1;na(e,n,i,o,g)<c||(f<0&&(f=aa(t,r,a,s,iF),iF[1]<iF[0]&&f>1&&Ro(),p=na(t,r,a,s,iF[0]),f>1&&(m=na(t,r,a,s,iF[1]))),f===2?g<iF[0]?d+=p<t?_:-_:g<iF[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<iF[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function Bo(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=da(t,r,a,s,rF);if(c===0)return 0;var l=fa(t,r,a);if(l>=0&&l<=1){for(var u=0,d=la(t,r,a,l),f=0;f<c;f++){var p=rF[f]===0||rF[f]===1?.5:1,m=la(e,n,i,rF[f]);m<o||(rF[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}var p=rF[0]===0||rF[0]===1?.5:1,m=la(e,n,i,rF[0]);return m<o?0:a<t?p:-p}function Vo(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);rF[0]=-c,rF[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=tF-1e-4){r=0,i=tF;var u=a?1:-1;return o>=rF[0]+e&&o<=rF[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=tF,i+=tF);for(var f=0,p=0;p<2;p++){var m=rF[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=tF+h),(h>=r&&h<=i||h+tF>=r&&h+tF<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function Ho(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===eF.M&&m>1&&(n||(s+=Io(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case eF.M:u=a[m++],d=a[m++],c=u,l=d;break;case eF.L:if(n){if(jo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Io(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case eF.C:if(n){if(Mo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=zo(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 eF.Q:if(n){if(No(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Bo(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case eF.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+=Io(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Fo(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Vo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case eF.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(jo(u,d,f,d,t,r,i)||jo(f,d,f,p,t,r,i)||jo(f,p,u,p,t,r,i)||jo(u,p,u,d,t,r,i))return!0}else s+=Io(f,d,f,p,r,i),s+=Io(u,p,u,d,r,i);break;case eF.Z:if(n){if(jo(c,l,u,d,t,r,i))return!0}else s+=Io(c,l,u,d,r,i);c=u,l=d}}return!n&&!Lo(l,d)&&(s+=Io(c,l,u,d,r,i)||0),s!==0}function Uo(e,t,n){return Ho(e,0,!1,t,n)}function Wo(e,t,n,r){return Ho(e,t,!0,n,r)}function Go(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}function Ko(e,t){var n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;var d;s+c>i&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}function qo(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&&(mF(r*2)===mF(i*2)&&(e.x1=e.x2=Yo(r,s,!0)),mF(a*2)===mF(o*2)&&(e.y1=e.y2=Yo(a,s,!0))),e}}function Jo(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=Yo(r,s,!0),e.y=Yo(i,s,!0),e.width=Math.max(Yo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Yo(i+o,s,!1)-e.y,o===0?0:1)),e}}function Yo(e,t,n){if(!t)return e;var r=mF(e*2);return(r+mF(t))%2==0?r/2:(r+(n?1:-1))/2}function Xo(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Zo(e,t){for(var n=0;n<TF.length;n++){var r=TF[n],i=t[r];i!=null&&(e[r]=i)}}function Qo(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function $o(e){return es(e),L(e.rich,es),e}function es(e){if(e){e.font=SF.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||CF[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||wF[n]?n:`top`,e.padding&&=Er(e.padding)}}function ts(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function ns(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function rs(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function is(e){var t=e.text;return t!=null&&(t+=``),t}function as(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}function os(e){return e.replace(/^\s+|\s+$/g,``)}function ss(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 cs(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return ls(e,t,n)}function ls(e,t,n){return V(e)?ds(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function us(e){return V(e)&&ds(e)}function ds(e){return!!os(e).match(/%$/)}function fs(e,t,n){return isNaN(t)?n?``+e:+e:(t=OF(kF(0,t),DF),e=(+e).toFixed(t),n?e:+e)}function ps(e){return e.sort(function(e,t){return e-t}),e}function ms(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(jF(e*t)/t===e)return n}return hs(e)}function hs(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return kF(0,(a<0?0:i-1-a)-r)}function gs(e,t,n){var r=AF(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=FF(2*AF(n||1)*AF(r))/IF,a=FF(AF(t))/IF,o=kF(0,NF(-i+a));return isFinite(o)||(o=NaN),o}function _s(e,t){var n=lr(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=PF(10,t),i=R(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=R(i,function(e){return MF(e)}),s=lr(o,function(e,t){return e+t},0),c=R(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return R(o,function(e){return e/r})}function vs(e,t){var n=kF(ms(e),ms(t)),r=e+t;return n>DF?r:fs(r,n)}function ys(e){var t=LF*2;return(e%t+t)%t}function bs(e){return e>-EF&&e<EF}function xs(e){if(e instanceof Date)return e;if(V(e)){var t=BF.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?new Date(NaN):new Date(jF(e))}function Ss(e){return PF(10,Cs(e))}function Cs(e){if(e===0)return 0;var t=MF(FF(e)/IF);return e/PF(10,t)>=10&&t++,t}function ws(e,t){var n=Cs(e),r=PF(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,fs(e,-n)}function Ts(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&s(e,t,1))}}function Es(e){var t=parseFloat(e);return t==e&&(t!==0||!V(e)||e.indexOf(`x`)<=0)?t:NaN}function Ds(e){return!isNaN(Es(e))}function Os(){return jF(RF()*9)}function ks(e,t){return t===0?e:ks(t,e%t)}function As(e,t){return e==null?t:t==null?e:e*t/ks(e,t)}function js(e){return e!=null&&isFinite(e)}function Ms(e,t,n){if(UF){if(n){if(HF[t])return;HF[t]=!0}console[e](VF+t)}}function Ns(e,t){Ms(`error`,e,t)}function Ps(e){throw Error(e)}function Fs(e,t,n){return(t-e)*n+e}function Is(e){return e instanceof Array?e:e==null?[]:[e]}function Ls(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])}}}function Rs(e){return H(e)&&!z(e)&&!(e instanceof Date)?e.value:e}function zs(e){return H(e)&&!(e instanceof Array)}function Bs(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=W();L(t,function(e,n){H(e)||(t[n]=null)});var s=Vs(e,o,n);return(r||i)&&Hs(s,e,o,t),r&&Us(s,t),r||i?Ws(s,t,i):a&&Gs(s,t),Ks(s),s}function Vs(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 Hs(e,t,n,r){L(r,function(i,a){if(i&&i.id!=null){var o=Js(i.id),s=n.get(o);if(s!=null){var c=e[s];Dr(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Us(e,t){L(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)&&qs(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function Ws(e,t,n){L(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Zs(r.existing)||r.existing&&t.id!=null&&!qs(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Gs(e,t){L(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ks(e){var t=W();L(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),L(e,function(e){var n=e.newOption;Dr(!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={})}),L(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(H(i)){if(a.name=i.name==null?r?r.name:WF+n:Js(i.name),r)a.id=Js(r.id);else if(i.id!=null)a.id=Js(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 qs(e,t,n){var r=Ys(t[e],null),i=Ys(n[e],null);return r!=null&&i!=null&&r===i}function Js(e){return Ys(e,``)}function Ys(e,t){return e==null?t:V(e)?e:gr(e)||hr(e)?e+``:t}function Xs(e){var t=e.name;return!!(t&&t.indexOf(WF))}function Zs(e){return e&&e.id!=null&&Js(e.id).indexOf(GF)===0}function Qs(e,t,n){L(e,function(e){var r=e.newOption;H(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=$s(t,r,e.existing,n))})}function $s(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function ec(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return z(t.dataIndex)?R(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return z(t.name)?R(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function tc(){var e=`__ec_inner_`+qF++;return function(t){return t[e]||(t[e]={})}}function nc(e,t,n){var r=rc(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=ic(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 rc(e,t){var n;if(V(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=W(),a={},o=!1;return L(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`)a[n]=e;else{var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&ar(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}function ic(e,t,n,r){r||=JF;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function ac(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function oc(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function sc(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function cc(e){return e===`auto`?EM.domSupported?`html`:`richText`:e||`html`}function lc(e,t){var n=W(),r=[];return L(e,function(e){var i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function uc(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(gr(r)){var o=Fs(n||0,r,i);return fs(o,a?Math.max(ms(n||0),ms(r)):t)}if(V(r))return i<1?n:r;for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=Fs(p,m,i);s[d]=fs(o,a?Math.max(ms(p),ms(m)):t)}}return s}function dc(){return[1/0,-1/0]}function fc(e,t){gc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function pc(e,t){gc(t)&&t<e[0]&&(e[0]=t)}function mc(e,t){gc(t)&&t>e[1]&&(e[1]=t)}function hc(e,t){_c(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function gc(e){return e!=null&&isFinite(e)}function _c(e,t){return gc(e)&&gc(t)&&e<=t}function vc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function yc(e){_c(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function bc(){var e=`__ec_once_`+XF++;return function(t,n){Fr(t,e)||(t[e]=1,n())}}function xc(e,t,n){var r=W(),i=0;L(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Sc(e){return e.value+``}function Cc(e){return e+``}function wc(e,t){return U(t,!0)?e.seriesIndex+2:0}function Tc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Ec(e,t){return{seriesType:e,overallReset:t}}function Dc(e){return{overallReset:e}}function Oc(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}function kc(e){return e!=null&&e!==`none`}function Ac(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function jc(e){Ac(e,`emphasis`,2)}function Mc(e){e.hoverState===2&&Ac(e,`normal`,0)}function Nc(e){Ac(e,`blur`,1)}function Pc(e){e.hoverState===1&&Ac(e,`normal`,0)}function Fc(e){e.selected=!0}function Ic(e){e.selected=!1}function Lc(e,t,n){t(e,n)}function Rc(e,t,n){Lc(e,t,n),e.isGroup&&e.traverse(function(e){Lc(e,t,n)})}function zc(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Bc(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 Vc(e,t,n,r){var i=n&&ar(n,`select`)>=0,a=!1;if(e instanceof cF){var o=pI(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(kc(s)||kc(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!kc(l.fill)&&kc(s)?(a=!0,r=I({},r),l=I({},l),l.fill=La(s)):!kc(l.stroke)&&kc(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=La(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Hc(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Uc(e,t,n){var r=ar(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Bc(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Wc(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Vc(this,e,t,n);if(e===`blur`)return Uc(this,e,n);if(e===`select`)return Hc(this,e,n)}return n}function Gc(e){e.stateProxy=Wc;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Wc),n&&(n.stateProxy=Wc)}function Kc(e,t){!el(e,t)&&!e.__highByOuter&&Rc(e,jc)}function qc(e,t){!el(e,t)&&!e.__highByOuter&&Rc(e,Mc)}function Jc(e,t){e.__highByOuter|=1<<(t||0),Rc(e,jc)}function Yc(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Rc(e,Mc)}function Xc(e){Rc(e,Nc)}function Zc(e){Rc(e,Pc)}function Qc(e){Rc(e,Fc)}function $c(e){Rc(e,Ic)}function el(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function tl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=mI(i),o=Oc(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Pc(e)}),s&&n.push(i)),a.isBlured=!1}),L(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function nl(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&Zc(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`||Nc(e)}),cr(t))a(e.getData(),t);else if(H(t))for(var u=fr(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),mI(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 rl(e,t,n){if(e!=null&&t!=null){var r=n.getModel().getComponent(e,t);if(r){mI(r).isBlured=!0;var i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Nc(e)})}}}function il(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=ec(i,t);a=(z(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=ZF(o);nl(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&nl(r,u,d,n)}}}function al(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(ZF(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function ol(e,t,n){var r=ZF(e),i=al(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&rl(r.componentMainType,r.componentIndex,n),L(a,function(e){return Kc(e,t)})):(nl(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&rl(r.componentMainType,r.componentIndex,n),Kc(e,t))}function sl(e,t,n){tl(n);var r=ZF(e),i=al(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?L(i,function(e){return qc(e,t)}):qc(e,t)}function cl(e,t,n){if(yl(t)){var r=t.dataType,i=ec(e.getData(r),t);z(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function ll(e){L(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?Qc(t):$c(t)})})}function ul(e){var t=[];return e.eachSeries(function(e){L(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 dl(e,t,n){gl(e,!0),Rc(e,Gc),ml(e,t,n)}function fl(e){gl(e,!1)}function pl(e,t,n,r){r?fl(e):dl(e,t,n)}function ml(e,t,n){var r=ZF(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}function hl(e,t,n,r){n||=`itemStyle`;for(var i=0;i<CI.length;i++){var a=CI[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[wI[n]]()}}function gl(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 _l(e){return!!(e&&e.__highDownDispatcher)}function vl(e){var t=fI[e];return t==null&&dI<=32&&(t=fI[e]=dI++),t}function yl(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function bl(e){var t=e.type;return t===`highlight`||t===`downplay`}function xl(e){var t=pI(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}function Sl(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=TI.M,d=TI.C,f=TI.L,p=TI.R,m=TI.A,h=TI.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=DI(t[0]*t[0]+t[1]*t[1]),y=DI(t[2]*t[2]+t[3]*t[3]),b=OI(-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++],bi(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],bi(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=EI[c];x[0]=n[o++],x[1]=n[o++],bi(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}function Cl(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function wl(e,t){return(e[0]*t[0]+e[1]*t[1])/(Cl(e)*Cl(t))}function Tl(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(wl(e,t))}function El(e,t,n,r,i,a,o,s,c,l,u){var d=MI/180*c,f=jI(d)*(e-n)/2+AI(d)*(t-r)/2,p=-1*AI(d)*(e-n)/2+jI(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=kI(m),s*=kI(m));var h=(i===a?-1:1)*kI((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+jI(d)*g-AI(d)*_,y=(t+r)/2+AI(d)*g+jI(d)*_,b=Tl([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Tl(x,S);if(wl(x,S)<=-1&&(C=MI),wl(x,S)>=1&&(C=0),C<0){var w=Math.round(C/MI*1e6)/1e6;C=MI*2+w%2*MI}u.addData(l,v,y,o,s,b,C,d,a)}function Dl(e){var t=new ZP;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ZP.CMD,c=e.match(NI);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(PI)||[],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,El(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,El(w,T,n,r,S,C,y,b,x,f,t)}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}function Ol(e){return e.setData!=null}function kl(e,t){var n=Dl(e),r=I({},t);return r.buildPath=function(e){var t=Ol(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Sl(n,e),this.dirtyShape()},r}function Al(e,t){return new FI(kl(e,t))}function jl(e,t){var n=kl(e,t);return function(e){P(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(FI)}function Ml(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 cF(t);return o.createPathProxy(),o.buildPath=function(e){if(Ol(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}function Nl(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<ZI))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Pl(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/JI(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)*JI(YI(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 Fl(e){var t;if(z(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 Il(e,t){var n,r=YI(t.r,0),i=YI(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=qI(c-s),p=f>HI&&f%HI;if(p>ZI&&(f=p),!(r>ZI))e.moveTo(l,u);else if(f>HI-ZI)e.moveTo(l+r*WI(s),u+r*UI(s)),e.arc(l,u,r,s,c,!d),i>ZI&&(e.moveTo(l+i*WI(c),u+i*UI(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*WI(s),j=r*UI(s),ee=i*WI(c),te=i*UI(c),ne=f>ZI;if(ne){var re=t.cornerRadius;re&&(n=Fl(re),m=n[0],h=n[1],g=n[2],_=n[3]);var ie=qI(r-i)/2;if(v=XI(ie,g),y=XI(ie,_),b=XI(ie,m),x=XI(ie,h),w=S=YI(v,y),T=C=YI(b,x),(S>ZI||C>ZI)&&(E=r*WI(c),D=r*UI(c),O=i*WI(s),k=i*UI(s),f<VI)){var ae=Nl(A,j,O,k,E,D,ee,te);if(ae){var oe=A-ae[0],se=j-ae[1],ce=E-ae[0],le=D-ae[1],ue=1/UI(GI((oe*ce+se*le)/(JI(oe*oe+se*se)*JI(ce*ce+le*le)))/2),de=JI(ae[0]*ae[0]+ae[1]*ae[1]);w=XI(S,(r-de)/(ue+1)),T=XI(C,(i-de)/(ue-1))}}}if(!ne)e.moveTo(l+A,u+j);else if(w>ZI){var fe=XI(g,w),pe=XI(_,w),me=Pl(O,k,A,j,r,fe,d),he=Pl(E,D,ee,te,r,pe,d);e.moveTo(l+me.cx+me.x0,u+me.cy+me.y0),w<S&&fe===pe?e.arc(l+me.cx,u+me.cy,w,KI(me.y0,me.x0),KI(he.y0,he.x0),!d):(fe>0&&e.arc(l+me.cx,u+me.cy,fe,KI(me.y0,me.x0),KI(me.y1,me.x1),!d),e.arc(l,u,r,KI(me.cy+me.y1,me.cx+me.x1),KI(he.cy+he.y1,he.cx+he.x1),!d),pe>0&&e.arc(l+he.cx,u+he.cy,pe,KI(he.y1,he.x1),KI(he.y0,he.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>ZI)||!ne)e.lineTo(l+ee,u+te);else if(T>ZI){var fe=XI(m,T),pe=XI(h,T),me=Pl(ee,te,E,D,i,-pe,d),he=Pl(A,j,O,k,i,-fe,d);e.lineTo(l+me.cx+me.x0,u+me.cy+me.y0),T<C&&fe===pe?e.arc(l+me.cx,u+me.cy,T,KI(me.y0,me.x0),KI(he.y0,he.x0),!d):(pe>0&&e.arc(l+me.cx,u+me.cy,pe,KI(me.y0,me.x0),KI(me.y1,me.x1),!d),e.arc(l,u,i,KI(me.cy+me.y1,me.cx+me.x1),KI(he.cy+he.y1,he.cx+he.x1),d),fe>0&&e.arc(l+he.cx,u+he.cy,fe,KI(he.y1,he.x1),KI(he.y0,he.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}function Ll(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++)xi(u,u,e[f]),Si(d,d,e[f]);xi(u,u,r[0]),Si(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(li(e[f]));continue}else c=e[f-1],l=e[f+1];fi(a,l,c),hi(a,a,t);var h=_i(m,c),g=_i(m,l),_=h+g;_!==0&&(h/=_,g/=_),hi(o,a,-h),hi(s,a,g);var v=di([],m,o),y=di([],m,s);r&&(Si(v,v,u),xi(v,v,d),Si(y,y,u),xi(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function Rl(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=Ll(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()}}function zl(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ra:na)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ra:na)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?ua:la)(e.x1,e.cpx1,e.x2,t),(n?ua:la)(e.y1,e.cpy1,e.y2,t)]}function Bl(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=U(r.duration,200),u=U(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)),B(d)&&(d=d(n,i)),B(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}return null}function Vl(e,t,n,r,i,a,o){var s=!1,c;B(i)?(o=a,a=i,i=null):H(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=Bl(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 Hl(e,t,n,r,i,a){Vl(`update`,e,t,n,r,i,a)}function Ul(e,t,n,r,i,a){Vl(`enter`,e,t,n,r,i,a)}function Wl(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 Gl(e,t,n,r,i,a){Wl(e)||Vl(`leave`,e,t,n,r,i,a)}function Kl(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),Gl(e,{style:{opacity:0}},t,n,r)}function ql(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||Kl(e,t,n,r)}):Kl(e,t,n,r)}function Jl(e){kL(e).oldStyle=e.style}function Yl(e){return cF.extend(e)}function Xl(e,t){return PL(e,t)}function Zl(e,t){jL[e]=t}function Ql(e){if(jL.hasOwnProperty(e))return jL[e]}function $l(e,t,n,r){var i=Al(e,t);return n&&(r===`center`&&(n=tu(n,i.getBoundingRect())),nu(i,n)),i}function eu(e,t,n){var r=new pF({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(tu(t,i))}}});return r}function tu(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}}function nu(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function ru(e,t){return qo(e,e,{lineWidth:t}),e}function iu(e,t){return Jo(e,e,t),e}function au(e,t){for(var n=ei([]);e&&e!==t;)ni(n,e.getLocalTransform(),n),e=e.parent;return n}function ou(e,t,n){return t&&!cr(t)&&(t=CN.getLocalTransform(t)),n&&(t=oi([],t)),bi([],e,t)}function su(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:AF(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:AF(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=ou(a,t,n),AF(a[0])>AF(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function cu(e){return!e.isGroup}function lu(e){return e.shape!=null}function uu(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){cu(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return lu(e)&&(t.shape=F(e.shape)),t}var a=r(e);t.traverse(function(e){if(cu(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Hl(e,r,n,ZF(e).dataIndex)}}})}function du(e,t){return R(e,function(e){var n=e[0];n=kF(n,t.x),n=OF(n,t.x+t.width);var r=e[1];return r=kF(r,t.y),r=OF(r,t.y+t.height),[n,r]})}function fu(e,t){var n=kF(e.x,t.x),r=OF(e.x+e.width,t.x+t.width),i=kF(e.y,t.y),a=OF(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 pu(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),ir(i,n),new pF(r)):$l(e.replace(`path://`,``),r,n,`center`)}function mu(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(hu(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function hu(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=gu(u,d,c,l);if(_u(f))return!1;var p=e-i,m=t-a,h=gu(p,m,c,l)/f;if(h<0||h>1)return!1;var g=gu(p,m,u,d)/f;return!(g<0||g>1)}function gu(e,t,n,r){return e*r-n*t}function _u(e){return e<=1e-6&&e>=-1e-6}function vu(e,t,n,r,i){return t==null||(gr(t)?LL[0]=LL[1]=LL[2]=LL[3]=t:(LL[0]=t[0],LL[1]=t[1],LL[2]=t[2],LL[3]=t[3]),r&&(LL[0]=kF(0,LL[0]),LL[1]=kF(0,LL[1]),LL[2]=kF(0,LL[2]),LL[3]=kF(0,LL[3])),n&&(LL[0]=-LL[0],LL[1]=-LL[1],LL[2]=-LL[2],LL[3]=-LL[3]),yu(e,LL,`x`,`width`,3,1,i&&i[0]||0),yu(e,LL,`y`,`height`,0,2,i&&i[1]||0)),e}function yu(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=kF(0,OF(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:AF(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function bu(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(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&&L(fr(c),function(e){Fr(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=ZF(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:ir({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function xu(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Su(e,t){if(e){if(z(e))for(var n=0;n<e.length;n++)xu(e[n],t);else xu(e,t)}}function Cu(e){return!e||AF(e[1])<RL&&AF(e[2])<RL||AF(e[0])<RL&&AF(e[3])<RL}function wu(e,t){return e?Y.copy(e,t):t.clone()}function Tu(e,t){return t?ti(e||$r(),t):void 0}function Eu(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Du(e){var t=-1/0,n=1/0;xu(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(e&&!e.isGroup){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function Ou(e,t,n){ku(e,t,n,-1/0)}function ku(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=kF(ku(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=kF(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function Au(e){return e.animation={duration:0},e}function ju(e,t){return t?ti(zL.transform,t):ei(zL.transform),zL.decomposeTransform(),$i(e,zL),e}function Mu(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}function Nu(e,t){for(var n=0;n<hI.length;n++){var r=hI[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 Pu(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??=B(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<hI.length;l++){var u=hI[l],d=t[u];c[u]=U(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function Fu(e,t,n,r){n||=BL;for(var i=e instanceof SF,a=!1,o=0;o<gI.length;o++){var s=t[gI[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new SF,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=Pu(n,t),u=t.normal,d=!!u.getShallow(`show`),f=Lu(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(Ru(u,n,!1));for(var o=0;o<hI.length;o++){var p=hI[o],s=t[p];if(s){var m=c.ensureState(p),h=!!U(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=Lu(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=Ru(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&&(WL(c).setLabelText=function(e){var r=Pu(n,t,e);Nu(c,r)})}else c&&(c.ignore=!0);e.dirty()}function Iu(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<hI.length;r++){var i=hI[r];n[i]=e.getModel([i,t])}return n}function Lu(e,t,n,r,i){var a={};return zu(a,e,n,r,i),t&&I(a,t),a}function Ru(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=U(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function zu(e,t,n,r,i){n||=BL;var a=t.ecModel,o=a&&a.option.textStyle,s=Bu(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=U(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);Vu(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=gr(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=GL.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=Er(_),h.__marginType=GL.textMargin)}Vu(e,t,o,null,null,n,r,i,!0,!1)}function Bu(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||BL).rich;if(n){t||={};for(var r=fr(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}function Vu(e,t,n,r,i,a,o,s,c,l){n=!o&&n||BL;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=U(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=U(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=U(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=U(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(var _=0;_<VL.length;_++){var v=VL[_],y=i!==!1&&r?wr(t.getShallow(v),r.getShallow(v),n[v]):U(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<HL.length;_++){var v=HL[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<UL.length;_++){var v=UL[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function Hu(e,t){var n=t&&t.getModel(`textStyle`);return Or([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(` `))}function Uu(e,t,n,r){if(e){var i=WL(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)}}function Wu(e,t,n,r,i){var a=WL(e);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=U(a.interpolatedValue,a.prevValue),c=a.value;function l(r){var l=uc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,Nu(e,Pu({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?Ul:Hl)(e,{percent:1},r,t,null,l)}function Gu(e){return e==null?0:e.length||1}function Ku(e){return e}function qu(e){aR(e).datasetMap=W()}function Ju(e,t,n){var r={},i=Xu(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=aR(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),L(e,function(t,n){var i=H(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});L(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 Yu(e,t,n){var r={};if(!Xu(e))return r;var i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&L(a,function(e,t){(H(e)?e.name:e)===`name`&&(o=t)});var s=function(){for(var e={},r={},s=[],c=0,l=Math.min(5,n);c<l;c++){var u=$u(t.data,i,t.seriesLayoutBy,a,t.startIndex,c);s.push(u);var d=u===iR.Not;if(d&&e.v==null&&c!==o&&(e.v=c),(e.n==null||e.n===e.v||!d&&s[e.n]===iR.Not)&&(e.n=c),f(e)&&s[e.n]!==iR.Not)return e;d||(u===iR.Might&&r.v==null&&c!==o&&(r.v=c),(r.n==null||r.n===r.v)&&(r.n=c))}function f(e){return e.v!=null&&e.n!=null}return f(e)?e:f(r)?r:null}();if(s){r.value=[s.v];var c=o??s.n;r.itemName=[c],r.seriesName=[c]}return r}function Xu(e){if(!e.get(`data`,!0))return ic(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},JF).models[0]}function Zu(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:ic(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},JF).models}function Qu(e,t){return $u(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function $u(e,t,n,r,i,a){var o,s=5;if(vr(e))return iR.Not;var c,l;if(r){var u=r[a];H(u)?(c=u.name,l=u.type):V(u)&&(c=u)}if(l!=null)return l===`ordinal`?iR.Must:iR.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return iR.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return iR.Not;var f=_[c];if(!f||vr(f))return iR.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=Rs(g);if(!z(y))return iR.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=V(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?iR.Might:iR.Not;if(t&&e!==`-`)return iR.Must}return iR.Not}function ed(e){return e instanceof oR}function td(e,t,n){n||=id(e);var r=t.seriesLayoutBy,i=ad(e,n,r,t.sourceHeader,t.dimensions);return new oR({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:F(t)})}function nd(e){return new oR({data:e,sourceFormat:vr(e)?aI:tI})}function rd(e){return new oR({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:F(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function id(e){var t=oI;if(vr(e))t=aI;else if(z(e)){e.length===0&&(t=nI);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(z(i)||vr(i)){t=nI;break}if(H(i)){t=rI;break}}}}else if(H(e)){for(var a in e)if(Fr(e,a)&&cr(e[a])){t=iI;break}}return t}function ad(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:sd(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?cd(function(e){e!=null&&e!==`-`&&(V(e)?o??=1:o=0)},n,s,10):o=gr(r)?r:+!!r,!i&&o===1&&(i=[],cd(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=od(e);else if(t===`keyedColumns`)i||(i=[],L(e,function(e,t){i.push(t)}));else if(t===`original`){var c=Rs(e[0]);a=z(c)&&c.length||1}return{startIndex:o,dimensionsDefine:sd(i),dimensionsDetectedCount:a}}function od(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return fr(n)}function sd(e){if(e){var t=W();return R(e,function(e,n){e=H(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function cd(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function ld(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}function ud(e,t){return gR[pd(e,t)]}function dd(e,t){return vR[pd(e,t)]}function fd(e){return bR[e]}function pd(e,t){return e===`arrayRows`?e+`_`+t:e}function md(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 fd(a)(r,o,s)}var c=r;return a===`original`&&(c=Rs(r)),c}}}function hd(e,t){var n={},r=n.encode={},i=W(),a=[],o=[],s={};L(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;gd(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),vd(n.type)&&(a[0]=t),gd(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}eI.each(function(e,t){var i=gd(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=R(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 xR(s,t),n}function gd(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function _d(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function vd(e){return e!==`ordinal`&&e!==`time`}function yd(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!gr(e)&&e!=null&&e!==`-`&&(e=+xs(e)),e==null||e===``?NaN:Number(e))}function bd(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function xd(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}function Sd(e){return e>65535?TR:ER}function Cd(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function wd(e,t,n,r,i){var a=kR[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)}function Td(e){return e instanceof PR}function Ed(e){for(var t=W(),n=0;n<(e||[]).length;n++){var r=e[n],i=H(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Dd(e){var t=MR(e);return t.dimNameMap||=Ed(e.dimensionsDefine)}function Od(e){return e>30}function kd(e,t){ed(e)||(e=nd(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=W(),a=[],o=Ad(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Od(o),c=r===e.dimensionsDefine,l=c?Dd(e):Ed(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=W(u),f=new DR(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=H(n)?n:{name:n},o=new SR,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=Is(e).slice();if(n.length===1&&!V(n[0])&&n[0]<0)d.set(t,!1);else{var r=d.set(t,[]);L(n,function(e,n){var i=V(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})}});var h=0;L(n,function(e){var t,n,r,i;if(V(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=I({},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=Is(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++)}L(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(ir(o,i),t,a),o.name==null&&n){var s=n[a];!H(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&ir(o.otherDims,r)})}});function g(e,t,n){eI.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)L(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=jd(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Qu(e,S)===iR.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return xc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new PR({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Ad(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return L(t,function(e){var t;H(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function jd(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}function Md(e){return!!XR[e]}function Nd(e){$R.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}function Pd(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=$R.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function Fd(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!Md(n)&&(i=0))}return{coordSysType:n,kind:i}}function Id(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=Fd(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}function Ld(e){var t=e.get(`coordinateSystem`),n=new tz(t),r=nz[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}function Rd(e){return e.get(`type`)===`category`}function zd(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;Bd(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(L(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),L(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),u||!m(e)||p&&(e.coordDim===`x`||e.coordDim===`angle`)||i&&i!==e.coordDim||(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;L(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function Bd(e){return!Td(e.schema)}function Vd(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function Hd(e,t){return Vd(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function Ud(e,t){var n=e.get(`coordinateSystem`),r=QR.get(n),i;return t&&t.coordSysDims&&(i=R(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=_d(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function Wd(e,t,n){var r,i;return n&&L(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function Gd(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=nd(e)):(i=r.getSource(),a=i.sourceFormat===tI);var o=Ld(t),s=Ud(t,o),c=n.useEncodeDefaulter,l=B(c)?c:c?mr(Ju,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=kd(i,u),f=Wd(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=zd(t,{schema:d,store:p}),h=new YR(d,t);h.setCalculationInfo(m);var g=f!=null&&Kd(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 Kd(e){if(e.sourceFormat===`original`)return!z(Rs(qd(e.data||[])))}function qd(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}function Jd(e){return[e||``,rz++].join(`_`)}function Yd(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=Rr(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=Rr(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Xd(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(L(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]),L(u.successor,d?p:f)}L(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return L(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),L(c,function(e){ar(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);ar(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 L(e,function(e){ar(t,e)>=0&&n.push(e)}),n}}function Zd(e,t){return nr(nr({},e,!0),t,!0)}function Qd(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)/iz);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]*Qd(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function $d(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=Qd(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)*Qd(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}}function ef(e,t,n,r,i){return nf(oz,t,r,i,!0)&&nf(e,n,oz[0],oz[1])}function tf(e,t){e&&n(e),t&&n(t);function n(e){var t=e[az];t&&(t.clearMarkers&&t.clearMarkers(),delete e[az])}}function nf(e,t,n,r,i){if(t.getBoundingClientRect&&EM.domSupported&&!of(t)){var a=t[az]||(t[az]={}),o=af(rf(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function rf(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function af(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?$d(s,o):$d(o,s))}function of(e){return e.nodeName.toUpperCase()===`CANVAS`}function sf(e){return e==null?``:(e+``).replace(sz,function(e,t){return cz[t]})}function cf(e,t){e=e.toUpperCase(),hz[e]=new nR(t),mz[e]=t}function lf(e){if(V(e)){var t=mz[e.toUpperCase()]||{};return e===dz||e===fz?F(t):nr(F(t),F(mz[pz]),!1)}return nr(F(e),F(mz[pz]),!1)}function uf(e){return hz[e]}function df(){return hz[pz]}function ff(e){_z||=e}function pf(){return _z}function mf(e,t){var n=pf(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function hf(e){var t=e.brk;return t?t.breaks:[]}function gf(e){var t=e.brk;return t?t.hasBreaks():!1}function _f(e){return!V(e)&&!B(e)?vf(e):e}function vf(e){e||={};var t={},n=!0;return L(Oz,function(t){n&&=e[t]==null}),L(Oz,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Oz[s],l=H(a)&&!z(a)?a[c]:a,u=void 0;z(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=wz[r]:Cz[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function yf(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function bf(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 xf(e){return e===bf(e)}function Sf(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Cf(e,t,n,r){var i=xs(e),a=i[Df(n)](),o=i[Of(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[kf(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Af(n)](),d=(u-1)%12+1,f=i[jf(n)](),p=i[Mf(n)](),m=i[Nf(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof nR?r:uf(r||gz)||df()).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,yf(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,yf(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,yf(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,yf(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,yf(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,yf(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,yf(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,yf(m,3)).replace(/{S}/g,m+``)}function wf(e,t,n,r,i){var a=null;if(V(n))a=n;else if(B(n)){var o={time:e.time,level:e.time?e.time.level:0},s=pf();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Tf(e.value,i);a=n[u][u][0]}}return Cf(new Date(e.value),a,i,r)}function Tf(e,t){var n=xs(e),r=n[Of(t)]()+1,i=n[kf(t)](),a=n[Af(t)](),o=n[jf(t)](),s=n[Mf(t)](),c=n[Nf(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 Ef(e,t,n){switch(t){case`year`:e[Ff(n)](0);case`month`:e[If(n)](1);case`day`:e[Lf(n)](0);case`hour`:e[Rf(n)](0);case`minute`:e[zf(n)](0);case`second`:e[Bf(n)](0)}return e}function Df(e){return e?`getUTCFullYear`:`getFullYear`}function Of(e){return e?`getUTCMonth`:`getMonth`}function kf(e){return e?`getUTCDate`:`getDate`}function Af(e){return e?`getUTCHours`:`getHours`}function jf(e){return e?`getUTCMinutes`:`getMinutes`}function Mf(e){return e?`getUTCSeconds`:`getSeconds`}function Nf(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Pf(e){return e?`setUTCFullYear`:`setFullYear`}function Ff(e){return e?`setUTCMonth`:`setMonth`}function If(e){return e?`setUTCDate`:`setDate`}function Lf(e){return e?`setUTCHours`:`setHours`}function Rf(e){return e?`setUTCMinutes`:`setMinutes`}function zf(e){return e?`setUTCSeconds`:`setSeconds`}function Bf(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Vf(e){if(!Ds(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Hf(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}function Uf(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Or(e)?e:`-`}function a(e){return js(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?xs(e):e;if(!isNaN(+c))return Cf(c,r,n);if(s)return`-`}if(t===`ordinal`)return hr(e)?i(e):gr(e)&&a(e)?e+``:`-`;var l=Es(e);return a(l)?Vf(l):hr(e)?i(e):typeof e==`boolean`?e+``:`-`}function Wf(e,t,n){z(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=jz[a];e=e.replace(Mz(o),Mz(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(Mz(jz[c],s),n?sf(l):l)}return e}function Gf(e,t,n){return L(t,function(t,r){e=e.replace(`{`+r+`}`,n?sf(t):t)}),e}function Kf(e,t){var n=V(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:`+sf(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+sf(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 qf(e,t){return t||=`transparent`,V(e)?e:H(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Jf(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}function Yf(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}function Xf(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Zf(e,t){var n=ep(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===Lz.point)a=n.refPoint,i=$f(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=z(o)?o:[o,o];i=$f(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[X(s[0],i.width)+i.x,X(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function Qf(e,t){var n=Zf(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);z(a)||(a=[0,a]);var o=X(r.width,t.getWidth()),s=X(r.height,t.getHeight()),c=Math.min(o,s),l=X(a[0],c/2),u=X(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function $f(e,t,n){n=Az(n||0);var r=t.width,i=t.height,a=X(e.left,r),o=X(e.top,i),s=X(e.right,r),c=X(e.bottom,i),l=X(e.width,r),u=X(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Y((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function ep(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=Pd(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Lz.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Lz.point,s=u,i=o.dataToPoint(l))}return a??=Lz.rect,a===Lz.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function tp(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new Y(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=$f(ir({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function np(e,t){return e[Fz[t][0]]!=null||e[Fz[t][1]]!=null&&e[Fz[t][2]]!=null}function rp(e){var t=e.layoutMode||e.constructor.layoutMode;return H(t)?t:t?{type:t}:null}function ip(e,t,n){var r=n&&n.ignoreSize;!z(r)&&(r=[r,r]);var i=o(Fz[0],0),a=o(Fz[1],1);c(Fz[0],e,i),c(Fz[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Nz(n,function(t){c[t]=e[t]}),Nz(n,function(e){Fr(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!Fr(a,f)&&Fr(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){Nz(e,function(e){t[e]=n[e]})}}function ap(e){return op({},e)}function op(e,t){return t&&e&&Nz(Pz,function(n){Fr(t,n)&&(e[n]=t[n])}),e}function sp(e){var t=[];return L(zz.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=R(t,function(e){return Rr(e).main}),e!==`dataset`&&ar(t,`dataset`)<=0&&t.unshift(`dataset`),t}function cp(e,t,n,r){return up(e,Vz,Is(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function lp(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 up(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:lp(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function dp(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}function fp(e){var t,n;return H(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function pp(e){return new Gz(e)}function mp(e,t){var n=new qz,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&Ps(``);var o=[],s={},c=e.dimensionsDefine;if(c)L(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Fr(s,n)&&Ps(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=ud(i,sI);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=q(hp,null,e)),n.cloneRawData=q(gp,null,e),n.count=q(dd(i,sI),null,r,a,o);var d=fd(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=q(_p,null,o,s),n.cloneAllDimensionInfo=q(vp,null,o),n}function hp(e){var t=e.sourceFormat;return Sp(t)||Ps(``),e.data}function gp(e){var t=e.sourceFormat,n=e.data;if(Sp(t)||Ps(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(I({},n[i]));return r}}function _p(e,t,n){if(n!=null){if(gr(n)||!isNaN(n)&&!Fr(t,n))return e[n];if(Fr(t,n))return t[n]}}function vp(e){return F(e)}function yp(e){e=F(e);var t=e.type,n=``;t||Ps(n);var r=t.split(`:`);r.length!==2&&Ps(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,Jz.set(t,e)}function bp(e,t,n){var r=Is(e),i=r.length;i||Ps(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=xp(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function xp(e,t,n,r){var i=``;t.length||Ps(i),H(e)||Ps(i);var a=e.type,o=Jz.get(a);o||Ps(i);var s=R(t,function(e){return mp(e,o)});return R(Is(o.transform({upstream:s[0],upstreamList:s,config:F(e.config)})),function(e,n){var r=``;H(e)||Ps(r),e.data||Ps(r),Sp(id(e.data))||Ps(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:sI,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:sI,sourceHeader:0,dimensions:e.dimensions};return td(e.data,i,null)})}function Sp(e){return e===`arrayRows`||e===`objectRows`}function Cp(e){return e.mainType===`series`}function wp(e){throw Error(e)}function Tp(e){var t=e.lineHeight;return t==null?Qz:`line-height:`+sf(t+``)+`px`}function Ep(e,t){var n=e.color||Z.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Z.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:`+sf(r+``)+`px;color:`+sf(n)+`;font-weight:`+sf(i+``),valueStyle:`font-size:`+sf(o+``)+`px;color:`+sf(a)+`;font-weight:`+sf(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}function Dp(e,t){return t.type=e,t}function Op(e){return e.type===`section`}function kp(e){return Op(e)?jp:Mp}function Ap(e){if(Op(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=Ap(e);n>=t&&(t=n+ +(r&&(!n||Op(e)&&!e.noHeader)))}),t}return 0}function jp(e,t,n,r){var i=t.noHeader,a=Pp(Ap(t)),o=[],s=t.blocks||[];Dr(!s||z(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Fr(l,c)){var u=new wR(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=kp(n)(s?I(I({},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):Fp(r,o.join(``),i?n:a.html);if(i)return d;var f=Uf(t.header,`ordinal`,e.useUTC),p=Ep(r,e.renderMode).nameStyle,m=Tp(r);return e.renderMode===`richText`?Rp(e,f,p)+a.richText+d:Fp(r,`<div style="`+p+`;`+m+`;">`+sf(f)+`</div>`+d,n)}function Mp(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=z(e)?e:[e],R(e,function(e,t){return Uf(e,z(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:Uf(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=Ep(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:Rp(e,f,v))+(o?``:zp(e,m,h,g,y)):Fp(r,(s?``:d)+(a?``:Ip(f,!s,v))+(o?``:Lp(m,h,g,y)),n)}}function Np(e,t,n,r,i,a){if(e)return kp(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Pp(e){return{html:$z[e],richText:eB[e]}}function Fp(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=Tp(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function Ip(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+sf(e)+`</span>`}function Lp(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=z(e)?e:[e],`<span style="`+i+`;`+r+`">`+R(e,function(e){return sf(e)}).join(`&nbsp;&nbsp;`)+`</span>`}function Rp(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function zp(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(z(t)?t.join(` `):t,a)}function Bp(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return qf(n)}function Vp(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}function Hp(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=z(s),l=Bp(t,n),u,d,f,p;if(o>1||c&&!o){var m=Up(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=md(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Xs(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Dp(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Dp(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Or(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Up(e,t,n,r,i){var a=t.getData(),o=lr(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(md(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(Dp(`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}}function Wp(e,t){return e.getName(t)||e.getId(t)}function Gp(e){var t=e.name;Xs(e)||(e.name=Kp(e)||t)}function Kp(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function qp(e){return e.model.getRawData().count()}function Jp(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Yp}function Yp(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Xp(e,t){L(Mr(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,mr(Zp,t))})}function Zp(e,t){var n=Qp(e);return n&&n.setOutputEnd((t||this).count()),t}function Qp(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}}function $p(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Z.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function em(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?eu(e.slice(8),new Y(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?$l(e.slice(7),{},new Y(t,n,r,i),o?`center`:`cover`):new cB({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=$p,a&&c.setColor(a),c}function tm(e){return z(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function nm(e,t){if(e!=null)return z(e)||(e=[e,e]),[X(e[0],t[0])||0,X(U(e[1],e[0]),t[1])||0]}function rm(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=md(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o<n.length;o++)a.push(md(e,t,n[o]));return a.join(` `)}}function im(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!z(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(` `)}function am(e,t){this.parent.drift(e,t)}function om(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function sm(e){return e!=null&&!H(e)&&(e={isIgnore:e}),e||{}}function cm(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:Iu(t),cursorStyle:t.get(`cursor`)}}function lm(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}function um(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=dm(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=R(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return Vd(t,d[0])&&(f=!0,d[0]=p),Vd(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 dm(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:gr(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function fm(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function pm(e,t){return!isFinite(e)||!isFinite(t)}function mm(e){return hm({ctor:fB},e).arr}function hm(e,t){var n=e.arr,r=e.ctor;if(t>zF&&(t=zF),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function gm(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 _m(e,t,n,r,i,a,o,s){for(var c=gm(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=um(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=fm(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 ee=l.length,te=mm(ee),ne=mm(ee),re=mm(ee),ie=mm(ee),ae=[],y=0;y<m.length;y++){var oe=m[y],se=y*2,ce=oe*2;te[se]=l[ce],te[se+1]=l[ce+1],ne[se]=u[ce],ne[se+1]=u[ce+1],re[se]=d[ce],re[se+1]=d[ce+1],ie[se]=f[ce],ie[se+1]=f[ce+1],ae[y]=p[oe]}return{current:te,next:ne,stackedOnCurrent:re,stackedOnNext:ie,status:ae}}function vm(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(pm(_,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(;pm(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||pm(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,te=C-v,ne=void 0,re=void 0;if(s===`x`){ne=Math.abs(A),re=Math.abs(j);var ie=E>0?1:-1;p=_-ie*ne*o,m=v,O=_+ie*re*o,k=v}else if(s===`y`){ne=Math.abs(ee),re=Math.abs(te);var ae=D>0?1:-1;p=_,m=v-ae*ne*o,O=_,k=v+ae*re*o}else ne=Math.sqrt(A*A+ee*ee),re=Math.sqrt(j*j+te*te),T=re/(re+ne),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=mB(O,hB(S,_)),k=mB(k,hB(C,v)),O=hB(O,mB(S,_)),k=hB(k,mB(C,v)),E=O-_,D=k-v,p=_-E*ne/re,m=v-D*ne/re,p=mB(p,hB(l,_)),m=mB(m,hB(u,v)),p=hB(p,mB(l,_)),m=hB(m,mB(u,v)),E=_-p,D=v-m,O=_+E*re/ne,k=v+D*re/ne}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}function ym(){var e=tc();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`}}function bm(e,t,n){e&&_l(e)&&(t===`emphasis`?Jc:Yc)(e,n)}function xm(e,t,n){var r=ec(e,t),i=t&&t.highlightKey!=null?vl(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){bm(e,n,i)}):L(Is(r),function(t){bm(e.getItemGraphicEl(t),n,i)})}function Sm(e){return xB(e.model)}function Cm(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&bB(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),CB[c]}function wm(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 _F({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=B(i)?function(e){i(e,d)}:null;Ul(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function Tm(e,t,n){var r=e.getArea(),i=fs(r.r0,1),a=fs(r.r,1),o=new $I({shape:{cx:fs(e.cx,1),cy:fs(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,Ul(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function Em(e,t,n,r,i){return e?e.type===`polar`?Tm(e,t,n):e.type===`cartesian2d`?wm(e,t,n,r,i):null:null}function Dm(e){var t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function Om(e,t){return e.type===t}function km(e){var t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}function Am(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||Fr(e,`text`)))}function jm(e,t,n){var r=e,i,a,o;if(t===`text`)o=r;else{o={},Fr(r,`text`)&&(o.text=r.text),Fr(r,`rich`)&&(o.rich=r.rich),Fr(r,`textFill`)&&(o.fill=r.textFill),Fr(r,`textStroke`)&&(o.stroke=r.textStroke),Fr(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),Fr(r,`fontSize`)&&(o.fontSize=r.fontSize),Fr(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),Fr(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};var s=Fr(r,`textPosition`);n?i.position=s?r.textPosition:`inside`:s&&(i.position=r.textPosition),Fr(r,`textPosition`)&&(i.position=r.textPosition),Fr(r,`textOffset`)&&(i.offset=r.textOffset),Fr(r,`textRotation`)&&(i.rotation=r.textRotation),Fr(r,`textDistance`)&&(i.distance=r.textDistance)}return Mm(o,e),L(o.rich,function(e){Mm(e,e)}),{textConfig:i,textContent:a}}function Mm(e,t){t&&(t.font=t.textFont||t.font,Fr(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),Fr(t,`textAlign`)&&(e.align=t.textAlign),Fr(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),Fr(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),Fr(t,`textWidth`)&&(e.width=t.textWidth),Fr(t,`textHeight`)&&(e.height=t.textHeight),Fr(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),Fr(t,`textPadding`)&&(e.padding=t.textPadding),Fr(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),Fr(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),Fr(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),Fr(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),Fr(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),Fr(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),Fr(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function Nm(e){return H(e)&&e.value!=null?e.value:e+``}function Pm(e,t,n){var r;e||={};var i=pf();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(L(DB,function(t){a[t]&&(e[t]=q(a[t],a))}),r=a)}return r??Vm(e,n),{brk:r,mapper:e}}function Fm(e,t){L(DB,function(n){e[n]=t[n]})}function Im(e,t){e.freeze=Ir}function Lm(e){return e.getExtentUnsafe(0,2)}function Rm(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function zm(e){var t=Rm(e,3);return t[1]-t[0]}function Bm(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function Vm(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():dc(),I(n,OB),n}function Hm(e,t,n,r){_c(n,r)&&(e[t][0]=n,e[t][1]=r)}function Um(e){return Wm(e)||Km(e)}function Wm(e){return e.type===`interval`}function Gm(e){return e.type===`time`}function Km(e){return e.type===`log`}function qm(e){return e.type===`ordinal`}function Jm(e){var t=Cs(e),n=PF(10,t),r=jF(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,fs(r*n,-t)}function Ym(e){return ms(e)+2}function Xm(e,t){return FF(e)/FF(t)}function Zm(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return PF(t,e)}function Qm(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=AF(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return gc(r[0])&&gc(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function $m(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function eh(e,t){return e||=t,jF(kF(e,1))}function th(e,t,n){var r=Lm(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}function nh(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=Ym(f);u<t-1;){var m=fs(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=pf();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}function rh(e,t,n,r){return Ef(new Date(t),e,r).getTime()===Ef(new Date(n),e,r).getTime()}function ih(e,t){return e/=xz,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ah(e){var t=30*xz;return e/=t,e>6?6:e>3?3:e>2?2:1}function oh(e){return e/=bz,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function sh(e,t){return e/=t?yz:vz,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function ch(e){return kF(ws(e,!0),1)}function lh(e,t,n){var r=Math.max(0,ar(Oz,t)-1);return Ef(new Date(e),Oz[r],n).getTime()}function uh(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function dh(e,t,n,r,i,a){var o=kz,s=0;function c(e,t,n,i,o,c,l){for(var u=uh(o,e),d=t,f=new Date(d);d<n&&d<=r[1]&&(l.push({value:d}),!(s++>3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!rh(bf(e),r[0],r[1],n)){s&&(i=[{value:lh(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/xz/365)),p=Df(n),m=Pf(n);break;case`half-year`:case`quarter`:case`month`:f=ah(t),p=Of(n),m=Ff(n);break;case`week`:case`half-week`:case`day`:f=ih(t,31),p=kf(n),m=If(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=oh(t),p=Af(n),m=Lf(n);break;case`minute`:f=sh(t,!0),p=jf(n),m=Rf(n);break;case`second`:f=sh(t,!1),p=Mf(n),m=zf(n);break;case`millisecond`:f=ch(t),p=Nf(n),m=Bf(n)}d>=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l<o.length;l++)a.push(o[l])}}for(var u=[],d=[],f=0,p=0,m=0;m<o.length;++m){var h=bf(o[m]);if(xf(o[m])&&(l(o[m],u[u.length-1]||[],d),h!==(o[m+1]?bf(o[m+1]):null))){if(d.length){p=f,d.sort(function(e,t){return e.value-t.value});for(var g=[],_=0;_<d.length;++_){var v=d[_].value;(_===0||d[_-1].value!==v)&&(g.push(d[_]),v>=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ur(R(u,function(e){return ur(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;m<b.length;++m)for(var C=b[m],w=0;w<C.length;++w){var T=Tf(C[w].value,n);S.push({value:C[w].value,time:{level:x-m,upperTimeUnit:T,lowerTimeUnit:T}})}xc(S,Sc,null),S.sort(function(e,t){return e.value-t.value});var E=S[0],D=S[S.length-1],O=Tf(r[0],n),k=Tf(r[1],n);return(!E||E.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),S}function fh(e){var t=e.get(`type`);return(t==null||!Fr(HB,t)&&!wB.getClass(t))&&(t=`value`),t}function ph(e,t,n){var r=pf(),i;switch(r&&(i=wh(e,t,n)),t){case`category`:return new kB({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:dc()});case`time`:return new MB({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new RB({logBase:e.get(`logBase`),breakOption:i});case`value`:return new AB({breakOption:i});default:return new((wB.getClass(t))||AB)({})}}function mh(e,t,n){var r=n?Rm(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return _c(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function hh(e){UB(e).noOnMyZero=!0}function gh(e){return UB(e).noOnMyZero}function _h(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=_f(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(B(t)){if(e.type===`category`)return function(n,r){return t(vh(e,n),n.value-e.scale.getExtent()[0],null)};var r=pf();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(vh(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function vh(e,t){var n=e.scale;return qm(n)?n.getLabel(t):t.value}function yh(e){return e.get(`interval`)??`auto`}function bh(e){return e.type===`category`&&yh(e.getLabelModel())===0}function xh(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[Hd(e,t)]=!0}),fr(n)}function Sh(e){return e===`middle`||e===`center`}function Ch(e){return e.getShallow(`show`)}function wh(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!pf()||!n||!Th(t)?void 0:r}function Th(e){return e!==`category`}function Eh(e,t,n,r,i,a){var o=Km(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=$m(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Dh(e,t){return qm(e)?e.getRawOrdinalNumber(t.value):t.value}function Oh(e,t){return qm(e)&&!!t.get(`boundaryGap`)}function kh(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Ah(e){for(var t=dc(),n=dc(),r=0;r<e.length;){var i=e[r++],a=e[r++];pm(i,a)||(fc(t,i),fc(n,a))}return[t,n]}function jh(e,t){var n=Ah(e),r=n[0],i=n[1],a=Ah(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function Mh(e){return gr(e)?e:e?.5:0}function Nh(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=mm(r*2),a=0;a<r;a++){var o=fm(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Ph(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;pm(p[c],p[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function Fh(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:Ma((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Ih(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=R(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=Fh(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`;L(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 gL(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Lh(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Rh(a,t))){var o=t.mapDimension(a.dim),s={};return L(a.getViewLabels(),function(e){e.tick.offInterval||(s[Dh(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Rh(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(uB.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function zh(e){for(var t=e.length/2;t>0&&pm(e[t*2-2],e[t*2-1]);t--);return t-1}function Bh(e,t){return[e[t*2],e[t*2+1]]}function Vh(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],!pm(o,e[l*2+1-i])){if(l===0)a=o;else{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 Hh(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<hI.length;t++)if(e.get([hI[t],`endLabel`,`show`]))return!0;return!1}function Uh(e,t,n,r){if(Om(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Hh(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=wm(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return Tm(t,n,r)}function Wh(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}}}function Gh(e,t){return{seriesType:e,plan:ym(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=R(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);Vd(n,o[0])&&(o[0]=c),Vd(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&&mm(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}function Kh(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;V(i)?p=GB[i]:B(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,KB))}}}}}function qh(e){e.registerChartView(WB),e.registerSeriesModel(lB),e.registerLayout(Gh(`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,Kh(`line`))}function Jh(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function Yh(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:R(Zh(n,r),function(t,n){return{formattedLabel:_h(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?Qh(e,t):tg(e)}function Xh(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:Zh(i,r)}:e.type===`category`?eg(e,t):{ticks:r.getTicks(n)}}function Zh(e,t){var n=t.getExtent(),r=[];return L(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),xc(r,Cc,null),ps(r),R(r,function(e){return{value:e}})}function Qh(e,t){var n=e.getLabelModel(),r=$h(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function $h(e,t,n){var r=ZB(e),i=yh(t),a=n.kind===YB.estimate;if(!a){var o=rg(r,i);if(o)return o}var s,c;B(i)?s=ug(e,i,!1):(c=i===`auto`?ag(e,n):i,s=ug(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return ig(r,i,l),!0}):ig(r,i,l),l}function eg(e,t){var n=XB(e),r=yh(t),i=rg(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),B(r))a=ug(e,r,!0);else if(r===`auto`){var s=$h(e,e.getLabelModel(),Jh(YB.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tick})}else o=r,a=ug(e,o,!0);return ig(n,r,{ticks:a,tickCategoryInterval:o})}function tg(e){var t=e.scale.getTicks(),n=_h(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}function ng(e){return function(t){return JB(t)[e]||(JB(t)[e]={list:[]})}}function rg(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function ig(e,t,n){return e.list.push({key:t,value:n}),n}function ag(e,t){if(t.kind===YB.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return JB(e).autoInterval=n,!0}),n}return JB(e).autoInterval??(JB(e).autoInterval=e.calculateCategoryInterval(t))}function og(e,t){var n=t.kind,r=lg(e),i=_h(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Ai(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===YB.estimate?(t.out.noPxChangeTryDetermine.push(q(sg,null,e,S,c)),S):cg(e,S,c)??S}function sg(e,t,n){return cg(e,t,n)==null}function cg(e,t,n){var r=qB(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function lg(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 ug(e,t,n){var r=_h(e),i=e.scale,a=[],o=B(t);return th(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}function dg(e){QB(e).prepare={}}function fg(e){QB(e).fullUpdate={}}function pg(e){return QB(e).prepare}function mg(e){return QB(e).fullUpdate}function hg(e,t){var n=e.model,r=eV(mg(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function gg(e,t){return yg(hg(e,t))}function _g(e,t){var n=[];return vg(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(yg(e))}),n}function vg(e,t){var n=eV(mg(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function yg(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function bg(e,t){var n=e.model.ecModel,r=eV(mg(n)).axSer;r&&Sg(n,r.get(e.model.uid),t)}function xg(e,t,n){var r=hg(e,t);r&&Sg(e.model.ecModel,r.sers,n)}function Sg(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function Cg(e,t,n){var r=eV(mg(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function wg(e,t){var n=e.model,r=eV(mg(n.ecModel)).keys;r&&L(r.get(n.uid),function(e){t(e)})}function Tg(e){var t=tV(pg(e)),n=t.keyed||=W();vg(e,function(t,r,i){var a=n.get(r)||n.set(r,W()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&nV.liPosMinGap(e,t,o)})}function Eg(e,t){nV[e]=t}function Dg(e,t,n){if(e){var r=t.ecModel,i=eV(mg(r)),a=e.model.uid,o=i.axSer||=W();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=rV.get(Og(s,c,n))||rV.get(Og(s,c,null));if(l){var u=i.keyed||=W(),d=i.keys||=W(),f=l.key,p=u.get(f)||u.set(f,W()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function Og(e,t,n){return e+`|&`+U(t,!0)+`|&`+(n||``)}function kg(e,t){var n=Og(t.seriesType,t.baseAxis,t.coordSysType);rV.set(n,t),$B(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:Tg})})}function Ag(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=zm(r);js(o)||(o=NaN);var s=e.getExtent(),c=AF(s[1]-s[0]);return qm(r)?jg(n,e,o,c):i&&Mg(n,e,o,c,i),a!=null&&(n.w=js(n.w)?kF(a,n.w):a),n}function jg(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function Mg(e,t,n,r,i){var a=!1,o=-1/0;L(i.key?[gg(t,i.key)]:_g(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),js(n)&&n>0&&js(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*iV,e.w2=e.w*n/r)}function Ng(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Pg(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Ag(e).w;if(!i)return!1;L(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}function Fg(e,t,n){n||=dV,t?e.dirty|=n:e.dirty&=~n}function Ig(e,t){return t||=dV,e.dirty==null||!!(e.dirty&t)}function Lg(e){if(e)return Ig(e)&&Rg(e,e.label,e),e}function Rg(e,t,n){var r=t.getComputedTransform();e.transform=Tu(e.transform,r);var i=e.localRect=wu(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=GL.textMargin);for(var d=0;d<4;d++)fV[d]=u===GL.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===GL.textMargin&&vu(i,fV,!1,!1);var f=e.rect=wu(e.rect,i);return r&&f.applyTransform(r),u===GL.minMargin&&vu(f,fV,!1,!1),e.axisAligned=Cu(r),(e.label=e.label||{}).ignore=t.ignore,Fg(e,!1),Fg(e,!0,uV),e}function zg(e,t,n){return e.transform=Tu(e.transform,n),e.localRect=wu(e.localRect,t),e.rect=wu(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Cu(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Bg(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Vg(e,t){for(var n=0;n<cV.length;n++){var r=cV[n];e[r]??(e[r]=t[r])}return Lg(e)}function Hg(e){var t=e.obb;return(!t||Ig(e,uV))&&(e.obb=t||=new EL,t.fromBoundingRect(e.localRect,e.transform),Fg(e,!1,uV)),t}function Ug(e,t,n,r,i){var a=e.length,o=ML[t],s=NL[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});for(var c=0,l,u=!1,d=0,f=0;f<a;f++){var p=e[f],m=p.rect;l=m[o]-c,l<0&&(m[o]-=l,p.label[o]-=l,u=!0);var h=Math.max(-l,0);d+=h,c=m[o]+m[s]}d>0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i<r;i++){var a=e[i],s=a.rect;s[o]+=t,a.label[o]+=t}}function C(t,n){for(var r=[],i=0,c=1;c<a;c++){var l=e[c-1].rect,u=Math.max(e[c].rect[o]-l[o]-l[s],0);r.push(u),i+=u}if(i){var d=Math.min(Math.abs(t)/i,n);if(t>0)for(var c=0;c<a-1;c++){var f=r[c]*d;S(f,0,c+1)}else for(var c=a-1;c>0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r<a-1;r++)if(t>0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function Wg(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.defaultAttr,i=n.labelLine;n.label.attr(`ignore`,r.ignore),i&&i.attr(`ignore`,r.labelGuideIgnore)}}function Gg(e){var t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=Lg(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(Kg(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function Kg(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:Hg(e).intersect(Hg(t),n,r)}function qg(e){pV||=e}function Jg(){return pV}function Yg(e,t,n,r){var i=[];return L(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function Xg(e){e.registerAction(vV,t),e.registerAction(yV,t),e.registerAction(bV,t);function t(e,t){var n=[],r=nc(t,e);function i(t,i){L(r[t],function(t){L(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(ir((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}function Zg(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=p_(e.axisName)&&Sh(e.nameLocation);L(r,function(e){var t=Lg(e);if(t&&!t.label.ignore){o.push(t);var n=a.transGroup;c&&(n.transform?oi(DV,n.transform):ei(DV),t.transform&&ni(DV,DV,t.transform),Y.copy(OV,t.localRect),OV.applyTransform(DV),s?s.union(OV):Y.copy(s=new Y(0,0,0,0),OV))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Y(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}function Qg(e,t,n){var r=new J;Kg(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Bg(t,r)}function $g(e,t,n,r){for(var i=J.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||Qg(s,n,r)}}function e_(e,t,n,r,i,a,o,s){u_(t)||l_(e,t,i,s,r,o);var c=t.labelLayoutList;f_(e,r,c,a),h_(r,e.rotation,c);var l=e.optionHideOverlap;n_(r,c,l),l&&Gg(ur(c,function(e){return e&&!e.label.ignore})),Zg(e,n,r,c)}function t_(e,t,n,r){var i=ys(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return bs(i-xV/2)?(o=c?`bottom`:`top`,a=`center`):bs(i-xV*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<xV*1.5&&i>xV/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function n_(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(bh(r))return;function a(e,a,o){var s=Lg(t[a]),c=Lg(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=wV(s.label).labelInfo.tick;if(Gm(l)&&u.notNice||qm(l)&&u.offInterval){i_(s.label);return}}if(e===!1||s.suggestIgnore)i_(s.label);else if(c.suggestIgnore)i_(c.label);else{var d=.1;if(!n){var f=[0,0,0,0];s=Vg({marginForce:f},s),c=Vg({marginForce:f},c)}Kg(s,c,null,{touchThreshold:d})&&i_(e?c.label:s.label)}}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function r_(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=TV(r),a=wV(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){i_(r);return}}})}function i_(e){e&&(e.ignore=!0)}function a_(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&&(bi(o,o,t),bi(s,s,t));var u=new cL({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});ru(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=TV(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function o_(e,t,n,r){var i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=a_(i.getTicksCoords(),n.transform,c,ir(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function s_(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(e.showMinorTicks&&!a.scale.isBlank()){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=ir(c.getLineStyle(),ir(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=a_(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function c_(e,t,n){if(u_(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),d_(e,null,null,null))}return!0}function l_(e,t,n,r,i,a){var o=i.axis,s=Cr(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new II;n.add(c);var l=Jh(r);if(!s||o.scale.isBlank())d_(t,[],c,l);else{var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(Cr(e.raw.labelRotate,u.get(`rotate`))||0)*xV/180,p=AV.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;L(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Dh(o.scale,n);if(m&&m[f]){var y=m[f];H(y)&&y.textStyle&&(l=new nR(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=U(l.getShallow(`alignMinLabel`,!0),x),C=U(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=U(l.getShallow(`verticalAlignMinLabel`,!0),w),E=U(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new SF({x:0,y:0,rotation:0,silent:AV.isLabelSilent(i),z2:D,style:Lu(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:B(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=wV(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,bu({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=AV.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var ee=j.parsedBreak;A.break={start:ee.vmin,end:ee.vmax}}o.type===`category`&&(A.dataIndex=f),ZF(O).eventData=A,j&&m_(i,a,O,j)}h.push(O),c.add(O)}),d_(t,R(h,function(e){return{label:e,priority:wV(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}}function u_(e){return!!e.labelLayoutList}function d_(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function f_(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);L(n,function(n,a){var o=Lg(n);if(o){var s=o.label,c=wV(s);o.suggestIgnore=s.ignore,s.ignore=!1,$i(NV,PV);var l=t.axis;NV.x=l.dataToCoord(Dh(l.scale,c.labelInfo.tick)),NV.y=e.labelOffset+e.labelDirection*i,NV.rotation=c.layoutRotation,r.add(NV),NV.updateTransform(),r.remove(NV),NV.decomposeTransform(),$i(s,NV),s.markRedraw(),Fg(o,!0),Lg(o)}})}function p_(e){return!!e}function m_(e,t,n,r){n.on(`click`,function(n){var i={type:mV,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function h_(e,t,n){var r=pf();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&wV(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&L(i,function(r){Jg().adjustBreakLabelPair(e.axis.inverse,t,[Lg(n[r[0]]),Lg(n[r[1]])])})}}function g_(e,t,n){n||={};var r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Cr(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function __(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function v_(e){var t={xAxisModel:null,yAxisModel:null};return L(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,JF).models[0]}),t}function y_(e,t,n,r,i,a){for(var o=g_(e,n),s=!1,c=!1,l=0;l<t.length;l++)Um(t[l].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new AV(n,r,o,i)}function b_(e,t,n){var r=g_(t,n);e.updateCfg(r)}function x_(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),yc(t))}function S_(e,t){return t==null?null:Sr(t)?NaN:e.parse(t)}function C_(e,t){var n;if(qm(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=z(r)?r:[r,r]}return[w_(n[0]),w_(n[1])]}function w_(e){return Pi(typeof e==`boolean`?0:e,1)||0}function T_(e){var t=FV(e.scale);return t.extent||=dc(),t}function E_(e,t){T_(e).dimIdxInCoord=t.get(e.dim)}function D_(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||O_(n,e,i,r,t)}function O_(e,t,n,r,i){var a=T_(t),o=a.extent,s=!1;bg(t,function(r){if(r.boxCoordinateSystem){var i=Pd(r).coord,c=a.dimIdxInCoord;if(c>=0&&z(i)){var l=i[c];l!=null&&!z(l)&&fc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;L(xh(u,n),function(e){hc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=N_(e,t,r);A_(e,new LV(e,r,o,s,c),i),a.extent=null}function k_(e,t){var n=e.scale;A_(n,new LV(n,e.model,t,!1,!1),IV)}function A_(e,t,n){e.rawExtentInfo=t,t.from=n}function j_(e,t){RV.set(e,t)}function M_(e,t,n,r,i){e.rawExtentInfo||k_({scale:e,model:t},i||dc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function N_(e,t,n){var r=Oh(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return wg(t,function(e){a=!!RV.get(e)||a}),a}function P_(e,t,n,r){if(n.ctnShp){var i;if(wg(e,function(t){var n=RV.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],pc(i,a[0]),mc(i,a[1]),hh(e))}}),i){var a=t.getExtent();if(qm(t))e.onBand||t.setExtent2(1,OF(a[0],a[0]+i[0]),kF(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=OF(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=kF(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function F_(){Eg(`liPosMinGap`,I_)}function I_(e,t,n){var r=W(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=bd(u);function f(n){Sg(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),i&&i.hasKey(t.uid)||(o=!0),p+=n.count()}),i&&i.keys().length===r.keys().length||(o=!0),!o&&a!=null)t.liPosMinGap=a;else{hm(zV,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||xd(d,a))&&(l&&(a=c.transformIn(a,null)),zV.arr[m++]=a)}});var h=zV.typed?zV.arr.subarray(0,m):(zV.arr.length=m,zV.arr);zV.typed?h.sort():ps(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=js(g)?g:m>0?-2:-1,n.serUids=r}}function L_(e){return function(t,n){var r=Ag(t,{fromStat:{key:e}});if(js(r.w2))return[-r.w2/2,r.w2/2]}}function R_(e,t){return e+`|&`+t}function z_(e){return F_(),{liPosMinGap:!qm(e.scale)}}function B_(e,t,n,r){kg(e,{key:t,seriesType:n,coordSysType:r,getMetrics:z_})}function V_(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}function H_(e){return e.get(`stack`)||GV+e.seriesIndex}function U_(e,t){var n=W_(e,t);return n.columnMap=G_(n),n}function W_(e,t){var n=R_(t,HV),r=[],i=Ag(e,{fromStat:{key:n},min:1});return xg(e,n,function(e){r.push({barWidth:X(e.get(`barWidth`),i.w),barMaxWidth:X(e.get(`barMaxWidth`),i.w),barMinWidth:X(e.get(`barMinWidth`)||(J_(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:H_(e)})}),{bandWidthResult:i,seriesInfo:r}}function G_(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};L(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Fr(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=OF(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=kF(35-o.length*4,15)+`%`;var c=X(i,t),l=X(a,1),u=(n-c)/(r+(r-1)*l);u=kF(u,0),L(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=OF(o,i)),a&&(o=kF(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=OF(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=kF(u,0);var d=0,f;L(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return L(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function K_(e){return{seriesType:e,overallReset:function(t){var n=R_(e,HV);Cg(t,n,function(t){var r=U_(t,e);xg(t,n,function(e){var t=r.columnMap[H_(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function q_(e){return{seriesType:e,plan:ym(),reset:function(e){if(__(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=Vd(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(V_(i))),p=J_(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&&mm(r*3),c=p&&s&&mm(r*3),l=p&&mm(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,AF(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,AF(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 J_(e){return e.pipelineContext&&e.pipelineContext.large}function Y_(e){return L_(R_(e,HV))}function X_(e){WV(e,function(){function t(t){var n=R_(t,HV);B_(e,n,t,HV),j_(n,Y_(t))}t(`bar`),t(`pictorialBar`)})}function Z_(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Q_(e,t,n,r){var i=e[t];if(i){var a=i[JV]||i,o=i[XV];if(i[YV]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Z_(a,n,r===`debounce`),i[JV]=a,i[XV]=r,i[YV]=n}return i}}function $_(e,t){var n=e[t];n&&n[JV]&&(n.clear&&n.clear(),e[t]=n[JV])}function ev(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Fi(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)+nv(m,s+_,!1),x=u+p*y(m)+rv(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+nv(m,-s+_,!1),x=u+p*y(m)+rv(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)+nv(h,s+_,!0),x=u+p*y(h)+rv(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+nv(h,-s+_,!0),x=u+p*y(h)+rv(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Fi(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function tv(e,t,n,r){if(gr(r))e.setTextConfig({rotation:r});else if(z(t))e.setTextConfig({rotation:0});else{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 nv(e,t,n){return t*Math.sin(e)*(n?-1:1)}function rv(e,t,n){return t*Math.cos(e)*(n?1:-1)}function iv(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;z(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:R(r,function(e){return Pi(e,i)})}}function av(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function ov(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?Hl:Ul)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Hl:Ul)(n,{shape:l},u,i)}function sv(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}function cv(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function lv(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 uv(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;I(u,iv(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?gv(i,a.coordinateSystem):_v(i,a.coordinateSystem),p=Iu(r);Fu(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:rm(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,tv(e,h===`outside`?f:h,lv(o),r.get([`label`,`rotate`]))}Uu(m,p,a.getRawValue(n),function(e){return im(t,e)});var g=r.getModel([`emphasis`]);pl(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),hl(e,r),cv(i)&&(e.style.fill=`none`,e.style.stroke=`none`,L(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function dv(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)}function fv(e,t,n,r){var i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?wc(e):0;if(l){var d=new lH({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new lH({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,ZF(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,uH),f.on(`mousemove`,uH)),n&&n.push(f)}function pv(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 mv(e,t,n){if(Om(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function hv(e,t,n){return new(e.type===`polar`?$I:_F)({shape:mv(t,n,e),silent:!0,z2:0})}function gv(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function _v(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function vv(e){e.registerChartView(tH),e.registerSeriesModel(qV),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,K_(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,q_(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,Kh(`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)})}),X_(e)}function yv(e,t){function n(t,n){var r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}L([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=I({},t),i.dispatchAction(I(t,{type:e[1],seriesIndex:n(r,t)}))})})}function bv(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=ec(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:z(l)?c.getName(l[0]):c.getName(l),selected:V(r)?r:I({},r)})}})}function xv(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(bv(`map`,`selectchanged`,t,r,e),bv(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(bv(`map`,`selected`,t,r,e),bv(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(bv(`map`,`unselected`,t,r,e),bv(`pie`,`unselected`,t,r,e))})}function Sv(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:`legend`});if(n&&n.length){var r=e.getData();r.filterSelf(function(e){for(var t=r.getName(e),i=0;i<n.length;i++)if(!n[i].isSelected(t))return!1;return!0})}}}}function Cv(e,t,n){t=z(t)&&{coordDimensions:t}||I({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=kd(r,t).dimensions,a=new YR(i,e);return a.initData(r,n),a}function wv(e,t,n,r,i){var a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0)}}function Tv(e,t,n,r,i,a,o,s,c){o-=e,s-=t;var l=Math.sqrt(o*o+s*s);o/=l,s/=l;var u=o*n+e,d=s*n+t;if(Math.abs(r-i)%mH<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=Po(i),i=Po(f)}else r=Po(r),i=Po(i);r>i&&(i+=mH);var p=Math.atan2(s,o);if(p<0&&(p+=mH),p>=r&&p<=i||p+mH>=r&&p+mH<=i)return c[0]=u,c[1]=d,l-n;var m=n*Math.cos(r)+e,h=n*Math.sin(r)+t,g=n*Math.cos(i)+e,_=n*Math.sin(i)+t,v=(m-o)*(m-o)+(h-s)*(h-s),y=(g-o)*(g-o)+(_-s)*(_-s);return v<y?(c[0]=m,c[1]=h,Math.sqrt(v)):(c[0]=g,c[1]=_,Math.sqrt(y))}function Ev(e,t,n,r,i,a,o,s){var c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;var p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}function Dv(e,t,n,r,i,a,o){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);var s=e+n,c=t+r,l=o[0]=Math.min(Math.max(i,e),s),u=o[1]=Math.min(Math.max(a,t),c);return Math.sqrt((l-i)*(l-i)+(u-a)*(u-a))}function Ov(e,t,n){var r=Dv(t.x,t.y,t.width,t.height,e.x,e.y,_H);return n.set(_H[0],_H[1]),r}function kv(e,t,n){for(var r=0,i=0,a=0,o=0,s,c,l=1/0,u=t.data,d=e.x,f=e.y,p=0;p<u.length;){var m=u[p++];p===1&&(r=u[p],i=u[p+1],a=r,o=i);var h=l;switch(m){case hH.M:a=u[p++],o=u[p++],r=a,i=o;break;case hH.L:h=Ev(r,i,u[p],u[p+1],d,f,_H,!0),r=u[p++],i=u[p++];break;case hH.C:h=sa(r,i,u[p++],u[p++],u[p++],u[p++],u[p],u[p+1],d,f,_H),r=u[p++],i=u[p++];break;case hH.Q:h=ma(r,i,u[p++],u[p++],u[p],u[p+1],d,f,_H),r=u[p++],i=u[p++];break;case hH.A:var g=u[p++],_=u[p++],v=u[p++],y=u[p++],b=u[p++],x=u[p++];p+=1;var S=!!(1-u[p++]);s=Math.cos(b)*v+g,c=Math.sin(b)*y+_,p<=1&&(a=s,o=c);var C=(d-g)*y/v+g;h=Tv(g,_,y,b,b+x,S,C,f,_H),r=Math.cos(b+x)*v+g,i=Math.sin(b+x)*y+_;break;case hH.R:a=r=u[p++],o=i=u[p++];var w=u[p++],T=u[p++];h=Dv(a,o,w,T,d,f,_H);break;case hH.Z:h=Ev(r,i,a,o,d,f,_H,!0),r=a,i=o}h<l&&(l=h,n.set(_H[0],_H[1]))}return l}function Av(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||gH,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());var c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&oi([],u),f=t.get(`length2`)||0;l&&bH.copy(l);for(var p=0;p<o.length;p++){var m=o[p];wv(m,0,s,vH,xH),J.scaleAndAdd(yH,vH,xH,f),yH.transform(d);var h=e.getBoundingRect(),g=l?l.distance(yH):e instanceof cF?kv(yH,e.path,bH):Ov(yH,h,bH);g<c&&(c=g,yH.transform(u),bH.transform(u),bH.toArray(a[0]),yH.toArray(a[1]),vH.toArray(a[2]))}jv(a,t.get(`minTurnAngle`)),n.setShape({points:a})}}}function jv(e,t){if(t<=180&&t>0){t=t/180*Math.PI,vH.fromArray(e[0]),yH.fromArray(e[1]),bH.fromArray(e[2]),J.sub(xH,vH,yH),J.sub(SH,bH,yH);var n=xH.len(),r=SH.len();if(!(n<.001||r<.001)){xH.scale(1/n),SH.scale(1/r);var i=xH.dot(SH);if(Math.cos(t)<i){var a=Ev(yH.x,yH.y,bH.x,bH.y,vH.x,vH.y,CH,!1);wH.fromArray(CH),wH.scaleAndAdd(SH,a/Math.tan(Math.PI-t));var o=bH.x===yH.x?(wH.y-yH.y)/(bH.y-yH.y):(wH.x-yH.x)/(bH.x-yH.x);if(isNaN(o))return;o<0?J.copy(wH,yH):o>1&&J.copy(wH,bH),wH.toArray(e[1])}}}}function Mv(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,vH.fromArray(e[0]),yH.fromArray(e[1]),bH.fromArray(e[2]),J.sub(xH,yH,vH),J.sub(SH,bH,yH);var r=xH.len(),i=SH.len();if(!(r<.001||i<.001)&&(xH.scale(1/r),SH.scale(1/i),xH.dot(t)<Math.cos(n))){var a=Ev(yH.x,yH.y,bH.x,bH.y,vH.x,vH.y,CH,!1);wH.fromArray(CH);var o=Math.PI/2,s=o+Math.acos(SH.dot(t))-n;if(s>=o)J.copy(wH,bH);else{wH.scaleAndAdd(SH,a/Math.tan(Math.PI/2-s));var c=bH.x===yH.x?(wH.y-yH.y)/(bH.y-yH.y):(wH.x-yH.x)/(bH.x-yH.x);if(isNaN(c))return;c<0?J.copy(wH,yH):c>1&&J.copy(wH,bH)}wH.toArray(e[1])}}}function Nv(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function Pv(e,t){var n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=LM(r[0],r[1]),a=LM(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=yi([],r[1],r[0],o/i),c=yi([],r[1],r[2],o/a),l=yi([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u<r.length;u++)e.lineTo(r[u][0],r[u][1])}}function Fv(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(!i)r&&e.removeTextGuideLine();else{for(var a=t.normal,o=a.get(`show`),s=i.ignore,c=0;c<gI.length;c++){var l=gI[c],u=t[l],d=l===`normal`;if(u){var f=u.get(`show`);if((d?s:U(i.states[l]&&i.states[l].ignore,s))||!U(f,o)){var p=d?r:r&&r.states[l];p&&(p.ignore=!0),r&&Nv(r,!0,l,u);continue}r||(r=new aL,e.setTextGuideLine(r),d||!s&&o||Nv(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),Nv(r,!1,l,u)}}if(r){ir(r.style,n),r.style.fill=null;var m=a.get(`showAbove`),h=e.textGuideLineConfig=e.textGuideLineConfig||{};h.showAbove=m||!1,r.buildPath=Pv}}}function Iv(e,t){t||=`labelLine`;for(var n={normal:e.getModel(t)},r=0;r<hI.length;r++){var i=hI[r];n[i]=e.getModel([i,t])}return n}function Lv(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){for(var a=e.rB,o=a*a,s=0;s<e.list.length;s++){var c=e.list[s],l=Math.abs(c.label.y-n),u=r+c.len,d=u*u,f=t+(Math.sqrt(Math.abs((1-l*l/o)*d))+c.len2)*i,p=f-c.label.x;zv(c,c.targetTextWidth-p*i,!0),c.label.x=f}}function d(e){for(var a={list:[],maxY:0},o={list:[],maxY:0},s=0;s<e.length;s++)if(e[s].labelAlignTo===`none`){var c=e[s],l=c.label.y>n?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)<p?Math.sqrt(d*d/(1-f*f/p/p)):p,l.maxY=d}l.list.push(c)}u(a),u(o)}for(var f=e.length,p=0;p<f;p++)if(e[p].position===`outer`&&e[p].labelAlignTo===`labelLine`){var m=e[p].label.x-l;e[p].linePoints[1][0]+=m,e[p].label.x=l}Ug(e,1,c,c+o)&&d(e)}function Rv(e,t,n,r,i,a,o,s){for(var c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=0;f<e.length;f++){var p=e[f].label;Vv(e[f])||(p.x<t?(u=Math.min(u,p.x),c.push(e[f])):(d=Math.max(d,p.x),l.push(e[f])))}for(var f=0;f<e.length;f++){var m=e[f];if(!Vv(m)&&m.linePoints){if(m.labelStyleWidth!=null)continue;var p=m.label,h=m.linePoints,g=void 0;g=m.labelAlignTo===`edge`?p.x<t?h[2][0]-m.labelDistance-o-m.edgeDistance:o+i-m.edgeDistance-h[2][0]-m.labelDistance:m.labelAlignTo===`labelLine`?p.x<t?u-o-m.bleedMargin:o+i-d-m.bleedMargin:p.x<t?p.x-o-m.bleedMargin:o+i-p.x-m.bleedMargin,m.targetTextWidth=g,zv(m,g,!1)}}Lv(l,t,n,r,1,i,a,o,s,d),Lv(c,t,n,r,-1,i,a,o,s,u);for(var f=0;f<e.length;f++){var m=e[f];if(!Vv(m)&&m.linePoints){var p=m.label,h=m.linePoints,_=m.labelAlignTo===`edge`,v=p.style.padding,y=v?v[1]+v[3]:0,b=p.style.backgroundColor?0:y,x=m.rect.width+b,S=h[1][0]-h[2][0];_?p.x<t?h[2][0]=o+m.edgeDistance+x+m.labelDistance:h[2][0]=o+i-m.edgeDistance-x-m.labelDistance:(p.x<t?h[2][0]=p.x+m.labelDistance:h[2][0]=p.x-m.labelDistance,h[1][0]=h[2][0]+S),h[1][1]=h[2][1]=p.y}}}function zv(e,t,n){if(e.labelStyleWidth==null){var r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);var d=r.getBoundingRect();r.setStyle(`width`,Math.ceil(d.width)),r.setStyle(`backgroundColor`,o)}else{var f=t-c,p=t<u?f:n?f>e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}Bv(a,r)}}}function Bv(e,t){DH.rect=e,Rg(DH,t,EH)}function Vv(e){return e.position===`center`}function Hv(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*TH,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=X(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=X(T,l);var E=w.get(`length2`);if(E=X(E,l),Math.abs(d.endAngle-d.startAngle)<o)L(h.states,p),h.ignore=!0,g&&(L(g.states,p),g.ignore=!0);else if(m(h)){var D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),k=Math.sin(D),A,j,ee,te;r=d.cx,i=d.cy;var ne=y===`inside`||y===`inner`;if(y===`center`)A=d.cx,j=d.cy,te=`center`;else{var re=(ne?(d.r+d.r0)/2*O:d.r*O)+r,ie=(ne?(d.r+d.r0)/2*k:d.r*k)+i;if(A=re+O*3,j=ie+k*3,!ne){var ae=re+O*(T+c-d.r),oe=ie+k*(T+c-d.r),se=ae+(O<0?-1:1)*E,ce=oe;A=x===`edge`?O<0?u+S:u+l-S:se+(O<0?-b:b),j=ce,ee=[[re,ie],[ae,oe],[se,ce]]}te=ne?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}var le=Math.PI,ue=0,de=v.get(`rotate`);if(gr(de))ue=le/180*de;else if(y===`center`)ue=0;else if(de===`radial`||de===!0)ue=O<0?-D+le:-D;else if(de===`tangential`||de===`tangential-noflip`&&y!==`outside`&&y!==`outer`){var fe=Math.atan2(O,k);fe<0&&(fe=le*2+fe),k>0&&de!==`tangential-noflip`&&(fe=le+fe),ue=fe-le}if(a=!!ue,h.x=A,h.y=j,h.rotation=ue,h.setStyle({verticalAlign:`middle`}),ne){h.setStyle({align:te});var pe=h.states.select;pe&&(pe.x+=h.x,pe.y+=h.y)}else{var me=new Y(0,0,0,0);Bv(me,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new J(O,k),linePoints:ee,textAlign:te,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:me,unconstrainedWidth:me.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ne})}}),!a&&e.get(`avoidLabelOverlap`)&&Rv(n,r,i,c,l,f,u,d);for(var h=0;h<n.length;h++){var g=n[h],_=g.label,v=g.labelLine,y=isNaN(_.x)||isNaN(_.y);if(_){_.setStyle({align:g.textAlign}),y&&(L(_.states,p),_.ignore=!0);var b=_.states.select;b&&(b.x+=_.x,b.y+=_.y)}if(v){var x=g.linePoints;y||!x?(L(v.states,p),v.ignore=!0):(jv(x,g.minTurnAngle),Mv(x,g.surfaceNormal,g.maxSurfaceAngle),v.setShape({points:x}),_.__hostTarget.textGuideLineConfig={anchor:new J(x[0][0],x[0][1])})}}}function Uv(e,t){e.eachSeriesByType(`pie`,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=Qf(e,t),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*kH,d=e.get(`endAngle`),f=e.get(`padAngle`)*kH;d=d===`auto`?u-OH:-d*kH;var p=e.get(`minAngle`)*kH+f,m=0;n.each(r,function(e){!isNaN(e)&&m++});var h=n.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=n.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;Ao(S,!_),u=S[0],d=S[1];var w=jH(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(n.setLayout({viewRect:l,r:s}),n.each(r,function(e,t){var r;if(isNaN(e))n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});else{r=v===`area`?T/m:h===0&&y?g:e*g,r<p?(r=p,E-=p):D+=e;var i=O+x*r,l=0,u=0;f>r?(l=O+x*r/2,u=l):(l=O+C,u=i-C),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?ss(e,b,[c,s]):s}),O=i}}),E<OH&&m){if(E<=.001){var k=T/m;n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t);r.angle=k;var i=0,a=0;k<f?(i=u+x*(t+1/2)*k,a=i):(i=u+x*t*k+C,a=u+x*(t+1)*k-C),r.startAngle=i,r.endAngle=a}})}else g=E/D,O=u,n.each(r,function(e,t){if(!isNaN(e)){var r=n.getItemLayout(t),i=r.angle===p?p:e*g,a=0,o=0;i<f?(a=O+x*i/2,o=a):(a=O+C,o=O+x*i-C),r.startAngle=a,r.endAngle=o,O+=x*i}})}})}function Wv(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(gr(r)&&!isNaN(r)&&r<0)})}}}function Gv(e){e.registerChartView(NH),e.registerSeriesModel(pH),yv(`pie`,e.registerAction),e.registerLayout(AH),e.registerProcessor(Sv(`pie`)),e.registerProcessor(Wv(`pie`))}function Kv(e,t,n,r){return n||={},r?qv(e,t,n):RH&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?qv(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function qv(e,t,n){if(EM.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(of(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(nf(LH,e,r,i)){n.zrX=LH[0],n.zrY=LH[1];return}}n.zrX=n.zrY=0}function Jv(e){return e||window.event}function Yv(e,t,n){if(t=Jv(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&&Kv(e,i,t,n)}else{Kv(e,t,t,n);var a=Xv(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&IH.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Xv(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Zv(e,t,n,r){e.addEventListener(t,n,r)}function Qv(e,t,n,r){e.removeEventListener(t,n,r)}function $v(e){return e.which===2||e.which===3}function ey(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function ty(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}function ny(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:ry}}function ry(){zH(this.event)}function iy(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||HH}return!1}function ay(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=iy(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==HH)){t.target=o;break}}}function oy(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}function sy(e){for(var t=0;e>=JH;)t|=e&1,e>>=1;return e+t}function cy(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++;ly(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function ly(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function uy(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 dy(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 fy(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 py(e,t){var n=YH,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=fy(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=dy(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];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{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=fy(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=dy(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>=YH||m>=YH);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];else 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]}else{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-fy(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-dy(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>=YH||g>=YH);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 my(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<JH)a=cy(e,n,r,t),uy(e,n,r,n+a,t);else{var o=py(e,t),s=sy(i);do{if(a=cy(e,n,r,t),a<s){var c=i;c>s&&(c=s),uy(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}function hy(){XH||(XH=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function gy(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}function _y(){return new Date().getTime()}function vy(e){var t=e.pointerType;return t===`pen`||t===`touch`}function yy(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 by(e){e&&(e.zrByTouch=!0)}function xy(e,t){return Yv(e.dom,new aU(e,t),!0)}function Sy(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}function Cy(e,t){var n=t.domHandlers;EM.pointerEventsSupported?L(nU.pointer,function(r){Ty(t,r,function(t){n[r].call(e,t)})}):(EM.touchEventsSupported&&L(nU.touch,function(r){Ty(t,r,function(i){n[r].call(e,i),yy(t)})}),L(nU.mouse,function(r){Ty(t,r,function(i){i=Jv(i),t.touching||n[r].call(e,i)})}))}function wy(e,t){EM.pointerEventsSupported?L(rU.pointer,n):EM.touchEventsSupported||L(rU.mouse,n);function n(n){function r(r){r=Jv(r),Sy(e,r.target)||(r=xy(e,r),t.domHandlers[n].call(e,r))}Ty(t,n,r,{capture:!0})}}function Ty(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Zv(e.domTarget,t,n,r)}function Ey(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Qv(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}function Dy(e){delete dU[e]}function Oy(e){if(!e)return!1;if(typeof e==`string`)return Ia(e,1)<oP;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Ia(t[i].color,1);return n/=r,n<oP}return!1}function ky(e,t){var n=new fU(er(),e,t);return dU[n.id]=n,n}function Ay(e,t){uU[e]=t}function jy(e){if(typeof pU==`function`)return pU(e)}function My(e){pU=e}function Ny(e,t,n){var r=yU.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}function Py(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 Fy(e,t){var n=e.color&&!e.colorLayer;L(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||zz.hasClass(r)||(typeof t==`object`?e[r]=e[r]?nr(e[r],t,!1):F(t):e[r]??(e[r]=t))})}function Iy(e,t,n){if(z(t)){var r=W();return L(t,function(e){e!=null&&Ys(e,null)!=null&&r.set(e,!0)}),ur(n,function(t){return t&&r.get(t[e])})}var i=Ys(t,null);return ur(n,function(t){return t&&i!=null&&t[e]===i})}function Ly(e,t){return t.hasOwnProperty(`subType`)?ur(e,function(e){return e&&e.subType===t.subType}):e}function Ry(e){var t=W();return e&&L(Is(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}function zy(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&&z(l)&&L(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),L(c,function(e){return f(e)}),L(r,function(e){return f(e.option)});function f(e){L(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function By(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return L(e,function(e,t){var n=t.match(EU);if(n&&n[1]&&n[2]){var a=n[1];Vy(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function Vy(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function Hy(e,t){return e.join(`,`)===t.join(`,`)}function Uy(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=AU.length;n<r;n++){var i=AU[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?nr(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?nr(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function Wy(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,ir(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function Gy(e){Wy(e,`itemStyle`),Wy(e,`lineStyle`),Wy(e,`areaStyle`),Wy(e,`label`),Wy(e,`labelLine`),Wy(e,`upperLabel`),Wy(e,`edgeLabel`)}function Ky(e,t){var n=kU(e)&&e[t],r=kU(n)&&n.textStyle;if(r)for(var i=0,a=KF.length;i<a;i++){var o=KF[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function qy(e){e&&(Gy(e),Ky(e,`label`),e.emphasis&&Ky(e.emphasis,`label`))}function Jy(e){if(kU(e)){Uy(e),Gy(e),Ky(e,`label`),Ky(e,`upperLabel`),Ky(e,`edgeLabel`),e.emphasis&&(Ky(e.emphasis,`label`),Ky(e.emphasis,`upperLabel`),Ky(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(Uy(t),qy(t));var n=e.markLine;n&&(Uy(n),qy(n));var r=e.markArea;r&&qy(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!vr(a))for(var o=0;o<a.length;o++)qy(a[o]);L(e.categories,function(e){Gy(e)})}if(i&&!vr(i))for(var o=0;o<i.length;o++)qy(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)qy(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)z(c[o])?(qy(c[o][0]),qy(c[o][1])):qy(c[o]);e.type===`gauge`?(Ky(e,`axisLabel`),Ky(e,`title`),Ky(e,`detail`)):e.type===`treemap`?(Wy(e.breadcrumb,`itemStyle`),L(e.levels,function(e){Gy(e)})):e.type===`tree`&&Gy(e.leaves)}}function Yy(e){return z(e)?e:e?[e]:[]}function Xy(e){return(z(e)?e[0]:e)||{}}function Zy(e,t){OU(Yy(e.series),function(e){kU(e)&&Jy(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),OU(n,function(t){OU(Yy(e[t]),function(e){e&&(Ky(e,`axisLabel`),Ky(e.axisPointer,`label`))})}),OU(Yy(e.parallel),function(e){var t=e&&e.parallelAxisDefault;Ky(t,`axisLabel`),Ky(t&&t.axisPointer,`label`)}),OU(Yy(e.calendar),function(e){Wy(e,`itemStyle`),Ky(e,`dayLabel`),Ky(e,`monthLabel`),Ky(e,`yearLabel`)}),OU(Yy(e.radar),function(e){Ky(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),OU(Yy(e.geo),function(e){kU(e)&&(qy(e),OU(Yy(e.regions),function(e){qy(e)}))}),OU(Yy(e.timeline),function(e){qy(e),Wy(e,`label`),Wy(e,`itemStyle`),Wy(e,`controlStyle`,!0);var t=e.data;z(t)&&L(t,function(e){H(e)&&(Wy(e,`label`),Wy(e,`itemStyle`))})}),OU(Yy(e.toolbox),function(e){Wy(e,`iconStyle`),OU(e.feature,function(e){Wy(e,`iconStyle`)})}),Ky(Xy(e.axisPointer),`label`),Ky(Xy(e.tooltip).axisPointer,`label`)}function Qy(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function $y(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 eb(e){e&&L(jU,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}function tb(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<NU.length;n++){var r=NU[n][1],i=NU[n][0];t[r]!=null&&(t[i]=t[r])}}function nb(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function rb(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function ib(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function ab(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&ab(e[n].children,t)}function ob(e,t){Zy(e,t),e.series=Is(e.series),L(e.series,function(e){if(H(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),nb(e.label);var n=e.data;if(n&&!vr(n))for(var r=0;r<n.length;r++)nb(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=Qy(e,`pointer.color`);i!=null&&$y(e,`itemStyle.color`,i)}else if(t===`bar`){tb(e),tb(e.backgroundStyle),tb(e.emphasis);var n=e.data;if(n&&!vr(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(tb(n[r]),tb(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)),rb(e),ab(e.data,rb)}else t===`graph`||t===`sankey`?ib(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&ir(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),eb(e)}}),e.dataRange&&(e.visualMap=e.dataRange),L(MU,function(t){var n=e[t];n&&(z(n)||(n=[n]),L(n,function(e){eb(e)}))})}function sb(e){var t=W();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),L(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),cb(e))})}function cb(e){L(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=vs(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}function lb(e,t){return e.visualStyleMapper||LU[t]||(console.warn(`Unknown style type '`+t+`'.`),LU.itemStyle)}function ub(e,t){return e.visualDrawType||RU[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}function db(e,t){t||={},ir(t,{text:`loading`,textColor:Z.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Z.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new II,r=new _F({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new SF({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 _F({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 pL({shape:{startAngle:-UU/2,endAngle:-UU/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:UU*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:UU*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}function fb(e){e.overallReset(e.ecModel,e.api,e.payload)}function pb(e){return e.dirtyOnOverallProgress&&mb}function mb(){this.agent.dirty(),this.getDownstream().dirty()}function hb(){this.agent&&this.agent.dirty()}function gb(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function _b(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Is(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return vb(t)}):GU}function vb(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 yb(e){return e.data.count()}function bb(e){JU=null;try{e(KU,qU)}catch{}return JU}function xb(e,t){for(var n in t.prototype)e[n]=Ir}function Sb(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n)}}function Cb(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t)}}function wb(e,t,n,r){switch(n){case`color`:var i=e.ensureUniqueItemVisual(t,`style`);i[e.getVisual(`drawType`)]=r,e.setItemVisual(t,`colorFromPalette`,!1);break;case`opacity`:e.ensureUniqueItemVisual(t,`style`).opacity=r;break;case`symbol`:case`symbolSize`:case`liftZ`:e.setItemVisual(t,n,r)}}function Tb(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}function Eb(e,t){aW[e]=t}function Db(e){return aW[e]}function Ob(e,t){oW[e]=t}function kb(e){return isFinite(e)}function Ab(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=kb(r)?r:0,i=kb(i)?i:1,a=kb(a)?a:0,o=kb(o)?o:0,e.createLinearGradient(r,a,i,o)}function jb(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=kb(o)?o:.5,s=kb(s)?s:.5,c=c>=0&&kb(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Mb(e,t,n){for(var r=t.type===`radial`?jb(e,t,n):Ab(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function Nb(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 Pb(e){return parseInt(e,10)}function Fb(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]||Pb(s[r])||Pb(e.style[r]))-(Pb(s[a])||0)-(Pb(s[o])||0)||0}function Ib(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:gr(e)?[e]:z(e)?e:null}function Lb(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Ib(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}function Rb(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function zb(e){return typeof e==`string`&&e!==`none`}function Bb(e){var t=e.fill;return t!=null&&t!==`none`}function Vb(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 Hb(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 Ub(e,t,n){var r=Xr(t.image,t.__image,n);if(Qr(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)*wM),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Wb(e,t,n,r,i){var a,o=Rb(n),s=Bb(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||uW,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Mb(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Mb(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?Ub(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?Ub(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Lb(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Hb(e,n),s&&Vb(e,n)):(s&&Vb(e,n),o&&Hb(e,n)),T&&e.setLineDash([])}function Gb(e,t,n){var r=t.__image=Xr(n.image,t.__image,t,t.onload);if(r&&Qr(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 Kb(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Lb(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Rb(n)&&e.strokeText(i,n.x,n.y),Bb(n)&&e.fillText(i,n.x,n.y)):(Bb(n)&&e.fillText(i,n.x,n.y),Rb(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}function qb(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){ex(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?vP.opacity:o}(r||t.blend!==n.blend)&&(a||=(ex(e,i),!0),e.globalCompositeOperation=t.blend||vP.blend);for(var s=0;s<dW.length;s++){var c=dW[s];(r||t[c]!==n[c])&&(a||=(ex(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(ex(e,i),!0),e.shadowColor=t.shadowColor||vP.shadowColor),a}function Jb(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=qb(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(ex(e,i),!0),zb(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(ex(e,i),!0),zb(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(ex(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(ex(e,i),!0),e.lineWidth=c)}for(var l=0;l<fW.length;l++){var u=fW[l],d=u[0];(r||a[d]!==o[d])&&(s||=(ex(e,i),!0),e[d]=a[d]||u[1])}return s}function Yb(e,t,n,r,i){return qb(e,t.style,n&&n.style,r,i)}function Xb(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 Zb(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),Xb(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function Qb(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)}function $b(e){var t=Bb(e),n=Rb(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 ex(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function tx(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};nx(e,t,n),rx(e,n)}function nx(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))t.__dirty&=-2,t.__isRendered=!1;else{var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||Nb(i,a))&&(a&&(ex(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(ex(e,n),e.save(),Zb(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped)t.__dirty&=-2,t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();var l=n.prevEl;l||(c=s=!0);var u=t instanceof cF&&t.autoBatch&&$b(o);s||Qb(r,l.transform)?(ex(e,n),Xb(e,t)):u||ex(e,n),t instanceof cF?(n.lastDrawType!==pW&&(c=!0,n.lastDrawType=pW),Jb(e,t,l,c,n),u&&(n.batchFill||n.batchStroke)||e.beginPath(),Wb(e,t,o,u,n)):t instanceof uF?(n.lastDrawType!==hW&&(c=!0,n.lastDrawType=hW),Jb(e,t,l,c,n),Kb(e,t,o)):t instanceof pF?(n.lastDrawType!==mW&&(c=!0,n.lastDrawType=mW),Yb(e,t,l,c,n),Gb(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==gW&&(c=!0,n.lastDrawType=gW),ix(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&ex(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}}}function rx(e,t){ex(e,t),t.prevElClipPaths&&e.restore()}function ix(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();for(var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o=t.getCursor(),s=r.length;o<s;o++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),nx(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}rx(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),nx(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}rx(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}function ax(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&_W.delete(e);var a=_W.get(e);if(a)return a;var o=ir(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,_W.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<yW.length;++s){var c=o[yW[s]];if(c!=null&&!z(c)&&!V(c)&&!gr(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=vW.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=sx(o.dashArrayX),f=cx(o.dashArrayY),p=ox(o.symbol),m=lx(d),h=ux(f),g=!i&&oM.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&&vW.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=As(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=As(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=em(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 tx(y,u)}}}}function ox(e){if(!e||e.length===0)return[[`rect`]];if(V(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!V(e[n])){t=!1;break}if(t)return ox([e]);for(var r=[],n=0;n<e.length;++n)V(e[n])?r.push([e[n]]):r.push(e[n]);return r}function sx(e){if(!e||e.length===0)return[[0,0]];if(gr(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!gr(e[r])){n=!1;break}if(n)return sx([e]);for(var i=[],r=0;r<e.length;++r)if(gr(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=R(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function cx(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(gr(e)){var t=Math.ceil(e);return[t,t]}var n=R(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function lx(e){return R(e,function(e){return ux(e)})}function ux(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}function dx(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=ax(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=ax(i,t)}}})}function fx(e){return function(){var t=[...arguments];if(this.isDisposed())this.id;else return mx(this,e,t)}}function px(e){return function(){var t=[...arguments];return mx(this,e,t)}}function mx(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),rP.prototype[t].apply(e,n)}function hx(e,t,n){var r=!(n&&n.ssr);if(r){var i=gx(e);if(i)return i}var a=new hG(e,t,n);return a.id=`ec_`+OG++,EG[a.id]=a,r&&oc(e,kG,a.id),dG(a),iW.trigger(`afterinit`,a),a}function gx(e){return EG[sc(e,kG)]}function _x(e,t){wG[e]=t}function vx(e){ar(SG,e)<0&&SG.push(e)}function yx(e,t){Ox(xG,e,t,EW)}function bx(e){Sx(`afterinit`,e)}function xx(e){Sx(`afterupdate`,e)}function Sx(e,t){iW.on(e,t)}function Cx(e,t,n){var r,i,a,o,s;B(t)&&(n=t,t=``),H(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;vG[r]||(Dr(UW.test(r)&&UW.test(i)),a&&Dr(i!==r),vG[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},bG[i]=1,a&&s&&(bG[l]=1),yG[l]=r)}function Tx(e,t){QR.register(e,t)}function Ex(e,t){Ox(CG,e,t,OW,`layout`,!0)}function Dx(e,t){Ox(CG,e,t,jW,`visual`,!0)}function Ox(e,t,n,r,i,a){if((B(t)||H(t))&&(n=t,t=r),!(ar(AG,n)>=0)){AG.push(n);var o=WU.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function kx(e,t){TG[e]=t}function Ax(e,t,n){var r=Db(`registerMap`);r&&r(e,t,n)}function jx(e,t,n,r){return{eventContent:{selected:ul(n),isFromClick:t.isFromClick||!1}}}function Mx(e){z(e)?L(e,function(e){Mx(e)}):ar(MG,e)>=0||(MG.push(e),B(e)&&(e={install:e}),e.install(NG))}function Nx(e){return{clipShape:Dm(e)}}function Px(e,t,n,r){L(HB,function(i,a){var o=nr(nr({},GG[a],!0),r,!0),s=function(e){P(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=rp(this),r=n?ap(e):{};nr(e,t.getTheme().get(a+`Axis`)),nr(e,this.getDefaultOption()),e.type=Fx(e),n&&ip(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=EB.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Jg();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,Fx)}function Fx(e){return e.type||(e.data?`category`:`value`)}function Ix(e){return(e.type===`interval`||e.type===`time`)&&!gf(e)}function Lx(e,t){var n=e.scale,r=e.model,i=M_(n,r,r.ecModel,e,null),a=Km(n),o=Km(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=AF(l[0].value-l[1].value),g=AF(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=Qm(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*kF(c,2):Jm(E),D=Ym(E)}function j(){w=fs(k-E*f,D)}function ee(){T=fs(O+E*p,D)}function te(){k=f?fs(w+E*f,D):w}function ne(){O=p?fs(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var re=e.getExtent(),ie=AF(re[1]-re[0]);D=gs([T,w],ie,.5/m),te(),ne(),js(D)&&(E=fs(E,D))}else{var ae=C[1]-C[0];E=a?kF(Ss(ae),1):ws(ae/m,2),D=Ym(E),b[0]?(w=C[0],A(function(){if(te(),O=fs(k+E*m,D),ee(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ne(),k=fs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=fs(NF(C[0]/E)*E,D),O=fs(MF(C[1]/E)*E,D);var e=jF((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=MF(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=fs(k-E*n[0],D),O=fs(O+E*n[1],D),j(),ee(),w<=C[0]&&T>=C[1])return!0}})}Eh(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function Rx(e,t){var n=Km(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Qm(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?Bx(r,t):zx(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Ym(d)),i[0]||(s[0]=fs(MF(s[0]/u)*u,l)),i[1]||(s[1]=fs(NF(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Eh(e,i,o,s,a,c)}function zx(e,t){var n=eh(t.splitNumber,5),r=Bm(e),i=t.minInterval,a=t.maxInterval,o=ws(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=Ym(o),c=e.getExtent(),l=[fs(NF(c[0]/o)*o,s),fs(MF(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function Bx(e,t){var n=eh(t.splitNumber,10),r=e.getExtent(),i=Bm(e),a=kF(Ss(i),1);n/i*a<=.5&&(a*=10);var o=Ym(a),s=[fs(NF(r[0]/a)*a,o),fs(MF(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function Vx(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;Hx(t,n,r,i,null)}function Hx(e,t,n,r,i){var a=M_(e,t,r,n,i),o=Wm(e)||Gm(e);Ux(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&P_(n,e,a,r)}function Ux(e,t){YG[e.type](e,t)}function Wx(e,t){return e.getCoordSysModel()===t}function Gx(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)Kx(s,i[c])&&(a=i[c]);else for(var l in i)if(Fr(i,l)&&Kx(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function Kx(e,t){if(!t)return!1;var n=t.scale,r=mh(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&gh(t)&&(i=!1),i}function qx(e){for(var t=fr(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];Um(a.scale)&&wh(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&L(r,function(e){e.__alignTo=n})}function Jx(e,t){return gf(e.scale)||gf(t.scale)||t.scale.getTicks().length<2}function Yx(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function Xx(e,t){L(e.x,function(e){return Zx(e,t.x,t.width)}),L(e.y,function(e){return Zx(e,t.y,t.height)})}function Zx(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),Yx(e,t)}function Qx(e,t,n,r,i,a,o){eS(r,i,YB.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=dr(s,function(e){return e>0})==null;return vu(r,s,!0,!0,n),Xx(i,r),c;function l(e){L(i[ML[e]],function(t){if(Ch(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Dh(t.scale,wV(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Sh(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[ML[n]]-t[ML[n]],a=t[NL[n]]+t[ML[n]]-(e[NL[n]]+e[ML[n]]);i=d(i,1-r),a=d(a,r);var o=XG[n][0],c=XG[n][1];s[o]=kF(s[o],i),s[c]=kF(s[c],a)}function d(e,t){return e>0&&!Sr(t)&&t>1e-4&&(e/=t),e}}function $x(e,t,n,r,i){var a=new EV($G);return L(n,function(n){return L(n,function(n){if(Ch(n.model)){var o=!r;n.axisBuilder=y_(e,t,n.model,i,a,o)}})}),a}function eS(e,t,n,r,i,a){var o=n===YB.determine;L(t,function(t){return L(t,function(t){Ch(t.model)&&(b_(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ML[1-t]]=e[NL[t]]<=a.refContainer[NL[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){Ch(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function tS(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=$f(e.get(`outerBounds`,!0)||BV,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ar([`all`,`axisLabel`],a)<0?`all`:a,s=[ls(U(e.get(`outerBoundsClampWidth`,!0),VV[0]),t.width),ls(U(e.get(`outerBoundsClampHeight`,!0),VV[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}function nS(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rS(n,e,t),n.seriesInvolved&&aS(n,e),n}function rS(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=fS(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),mr(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)&&L(f.baseAxes,mr(p,!d||`cross`,u)),d&&L(f.otherAxes,mr(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||dS(d))){s??=d.get(`triggerTooltip`),d=r?iS(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=fS(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:dS(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=oS(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function iS(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=F(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&ir(l,u.textStyle)}return e.model.getModel(`axisPointer`,new nR(c,n,r))}function aS(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&L(e.coordSysAxesInfo[fS(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function oS(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(sS(a[r+`AxisId`],n.id)||sS(a[r+`AxisIndex`],n.componentIndex)||sS(a[r+`AxisName`],n.name))return i}}function sS(e,t){return e===`all`||z(e)&&ar(e,t)>=0||e===t}function cS(e){var t=lS(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=dS(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}}function lS(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[fS(e)]}function uS(e){var t=lS(e);return t&&t.axisPointerModel}function dS(e){return!!e.get([`handle`,`show`])}function fS(e){return e.type+`||`+e.id}function pS(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(l.length){var u=s.length,d=nK(e).splitAreaColors,f=W(),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=z(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 _F({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:ir({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}nK(e).splitAreaColors=f}}}function mS(e){nK(e).splitAreaColors=null}function hS(e){e.registerComponentView(cK),e.registerComponentModel(UV),e.registerCoordinateSystem(`cartesian2d`,ZG),Px(e,`x`,VG,lK),Px(e,`y`,VG,lK),e.registerComponentView(oK),e.registerComponentView(sK),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function gS(e){Mx(hS),e.registerSeriesModel(PG),e.registerChartView(zG),e.registerLayout(Gh(`scatter`))}function _S(e,t){return!!uK(e)[t]}function vS(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||dK.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=Eu(r),o=Eu(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}function yS(e){return e.__ecRoamConsumed}function bS(e){var t=pK(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function xS(e,t,n,r){for(var i=bS(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),CS(e,t)}function SS(e,t,n){for(var r=bS(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||wS(e,t);return}}function CS(e,t){var n=bS(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function wS(e,t){var n=bS(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function TS(e,t,n,r,i){i.isAvailableBehavior=q(ES,null,n,r),e.trigger(t,i)}function ES(e,t,n){var r=n[e];return!e||r&&(!V(r)||t.event[r+`Key`])}function DS(e){return e}function OS(e,t){return eN(e||QM(),DS(t).dataRect)}function kS(e,t){return eN(e||QM(),DS(t).viewRect)}function AS(e,t,n){return $i(e||Qi(),DS(t).trans[n])}function jS(e){return!!(e.dataRect&&e.viewRect)}function MS(e,t,n,r){r===1?HS(e,t.trans[0],n):$i(e,n)}function NS(e,t,n){wN(n,_K),ni(_K,_K,t.mtRawInv),ju(e,_K)}function PS(e,t){var n=DS(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=iC(t.getShallow(`zoom`)||1,r)||1,jS(n)&&LS(n)}function FS(e,t,n,r,i){var a=DS(e);a.dataRect=new Y(t,n,r,i),jS(a)&&LS(a)}function IS(e,t,n,r,i){var a=DS(e);a.viewRect=new Y(t,n,r,i),jS(a)&&LS(a)}function LS(e){RS(e),zS(e),BS(e)}function RS(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=eN(yK,t),t.y=-t.y-t.height),tN(vK,t,n),ju(r,vK),i&&(r.scaleY=-r.scaleY);var a=wN(r,e.mtRaw);oi(e.mtRawInv,a)}function zS(e){var t=WS(e),n=QS(bK,e,e.centerOption)?bi(bK,bK,e.mtRaw):t,r=e.zoom,i=e.trans[1];i.x=t[0]-r*n[0],i.y=t[1]-r*n[1],i.scaleX=i.scaleY=r}function BS(e){var t=e.trans,n=t[1],r=t[0],i=t[2];HS(i,r,n);var a=wN(i,e.mtOverall),o=oi(e.mtOverallInv,a);VS(e,i,a,o),VS(e.lgGeo,i,a,o)}function VS(e,t,n,r){e&&($i(e,t),ti(e.transform||=[],n),ti(e.invTransform||=[],r))}function HS(e,t,n){wN(t,xK),wN(n,SK),ni(SK,SK,xK),ju(e,SK)}function US(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function WS(e){var t=e.viewRect;return CK[0]=t.x+t.width/2,CK[1]=t.y+t.height/2,CK}function GS(e,t,n,r){var i=DS(n);i.syncBackEl=e,i.syncBackType=t,r?Hl(e,AS(null,n,t),r):(AS(e,n,t),e.dirty())}function KS(e,t,n,r){var i=DS(e),a=i.syncBackEl;a?(a.stopAnimation(),MS(wK,i,a,i.syncBackType)):$i(wK,i.trans[2]),NS(TK,i,wK),r?XS(wK,TK,i,r):$i(wK,TK),NS(wK,i,wK),nC(i,t,n,wK)}function qS(e,t,n){var r=JS(t);r&&(KS(r,t,n,e),PS(r,t))}function JS(e){return e.__ownRoamView?e.__ownRoamView():null}function YS(e,t,n,r){n.setUpdatePayload(Au(e));var i=Oc(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function XS(e,t,n,r){r.dx!=null&&r.dy!=null&&(e.x+=r.dx,e.y+=r.dy);var i=r.zoom;if(i!=null){var a=ZS(t),o=iC(a*i,n.zoomLimit)/a;e.x-=(r.originX-e.x)*(o-1),e.y-=(r.originY-e.y)*(o-1),e.scaleX*=o,e.scaleY*=o}}function ZS(e){return e.scaleX}function QS(e,t,n){var r=t.dataRect;if(!n)return!1;var i=t.lgCt;return i?ui(e,X(n[0],i.w),X(n[1],i.h)):r&&ui(e,X(n[0],r.width,r.x),X(n[1],r.height,r.y)),!0}function $S(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[eC(0,t,n,r),eC(1,t,n,r)]}function eC(e,t,n,r){return n&&r&&r[NL[e]]&&us(n[e])?(t[e]-r[ML[e]])/r[NL[e]]*100+`%`:t[e]}function tC(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function nC(e,t,n,r){var i=WS(e),a=ZS(r),o=AF(a)>1e-6;EK[0]=o?(i[0]-r.x)/a:i[0],EK[1]=o?(i[1]-r.y)/a:i[1],bi(EK,EK,e.mtRawInv);var s=$S(e,EK);rC(t,s,a),L(n,function(e){e!==t&&rC(e,s.slice(),a)})}function rC(e,t,n){var r=e.option;r.center=t,r.zoom=n}function iC(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function aC(e,t,n,r,i,a,o,s){if(!JS(e)){n.disable();return}n.enable(U(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Au(ir({type:cC(r,e.subType,cI)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function oC(e){return function(t,n,r){return DK.copy(e.getBoundingRect()),DK.applyTransform(e.getComputedTransform()),DK.contain(n,r)}}function sC(e,t,n){var r=cC(t,n,cI);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(ac(e,t,n),function(t){qS(e,t),YS(e,t,r,i)})})}function cC(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function lC(e,t,n,r,i,a,o){var s=new hK(null,tC(e.ecModel,t));return FS(s,n,r,i,a),o?IS(s,o.x,o.y,o.width,o.height):IS(s,n,r,i,a),PS(s,e),s}function uC(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,_C(t,n,e),L(n,function(n){L(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,mr(dC,e))})}),t.wrapMethod(`cloneShallow`,mr(pC,e)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,mr(fC,e))}),Dr(n[t.dataType]===t)}function dC(e,t){if(gC(this)){var n=I({},OK(this).datas);n[this.dataType]=t,_C(t,n,e)}else vC(t,this.dataType,OK(this).mainData,e);return t}function fC(e,t){return e.struct&&e.struct.update(),t}function pC(e,t){return L(OK(t).datas,function(n,r){n!==t&&vC(n.cloneShallow(),r,t,e)}),t}function mC(e){var t=OK(this).mainData;return e==null||t==null?t:OK(t).datas[e]}function hC(){var e=OK(this).mainData;return e==null?[{data:e}]:R(fr(OK(e).datas),function(t){return{type:t,data:OK(e).datas[t]}})}function gC(e){return OK(e).mainData===e}function _C(e,t,n){OK(e).datas={},L(t,function(t,r){vC(t,r,e,n)})}function vC(e,t,n,r){OK(n).datas[t]=e,OK(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=mC,e.getLinkedDataAll=hC}function yC(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function bC(e,t,n){if(e&&ar(t,e.type)>=0){var r=n.getData().tree.root,i=e.targetNode;if(V(i)&&(i=r.getNodeById(i)),i&&r.contains(i))return{node:i};var a=e.targetNodeId;if(a!=null&&(i=r.getNodeById(a)))return{node:i}}}function xC(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function SC(e,t){return ar(xC(e),t)>=0}function CC(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}function wC(e){for(var t=0;t<jK.length;t++)e.registerAction({type:jK[t],update:`updateView`},Ir);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){var r=bC(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){var i=t.getViewRoot();i&&(e.direction=SC(i,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function TC(e){var t=e.getData().tree,n={};t.eachNode(function(t){for(var r=t;r&&r.depth>1;)r=r.parentNode;var i=cp(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}function EC(e){var t=0;L(e.children,function(e){EC(e);var n=e.value;z(n)&&(n=n[0]),t+=n});var n=e.value;z(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),z(e.value)?e.value[0]=n:e.value=n}function DC(e,t){var n=Is(t.get(`color`)),r=Is(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;L(e,function(e){var t=new nR(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});var o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}function OC(e,t,n,r,i,a){var o=[[i?e:e-FK,t],[e+n,t],[e+n,t+r],[i?e:e-FK,t+r]];return!a&&o.splice(2,0,[e+n+FK,t+r/2]),!i&&o.push([e,t+r/2]),o}function kC(e,t,n){ZF(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&CC(n,t)}}function AC(){return new LK}function jC(e,t,n,r){var i,a;if(!e.isRemoved()){var o=e.getLayout();i=o.width,a=o.height;var s=e.getModel(),c=s.get(VK),l=s.get(HK)/2,u=VC(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=RK(i-2*f,0),a=RK(a-f-p,0);var m=i*a,h=MC(e,s,m,t,n,r);if(h.length){var g={x:f,y:p,width:i,height:a},_=zK(i,a),v=1/0,y=[];y.area=0;for(var b=0,x=h.length;b<x;){var S=h[b];y.push(S),y.area+=S.getLayout().area;var C=IC(y,_,t.squareRatio);C<=v?(b++,v=C):(y.area-=y.pop().getLayout().area,LC(y,_,g,l,!1),_=zK(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&LC(y,_,g,l,!0),!n){var w=s.get(`childrenVisibleMin`);w!=null&&m<w&&(n=!0)}for(var b=0,x=h.length;b<x;b++)jC(h[b],t,n,r+1)}}}function MC(e,t,n,r,i,a){var o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);var c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=ur(o,function(e){return!e.isRemoved()}),PC(o,s);var l=FC(t,o,s);if(l.sum===0||(l.sum=NC(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(var u=0,d=o.length;u<d;u++){var f=o[u].getValue()/l.sum*n;o[u].setLayout({area:f})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function NC(e,t,n,r,i){if(!r)return n;for(var a=e.get(`visibleMin`),o=i.length,s=o,c=o-1;c>=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*t<a&&(s=c,n-=l)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function PC(e,t){return t&&e.sort(function(e,n){var r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function FC(e,t,n){for(var r=0,i=0,a=t.length;i<a;i++)r+=t[i].getValue();var o=e.get(`visualDimension`),s;return!t||!t.length?s=[NaN,NaN]:o===`value`&&n?(s=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&s.reverse()):(s=dc(),BK(t,function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function IC(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;a<s;a++)o=e[a].getLayout().area,o&&(o<i&&(i=o),o>r&&(r=o));var c=e.area*e.area,l=t*t*n;return c?RK(l*r/c,c/(l*i)):1/0}function LC(e,t,n,r,i){var a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(var d=0,f=e.length;d<f;d++){var p=e[d],m={},h=u?p.getLayout().area/u:0,g=m[c[o]]=RK(u-2*r,0),_=n[s[a]]+n[c[a]]-l,v=d===f-1||_<h?_:h,y=m[c[a]]=RK(v-2*r,0);m[s[o]]=n[s[o]]+zK(r,g/2),m[s[a]]=l+zK(r,y/2),l+=v,p.setLayout(m,!0)}n[s[o]]+=u,n[c[o]]-=u}function RC(e,t,n,r){var i=(t||{}).node,a=r.width,o=r.height,s=I({},r);if(!i||i===n)return s;for(var c,l=a*o,u=l*e.option.zoomToNodeRatio;c=i.parentNode;){for(var d=0,f=c.children,p=0,m=f.length;p<m;p++)d+=f[p].getValue();var h=i.getValue();if(h===0)return s;u*=d/h;var g=c.getModel(),_=g.get(VK),v=Math.max(_,VC(g));u+=4*_*_+(3*_+v)*u**.5,u>zF&&(u=zF),i=c}u<l&&(u=l);var y=(u/l)**.5;return{width:a*y,height:o*y}}function zC(e,t,n){if(t)return{x:t.x,y:t.y};var r={x:0,y:0};if(!n)return r;var i=n.node,a=i.getLayout();if(!a)return r;for(var o=[a.width/2,a.height/2],s=i;s;){var c=s.getLayout();o[0]+=c.x,o[1]+=c.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function BC(e,t,n,r,i){var a=e.getLayout(),o=n[i],s=o&&o===e;if(!(o&&!s||i===n.length&&e!==r)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);var c=new Y(t.x-a.x,t.y-a.y,t.width,t.height);BK(e.viewChildren||[],function(e){BC(e,c,n,r,i+1)})}}function VC(e){return e.get(UK)?e.get(WK):0}function HC(e,t){return t.width/e.width||t.height/e.height||1}function UC(e,t){return iC(e,t.get(`scaleLimit`,!0))}function WC(){return{nodeGroup:[],background:[],content:[]}}function GC(e,t,n,r,i,a,o,s,c,l){if(!o)return;var u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;var p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=le(`nodeGroup`,KK);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),nq(D).nodeWidth=p,nq(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=le(`background`,qK,l,QK);O&&ie(D,O,x&&u.upperLabelHeight);var k=f.getModel(`emphasis`),A=k.get(`focus`),j=k.get(`blurScope`),ee=k.get(`disabled`),te=A===`ancestor`?o.getAncestorsIndices():A===`descendant`?o.getDescendantIndices():A;if(x)_l(D)&&gl(D,!1),O&&(gl(O,!ee),d.setItemGraphicEl(o.dataIndex,O),ml(O,te,j));else{var ne=le(`content`,qK,l,$K);ne&&ae(D,ne),O.disableMorphing=!0,O&&_l(O)&&gl(O,!1),gl(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var re=f.getShallow(`cursor`);re&&ne.attr(`cursor`,re),ml(D,te,j)}return D;function ie(t,n,r){var i=ZF(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)oe(n);else{n.invisible=!1;var a=o.getVisual(`style`),s=a.stroke,c=tq(S);c.fill=s;var l=eq(C);l.fill=C.get(`borderColor`);var u=eq(w);u.fill=w.get(`borderColor`);var d=eq(T);if(d.fill=T.get(`borderColor`),r){var f=p-2*h;se(n,s,a.opacity,{x:h,y:0,width:f,height:b})}else n.removeTextContent();n.setStyle(c),n.ensureState(`emphasis`).style=l,n.ensureState(`blur`).style=u,n.ensureState(`select`).style=d,Gc(n)}t.add(n)}function ae(t,n){var r=ZF(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;var i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)oe(n);else{n.invisible=!1;var s=o.getVisual(`style`),c=s.fill,l=tq(S);l.fill=c,l.decal=s.decal;var u=eq(C),d=eq(w),f=eq(T);se(n,c,s.opacity,null),n.setStyle(l),n.ensureState(`emphasis`).style=u,n.ensureState(`blur`).style=d,n.ensureState(`select`).style=f,Gc(n)}t.add(n)}function oe(e){!e.invisible&&a.push(e)}function se(t,n,r,i){var a=f.getModel(i?XK:YK),s=Ys(f.get(`name`),null),c=a.getShallow(`show`);Fu(t,Iu(f,i?XK:YK),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Er(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ce(d,i,u);var m=l.getState(`emphasis`);ce(m?m.style:null,i,u)}}function ce(t,n,r){var i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){var a=e.get(`drillDownIcon`,!0);t.text=a?a+` `+i:i}}function le(e,r,a,o){var s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,ue(c,s)):g||(s=new r,s instanceof SP&&(s.z2=KC(a,o)),de(c,s)),t[e][_]=s}function ue(e,t){var n=e[_]={};t instanceof KK?(n.oldX=t.x,n.oldY=t.y):n.oldShape=I({},t.shape)}function de(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof II;if(a&&(!r||r.direction===`drillDown`)){var c=0,l=0,u=i.background[a.getRawIndex()];!r&&u&&u.oldShape&&(c=u.oldShape.width,l=u.oldShape.height),s?(n.oldX=0,n.oldY=l):n.oldShape={x:c,y:l,width:0,height:0}}n.fadein=!s}}function KC(e,t){return e*ZK+t}function qC(e){var t=e.pieceList;e.hasSpecialVisual=!1,L(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function JC(e){var t=e.categories,n=e.categoryMap={},r=e.visual;if(iq(t,function(e,t){n[e]=t}),!z(r)){var i=[];H(r)?iq(r,function(e,t){var r=n[t];i[r??oq]=e}):i[oq]=r,r=rw(e,i)}for(var a=t.length-1;a>=0;a--)r[a]??(delete n[t[a]],t.pop())}function YC(e,t){var n=e.visual,r=[];H(n)?iq(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),rw(e,r)}function XC(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:tw([0,1])}}function ZC(e){var t=this.option.visual;return t[Math.round(ss(e,[0,1],[0,t.length-1],!0))]||{}}function QC(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function $C(e){var t=this.option.visual;return t[this.option.loop&&e!==oq?e%t.length:e]}function ew(){return this.option.visual[0]}function tw(e){return{linear:function(t){return ss(t,e,this.option.visual,!0)},category:$C,piecewise:function(t,n){var r=nw.call(this,n);return r??=ss(t,e,this.option.visual,!0),r},fixed:ew}}function nw(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[sq.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function rw(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=R(t,function(e){return Da(e)||[0,0,0,1]})),t}function iw(e,t,n){return e?t<=n:t<n}function aw(e,t,n,r){var i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(a&&!a.invisible&&a.isInView){var s=i.getModel(lq),c=ow(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=sw(c),u=cw(d,f)),l.stroke=u;var p=e.viewChildren;if(!p||!p.length)f=sw(c),l.fill=f;else{var m=uw(e,i,a,s,c,p);L(p,function(e,t){(e.depth>=n.length||e===n[e.depth])&&aw(e,fw(i,c,e,t,m,r),n,r)})}}}function ow(e,t,n){var r=I({},t),i=n.designatedVisualItemStyle;return L([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function sw(e){var t=lw(e,`color`);if(t){var n=lw(e,`colorAlpha`),r=lw(e,`colorSaturation`);return r&&(t=Na(t,null,null,r)),n&&(t=Pa(t,n)),t}}function cw(e,t){return t==null?null:Na(t,null,null,e)}function lw(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function uw(e,t,n,r,i,a){if(a&&a.length){var o=dw(t,`color`)||i.color!=null&&i.color!==`none`&&(dw(t,`colorAlpha`)||dw(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);var u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;var f=new sq(d);return uq(f).drColorMappingBy=u,f}}}function dw(e,t){var n=e.get(t);return z(n)&&n.length?{name:t,range:n}:null}function fw(e,t,n,r,i,a){var o=I({},t);if(i){var s=i.type,c=s===`color`&&uq(i).drColorMappingBy,l=c===`index`?r:c===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[s]=i.mapValueToVisual(l)}return o}function pw(e){e.registerSeriesModel(MK),e.registerChartView(rq),e.registerVisual(dq),e.registerLayout(GK),wC(e)}function mw(e){return`_EC_`+e}function hw(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}function gw(e,t,n,r,i){for(var a=new fq(r),o=0;o<e.length;o++)a.addNode(Cr(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(Cr(Ys(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=Gd(e,n);else{var h=QR.get(p),g=h&&h.dimensions||[];ar(g,`value`)<0&&g.concat([`value`]);var _=kd(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new YR(_,n),m.initData(e)}var v=new YR([`value`],n);return v.initData(c,s),i&&i(m,v),uC({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}function _w(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}function vw(e){return`_`+e+`Type`}function yw(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=tm(i),l=nm(o||0,c);return r+c+l+(a||``)+(s||``)}function bw(e,t,n){var r=t.getItemVisual(n,e);if(r&&r!==`none`){var i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=tm(i),l=nm(o||0,c),u=em(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:a*Math.PI/180||0,u.name=e,u}}function xw(e){var t=new vq({name:`line`,subPixelOptimize:!0});return Sw(t.shape,e),t}function Sw(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}function Cw(e){return e.animators&&e.animators.length>0}function ww(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Iu(t)}}function Tw(e){return isNaN(e[0])||isNaN(e[1])}function Ew(e){return e&&!Tw(e[0])&&!Tw(e[1])}function Dw(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:X(n[0],t.getWidth()),cy:X(n[1],t.getHeight()),r:X(e.get(`radius`),a/2)}}function Ow(e,t){var n=e==null?``:e+``;return t&&(V(t)?n=t.replace(`{value}`,n):B(t)&&(n=t(e))),n}function kw(e){e.registerChartView(wq),e.registerSeriesModel(Tq)}function Aw(e,t){for(var n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`,o=0,s=e.count();o<s;o++)i[o]=o;return B(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function jw(e){var t=e.hostModel,n=Nw(t);e.each(function(t){var r=e.getItemModel(t),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(t),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{var p=void 0,m=void 0,h=void 0,g=void 0,_=a.get(`length`);V(i)&&(!n&&ar([`top`,`bottom`],i)>-1&&(i=`left`),n&&ar([`left`,`right`],i)>-1&&(i=`bottom`)),i===`left`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,h=p-_,u=h-5,l=`right`):i===`right`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,h=p+_,u=h+5,l=`left`):i===`top`?(p=(s[3][0]+s[0][0])/2,m=(s[3][1]+s[0][1])/2,g=m-_,d=g-5,l=`center`):i===`bottom`?(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,g=m+_,d=g+5,l=`center`):i===`rightTop`?(p=n?s[3][0]:s[1][0],m=n?s[3][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p+_,u=h+5,l=`top`)):i===`rightBottom`?(p=s[2][0],m=s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`bottom`)):i===`leftTop`?(p=s[0][0],m=n?s[0][1]:s[1][1],n?(g=m-_,d=g-5,l=`center`):(h=p-_,u=h-5,l=`right`)):i===`leftBottom`?(p=n?s[1][0]:s[3][0],m=n?s[1][1]:s[2][1],n?(g=m+_,d=g+5,l=`center`):(h=p-_,u=h-5,l=`right`)):(p=(s[1][0]+s[2][0])/2,m=(s[1][1]+s[2][1])/2,n?(g=m+_,d=g+5,l=`center`):(h=p+_,u=h+5,l=`left`)),n?(h=p,u=h):(g=m,d=g),f=[[p,m],[h,g]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}function Mw(e,t){e.eachSeriesByType(Eq,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=ep(e,t),o=$f(e.getBoxLayoutParams(),a.refContainer),s=Nw(e),c=o.width,l=o.height,u=Aw(n,i),d=o.x,f=o.y,p=s?[X(e.get(`minSize`),l),X(e.get(`maxSize`),l)]:[X(e.get(`minSize`),c),X(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h??=Math.min(m[0],0),g??=m[1];var _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){var i=ss(n.get(r,e)||0,[h,g],p,!0),a=void 0;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i)}return[[t,a],[t,a+i]]}var o=ss(n.get(r,e)||0,[h,g],p,!0),u;switch(_){case`left`:u=d;break;case`center`:u=d+(c-o)/2;break;case`right`:u=d+c-o}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;x<u.length;x++){var S=u[x],C=u[x+1],w=n.getItemModel(S);if(s){var T=w.get([`itemStyle`,`width`]);T==null?T=y:(T=X(T,c),i===`ascending`&&(T=-T));var E=b(S,d),D=b(C,d+T);d+=T+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}else{var O=w.get([`itemStyle`,`height`]);O==null?O=y:(O=X(O,l),i===`ascending`&&(O=-O));var E=b(S,f),D=b(C,f+O);f+=O+v,n.setItemLayout(S,{points:E.concat(D.slice().reverse())})}}jw(n)})}function Nw(e){return e.get(`orient`)===`horizontal`}function Pw(e){e.registerChartView(Aq),e.registerSeriesModel(Dq),e.registerLayout(jq),e.registerProcessor(Sv(Eq))}function Fw(e,t,n,r,i,a){e||=0;var o=vs(n[1],-n[0]);if(i!=null&&(i=Lw(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(vs(t[1],-t[0]));s=Lw(s,[0,o]),i=a=Lw(s,[i,a]),r=0}t[0]=Lw(t[0],n),t[1]=Lw(t[1],n);var c=Iw(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=vs(u[0],l):u[1]=vs(u[1],-l),t[r]=Lw(t[r],u);var d=Iw(t,r);return i!=null&&(d.sign!==c.sign||d.span<i)&&(t[1-r]=vs(t[r],c.sign*i)),d=Iw(t,r),a!=null&&d.span>a&&(t[1-r]=vs(t[r],d.sign*a)),t}function Iw(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 Lw(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}function Rw(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);V(r)&&V(i)&&(e.fill=new gL(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function zw(e,t,n){var r=new _F({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Ul(r,{shape:{width:e.width+20}},t,n),r}function Bw(e,t){e.eachSeriesByType(Mq,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=ep(e,t).refContainer,a=$f(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;Hw(l),Vw(l,u,n,r,o,s,ur(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function Vw(e,t,n,r,i,a,o,s,c){Uw(e,t,n,i,a,s,c),Jw(e,t,a,i,r,o,s),sT(e,s)}function Hw(e){L(e,function(e){var t=aT(e.outEdges,iT),n=aT(e.inEdges,iT),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function Uw(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f<t.length;f++)s[f]=1;for(var f=0;f<e.length;f++)c[f]=e[f].inEdges.length,c[f]===0&&l.push(e[f]);for(var p=-1;l.length;){for(var m=0;m<l.length;m++){var h=l[m],g=h.hostGraph.data.getRawDataItem(h.dataIndex),_=g.depth!=null&&g.depth>=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;v<h.outEdges.length;v++){var y=h.outEdges[v],b=ar(t,y);s[b]=0;var x=y.node2,S=ar(e,x);--c[S]===0&&ar(u,x)<0&&u.push(x)}}++d,l=u,u=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw Error(`Sankey is a DAG, the original data has cycle!`);var C=p>d-1?p:d-1;o&&o!==`left`&&Gw(e,o,a,C),qw(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function Ww(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function Gw(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var c=a[s];c.setLayout({skNodeHeight:o},!0);for(var l=0;l<c.inEdges.length;l++){var u=c.inEdges[l];ar(i,u.node1)<0&&i.push(u.node1)}}a=i,i=[],++o}L(e,function(e){Ww(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&Kw(e,r)}function Kw(e,t){L(e,function(e){!Ww(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function qw(e,t,n){L(e,function(e){var r=e.getLayout().depth*t;n===`vertical`?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function Jw(e,t,n,r,i,a,o){var s=Yw(e,o);Xw(s,t,n,r,i,o),Zw(s,i,n,r,o);for(var c=1;a>0;a--)c*=.99,Qw(s,c,o),Zw(s,i,n,r,o),oT(s,c,o),Zw(s,i,n,r,o)}function Yw(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=lc(e,function(e){return e.getLayout()[r]});return ps(i.keys),L(i.keys,function(e){n.push(i.buckets.get(e))}),n}function Xw(e,t,n,r,i,a){var o=1/0;L(e,function(e){var t=e.length,s=0;L(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c<o&&(o=c)}),L(e,function(e){L(e,function(e,t){var n=e.getLayout().value*o;a===`vertical`?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),L(t,function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)})}function Zw(e,t,n,r,i){var a=i===`vertical`?`x`:`y`;L(e,function(e){e.sort(function(e,t){return e.getLayout()[a]-t.getLayout()[a]});for(var o,s,c,l=0,u=e.length,d=i===`vertical`?`dx`:`dy`,f=0;f<u;f++)s=e[f],c=l-s.getLayout()[a],c>0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Qw(e,t,n){L(e.slice().reverse(),function(e){L(e,function(e){if(e.outEdges.length){var r=aT(e.outEdges,$w,n)/aT(e.outEdges,iT);if(isNaN(r)){var i=e.outEdges.length;r=i?aT(e.outEdges,eT,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-rT(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-rT(e,n))*t;e.setLayout({y:o},!0)}}})})}function $w(e,t){return rT(e.node2,t)*e.getValue()}function eT(e,t){return rT(e.node2,t)}function tT(e,t){return rT(e.node1,t)*e.getValue()}function nT(e,t){return rT(e.node1,t)}function rT(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function iT(e){return e.getValue()}function aT(e,t,n){for(var r=0,i=e.length,a=-1;++a<i;){var o=+t(e[a],n);isNaN(o)||(r+=o)}return r}function oT(e,t,n){L(e,function(e){L(e,function(e){if(e.inEdges.length){var r=aT(e.inEdges,tT,n)/aT(e.inEdges,iT);if(isNaN(r)){var i=e.inEdges.length;r=i?aT(e.inEdges,nT,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-rT(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-rT(e,n))*t;e.setLayout({y:o},!0)}}})})}function sT(e,t){var n=t===`vertical`?`x`:`y`;L(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),L(e,function(e){var t=0,n=0;L(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),L(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}function cT(e){e.eachSeriesByType(Mq,function(e){var t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){var i=1/0,a=-1/0;L(n,function(e){var t=e.getLayout().value;t<i&&(i=t),t>a&&(a=t)}),L(n,function(t){var n=new sq({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&L(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function lT(e){e.registerChartView(Iq),e.registerSeriesModel(Nq),e.registerLayout(Lq),e.registerVisual(Rq),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:$F,subType:Mq,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),sC(e,$F,Mq)}function uT(e,t,n){var r=e[1]-e[0];t=R(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r<i;r++){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function dT(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}function fT(e){e.registerChartView(Vq),e.registerSeriesModel(Hq)}function pT(e,t,n,r,i){var a=e+`Animation`,o=Bl(e,r,i)||{},s=Kq(t).userDuring;return o.duration>0&&(o.during=s?q(xT,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),I(o,n[a]),o}function mT(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=Kq(e),l=t.style;c.userDuring=t.during;var u={},d={};if(TT(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m<p.length;m++){var h=p[m];CT(`shape`,h,f[m])}else CT(`shape`,t,d),CT(`extra`,t,d);if(!a&&s&&(wT(e,t,u),ST(`shape`,e,t,u),ST(`extra`,e,t,u),ET(e,t,l,u)),d.style=l,vT(e,d,o),bT(e,t),s){if(a){var g={};L(Gq,function(e){var n=e?t[e]:t;n&&n.enterFrom&&(e&&(g[e]=g[e]||{}),I(e?g[e]:g,n.enterFrom))});var _=pT(`enter`,e,t,n,i);_.duration>0&&e.animateFrom(g,_)}else yT(e,t,i||0,n,u)}hT(e,t),l?e.dirty():e.markRedraw()}function hT(e,t){for(var n=Kq(e).leaveToProps,r=0;r<Gq.length;r++){var i=Gq[r],a=i?t[i]:t;a&&a.leaveTo&&(n||=Kq(e).leaveToProps={},i&&(n[i]=n[i]||{}),I(i?n[i]:n,a.leaveTo))}}function gT(e,t,n,r){if(e){var i=e.parent,a=Kq(e).leaveToProps;if(a){var o=pT(`update`,e,t,n,0);o.done=function(){i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function _T(e){return e===`all`}function vT(e,t,n){var r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});for(var i=e.animators,a=0;a<i.length;a++){var o=i[a];o.targetName===`style`&&o.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function yT(e,t,n,r,i){if(i){var a=pT(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function bT(e,t){Fr(t,`silent`)&&(e.silent=t.silent),Fr(t,`ignore`)&&(e.ignore=t.ignore),e instanceof SP&&Fr(t,`invisible`)&&(e.invisible=t.invisible),e instanceof cF&&Fr(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}function xT(){var e=this,t=e.el;if(t){var n=Kq(t).userDuring,r=e.userDuring;n===r?(qq.el=t,r(Jq)):e.el=e.userDuring=null}}function ST(e,t,n,r){var i=n[e];if(i){var a=t[e],o;if(a){var s=n.transition,c=i.transition;if(c){if(!o&&(o=r[e]={}),_T(c))I(o,a);else for(var l=Is(c),u=0;u<l.length;u++){var d=l[u],f=a[d];o[d]=f}}else if(_T(s)||ar(s,e)>=0){!o&&(o=r[e]={});for(var p=fr(a),u=0;u<p.length;u++){var d=p[u],f=a[d];DT(i[d],f)&&(o[d]=f)}}}}}function CT(e,t,n){var r=t[e];if(r)for(var i=n[e]={},a=fr(r),o=0;o<a.length;o++){var s=a[o];i[s]=co(r[s])}}function wT(e,t,n){for(var r=t.transition,i=_T(r)?TN:Is(r||[]),a=0;a<i.length;a++){var o=i[a];o!==`style`&&o!==`shape`&&o!==`extra`&&(n[o]=e[o])}}function TT(e,t,n){for(var r=0;r<Wq.length;r++){var i=Wq[r],a=Uq[i],o=t[i];o&&(n[a[0]]=o[0],n[a[1]]=o[1])}for(var r=0;r<TN.length;r++){var s=TN[r];t[s]!=null&&(n[s]=t[s])}}function ET(e,t,n,r){if(n){var i=e.style,a;if(i){var o=n.transition,s=t.transition;if(o&&!_T(o)){var c=Is(o);!a&&(a=r.style={});for(var l=0;l<c.length;l++){var u=c[l],d=i[u];a[u]=d}}else if(e.getAnimationStyleProps&&(_T(s)||_T(o)||ar(s,`style`)>=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=fr(n),l=0;l<m.length;l++){var u=m[l];if(p[u]){var d=i[u];a[u]=d}}}}}}}function DT(e,t){return cr(e)?e!==t:e!=null&&isFinite(e)}function OT(e){e.stopAnimation(`keyframe`),e.attr(Yq(e))}function kT(e,t,n){if(n.isAnimationEnabled()&&t){if(z(t))L(t,function(t){kT(e,t,n)});else{var r=t.keyframes,i=t.duration;if(n&&i==null){var a=Bl(`enter`,n,0);i=a&&a.duration}if(r&&i){var o=Yq(e);L(Gq,function(n){if(!n||e[n]){var a;r.sort(function(e,t){return e.percent-t.percent}),L(r,function(r){var s=e.animators,c=n?r[n]:r;if(c){var l=fr(c);if(n||(l=ur(l,function(e){return ar(Xq,e)<0})),l.length){a||(a=e.animate(n,t.loop,!0),a.scope=`keyframe`);for(var u=0;u<s.length;u++)s[u]!==a&&s[u].targetName===a.targetName&&s[u].stopTracks(l);n&&(o[n]=o[n]||{});var d=n?o[n]:o;L(l,function(t){d[t]=((n?e[n]:e)||{})[t]}),a.whenWithKeys(i*r.percent,c,l,r.easing)}}}),a&&a.delay(t.delay||0).duration(i).start(t.easing)}})}}}}function AT(e,t,n,r){jT(Zq(n).lastProp,r)||(Zq(n).lastProp=r,t?Hl(n,r,e):(n.stopAnimation(),n.attr(r)))}function jT(e,t){if(H(e)&&H(t)){var n=!0;return L(t,function(t,r){n&&=jT(e[r],t)}),!!n}return e===t}function MT(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function NT(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function PT(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function FT(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 IT(e,t,n,r,i){var a=RT(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=Az(o.get(`padding`)||0),c=o.getFont(),l=Ai(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),LT(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:Lu(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function LT(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 RT(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:vh(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):B(o)&&(a=o(s))}return a}function zT(e,t,n){var r=$r();return ii(r,r,n.rotation),ri(r,r,n.position),ou([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function BT(e,t,n,r,i,a){var o=AV.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),IT(t,r,i,a,{position:zT(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function VT(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function HT(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function UT(e,t,n){return Ag(e,{fromStat:{sers:R(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function WT(e,t,n){return[kF(OF(t[0],t[1]),e-n/2),OF(e+n/2,kF(t[0],t[1]))]}function GT(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}function KT(e){return e.dim===`x`?0:1}function qT(e,t,n){if(!EM.node){var r=t.getZr();iJ(r).records||(iJ(r).records={}),JT(r,t);var i=iJ(r).records[e]||(iJ(r).records[e]={});i.handler=n}}function JT(e,t){if(iJ(e).initialized)return;iJ(e).initialized=!0,n(`click`,mr(ZT,`click`)),n(`mousemove`,mr(ZT,`mousemove`)),n(`mousewheel`,mr(ZT,`mousewheel`)),n(`globalout`,XT);function n(n,r){e.on(n,function(n){var i=QT(t);aJ(iJ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),YT(i.pendings,t)})}}function YT(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 XT(e,t,n){e.handler(`leave`,null,n)}function ZT(e,t,n,r){t.handler(e,n,r)}function QT(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 $T(e,t){if(!EM.node){var n=t.getZr();(iJ(n).records||{})[e]&&(iJ(n).records[e]=null)}}function eE(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=ec(a,e);if(o==null||o<0||z(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(R(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}}function tE(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||q(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){dE(i)&&(i=eE({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=dE(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||dE(i),f={},p={},m={list:[],map:{}},h={showPointer:mr(iE,p),showTooltip:mr(aE,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=lE(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&nE(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(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,uE(t),uE(e)))),g[e.key]=a}})}),L(g,function(e,t){nE(u[t],e,h,!0,f)}),oE(p,u,f),sE(m,i,e,o),cE(u,o,n),f}}function nE(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries)n.showPointer(e,t);else{var o=rE(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}}function rE(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(js(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),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function iE(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function aE(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=fS(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 oE(e,t,n){var r=n.axesInfo=[];L(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 sE(e,t,n,r){if(dE(t)||!e.list.length)r({type:`hideTip`});else{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 cE(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=sJ(r)[i]||{},o=sJ(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}L(a,function(e,t){!o[t]&&c.push(l(e))}),L(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function lE(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 uE(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 dE(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function fE(e){tK.registerAxisPointerClass(`CartesianAxisPointer`,tJ),e.registerComponentModel(rJ),e.registerComponentView(oJ),e.registerPreprocessor(function(e){if(e){e.axisPointer&&e.axisPointer.length!==0||(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=nS(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},tE)}function pE(e){Mx(hS),Mx(fE)}function mE(e,t){var n=e.cellSize,r=z(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),ip(e,t,{type:`box`,ignoreSize:R([0,1],function(e){return np(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}function hE(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function gE(e){e.registerComponentModel(cJ),e.registerComponentView(lJ),e.registerCoordinateSystem(`calendar`,dJ)}function _E(e,t){var n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){var r=t.parentOption;r?t.parentId=r.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function vE(e,t){var n;return L(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function yE(e,t,n){var r=I({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(nr(i,r,!0),ip(i,r,{ignoreSize:!0}),op(n,i),bE(n,i),bE(n,i,`shape`),bE(n,i,`style`),bE(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}function bE(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),e&&t)for(var r=n?fJ:pJ,i=0;i<r.length;i++){var a=r[i];e[a]==null&&t[a]!=null&&(e[a]=t[a])}}function xE(e,t){if(e&&(e.hv=t.hv=[vE(t,[`left`,`right`]),vE(t,[`top`,`bottom`])],e.type===`group`)){var n=e,r=t;n.width??=r.width=0,n.height??=r.height=0}}function SE(e){var t=new(Fr(hJ,e)?hJ[e]:Ql(e))({});return gJ(t).type=e,t}function CE(e,t,n,r){var i=SE(n);return t.add(i),r.set(e,i),gJ(i).id=e,gJ(i).isNew=!0,i}function wE(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){wE(e,t,n,r)}),gT(e,t,r),n.removeKey(gJ(e).id))}function TE(e,t,n,r){e.isGroup||L([[`cursor`,SP.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];Fr(t,r)?e[r]=U(t[r],n[1]):e[r]??(e[r]=n[1])}),L(fr(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=B(r)?r:null}}),Fr(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function EE(e){return e=I({},e),L([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(Pz),function(t){delete e[t]}),e}function DE(e,t,n){var r=ZF(e).eventData;e.silent||e.ignore||r||(r=ZF(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function OE(e){e.registerComponentModel(mJ),e.registerComponentView(_J),e.registerPreprocessor(function(e){var t=e.graphic;z(t)?e.graphic=!t[0]||!t[0].elements?[{elements:t}]:[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}function kE(e){return ar(bJ,e.get(`coordinateSystem`))>=0}function AE(e){return e+`Axis`}function jE(e,t){var n=W(),r=[],i=W();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 ME(e){var t=e.ecModel,n={infoList:[],infoMap:W()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(AE(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}function NE(e){var t=yJ(pg(e));return t.axisProxyMap||=W()}function PE(e){if(e)return NE(e.ecModel).get(e.uid)}function FE(e,t){NE(e.ecModel).set(e.uid,t)}function IE(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?PE(n.model):null}function LE(e){var t={};return L([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}function RE(e){e.registerAction(`dataZoom`,function(e,t){L(jE(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}function zE(e){EJ(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,TJ),RE(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function BE(e,t){var n=Az(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new _F({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})}function VE(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function HE(e){if(EM.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}function UE(e,t){if(!e)return t;t=Hf(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function WE(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}function GE(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function KE(e,t,n){if(!V(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=qf(t);var a=GE(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=jJ+`:`,l;ar([`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 qE(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(EM.transformSupported?``+jJ+i:`,left`+i+`,top`+i)),AJ+`:`+a}function JE(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!EM.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=EM.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+jJ+`:`+o+`;`:[[`top`,0],[`left`,0],[OJ,o]]}function YE(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=U(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),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function XE(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=Vp(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(qE(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Hf(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(YE(d)),f!=null&&i.push(`padding:`+Az(f).join(`px `)+`px`),i.join(`;`)+`;`}function ZE(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&ef(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()}function QE(e){return Math.max(0,e)}function $E(e){var t=QE(e.shadowBlur||0),n=QE(e.shadowOffsetX||0),r=QE(e.shadowOffsetY||0);return{left:QE(t-n),right:QE(t+n),top:QE(t-r),bottom:QE(t+r)}}function eD(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function tD(e,t,n){var r=t.ecModel,i;n?(i=new nR(n,r,r),i=new nR(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof nR&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new nR(o,i,r)))}return i}function nD(e,t){return e.dispatchAction||q(t.dispatchAction,t)}function rD(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 iD(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 aD(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 oD(e){return e===`center`||e===`middle`}function sD(e,t,n){var r=rc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=ic(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=ZF(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function cD(e){Mx(fE),e.registerComponentModel(DJ),e.registerComponentView(IJ),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ir),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ir)}function lD(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function uD(e,t,n){var r={};return LJ(t,function(t){var a=r[t]=i();LJ(e[t],function(e,r){if(sq.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new sq(i),r===`opacity`&&(i=F(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new sq(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function dD(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&lD(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&lD(t[n])?e[n]=F(t[n]):delete e[n]})}function fD(e,t,n,r){var i={};return L(e,function(e){i[e]=sq.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Sb(a,l,e)}function c(e,t){wb(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}function pD(e){e.registerComponentModel(RJ),e.registerComponentView(zJ)}function mD(e,t){if(!e)return!1;for(var n=z(e)?e:[e],r=0;r<n.length;r++)if(n[r]&&n[r][t])return!0;return!1}function hD(e){Ls(e,`label`,[`show`])}function gD(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function _D(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function vD(e,t,n,r,i,a,o){var s=[],c=Vd(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=wD(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);var d=t.get(i,u),f=ms(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}function yD(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!_D(t)&&!z(t.coord)&&z(i)){var a=bD(t,n,r,e);if(t=F(t),t.type&&HJ[t.type]&&a.baseAxis&&a.valueAxis){var o=ar(i,a.baseAxis.dim),s=ar(i,a.valueAxis.dim),c=HJ[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=c[0],t.value=c[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!z(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&HJ[t.type]){var u=r.getOtherAxis(l);u&&(t.value=wD(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)HJ[d[f]]&&(d[f]=wD(n,n.mapDimension(i[f]),d[f]));return t}}function bD(e,t,n,r){var i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(xD(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function xD(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function SD(e,t){return e&&e.containData&&t.coord&&!gD(t)?e.containData(t.coord):!0}function CD(e,t){return e?function(e,n,r,i){return yd(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return yd(e.value,t[i])}}function wD(e,t,n){if(n===`average`){var r=0,i=0;return e.each(t,function(e,t){isNaN(e)||(r+=e,i++)}),r/i}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}function TD(e,t,n){e.eachSeries(function(e){var r=VJ.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=Eu(r),o=a.z,s=a.zlevel;Ou(i.group,o,s)}})}function ED(e){return!isNaN(e)&&!isFinite(e)}function DD(e,t,n,r){var i=1-e,a=r.dimensions[e];return ED(t[i])&&ED(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function OD(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(DD(1,n,r,e)||DD(0,n,r,e)))return!0}return SD(e,t[0])&&SD(e,t[1])}function kD(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=X(o.get(`x`),i.getWidth()),l=X(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{var u=a.dimensions,d=e.get(u[0],t),f=e.get(u[1],t);s=a.dataToPoint([d,f])}if(Om(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;ED(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):ED(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}function AD(e,t,n){var r=e?R(e&&e.dimensions,function(e){var n=t.getData();return I(I({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new YR(r,n),a=new YR(r,n),o=new YR([],n),s=R(n.get(`data`),mr(qJ,t,e,n));e&&(s=ur(s,mr(OD,e)));var c=CD(!!e,r);return i.initData(R(s,function(e){return e[0]}),null,c),a.initData(R(s,function(e){return e[1]}),null,c),o.initData(R(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function jD(e){e.registerComponentModel(GJ),e.registerComponentView(JJ),e.registerPreprocessor(function(e){mD(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}function MD(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),QJ(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:ax(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 ND(e){var t=e.icon||`roundRect`,n=em(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=Z.color.neutral00,n.style.lineWidth=2),n}function PD(e,t,n,r){ID(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),FD(e,t,n,r)}function FD(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function ID(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function LD(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),RD(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),RD(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function RD(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(r!==`
29
+ `&&r!==``){var i=e.isSelected(r);n[r]=Fr(n,r)?n[r]&&i:i}}),n}function zD(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,mr(LD,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,mr(LD,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,mr(LD,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,mr(LD,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,mr(LD,`unSelect`))}function BD(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 VD(e){e.registerComponentModel(XJ),e.registerComponentView(eY),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,tY),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),zD(e)}function HD(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,ip(t,n,{type:`box`,ignoreSize:!!i})}function UD(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 WD(e){Mx(VD),e.registerComponentModel(nY),e.registerComponentView(oY),UD(e)}function GD(e){Mx(VD),Mx(WD)}function KD(e,t,n){cY(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function qD(e,t){for(var n=cY(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||JD(n,o))}}}function JD(e,t){if(t){e.removeKey(t.model.uid);var n=t.controller;n&&n.dispose()}}function YD(e,t){var n={model:t,containsPoint:mr(ZD,t),dispatchAction:mr(XD,e),dataZoomInfoMap:null,controller:null},r=n.controller=new fK(e.getZr());return L([`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 XD(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function ZD(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function QD(e,t,n){var r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){var t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=U(t.get(`cursorGrab`,!0),s),c=U(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function $D(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=cY(t),r=n.coordSysRecordMap||=W();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){L(ME(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,YD(t,n.model));(a.dataZoomInfoMap||=W()).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){var n=e.controller,i,a=e.dataZoomInfoMap;if(a){var o=a.keys()[0];o!=null&&(i=a.get(o))}if(!i)JD(r,e);else{var s=QD(a,e,t);n.enable(s.controlType,s.opt),Q_(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)}})})}function eO(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(Fw(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}function tO(e){zE(e),e.registerComponentModel(sY),e.registerComponentView(lY),$D(e)}function nO(e,t,n,r){var i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);var o=n.value[t],s=o==null||isNaN(o)?``:qm(r)||Gm(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?fs(o,a,!0):o+``;return B(i)?i(o,s):V(i)?i.replace(`{value}`,s):s}function rO(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function iO(e){return e===`vertical`?`ns-resize`:`ew-resize`}function aO(e){e.registerComponentModel(fY),e.registerComponentView(SY),zE(e)}function oO(e){Mx(tO),Mx(aO)}function sO(e,t,n){var r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;for(var a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=NY[o],c=[0,null,10],l={},u=0;u<3;u++)l[NY[1-o][u]]=c[u],l[s[u]]=u===2?n[0]:r[s[u]];var d=[[`x`,`width`,3],[`y`,`height`,0]][o],f=$f(l,a,r.padding);return s[(f.margin[d[2]]||0)+f[d[0]]+f[d[1]]*.5<a[d[1]]*.5?0:1]}function cO(e,t){return L(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}function lO(e,t,n,r){for(var i=t.targetVisuals[r],a=sq.prepareVisualTypes(i),o={color:Cb(e.getData(),`color`)},s=0,c=a.length;s<c;s++){var l=a[s],u=i[l===`opacity`?`__alphaForOpacity`:l];u&&u.applyVisual(n,d,f)}return o.color;function d(e){return o[e]}function f(e,t){o[e]=t}}function uO(e){var t=e&&e.visualMap;z(t)||(t=t?[t]:[]),LY(t,function(e){if(e){dO(e,`splitList`)&&!dO(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&z(t)&&LY(t,function(e){H(e)&&(dO(e,`start`)&&!dO(e,`min`)&&(e.min=e.start),dO(e,`end`)&&!dO(e,`max`)&&(e.max=e.end))})}})}function dO(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}function fO(e){RY||(RY=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(PY,FY),L(IY,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(uO))}function pO(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}function mO(e){e.registerComponentModel(zY),e.registerComponentView(VY),fO(e)}function hO(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}function gO(e,t){var n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:hO(r&&r.shape.points)}}function _O(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];t[i]!=null&&(e[i]=t[i])}}function vO(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=JY(t).labelManager;r||=JY(t).labelManager=new qY,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=JY(t).labelManager;L(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}function yO(e,t){return new YY(e,t)}function bO(e,t){var n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};L(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=CO(e,t);if(o){var s=o.vmin!==e.vmin,c=o.vmax!==e.vmax,l=o.vmax-o.vmin;if(!(s&&c)){if(s||c){var u=s?`S`:`E`;a[u][i.type].has=!0,a[u][i.type].span=l,a[u][i.type].inExtFrac=l/(e.vmax-e.vmin),a[u][i.type].val=i.val}else r[i.type].span+=l,r[i.type].val+=i.val}}});var o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));L(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:kF(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function xO(e,t,n,r,i,a){e!==`no`&&L(n,function(n){var o=CO(n,a);if(o)for(var s=t.length-1;s>=0;s--){var c=t[s],l=r(c),u=i*3/4;l>o.vmin-u&&l<o.vmax+u&&(e!==`preserve_extent_bound`||l!==a[0]&&l!==a[1])&&t.splice(s,1)}})}function SO(e,t,n,r){L(t,function(t){var i=CO(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort(function(e,t){return e.value-t.value})}function CO(e,t){var n=kF(e.vmin,t[0]),r=OF(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function wO(e,t,n){var r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999}L(e,function(e){if(e&&e.start!=null&&e.end!=null&&!e.isExpanded){var a={breakOption:F(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){var o=!1;if(V(e.gap)){var s=Or(e.gap);if(s.match(/%$/)){var c=parseFloat(s)/100;i(c,`Percent gap`)||(c=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=c,o=!0}}if(!o){var l=t.parse(e.gap);(!isFinite(l)||l<0)&&(l=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=l}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&L([`vmin`,`vmax`],function(e){a[e]<0&&(a[e]=0)}),a.vmin>a.vmax){var u=a.vmax;a.vmax=a.vmin,a.vmin=u}r.push(a)}}),r.sort(function(e,t){return e.vmin-t.vmin});var a=-1/0;return L(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:ur(r,function(e){return!!e})}}function TO(e,t){return EO(t)===EO(e)}function EO(e){return e.start+`_\0_`+e.end}function DO(e,t,n){var r=[];L(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),L(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=dr(r,function(n){return TO(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return L(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function OO(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=dr(n,function(e){return TO(e.breakOption,t.break.parsedBreak.breakOption)}),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:F(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function kO(e,t,n,r,i){i.original=wO(e,t,n);var a=i.transformed=wO(e,t,n),o=i.lookup;a.breaks=R(a.breaks,function(e,n){var i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}function AO(e,t){return t&&(e||={},e.break={type:QY[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function jO(){ff({createBreakScaleMapper:yO,pruneTicksByBreak:xO,addBreaksToTicks:SO,parseAxisBreakOption:wO,identifyAxisBreak:TO,serializeAxisBreakIdentifier:EO,retrieveAxisBreakPairs:DO,getTicksBreakOutwardTransform:OO,parseAxisBreakOptionInwardTransform:kO,makeAxisLabelFormatterParamBreak:AO})}function MO(e,t){var n=dr(e,function(e){return pf().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function NO(e){L(e,function(e){return e.shouldRemove=!0})}function PO(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function FO(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!pf())return;var o=pf().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1);if(!o.length)return;var s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);var d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new II({ignoreModelZ:!0}),y=a.isHorizontal(),b=$Y(t).visualList||($Y(t).visualList=[]);NO(b);for(var x=function(e){var t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();var s=MO(b,t);s.shouldRemove=!1;var c=new II;C(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,function(){var e={type:mV,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[a.dim+`AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)},S=0;S<o.length;S++)x(S);e.add(v),PO(b);function C(e,t,n,i,a,o){var s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[ML[v]]+r[NL[v]];function b(e){var t=[],n=[];t[d]=n[d]=e,t[v]=r[ML[v]],n[v]=y;var i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return qo(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);for(var x=[],S=[],C=!0,w=r[ML[v]],T=0;;T++){var E=w===r[ML[v]],D=w>=y;D&&(w=y);var O=[],k=[];O[d]=n,k[d]=i,!E&&!D&&(O[d]+=C?-c:c,k[d]-=C?c:-c),O[v]=w,k[v]=w,x.push(O),S.push(k);var A=void 0;if(T<e.length?A=e[T]:(A=Math.random(),e.push(A)),w+=A*(u-l)+l,C=!C,D)break}var j=pf().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new aL({anid:`break_a_`+j,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new aL({anid:`break_b_`+j,shape:{points:S},style:s,z:f}));var ee=S.slice();ee.reverse();var te=x.concat(ee);t.add(new rL({anid:`break_c_`+j,shape:{points:te},style:{fill:_,opacity:p.opacity},z:f}))}}}function IO(e,t,n,r){var i=e.axis,a=n.transform;Dr(r.style);var o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());var s=R(pf().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),function(e){return e.break},!1),function(e){var t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:pf().serializeAxisBreakIdentifier(t.breakOption)}});s.sort(function(e,t){return e.coordPair[0]-t.coordPair[0]});for(var c=o[0],l=null,u=0;u<s.length;u++){var d=s[u],f=Math.max(d.coordPair[0],o[0]),p=Math.min(d.coordPair[1],o[1]);c<=f&&m(c,f,l,d),c=p,l=d}c<=o[1]&&m(c,o[1],l,null);function m(e,n,i,o){function s(e,t){a&&(bi(e,e,a),bi(t,t,a))}function c(e,t){var n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};qo(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}var l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);var p=new cL(I({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_`+(i?i.brkId:`\0`)+`_\0_`+(o?o.brkId:`\0`)}}function LO(e,t,n){if(dr(n,function(e){return!e}))return;var r=new J;if(!Kg(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;var i=$r();ii(i,i,-t);var a=R(n,function(e){return e.transform?ni($r(),i,e.transform):i});function o(e){var t=n[0].localRect,r=new J(t[NL[e]]*a[0][0],t[NL[e]]*a[0][1]);return Math.abs(r.y)<1e-5}var s=.5;if(o(0)||o(1)){var c=R(n,function(e,t){var n=e.localRect.clone();return n.applyTransform(a[t]),n}),l=new J;l.copy(n[0].label).add(n[1].label).scale(.5),l.transform(i);var u=r.clone().transform(i),d=(c[0].x+c[1].x+(u.x>=0?c[0].width:c[1].width)+u.x)/2-l.x,f=Math.min(d,d-u.x),p=Math.max(d,d-u.x);s=(d-(p<0?p:f>0?f:0))/u.x}var m=new J,h=new J;J.scale(m,r,-s),J.scale(h,r,1-s),Bg(n[0],m),Bg(n[1],h)}function RO(e,t){var n={breaks:[]};return L(t.breaks,function(r){if(r){var i=dr(e.get(`breaks`,!0),function(e){return pf().identifyAxisBreak(e,r)});if(i){var a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}}}),n}function zO(){qg({adjustBreakLabelPair:LO,buildAxisBreakLine:IO,rectCoordBuildBreakAxis:FO,updateModelAxisBreak:RO})}function BO(e){Xg(e),jO(),zO()}function VO(e){var t=e.fill;return t!=null&&t!==oX}function HO(e){var t=e.stroke;return t!=null&&t!==oX}function UO(e,t,n,r){var i=t.opacity==null?1:t.opacity;if(n instanceof pF)e(`opacity`,i);else{if(VO(t)){var a=Ra(t.fill);e(`fill`,a.color);var o=t.fillOpacity==null?a.opacity*i:t.fillOpacity*a.opacity*i;(r||o<1)&&e(`fill-opacity`,o)}else e(`fill`,oX);if(HO(t)){var s=Ra(t.stroke);e(`stroke`,s.color);var c=t.strokeNoScale?n.getLineScale():1,l=c?(t.lineWidth||0)/c:0,u=t.strokeOpacity==null?s.opacity*i:t.strokeOpacity*s.opacity*i,d=t.strokeFirst;if((r||l!==1)&&e(`stroke-width`,l),(r||d)&&e(`paint-order`,d?`stroke`:`fill`),(r||u<1)&&e(`stroke-opacity`,u),t.lineDash){var f=Lb(n),p=f[0],m=f[1];p&&(m=sX(m||0),e(`stroke-dasharray`,p.join(`,`)),(m||r)&&e(`stroke-dashoffset`,m))}else r&&e(`stroke-dasharray`,oX);for(var h=0;h<cX.length;h++){var g=cX[h];if(r||t[g]!==aF[g]){var _=t[g]||aF[g];_&&e(lX[h],_)}}}else r&&e(`stroke`,oX)}}function WO(e){return document.createElementNS(uX,e)}function GO(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function KO(e,t){var n=[];if(t)for(var r in t){var i=t[r],a=r;i!==!1&&(i!==!0&&i!=null&&(a+=`="`+i+`"`),n.push(a))}return`<`+e+` `+n.join(` `)+`>`}function qO(e){return`</`+e+`>`}function JO(e,t){t||={};var n=t.newline?`
30
+ `:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return KO(i,a)+(i===`style`?o||``:sf(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+qO(i)}return r(e)}function YO(e,t,n){n||={};var r=n.newline?`
31
+ `:``,i=` {`+r,a=r+`}`,o=R(fr(e),function(t){return t+i+R(fr(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(fr(t),function(e){return`@keyframes `+e+i+R(fr(t[e]),function(n){return n+i+R(fr(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function XO(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ZO(e,t,n,r){return GO(`svg`,`root`,{width:e,height:t,xmlns:uX,"xmlns:xlink":dX,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}function QO(){return hX++}function $O(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new aX;return i.reset($a(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function ek(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[_X]=n+`px `+r+`px`)}function tk(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function nk(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=XO(n.zrId);t.animation=!0,ik(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=fr(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=tk(i,n);return a.replace(o,s)}}function rk(e){return V(e)?gX[e]?`cubic-bezier(`+gX[e]+`)`:ga(e)?e:``:``}function ik(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof mL){var s=nk(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l<a;l++){var u=i[l],d=[u.getMaxTime()/1e3+`s`],f=rk(u.getClip().easing),p=u.getDelay();f?d.push(f):d.push(`linear`),p&&d.push(p/1e3+`s`),u.getLoop()&&d.push(`infinite`);var m=d.join(` `);c[m]=c[m]||[m,[]],c[m][1].push(u)}function h(i){var a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){for(var r=e.getTracks(),i=e.getMaxTime(),a=0;a<r.length;a++){var o=r[a];if(o.needsAnimate()){var s=o.keyframes,c=o.propName;if(n&&(c=n(c)),c)for(var l=0;l<s.length;l++){var d=s[l],f=Math.round(d.time/i*100)+`%`,p=rk(d.easing),m=d.rawValue;(V(m)||gr(m))&&(t[f]=t[f]||{},t[f][c]=d.rawValue,p&&(t[f][u]=p))}}}}for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m?m===`shape`&&d(p,c):!r&&d(p,s)}for(var h in s){var g={};$i(g,e),I(g,s[h]);var _=eo(g),v=s[h][u];l[h]=_?{transform:_}:{},ek(l[h],g),v&&(l[h][u]=v)}var y,b=!0;for(var h in c){l[h]=l[h]||{};var x=!y,v=c[h][u];x&&(y=new ZP);var S=y.len();y.reset(),l[h].d=$O(e,c[h],y);var C=y.len();if(!x&&S!==C){b=!1;break}v&&(l[h][u]=v)}if(!b)for(var h in l)delete l[h].d;if(!r)for(var f=0;f<o;f++){var p=a[f],m=p.targetName;m===`style`&&d(p,l,function(e){return vX[e]})}for(var w=fr(l),T=!0,E,f=1;f<w.length;f++){var D=w[f-1],O=w[f];if(l[D][_X]!==l[O][_X]){T=!1;break}E=l[D][_X]}if(T&&E){for(var h in l)l[h][_X]&&delete l[h][_X];t[_X]=E}if(ur(w,function(e){return fr(l[e]).length>0}).length)return tk(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+QO();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function ak(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};ok(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=La(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),ok(r,t,n,!0)}}}function ok(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+QO(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}function sk(e){return e&&V(e.src)}function ck(e){return e&&B(e.toDataURL)}function lk(e,t,n,r){UO(function(i,a){var o=i===`fill`||i===`stroke`;o&&Za(a)?Ck(t,e,i,r):o&&Ja(a)?wk(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Sk(n,e,r)}function uk(e,t){var n=jy(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[mX+`silent`]=`true`))}function dk(e){return za(e[0]-1)&&za(e[1])&&za(e[2])&&za(e[3]-1)}function fk(e){return za(e[4])&&za(e[5])}function pk(e,t,n){if(t&&!(fk(t)&&dk(t))){var r=n?10:1e4;e.transform=dk(t)?`translate(`+yX(t[4]*r)/r+` `+yX(t[5]*r)/r+`)`:Ha(t)}}function mk(e,t,n){for(var r=e.points,i=[],a=0;a<r.length;a++)i.push(yX(r[a][0]*n)/n),i.push(yX(r[a][1]*n)/n);t.points=i.join(` `)}function hk(e){return!e.smooth}function gk(e){var t=R(e,function(e){return typeof e==`string`?[e,e]:e});return function(e,n,r){for(var i=0;i<t.length;i++){var a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=yX(o*r)/r)}}}function _k(e){for(var t=e.animators,n=0;n<t.length;n++)if(t[n].targetName===`shape`)return!0;return!1}function vk(e,t){var n=e.style,r=e.shape,i=bX[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&$a(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&_k(e))&&!(c<1)){s=e.type;var u=10**l;i[0](r,a,u)}else{var d=!e.path||e.shapeChanged();e.path||e.createPathProxy();var f=e.path;d&&(f.beginPath(),e.buildPath(f,e.shape),e.pathUpdated());var p=f.getVersion(),m=e,h=m.__svgPathBuilder;m.__svgPathVersion===p&&h&&c===m.__svgPathStrokePercent||(h||=m.__svgPathBuilder=new aX,h.reset(l),f.rebuildPath(h,c),h.generateStr(),m.__svgPathVersion=p,m.__svgPathStrokePercent=c),a.d=h.getStr()}return pk(a,e.transform),lk(a,n,e,t),uk(a,e),t.animation&&ik(e,a,t),t.emphasis&&ak(e,a,t),GO(s,e.id+``,a)}function yk(e,t){var n=e.style,r=n.image;if(r&&!V(r)&&(sk(r)?r=r.src:ck(r)&&(r=r.toDataURL())),r){var i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),pk(c,e.transform),lk(c,n,e,t),uk(c,e),t.animation&&ik(e,c,t),GO(`image`,e.id+``,c)}}function bk(e,t){var n=e.style,r=n.text;if(r!=null&&(r+=``),!(!r||isNaN(n.x)||isNaN(n.y))){var i=n.font||`12px sans-serif`,a=n.x||0,o=Ua(n.y||0,Ni(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":WN[n.textAlign]||n.textAlign};if(Qo(n)){var c=``,l=n.fontStyle,u=Xo(n.fontSize);if(!parseFloat(u))return;var d=n.fontFamily||`sans-serif`,f=n.fontWeight;c+=`font-size:`+u+`;font-family:`+d+`;`,l&&l!==`normal`&&(c+=`font-style:`+l+`;`),f&&f!==`normal`&&(c+=`font-weight:`+f+`;`),s.style=c}else s.style=`font: `+i;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),pk(s,e.transform),lk(s,n,e,t),uk(s,e),t.animation&&ik(e,s,t),GO(`text`,e.id+``,s,void 0,r)}}function xk(e,t){if(e instanceof cF)return vk(e,t);if(e instanceof pF)return yk(e,t);if(e instanceof uF)return bk(e,t)}function Sk(e,t,n){var r=e.style;if(Wa(r)){var i=Ga(e),a=n.shadowCache,o=a[i];if(!o){var s=e.getGlobalScale(),c=s[0],l=s[1];if(!c||!l)return;var u=r.shadowOffsetX||0,d=r.shadowOffsetY||0,f=r.shadowBlur,p=Ra(r.shadowColor),m=p.opacity,h=p.color,g=f/2/c,_=f/2/l,v=g+` `+_;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=GO(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[GO(`feDropShadow`,``,{dx:u/c,dy:d/l,stdDeviation:v,"flood-color":h,"flood-opacity":m})]),a[i]=o}t.filter=Qa(o)}}function Ck(e,t,n,r){var i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(Ya(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(Xa(i))a=`radialGradient`,o.cx=U(i.x,.5),o.cy=U(i.y,.5),o.r=U(i.r,.5);else return;for(var s=i.colorStops,c=[],l=0,u=s.length;l<u;++l){var d=Va(s[l].offset)*100+`%`,f=s[l].color,p=Ra(f),m=p.color,h=p.opacity,g={offset:d};g[`stop-color`]=m,h<1&&(g[`stop-opacity`]=h),c.push(GO(`stop`,l+``,g))}var _=JO(GO(a,``,o,c)),v=r.gradientCache,y=v[_];y||(y=r.zrId+`-g`+r.gradientIdx++,v[_]=y,o.id=y,r.defs[y]=GO(a,y,o,c)),t[n]=Qa(y)}function wk(e,t,n,r){var i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(Ka(i)){var f=i.imageWidth,p=i.imageHeight,m=void 0,h=i.image;if(V(h)?m=h:sk(h)?m=h.src:ck(h)&&(m=h.toDataURL()),typeof Image>`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Dr(f,g),Dr(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=Xr(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=GO(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=F(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=eo(i);x&&(o.patternTransform=x);var S=GO(`pattern`,``,o,[d]),C=JO(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=GO(`pattern`,T,o,[d])),t[n]=Qa(T)}}function Tk(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=GO(`clipPath`,a,o,[vk(e,n)])}t[`clip-path`]=Qa(a)}function Ek(e){return document.createTextNode(e)}function Dk(e,t,n){e.insertBefore(t,n)}function Ok(e,t){e.removeChild(t)}function kk(e,t){e.appendChild(t)}function Ak(e){return e.parentNode}function jk(e){return e.nextSibling}function Mk(e,t){e.textContent=t}function Nk(e){return e===void 0}function Pk(e){return e!==void 0}function Fk(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function Ik(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function Lk(e){var t,n=e.children,r=e.tag;if(Pk(r)){var i=e.elm=WO(r);if(Bk(CX,e),z(n))for(t=0;t<n.length;++t){var a=n[t];a!=null&&kk(i,Lk(a))}else Pk(e.text)&&!H(e.text)&&kk(i,Ek(e.text))}else e.elm=Ek(e.text);return e.elm}function Rk(e,t,n,r,i){for(;r<=i;++r){var a=n[r];a!=null&&Dk(e,Lk(a),t)}}function zk(e,t,n,r){for(;n<=r;++n){var i=t[n];i!=null&&(Pk(i.tag)?Ok(Ak(i.elm),i.elm):Ok(e,i.elm))}}function Bk(e,t){var n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){var o=a[n];i[n]!==o&&(o===!0?r.setAttribute(n,``):o===!1?r.removeAttribute(n):n===`style`?r.style.cssText=o:n.charCodeAt(0)===SX?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(fX,n,o):n.charCodeAt(3)===xX?r.setAttributeNS(pX,n,o):n.charCodeAt(5)===xX?r.setAttributeNS(dX,n,o):r.setAttribute(n,o):r.setAttribute(n,o))}for(n in i)n in a||r.removeAttribute(n)}}function Vk(e,t,n){for(var r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:Ik(o,l)?(Hk(o,l),o=t[++r],l=n[++i]):Ik(s,u)?(Hk(s,u),s=t[--a],u=n[--c]):Ik(o,u)?(Hk(o,u),Dk(e,o.elm,jk(s.elm)),o=t[++r],u=n[--c]):Ik(s,l)?(Hk(s,l),Dk(e,s.elm,o.elm),s=t[--a],l=n[++i]):(Nk(d)&&(d=Fk(t,r,a)),f=d[l.key],Nk(f)?Dk(e,Lk(l),o.elm):(p=t[f],p.tag===l.tag?(Hk(p,l),t[f]=void 0,Dk(e,p.elm,o.elm)):Dk(e,Lk(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,Rk(e,m,n,i,c)):zk(e,t,r,a))}function Hk(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(Bk(e,t),Nk(t.text)?Pk(r)&&Pk(i)?r!==i&&Vk(n,r,i):Pk(i)?(Pk(e.text)&&Mk(n,``),Rk(n,null,i,0,i.length-1)):Pk(r)?zk(n,r,0,r.length-1):Pk(e.text)&&Mk(n,``):e.text!==t.text&&(Pk(r)&&zk(n,r,0,r.length-1),Mk(n,t.text)))}function Uk(e,t){if(Ik(e,t))Hk(e,t);else{var n=e.elm,r=Ak(n);Lk(t),r!==null&&(Dk(r,t.elm,jk(n)),zk(r,[e],0,0))}return t}function Wk(e){return function(){}}function Gk(e,t,n,r){var i;if(n&&n!==`none`){if(i=GO(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),Za(n))Ck({fill:n},i.attrs,`fill`,r);else if(Ja(n))wk({style:{fill:n},dirty:Ir,getBoundingRect:function(){return{width:e,height:t}}},i.attrs,`fill`,r);else{var a=Ra(n),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs[`fill-opacity`]=s)}}return i}function Kk(e){e.registerPainter(`svg`,TX)}function qk(e,t,n){var r=oM.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}function Jk(e){return!e.__cursors.get(0)}function Yk(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}function Xk(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function Zk(e,t){var n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function Qk(e,t,n,r){var i=new EX(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,$k(i),i}function $k(e){e.__cursorStack=[],e.__cursors=W()}function eA(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function tA(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,eA({key:r})))}function nA(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function rA(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function iA(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];n&&(n&MX&&!s.__builtin__||n&NX&&s.__builtin__||n&PX&&s===e.hoverlayer)||t(s,a,o,i)}}function aA(e){e.registerPainter(`canvas`,IX)}function oA(e,...t){console.warn(e,...t)}function sA(e,...t){console.error(e,...t)}function cA(e){let t=HX.get(e);return t||(t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}),HX.set(e,t)),t}function lA(e){if(typeof e!=`string`||e===``)return!1;try{return cA(e),!0}catch{return!1}}function uA(e,t=BX){if(t===`Asia/Kolkata`){let t=new Date(e+VX);return{year:t.getUTCFullYear(),month:t.getUTCMonth(),day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}let n=Object.fromEntries(cA(t).formatToParts(e).map(e=>[e.type,Number(e.value)]));return{year:n.year,month:n.month-1,day:n.day,hour:n.hour%24,minute:n.minute,second:n.second}}function dA(e,t=BX){if(t===`Asia/Kolkata`)return VX;let n=uA(e,t),r=new Date(0);return r.setUTCFullYear(n.year,n.month,n.day),r.setUTCHours(n.hour,n.minute,n.second,0),r.getTime()-Math.floor(e/1e3)*1e3}function fA(e,t=BX){let n=e-dA(e,t);return n=e-dA(n,t),n}function pA(e,{decimals:t}={}){if(!tZ(e))return`-`;let n=QX(XX(t,2)).format(Math.abs(e));return n===`0`?`0`:nZ(e)+n}function mA(e,{unit:t=`rupees`,decimals:n,currency:r=`INR`}={}){if(!tZ(e))return`-`;let i=rZ(e,t),a=eZ(XX(n,0)).format(Math.abs(i));return(Number(a.replace(/,/g,``))===0?``:nZ(i))+zX(r)+a}function hA(e,{currency:t,unit:n=`rupees`}={}){if(!tZ(e))return`-`;let r=t?rZ(e,n):e,i=t?zX(t):``,a=Math.abs(r),o=YX.findIndex(([e])=>a>=e);if(o===-1){let e=QX(iZ(a)).format(a);if(e!==`1,000`)return(e===`0`?``:nZ(r))+i+e;o=YX.length-1}let[s,c]=YX[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u));return d>=100&&o>0&&(--o,[s,c]=YX[o],l=a/s,u=l>=100?0:l>=10?1:2,d=Number(l.toFixed(u))),`${nZ(r)}${i}${QX(u).format(d)} ${c}`}function gA(e,{decimals:t}={}){return tZ(e)?`${pA(e*100,{decimals:XX(t,1)})}%`:`-`}function _A(e,{unit:t=`s`}={}){if(!tZ(e))return`-`;let n={ms:1,s:1e3,min:6e4,h:36e5}[t]??1e3,r=Math.abs(e*n),i=nZ(e);if(Math.round(r)<1e3)return`${i}${QX(0).format(r)} ms`;let a=r/1e3;if(a<10)return`${i}${QX(1).format(a)}s`;let o=Math.round(a);if(o<60)return`${i}${o}s`;let s=e=>String(e).padStart(2,`0`),c=Math.floor(o/60);if(c<60)return`${i}${c}m ${s(o%60)}s`;let l=Math.floor(c/60);return`${i}${QX(0).format(l)}h ${s(c%60)}m`}function vA(e,t=BX){if(e instanceof Date)return e.getTime();if(tZ(e))return e;if(typeof e!=`string`)return NaN;let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(n){let[e,r,i]=[Number(n[1]),Number(n[2]),Number(n[3])],a=new Date(Date.UTC(2e3,r-1,i));return a.setUTCFullYear(e),a.getUTCFullYear()===e&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?fA(a.getTime(),t):NaN}return Date.parse(e)}function yA(e,t=BX){let{year:n,month:r,day:i,hour:a,minute:o}=uA(e,t);return{year:n,month:r,day:i,hour:a,minute:o}}function bA(e,{pattern:t=`day`,timeZone:n=BX}={}){let r=vA(e,n);if(!Number.isFinite(r))return`-`;let i=yA(r,n),a=e=>String(e).padStart(2,`0`),o=`${a(i.day)}-${JX[i.month]}-${i.year}`,s=`${a(i.hour)}:${a(i.minute)}`;switch(t){case`month`:return`${JX[i.month]}-${i.year}`;case`year`:return String(i.year);case`datetime`:return`${o} ${s}`;case`time`:return s;default:return o}}function xA(e,{timeZone:t=BX}={}){let n=vA(e,t);if(!Number.isFinite(n))return`-`;let r=yA(n,t);return`${String(r.day).padStart(2,`0`)}-${JX[r.month]}`}function G(e,t){if(e==null||e===``)return`-`;let n=t?.style;if(n===`date`)return bA(e,t);if(typeof e!=`number`)return String(e);switch(n){case`currency`:return mA(e,t);case`percent`:return gA(e,t);case`compact`:return hA(e,t);case`duration`:return _A(e,t);default:return pA(e,t)}}function SA(e){let t=e?.style;return t===`currency`?{style:`compact`,currency:e.currency??`INR`,unit:e.unit}:!t||t===`number`?{style:`compact`}:e}function CA(e){LZ.has(e)||(LZ.add(e),oA(`[@webority/ui-elements] <wui-chart> ${e}`))}function wA(e,t,n){t==null||n.includes(t)||CA(`received ${e}="${String(t)}", which is not one of ${RZ(n)}. The chart uses its default instead.`)}function TA(e,t,n){for(let r of Object.keys(t))n.includes(r)||(/^(y2|secondary)/i.test(r)?CA(`ignores ${e}.${r}: a chart has one value axis by design. Show the second measure as its own chart.`):CA(`ignores the unknown key ${e}.${r}. Known keys: ${n.join(`, `)}.`))}function EA(e,t){if(t!=null){if(typeof t!=`object`)CA(`expects ${e} to be an object such as { style: "currency" }.`);else{if(TA(e,t,IZ),wA(`${e}.style`,t.style,UX),t.currency!=null&&!RX(t.currency)&&CA(`received ${e}.currency="${String(t.currency)}", which is not an ISO 4217 code such as "INR". The chart uses INR instead.`),t.unit!=null){let n=t.style===`duration`?GX:WX;wA(`${e}.unit`,t.unit,n)}wA(`${e}.pattern`,t.pattern,KX),t.decimals!=null&&!(Number.isInteger(t.decimals)&&t.decimals>=0&&t.decimals<=20)&&CA(`received ${e}.decimals=${String(t.decimals)}, which is not a whole number from 0 to 20. The chart uses its default instead.`)}}}function DA(e){let t=(e,t=pZ)=>(sA(`[@webority/ui-elements] <wui-chart> ${e}`),{spec:null,problem:t});if(!BZ(e))return t('has no spec: set the `spec` property or add a <script type="application/json"> child.');if(TA(`spec`,e,OZ),wA(`type`,e.type,aZ),!aZ.includes(e.type))return t(`cannot draw type "${String(e.type)}".`);let n=e.type;typeof e.title==`string`&&e.title.trim()||CA("needs a `title`: it names the chart for screen readers and names exported files.");for(let[t,r]of Object.entries(CZ))e[t]!=null&&!r.includes(n)&&CA(`ignores spec.${t} on a ${n} chart: it applies to ${r.join(`, `)}.`);let r=BZ(e.x)?e.x:{};TA(`spec.x`,r,kZ);let i=SZ[n]??[`category`];wA(`x.kind`,r.kind,sZ),sZ.includes(r.kind)&&!i.includes(r.kind)&&CA(`ignores x.kind="${r.kind}" on a ${n} chart: it takes ${RZ(i)}.`),EA(`x.format`,r.format),typeof r.key!=`string`&&n!==`gauge`&&CA("needs `x.key`, the column holding each row's x value or slice name.");let a=BZ(e.y)?e.y:{};TA(`spec.y`,a,PZ),EA(`y.format`,a.format);let o=Array.isArray(e.series)?e.series.filter(BZ):[];for(let[e,t]of o.entries())TA(`spec.series[${e}]`,t,AZ),EA(`series[${e}].format`,t.format),typeof t.key!=`string`&&CA(`needs series[${e}].key, the column holding that series' values.`);if(o.length===0)return t(`has no series to draw.`);let s=o.map(e=>e.key).filter(e=>typeof e==`string`),c=s.find((e,t)=>s.indexOf(e)!==t);if(c!==void 0)return t(`has two series with the key "${c}": each series needs its own key.`);if(o.length>8)return t(`refuses ${o.length} series: 8 is the most that stay distinguishable. Fold the smallest into an Other series, or split the chart.`,hZ);let l=yZ(n);if(l&&o.length>1){let e=n===`donut`?`Compare parts across groups with a percent-stacked column instead.`:`Show the other measures as their own charts, or use small multiples.`;CA(`draws one series as a ${n}; it got ${o.length} and shows the first. ${e}`)}let u=(e,t,n,r)=>t==null?null:BZ(t)?(TA(e,t,n),typeof t.key==`string`?(EA(`${e}.format`,t.format),{key:t.key,label:typeof t.label==`string`?t.label:``,format:VZ(t.format)}):(CA(`needs ${e}.key, the column holding ${r}.`),null)):(CA(`expects ${e} to be an object such as { key: "column" }.`),null),d=CZ.group.includes(n)?u(`spec.group`,e.group,jZ,`each row's group`):null,f=n===`sankey`?u(`spec.to`,e.to,jZ,`where each flow ends`):null,p=n===`bubble`?u(`spec.size`,e.size,MZ,`each bubble's size`):null;if((n===`heatmap`||n===`treemap`)&&!d)return t(`needs \`group.key\` to draw a ${n}: the column holding each ${n===`heatmap`?`row`:`parent`}.`);if(n===`sankey`&&!f)return t("needs `to.key` to draw a sankey: the column holding where each flow ends.");if(n===`bubble`&&!p)return t("needs `size.key` to draw a bubble chart: the column holding each bubble's size.");let m=bZ.includes(n)?oZ:[`none`];wA(`stack`,e.stack,m),wA(`state`,e.state,lZ),wA(`renderer`,e.renderer,cZ),e.timeZone!=null&&!lA(e.timeZone)&&CA(`received timeZone="${String(e.timeZone)}", which is not a time zone this browser knows. The chart uses Asia/Kolkata instead.`);let h=lA(e.timeZone)?e.timeZone:BX;e.target!=null&&(BZ(e.target)&&TA(`spec.target`,e.target,FZ),BZ(e.target)&&zZ(e.target.value)||CA("ignores a `target` without a numeric `value`.")),e.trend!=null&&typeof e.trend!=`boolean`&&CA("expects `trend` to be true or false."),e.zoom!=null&&typeof e.zoom!=`boolean`&&CA("expects `zoom` to be true or false.");let g=[];if(n===`gauge`&&e.bands!=null){let t=Array.isArray(e.bands)?e.bands.filter(BZ):[];for(let e of t)TA(`spec.bands[]`,e,NZ);g=t.filter(e=>zZ(e.upTo)&&typeof e.label==`string`&&e.label).map(e=>({upTo:e.upTo,label:e.label})).sort((e,t)=>e.upTo-t.upTo),Array.isArray(e.bands)&&g.length===t.length||CA("ignores a gauge band without a numeric `upTo` and a `label`.")}let _=VZ(a.format??o[0].format),v=(l?o.slice(0,1):o).map(e=>({key:e.key,label:typeof e.label==`string`&&e.label?e.label:String(e.key),format:VZ(e.format)??_})),y=i.includes(r.kind)?r.kind:i[0],b=Array.isArray(e.data)?e.data.filter(BZ):[],x=-1,S=null;n===`donut`&&b.length>6&&(S=b,{data:b,otherIndex:x}=AA(b,r.key,v[0].key),CA(`draws at most 6 donut slices; the smallest ${e.data.length-5} are shown as "${dZ}". Send fewer rows, or use a bar chart for many parts.`));let C=v[0].key,w=(e,t)=>{let n=b.filter(e);n.length!==b.length&&CA(`leaves out ${b.length-n.length} row(s) ${t}.`),b=n},T=e=>e!=null&&e!==``,E=e=>zZ(e)&&e>0;if(y===`time`&&xZ.includes(n)&&w(e=>Number.isFinite(vA(e[r.key],h)),`without a readable date`),n===`gauge`&&b.length>1)CA(`draws one value as a gauge; it got ${b.length} rows and shows the first.`),b=b.slice(0,1);else if(n===`scatter`||n===`bubble`){w(e=>zZ(e[r.key])&&zZ(e[C])&&(n!==`bubble`||E(e[p.key])),`without a number for x and y (and a positive size)`);let e=new Set(d?b.map(e=>String(e[d.key]??``)):[]);if(e.size>3)return t(`refuses ${e.size} colour groups on a ${n} chart: 3 is the most that stay tellable apart. Keep the three that matter and fold the rest into one, or split the chart.`,gZ)}else if(n===`calendar`)w(e=>Number.isFinite(vA(e[r.key],h)),`without a readable date`);else if(n===`heatmap`)w(e=>T(e[r.key])&&T(e[d.key]),`without a column or a row`);else if(n===`treemap`){w(e=>T(e[r.key])&&T(e[d.key])&&E(e[C]),`without a name, a parent and a positive size`);let e=new Set(b.map(e=>String(e[d.key])));if(e.size>8)return t(`refuses ${e.size} parents in a treemap: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,gZ)}else if(n===`sankey`){w(e=>T(e[r.key])&&T(e[f.key])&&E(e[C]),`without a start, an end and a positive size`);let e=OA(b,r.key,f.key);if(e)return t(e.reason,e.text)}else if(n===`waterfall`){let e=kA(b,C);if(e?.refuse)return t(e.refuse);e&&CA(e.warn)}let D=zZ(e.height)&&e.height>0?e.height:null;if(n===`multiples`){let e=EZ*v.length+DZ;D!=null&&D<e&&(CA(`needs at least ${e}px of height for ${v.length} small charts; it got ${D}px and draws at ${e}px.`),D=e),D??=TZ*v.length+40}return D??=wZ[n]??320,{problem:null,spec:{type:n,title:typeof e.title==`string`?e.title.trim():``,description:typeof e.description==`string`?e.description:``,data:b,allData:S??b,x:{key:r.key,kind:y,format:VZ(r.format)??(y===`time`?{style:`date`}:y===`value`?{style:`number`}:void 0),label:r.label??``},series:v,group:d,to:f,size:p,trend:CZ.trend.includes(n)&&e.trend===!0,zoom:CZ.zoom.includes(n)?(e.zoom??b.length>5e3)===!0:!1,bands:g,stack:m.includes(e.stack)?e.stack:`none`,y:{label:a.label??``,format:_,min:zZ(a.min)?a.min:void 0,max:zZ(a.max)?a.max:void 0,wholeNumbers:a.wholeNumbers===!0},target:BZ(e.target)&&zZ(e.target.value)?{value:e.target.value,label:String(e.target.label??``)}:null,centerLabel:n===`donut`&&typeof e.centerLabel==`string`&&e.centerLabel.trim()?e.centerLabel.trim():``,height:D,state:lZ.includes(e.state)?e.state:`ready`,emptyText:typeof e.emptyText==`string`&&e.emptyText?e.emptyText:fZ,errorText:typeof e.errorText==`string`&&e.errorText?e.errorText:pZ,loadingText:typeof e.loadingText==`string`&&e.loadingText?e.loadingText:mZ,renderer:cZ.includes(e.renderer)?e.renderer:`auto`,timeZone:h,otherIndex:x}}}function OA(e,t,n){let r=e.map(e=>[String(e[t]),String(e[n])]),i=new Map;for(let[e,t]of r)i.has(e)||i.set(e,0),i.set(t,(i.get(t)??0)+1);let a=[...i].filter(([,e])=>e===0).map(([e])=>e);if(a.length>8)return{reason:`refuses ${a.length} flow starts in a sankey: 8 is the most that keep their own colour. Fold the smallest into one, or split the chart.`,text:gZ};let o=0;for(;a.length;){let e=a.pop();o+=1;for(let[t,n]of r)t===e&&(i.set(n,i.get(n)-1),i.get(n)===0&&a.push(n))}return o<i.size?{reason:`cannot draw a sankey whose flows loop back on themselves.`,text:pZ}:null}function kA(e,t){let n=e.map(e=>zZ(e[t])?e[t]:0),r=n[n.length-1]??0,i=n[0]??0,a=i;for(let e of n.slice(1,-1))i+=e,a=Math.min(a,i);return a<0||n.length>1&&r<0?{refuse:`cannot draw a waterfall whose running total goes below zero.`}:n.length>2&&Math.abs(r-i)>.5?{warn:`draws the waterfall's closing total (${r}) as given, though the opening total plus the steps is ${i}.`}:null}function AA(e,t,n){let r=new Set(e.map((e,t)=>({i:t,v:zZ(e[n])?e[n]:0})).sort((e,t)=>t.v-e.v).slice(0,5).map(e=>e.i)),i=e.reduce((e,t,i)=>r.has(i)||!zZ(t[n])?e:e+t[n],0),a=e.filter((e,t)=>r.has(t)),o=new Set(a.map(e=>String(e[t]))),s=dZ;for(let e=2;o.has(s);e+=1)s=`${dZ} (${e})`;return a.push({[t]:s,[n]:i}),{data:a,otherIndex:a.length-1}}function K(e,t,n){let r=e.data[n]?.[t];return zZ(r)?r:null}function jA(e){return e.type===`gauge`||e.series.some(t=>e.data.some((n,r)=>K(e,t.key,r)!=null))}function MA(e,t){let n=e.data[t]?.[e.x.key];return n==null||n===``?`-`:e.x.format?G(n,{...e.x.format,timeZone:e.timeZone}):String(n)}function NA(e,t){return vA(e.data[t]?.[e.x.key],e.timeZone)}function PA(e,t){let n=e.group?e.data[t]?.[e.group.key]:null;return n==null||n===``?`-`:String(n)}function FA(e,t){let n=e.to?e.data[t]?.[e.to.key]:null;return n==null||n===``?`-`:String(n)}function IA(e){return e.group?HZ(e.data.map((t,n)=>PA(e,n))):[]}function LA(e){return yZ(e.type)?e.data.length:e.data.length*e.series.length}function RA(e){return e.renderer===`auto`?LA(e)>5e3?`canvas`:`svg`:e.renderer}function zA(e){switch(e.type){case`donut`:return e.data.map((t,n)=>MA(e,n));case`scatter`:case`bubble`:return IA(e);case`line`:case`area`:case`column`:case`bar`:return e.series.map(e=>e.key);default:return[]}}function BA(e){return[`line`,`area`,`column`,`bar`].includes(e.type)?e.series.map(e=>e.label):zA(e)}function VA(e,t,n){return e.type===`donut`?n.has(MA(e,t)):(e.type===`scatter`||e.type===`bubble`)&&e.group?n.has(PA(e,t)):!1}function HA(e,t){return e.data.map((n,r)=>{let i=e.series.filter(e=>!t.has(e.key)).reduce((t,n)=>t+Math.abs(K(e,n.key,r)??0),0);return Object.fromEntries(e.series.map(t=>[t.key,i&&K(e,t.key,r)!=null?K(e,t.key,r)/i:null]))})}function UA(e,t=BX){return`${UZ[new Date(e+dA(e,t)).getUTCDay()]}, ${bA(e,{timeZone:t})}`}function WA(e,t){let n=e.filter(zZ);if(!n.length)return[];let r=WZ(n),i=GZ(n),a=[t[1],t[2],t[3],t[5],t[6]];if(r===i)return[{from:r,to:i,colour:a[2]}];let o=(i-r)/a.length;return a.map((e,t)=>({from:r+o*t,to:t===a.length-1?i:r+o*(t+1),colour:e}))}function GA(e,t){if(t==null||!e.length)return;let n=e.length-1,r=e.findIndex((e,r)=>t>=e.from&&(r===n?t<=e.to:t<e.to));return e[r<0?n:r].colour}function KA(e,t){return Array.from({length:e},(n,r)=>t[e===1?6:Math.round(6-r*4/(e-1))])}function qA(e,t){return e.bands.find(e=>t<=e.upTo)??e.bands[e.bands.length-1]??null}function JA(e){return{min:e.y.min??0,max:e.y.max??100}}function YA(e){let t=e.series[0].key,n=e.data.length-1,r=0;return e.data.map((i,a)=>{let o=K(e,t,a)??0,s=a===0||a===n,c=s?0:r,l=s?o:r+o;return a===0?r=o:s||(r=l),{index:a,total:s,value:o,from:c,to:l,level:s?o:l}})}function XA(e,t){let n=e.series[0].key,r=e.data.map(t=>({from:String(t[e.x.key]),to:String(t[e.to.key]),value:t[n]})),i=new Map;for(let e of r)i.has(e.from)||i.set(e.from,[]),i.set(e.to,[...i.get(e.to)??[],e]);let a=new Map,o=0;for(let[e,n]of i)n.length||a.set(e,t[o++%t.length]);let s=[...a.keys()],c=new Map([...i].filter(([,e])=>e.length).map(([e,t])=>[e,t.length]));for(;s.length;){let e=s.shift();for(let t of r.filter(t=>t.from===e)){if(c.set(t.to,c.get(t.to)-1),c.get(t.to)>0)continue;let e=i.get(t.to).reduce((e,t)=>t.value>e.value?t:e);a.set(t.to,a.get(e.from)),s.push(t.to)}}return a}function ZA(e){let t=e.series[0].key,n=new Map(IA(e).map(e=>[e,0]));return e.data.forEach((r,i)=>{n.set(PA(e,i),n.get(PA(e,i))+r[t])}),n}function QA(e,t,n){let{palette:r,neutral:i,seq:a}=n,o=e.series[0].key;switch(e.type){case`donut`:return tj(e,t,n);case`funnel`:return KA(e.data.length,a)[t];case`heatmap`:case`calendar`:return GA(WA(KZ(e,o),a),K(e,o,t));case`gauge`:return r[0];case`waterfall`:{let n=YA(e)[t];return n.total?r[0]:n.value>=0?r[2]:r[7]}case`treemap`:return r[[...ZA(e).keys()].indexOf(PA(e,t))%r.length];case`sankey`:return XA(e,r).get(String(e.data[t][e.x.key]));case`scatter`:case`bubble`:return r[Math.max(0,IA(e).indexOf(PA(e,t)))];default:return r[0]??i}}function $A(e,t,n,r){let i=e.series[0],a=K(e,i.key,t),o=()=>QA(e,t,r);switch(e.type){case`donut`:{let r=e.data.reduce((t,r,a)=>t+(n.has(MA(e,a))?0:K(e,i.key,a)??0),0);return{title:MA(e,t),rows:[{color:o(),label:i.label,value:G(a,i.format)},{label:`Share`,value:r&&a!=null?G(a/r,{style:`percent`}):`-`}],foot:``}}case`heatmap`:return{title:`${PA(e,t)}, ${MA(e,t)}`,rows:[{color:o(),label:i.label,value:G(a,i.format)}],foot:``};case`calendar`:return{title:UA(NA(e,t),e.timeZone),rows:[{color:o(),label:i.label,value:G(a,i.format)}],foot:``};case`funnel`:{let n=K(e,i.key,0),r=t?K(e,i.key,t-1):null,s=[{color:o(),label:i.label,value:G(a,i.format)}];return t&&s.push({label:`Of previous step`,value:qZ(a,r)}),s.push({label:`Of ${MA(e,0)}`,value:qZ(a,n)}),{title:MA(e,t),rows:s,foot:``}}case`gauge`:{let{min:n,max:r}=JA(e),s=a==null?null:qA(e,a),c=[{color:o(),label:i.label,value:G(a,i.format)}];return c.push({label:`Scale`,value:`${G(n,i.format)} to ${G(r,i.format)}`}),s&&c.push({label:`Band`,value:s.label}),{title:e.data[t]?.[e.x.key]==null?i.label:MA(e,t),rows:c,foot:``}}case`waterfall`:{let n=YA(e)[t],r=YA(e)[0].value,a=n.total?[{color:o(),label:i.label,value:G(n.value,i.format)}]:[{color:o(),label:`Change`,value:ej(n.value,i.format)},{label:`Running total`,value:G(n.level,i.format)}],s=!n.total&&r?`${ej(n.value/r*100,{style:`number`,decimals:2},`%`)} of opening`:``;return{title:MA(e,t),rows:a,foot:s}}case`treemap`:{let n=PA(e,t),r=ZA(e).get(n);return{title:`${n} / ${MA(e,t)}`,rows:[{color:o(),label:i.label,value:G(a,i.format)},{label:`Share of ${n}`,value:qZ(a,r)}],foot:``}}case`sankey`:{let n=String(e.data[t][e.x.key]),r=e.data.reduce((t,r,a)=>String(r[e.x.key])===n?t+(K(e,i.key,a)??0):t,0);return{title:`${n} to ${FA(e,t)}`,rows:[{color:o(),label:i.label,value:G(a,i.format)},{label:`Share of ${n}`,value:qZ(a,r)}],foot:``}}case`scatter`:case`bubble`:{let n=[{color:o(),label:e.x.label||String(e.x.key),value:MA(e,t)},{label:i.label,value:G(a,i.format)}];return e.size&&n.push({label:e.size.label||String(e.size.key),value:G(e.data[t][e.size.key],e.size.format)}),{title:e.group?PA(e,t):i.label,rows:n,foot:``}}}let s=e.stack===`percent`?HA(e,n)[t]:null,c=e.series.map((e,t)=>({s:e,i:t})).filter(({s:e})=>!n.has(e.key)),l=c.map(({s:n,i})=>{let a=K(e,n.key,t),o=G(a,n.format);return{color:e.type===`multiples`?r.palette[0]:r.palette[i],line:e.type===`line`||e.type===`multiples`,label:n.label,value:s&&a!=null?`${o} (${G(s[n.key],{style:`percent`})})`:o}}),u=``;if(e.stack!==`none`&&c.length>1&&(u=`Total ${G(c.reduce((n,{s:r})=>n+(K(e,r.key,t)??0),0),c[0].s.format)}`),e.target&&c.length===1){let n=K(e,c[0].s.key,t);if(n!=null){let t=n-e.target.value,r=e.target.label||`target`;u=`${t>=0?`Above`:`Below`} ${r} by ${G(Math.abs(t),c[0].s.format)}`}}return{title:MA(e,t),rows:l,foot:u}}function ej(e,t,n=``){let r=`${G(Math.abs(e),t)}${n}`;return e>0?`+${r}`:e<0?`−${r}`:r}function tj(e,t,n){return t===e.otherIndex?n.neutral:n.palette[t%n.palette.length]}function nj(e){let t=(e,t)=>{let n=document.createElement(`div`);return n.className=e,t!=null&&(n.textContent=t),n},n=t(`wui-chart-tooltip-body`);e.title&&n.append(t(`wui-chart-tooltip-title`,e.title));for(let r of e.rows){let e=t(`wui-chart-tooltip-row`);if(r.color){let t=document.createElement(`span`);t.className=r.line?`wui-chart-tooltip-swatch wui-chart-tooltip-swatch-line`:`wui-chart-tooltip-swatch`,t.style.background=r.color,e.append(t)}let i=document.createElement(`span`);i.className=`wui-chart-tooltip-label`,i.textContent=r.label;let a=document.createElement(`span`);a.className=`wui-chart-tooltip-value`,a.textContent=r.value,e.append(i,a),n.append(e)}return e.foot&&n.append(t(`wui-chart-tooltip-foot`,e.foot)),n}function rj(e){let t=[e.title,...e.rows.map(e=>`${e.label} ${e.value}`)];return e.foot&&t.push(e.foot),t.filter(Boolean).join(`. `)}function ij(e){return e.x.label?e.x.label:{gauge:`Measure`,funnel:`Stage`,waterfall:`Step`,sankey:`From`,scatter:`X`,bubble:`X`}[e.type]??(e.x.kind===`time`?`Date`:`Category`)}function aj(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=t.series[0],r=(e,r=n)=>G(K(t,r.key,e),r.format),i=(e,n,r=n.length)=>({caption:t.title,head:e,rows:n.slice(0,500),total:r,truncated:r>500}),a=t.data.map((e,t)=>t);switch(t.type){case`heatmap`:{let e=HZ(a.map(e=>MA(t,e))),n=IA(t),o=new Map(a.map(e=>[`${PA(t,e)}\u0000${MA(t,e)}`,r(e)]));return i([t.group.label||`Row`,...e],n.map(t=>({head:t,cells:e.map(e=>o.get(`${t}\u0000${e}`)??`-`)})))}case`funnel`:{let e=K(t,n.key,0);return i([ij(t),n.label,`Of previous step`,`Of ${MA(t,0)}`],a.map(i=>({head:MA(t,i),cells:[r(i),i?qZ(K(t,n.key,i),K(t,n.key,i-1)):`-`,qZ(K(t,n.key,i),e)]})))}case`gauge`:return i([ij(t),n.label,...t.bands.length?[`Band`]:[]],a.map(e=>({head:t.data[e][t.x.key]==null?n.label:MA(t,e),cells:[r(e),...t.bands.length?[JZ(t,K(t,n.key,e))]:[]]})));case`waterfall`:return i([ij(t),`Change`,`Running total`],YA(t).map(e=>({head:MA(t,e.index),cells:[e.total?`-`:ej(e.value,n.format),G(e.level,n.format)]})));case`treemap`:{let e=ZA(t);return i([t.group.label||`Group`,t.x.label||`Item`,n.label,`Share of group`],a.map(i=>({head:PA(t,i),cells:[MA(t,i),r(i),qZ(K(t,n.key,i),e.get(PA(t,i)))]})))}case`sankey`:return i([ij(t),t.to.label||`To`,n.label],a.map(e=>({head:MA(t,e),cells:[FA(t,e),r(e)]})));case`scatter`:case`bubble`:return i([ij(t),n.label,...t.size?[t.size.label||t.size.key]:[],...t.group?[t.group.label||`Group`]:[]],a.map(e=>({head:MA(t,e),cells:[r(e),...t.size?[G(t.data[e][t.size.key],t.size.format)]:[],...t.group?[PA(t,e)]:[]]})))}let o=t.type===`donut`,s=o?t.data.reduce((e,r,i)=>e+(K(t,n.key,i)??0),0):0,c=[ij(t),...t.series.map(e=>e.label)];return o&&c.push(`Share`),i(c,a.slice(0,500).map(e=>{let i=t.series.map(t=>r(e,t));if(o){let r=K(t,n.key,e);i.push(s&&r!=null?G(r/s,{style:`percent`}):`-`)}return{head:MA(t,e),cells:i}}),t.data.length)}function oj(e){switch(e?.style){case`currency`:case`compact`:return e.currency||e.style===`currency`?` (${e.currency??`INR`})`:``;case`percent`:return` (%)`;case`duration`:return` (${e.unit??`s`})`;default:return``}}function sj(e,t){return e==null?e:t?.unit===`paise`?e/100:t?.style===`percent`?Number((e*100).toPrecision(12)):e}function cj(e){let t=e.allData&&e.allData!==e.data?{...e,data:e.allData}:e,n=e=>{if(e==null)return``;let t=String(e);return typeof e==`string`&&/^[=+\-@\t\r]/.test(t)&&(t=`'${t}`),/[",\r\n]/.test(t)?`"${t.replace(/"/g,`""`)}"`:t},r={head:t.x.label||t.x.key,value:e=>{let n=e[t.x.key];return t.x.kind===`time`?bA(n,{pattern:t.x.format?.pattern??`day`,timeZone:t.timeZone}):n}},i=t.series.map(e=>({head:`${e.label}${oj(e.format)}`,value:t=>sj(zZ(t[e.key])?t[e.key]:null,e.format)})),a=t.group?{head:t.group.label||t.group.key,value:e=>e[t.group.key]}:null,o;switch(t.type){case`heatmap`:o=[r,a,...i];break;case`treemap`:o=[a,r,...i];break;case`sankey`:o=[r,{head:t.to.label||t.to.key,value:e=>e[t.to.key]},...i];break;case`bubble`:o=[r,...i,{head:`${t.size.label||t.size.key}${oj(t.size.format)}`,value:e=>sj(e[t.size.key],t.size.format)},...a?[a]:[]];break;case`scatter`:o=[r,...i,...a?[a]:[]];break;case`gauge`:o=typeof t.x.key==`string`?[r,...i]:i;break;default:o=[r,...i]}let s=[o.map(e=>n(e.head)).join(`,`)];for(let e of t.data)s.push(o.map(t=>n(t.value(e))).join(`,`));return`${s.join(`\r
32
+ `)}`}function lj(e){return(e?.title??``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/(^-|-$)/g,``)||`chart`}function uj(e,t=new Set){let n=[];e.description&&n.push(e.description.replace(/\.?\s*$/,`.`));let r=zA(e);if(r.length&&r.every(e=>t.has(e)))return n.push(`Every series is hidden.`),n.join(` `);let i=e.data.length,a=e.data.map((e,t)=>t).filter(n=>!VA(e,n,t)),o=e.series[0],s=KZ(e,o.key),c=s.reduce((e,t)=>e+t,0),l=()=>e.data.reduce((t,n,r)=>(K(e,o.key,r)??-1/0)>(K(e,o.key,t)??-1/0)?r:t,0),u=()=>e.data.reduce((t,n,r)=>(K(e,o.key,r)??1/0)<(K(e,o.key,t)??1/0)?r:t,0);switch(e.type){case`donut`:{let t=a.reduce((t,n)=>t+(K(e,o.key,n)??0),0),r=a.reduce((t,n)=>(K(e,o.key,n)??-1/0)>(K(e,o.key,t)??-1/0)?n:t,a[0]);return n.push(`${_Z.donut} of ${o.label} in ${a.length} ${a.length===1?`part`:`parts`}, ${G(t,o.format)} in all.`),a.length&&t&&n.push(`${MA(e,r)} is the largest, at ${G(K(e,o.key,r)/t,{style:`percent`})}.`),n.join(` `)}case`heatmap`:if(n.push(`${_Z.heatmap} of ${o.label} by ${e.group.label||`row`} and ${e.x.label||`column`}, ${i} cells.`),s.length){let t=l(),r=u();n.push(`Highest is ${XZ(e,t)} at ${PA(e,t)}, ${MA(e,t)}; lowest is ${XZ(e,r)} at ${PA(e,r)}, ${MA(e,r)}.`)}return n.join(` `);case`calendar`:return n.push(`${_Z.calendar} of ${o.label}, ${i} ${i===1?`day`:`days`}${i>1?`, from ${MA(e,0)} to ${MA(e,i-1)}`:``}.`),s.length&&n.push(`Highest is ${XZ(e,l())} on ${MA(e,l())}; lowest is ${XZ(e,u())} on ${MA(e,u())}.`),n.join(` `);case`funnel`:return n.push(`${_Z.funnel} of ${o.label} in ${i} stages.`),i>1&&n.push(`${MA(e,0)} is ${XZ(e,0)} and ${MA(e,i-1)} is ${XZ(e,i-1)}, ${qZ(K(e,o.key,i-1),K(e,o.key,0))} of the start.`),n.join(` `);case`gauge`:{let t=K(e,o.key,0),{min:r,max:i}=JA(e),a=t==null?null:qA(e,t);return n.push(`${_Z.gauge}: ${o.label} is ${G(t,o.format)} on a scale from ${G(r,o.format)} to ${G(i,o.format)}${a?`, in the ${a.label} band`:``}.`),n.join(` `)}case`waterfall`:{let t=YA(e);if(n.push(`${_Z.waterfall} of ${o.label}.`),i>1){let r=t.filter(e=>!e.total);n.push(`It opens at ${G(t[0].value,o.format)} and closes at ${G(t[i-1].value,o.format)}.`);let a=r.reduce((e,t)=>t.value>(e?.value??0)?t:e,null),s=r.reduce((e,t)=>t.value<(e?.value??0)?t:e,null);a&&n.push(`The largest rise is ${MA(e,a.index)}, ${ej(a.value,o.format)}.`),s&&n.push(`The largest fall is ${MA(e,s.index)}, ${ej(s.value,o.format)}.`)}return n.join(` `)}case`treemap`:{let t=ZA(e);if(!t.size)return`${_Z.treemap} of ${o.label}: no items.`;let[r,a]=[...t].reduce((e,t)=>t[1]>e[1]?t:e);return n.push(`${_Z.treemap} of ${o.label}: ${i} items in ${t.size} groups, ${G(c,o.format)} in all.`),n.push(`${r} is the largest group, at ${qZ(a,c)}.`),n.join(` `)}case`sankey`:{let t=HZ(e.data.flatMap(t=>[String(t[e.x.key]),String(t[e.to.key])])),r=l();return n.push(`${_Z.sankey} of ${o.label}: ${i} flows between ${t.length} places.`),n.push(`The largest flow is ${MA(e,r)} to ${FA(e,r)}, ${XZ(e,r)}.`),n.join(` `)}case`scatter`:case`bubble`:{let r=IA(e).filter(e=>!t.has(e));n.push(`${_Z[e.type]} of ${o.label} against ${e.x.label||e.x.key}, ${a.length} points${r.length?` in ${r.length} groups: ${r.join(`, `)}`:``}.`);let i=a.map(t=>e.data[t][e.x.key]).filter(zZ),s=a.map(t=>K(e,o.key,t)).filter(e=>e!=null);for(let t of[YZ(e.x.label||String(e.x.key),i,e.x.format),YZ(o.label,s,o.format)])t&&n.push(t);return n.join(` `)}}let d=e.stack===`percent`?`, stacked to 100%`:e.stack===`stacked`?`, stacked`:``,f=e.series.filter(e=>!t.has(e.key));n.push(`${_Z[e.type]} of ${f.map(e=>e.label).join(`, `)}${d}${e.type===`multiples`?`, sharing one x axis`:``}.`),i&&n.push(`${i} ${i===1?`point`:`points`}, ${i>1?`from ${MA(e,0)} to ${MA(e,i-1)}`:MA(e,0)}.`);for(let t of f){let r=YZ(t.label,KZ(e,t.key),t.format);r&&n.push(r)}return n.join(` `)}function dj(e){return e.stack===`percent`?{style:`percent`,decimals:0}:SA(e.y.format)}function fj(e,t){let n=e.data.map((e,t)=>t).filter(n=>!VA(e,n,t));if(e.type!==`scatter`&&e.type!==`bubble`)return n;let r=t=>e.data[t][e.x.key];return n.sort((e,t)=>r(e)-r(t)||e-t)}function pj(e){let t=HZ(e.data.map((t,n)=>MA(e,n))),n=IA(e),r=new Map(e.data.map((r,i)=>[`${t.indexOf(MA(e,i))},${n.indexOf(PA(e,i))}`,i]));return{columns:t.length,rows:n.length,at:r,position:r=>[t.indexOf(MA(e,r)),n.indexOf(PA(e,r))]}}function mj(e,t,n,r){if(n===`Escape`)return null;let i=e.data.length;if(!i)return t;if(e.type===`gauge`)return n in QZ||n===`Home`||n===`End`?{index:0,series:0}:t;if(e.type===`heatmap`||e.type===`calendar`)return hj(e,t,n);let a=$Z.includes(e.type),o=e.series.map((e,t)=>r.has(e.key)?-1:t).filter(e=>e>=0),s=a?fj(e,r):null;if(a?!s.length:!o.length)return t;let c=t??{index:a?s[0]:0,series:a?0:o[0]};if(t==null&&n in QZ)return c;if(a){let e=Math.max(0,s.indexOf(c.index));return n===`Home`?{index:s[0],series:0}:n===`End`?{index:s[s.length-1],series:0}:n in QZ?{index:s[(e+QZ[n]+s.length)%s.length],series:0}:t}if(n===`Home`)return{...c,index:0};if(n===`End`)return{...c,index:i-1};if(!(n in QZ))return t;if(e.type===`bar`?n===`ArrowUp`||n===`ArrowDown`:n===`ArrowLeft`||n===`ArrowRight`)return{...c,index:Math.min(i-1,Math.max(0,c.index+QZ[n]))};let l=Math.max(0,o.indexOf(c.series)),u=e.type===`bar`?QZ[n]:-QZ[n];return{...c,series:o[Math.min(o.length-1,Math.max(0,l+u))]}}function hj(e,t,n){let r=e.data.length,i=e.type===`calendar`,a=i?e.data.map((e,t)=>t).sort((t,n)=>NA(e,t)-NA(e,n)):null,o=i?null:pj(e),s=t??{index:i?a[0]:0,series:0};if(t==null&&n in QZ)return s;if(n===`Home`)return{index:i?a[0]:0,series:0};if(n===`End`)return{index:i?a[r-1]:r-1,series:0};if(!(n in QZ))return t;if(i){let t=n===`ArrowDown`||n===`ArrowUp`?QZ[n]:QZ[n]*7,r=t=>{let n=NA(e,t);return Math.floor((n+dA(n,e.timeZone))/ZZ)},i=r(s.index),o=a.filter(e=>t>0?r(e)>i:r(e)<i);if(!o.length)return{index:s.index,series:0};let c=i+t;return{index:o.reduce((e,t)=>Math.abs(r(t)-c)<Math.abs(r(e)-c)?t:e),series:0}}let[c,l]=o.position(s.index),[u,d]=n===`ArrowLeft`||n===`ArrowRight`?[QZ[n],0]:[0,QZ[n]];return{index:o.at.get(`${c+u},${l+d}`)??s.index,series:0}}function gj(e,t,n,r,i=!1){let a=SA(e);if(i)return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:0}:{style:`number`,decimals:0};if(a.style!==`compact`||!Number.isFinite(t)||!Number.isFinite(n))return a;let o=(n-t)/r;if(!(o>0)||o>=Math.max(Math.abs(t),Math.abs(n))*.02)return a;let s=Math.min(6,Math.max(0,Math.ceil(-Math.log10(o))));return a.currency?{style:`currency`,currency:a.currency,unit:a.unit,decimals:s}:{style:`number`,decimals:s}}function _j(e){let t=String(e??``).trim(),n=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(t);if(n){let e=n[1].length===3?[...n[1]].map(e=>e+e).join(``):n[1];return[0,2,4].map(t=>Number.parseInt(e.slice(t,t+2),16))}let r=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(t);return r?r.slice(1,4).map(Number):null}function vj(e,t){let n=_j(e);return n?`rgba(${n.join(`,`)},${t})`:String(e??``).trim()}function yj(e,t,n){let r=_j(e),i=_j(t);return r&&i?`rgb(${r.map((e,t)=>Math.round(e+(i[t]-e)*n)).join(`,`)})`:e}function bj(e,t){let n=_j(e),r=_j(t.text),i=_j(t.surface);return!n||!r||!i||cQ(sQ(n),sQ(r))>=cQ(sQ(n),sQ(i))?t.text:t.surface}function xj(e){let t=e.x.format?.pattern;return n=>{let r=fA(n,e.timeZone);if(t===`month`||t===`year`)return bA(r,{pattern:t,timeZone:e.timeZone});let i=uA(r,e.timeZone);return i.hour||i.minute?bA(r,{pattern:`time`,timeZone:e.timeZone}):xA(r,{timeZone:e.timeZone})}}function Sj(e,t,n){let r=iQ,i=e=>n?e?[r,0,0,r]:[0,r,r,0]:e?[0,0,r,r]:[r,r,0,0];return e.data.map((n,r)=>{let a={};if(e.stack===`none`){for(let t of e.series)a[t.key]=i((K(e,t.key,r)??0)<0);return a}let o=null,s=null;for(let n of e.series){let i=K(e,n.key,r);t.has(n.key)||i==null||i===0||(i>0?o=n.key:s=n.key)}for(let t of e.series)a[t.key]=t.key===o?i(!1):t.key===s?i(!0):0;return a})}function Cj(e,t,n,r){let i=n.width<576,a=r.animation!==!1&&!t.reducedMotion&&LA(e)<=5e3,o=zA(e),s=Object.fromEntries(o.map(e=>[e,!r.hidden.has(e)])),c={palette:t.palette,neutral:t.neutral,seq:t.seq},l={backgroundColor:t.surface,borderColor:t.grid,borderWidth:1,padding:[10,12],confine:!0,className:`wui-chart-tooltip`,extraCssText:`box-shadow:${t.shadow};border-radius:10px;`,textStyle:{fontFamily:t.font,color:t.textBody,fontSize:12},transitionDuration:a?.25:0},u={backgroundColor:`transparent`,animation:a,animationDuration:1e3,animationEasing:`cubicOut`,animationDurationUpdate:650,animationEasingUpdate:`cubicInOut`,textStyle:{fontFamily:t.font,color:t.label},color:t.palette,legend:{show:!1,data:o,selected:s}},d={base:u,tooltipBase:l,colours:c,compact:i,animate:a},f=kQ[e.type];if(f)return f(e,t,n,r,d);let p=e.type===`bar`,m=e.x.kind===`time`,h=e.stack===`percent`?HA(e,r.hidden):null,g=p||e.type===`column`?Sj(e,r.hidden,p):null,_=e.series.length===1,v=r.renderer===`canvas`,[y,b]=nQ(e.series.flatMap(t=>e.data.map((n,r)=>K(e,t.key,r))),!0),x=e.stack===`percent`?dj(e):gj(e.y.format,e.y.min??y,e.y.max??b,i?3:4,e.y.wholeNumbers),S=h?.some(e=>Object.values(e).some(e=>e!=null&&e<0))?-1:0,C=e.series.findIndex(e=>!r.hidden.has(e.key)),w={type:m?`time`:`category`,boundaryGap:!m&&(e.type===`column`||p),inverse:p,axisLine:{show:!0,lineStyle:{color:t.axis}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{color:t.label,fontSize:12,margin:12,hideOverlap:!0,...m?{formatter:xj(e)}:{}},...m?{}:{data:e.data.map((t,n)=>MA(e,n))}},T={type:`value`,splitNumber:i?3:4,min:e.stack===`percent`?S:e.y.min,max:e.stack===`percent`?1:e.y.max,minInterval:e.y.wholeNumbers?1:void 0,interval:e.stack===`percent`?.25:void 0,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:t.grid,type:`solid`,width:1}},axisLabel:{color:t.label,fontSize:12,formatter:e=>G(e,x)},...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,align:p?`right`:`left`}}:{}},E=e.zoom,D=_&&e.type!==`column`&&!p&&!i,O=e.series.map((n,r)=>{let o=t.palette[r],s=e.data.some((t,r)=>K(e,n.key,r)!=null&&K(e,n.key,r-1)==null&&K(e,n.key,r+1)==null),c=t=>{let r=K(e,n.key,t),i=h?h[t][n.key]:r;return m?[uQ(NA(e,t),e.timeZone),i]:i},l={id:n.key,name:n.key,stack:e.stack===`none`?void 0:`total`,emphasis:{focus:_?`none`:`series`,blurScope:`coordinateSystem`},blur:{itemStyle:{opacity:.22},lineStyle:{opacity:.22},areaStyle:{opacity:.08}}};if(e.type===`line`||e.type===`area`){let n=e.type===`area`?_||e.stack!==`none`?t.dark?.34:.22:.1:0;return{...l,type:`line`,data:e.data.map((e,t)=>c(t)),smooth:.35,smoothMonotone:`x`,connectNulls:!1,symbol:`circle`,showSymbol:s,symbolSize:8,sampling:v?`lttb`:void 0,lineStyle:{width:2,color:o,..._&&!v?{shadowColor:vj(o,.35),shadowBlur:10,shadowOffsetY:6}:{}},itemStyle:{color:o,borderColor:t.surface,borderWidth:2},areaStyle:n?{color:lQ(o,n)}:void 0,endLabel:D?{show:!0,formatter:e=>G(Array.isArray(e.value)?e.value[1]:e.value,x),color:o,fontWeight:600,fontSize:12,distance:8,fontFamily:t.font,valueAnimation:a}:void 0,markLine:r===C?wj(e,t,!1,a):void 0}}return{...l,type:`bar`,barMaxWidth:rQ,barCategoryGap:i?`28%`:`38%`,itemStyle:{color:o,borderColor:t.surface,borderWidth:e.stack===`none`?0:1},animationDelay:a?e=>e*45+r*110:0,data:e.data.map((e,t)=>({value:c(t),itemStyle:{borderRadius:g[t][n.key]}})),markLine:r===C?wj(e,t,p,a):void 0}});return{...u,useUTC:m,grid:{left:4,right:D?64:i?8:16,top:e.y.label?28:12,bottom:E?44:4,outerBoundsMode:`same`},dataZoom:E?Uj(e,t,t.palette[0],r.zoom):void 0,tooltip:{...l,trigger:`axis`,axisPointer:e.type===`line`||e.type===`area`?{type:`line`,lineStyle:{color:t.axis}}:{type:`shadow`,shadowStyle:{color:vj(t.neutral,t.dark?.12:.1)}},formatter:t=>nj($A(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,c))},xAxis:p?T:w,yAxis:p?w:T,series:O}}function wj(e,t,n,r){if(!e.target)return;let i=e.series[0].format;return{silent:!0,symbol:`none`,animation:r,lineStyle:{color:t.label,type:[5,4],width:1},label:{position:`insideEndTop`,formatter:()=>[e.target.label,G(e.target.value,i)].filter(Boolean).join(` `),color:t.textMuted,fontSize:12,fontFamily:t.font,backgroundColor:t.surface,padding:[2,6],borderRadius:4},data:[n?{xAxis:e.target.value}:{yAxis:e.target.value}]}}function Tj(e,t,n,r,{base:i,tooltipBase:a,colours:o,compact:s}){let c=e.series[0],l=e.data.map((t,n)=>MA(e,n)),u=e.data.reduce((t,n,i)=>t+(r.hidden.has(l[i])?0:K(e,c.key,i)??0),0);return{...i,tooltip:{...a,trigger:`item`,formatter:t=>nj($A(e,t.dataIndex,r.hidden,o))},graphic:[{type:`group`,left:`center`,top:`middle`,silent:!0,children:[{type:`text`,style:{text:G(u,SA(c.format)),x:0,y:-10,align:`center`,verticalAlign:`middle`,fill:t.text,fontSize:s?18:22,fontWeight:650,fontFamily:t.font}},{type:`text`,style:{text:e.centerLabel||`Total`,x:0,y:14,align:`center`,verticalAlign:`middle`,fill:t.label,fontSize:12,fontFamily:t.font}}]}],series:[{id:c.key,name:c.key,type:`pie`,radius:s?[`50%`,`70%`]:[`54%`,`72%`],center:[`50%`,`50%`],padAngle:1.6,minAngle:3,startAngle:90,avoidLabelOverlap:!0,itemStyle:{borderRadius:6,borderColor:t.surface,borderWidth:2},animationType:`expansion`,animationDuration:1100,label:s?{show:!1}:{show:!0,position:`outside`,color:t.label,fontFamily:t.font,fontSize:12,lineHeight:16,formatter:e=>`${e.name}\n${G(e.percent/100,{style:`percent`,decimals:0})}`},labelLine:{length:10,length2:8,smooth:.2,lineStyle:{color:t.axis}},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:6,itemStyle:{shadowBlur:16,shadowColor:`rgba(0,0,0,0.18)`}},data:e.data.map((t,n)=>({name:l[n],value:K(e,c.key,n)??0,itemStyle:{color:tj(e,n,o)}}))}]}}function Ej(e,t){return{...e,trigger:`item`,formatter:e=>t(e)}}function Dj(e,t,n){return{type:`piecewise`,orient:`horizontal`,right:4,bottom:0,pieces:t.map((e,n)=>({gte:e.from,[n===t.length-1?`lte`:`lt`]:e.to,color:e.colour})),itemWidth:11,itemHeight:11,itemGap:3,itemSymbol:`roundRect`,showLabel:!1,text:[`More`,`Less`],textGap:8,selectedMode:!1,textStyle:{color:e.label,fontSize:12,fontFamily:e.font},...n}}function Oj(e,t,n,r,i){let a=e.series[0],o=dQ(e.data.map((t,n)=>MA(e,n))),s=IA(e),c=WA(fQ(e,a.key),t.seq);return{...i.base,grid:{left:4,right:4,top:8,bottom:40,outerBoundsMode:`same`},tooltip:Ej(i.tooltipBase,t=>nj($A(e,t.dataIndex,r.hidden,i.colours))),xAxis:pQ(t,o,{axisLine:{show:!1},splitArea:{show:!1}}),yAxis:pQ(t,s,{inverse:!0,axisLine:{show:!1}}),visualMap:Dj(t,c),series:[{type:`heatmap`,data:e.data.map((t,n)=>[o.indexOf(MA(e,n)),s.indexOf(PA(e,n)),K(e,a.key,n)??`-`]),itemStyle:{borderColor:t.surface,borderWidth:2,borderRadius:4},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}},progressive:0,animationDuration:800}]}}function kj(e,t){let n=e.data.map((t,n)=>NA(e,n)).filter(Number.isFinite),r=_Q(n),i=vQ(n),a=Math.ceil((i-r)/hQ)+1,o=Math.floor((t.height-62)/7),s=Math.max(yQ,Math.min(bQ,o,Math.floor((t.width-44)/a))),c=Math.max(1,Math.floor((t.width-44)/s));return{cell:s,from:a>c?i-(c-1)*hQ:r,to:i}}function Aj(e,t,n,r,i){let a=e.series[0],{cell:o,from:s,to:c}=kj(e,n),l=WA(fQ(e,a.key),t.seq);return{...i.base,tooltip:Ej(i.tooltipBase,t=>nj($A(e,t.dataIndex,r.hidden,i.colours))),visualMap:Dj(t,l,{right:4}),calendar:{range:[gQ(s,e.timeZone),gQ(c,e.timeZone)],top:24,left:34,cellSize:[o,o],splitLine:{show:!1},itemStyle:{color:t.seq[0],borderColor:t.surface,borderWidth:o<16?2:3},dayLabel:{firstDay:1,nameMap:[``,`Mon`,``,`Wed`,``,`Fri`,``],color:t.label,fontSize:12,fontFamily:t.font,margin:8},monthLabel:{color:t.label,fontSize:12,fontFamily:t.font,margin:8},yearLabel:{show:!1}},series:[{type:`heatmap`,coordinateSystem:`calendar`,data:e.data.map((t,n)=>[gQ(NA(e,n),e.timeZone),K(e,a.key,n)??`-`]),itemStyle:{borderRadius:3,borderColor:t.surface,borderWidth:2},emphasis:{itemStyle:{borderColor:t.text,borderWidth:1.5}}}]}}function jj(e,t,n,r,i){let a=e.series[0],o=KA(e.data.length,t.seq),s=K(e,a.key,0);return{...i.base,tooltip:Ej(i.tooltipBase,t=>nj($A(e,t.dataIndex,r.hidden,i.colours))),series:[{type:`funnel`,sort:`none`,gap:3,left:0,right:0,top:4,bottom:4,minSize:`38%`,maxSize:`100%`,funnelAlign:`center`,animationDuration:900,itemStyle:{borderColor:t.surface,borderWidth:0,borderRadius:6},emphasis:{itemStyle:{shadowBlur:14,shadowColor:`rgba(0,0,0,0.18)`}},label:{show:!0,position:`inside`,fontFamily:t.font,lineHeight:17},data:e.data.map((n,r)=>{let i=bj(o[r],t),c=K(e,a.key,r),l=r?`${qZ(c,K(e,a.key,r-1))} of previous step`:`${qZ(c,s)} of ${tQ(MA(e,0))}`;return{name:MA(e,r),value:c??0,itemStyle:{color:o[r]},label:{formatter:`{n|${tQ(MA(e,r))}} {v|${tQ(G(c,a.format))}}\n{p|${r?l:`first stage`}}`,rich:{n:{color:i,fontSize:12.5,fontWeight:500,fontFamily:t.font},v:{color:i,fontSize:13,fontWeight:700,fontFamily:t.font},p:{color:vj(i,.78),fontSize:12,fontFamily:t.font}}}}})}]}}function Mj(e,t,n,r,i){let a=e.series[0],{min:o,max:s}=JA(e),c=K(e,a.key,0),l=c??o,u=c==null?null:qA(e,c),d=t.palette[0],f=s-o||1,p=e.bands.length?e.bands.map((e,n)=>[Math.min(1,Math.max(0,(e.upTo-o)/f)),t.seq[1+Math.min(n,3)]]):[[1,t.grid]];return e.bands.length&&p[p.length-1][0]<1&&p.push([1,t.grid]),{...i.base,tooltip:Ej(i.tooltipBase,()=>nj($A(e,0,r.hidden,i.colours))),series:[{type:`gauge`,startAngle:215,endAngle:-35,min:o,max:s,radius:`96%`,center:[`50%`,`58%`],splitNumber:10,pointer:{show:!1},anchor:{show:!1},progress:{show:c!=null,width:14,roundCap:!0,itemStyle:{color:d,shadowBlur:i.animate?12:0,shadowColor:vj(d,.35)}},axisLine:{roundCap:!0,lineStyle:{width:14,color:p}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:!1},title:{offsetCenter:[0,`30%`],color:t.label,fontSize:12.5,fontFamily:t.font},detail:{valueAnimation:i.animate,offsetCenter:[0,`-4%`],fontFamily:t.font,formatter:e=>`{v|${tQ(c==null?G(null):G(e,a.format))}}{u|/${tQ(G(s,a.format))}}${u?`\n{s|${tQ(u.label)}}`:``}`,rich:{v:{fontSize:36,fontWeight:650,color:t.text,fontFamily:t.font,padding:[0,2,0,0]},u:{fontSize:14,color:t.label,fontFamily:t.font,padding:[12,0,0,0]},s:{fontSize:12,color:t.label,fontFamily:t.font,padding:[8,0,0,0]}}},data:[{value:l,name:e.data[0]?.[e.x.key]==null?a.label:MA(e,0)}]}]}}function Nj(e){let t=vQ(e.map(e=>e.level).concat(e.map(e=>e.from),e.map(e=>e.to))),n=_Q(e.filter(e=>!e.total).map(e=>Math.min(e.from,e.to)).concat(e.filter(e=>e.total).map(e=>e.value))),r=vQ(e.filter(e=>!e.total).map(e=>Math.abs(e.value)));if(!(t>0)||!(n>t*.4)||!(r<t*.15))return null;let i=10**Math.floor(Math.log10(t))/10,a=Math.round(t*.08/i)*i,o=Math.floor(n*.965/i)*i;return o>a?{start:a,end:o}:null}function Pj(e,t,n){let r=Math.floor(n/Math.max(1,e.length)-xQ);return{nameSize:12,valueSize:12,category:vQ(e.flatMap(e=>String(e).split(/\s+/)).map(e=>oQ(e,12)))<=r?{interval:0,width:r,overflow:`break`}:{interval:0,rotate:45,width:SQ,overflow:`truncate`,hideOverlap:!0},showValues:t.every(e=>oQ(e,12)<=r)}}function Fj(e,t,n,r,i){let a=e.series[0],o=YA(e),s=dj(e),c=Nj(o),l=t=>QA(e,t.index,i.colours),u=o.map(t=>MA(e,t.index)),d=o.map(e=>e.total?G(e.value,s):ej(e.value,s)),f=o.flatMap(e=>[e.from,e.to]),p=Math.max(oQ(G(vQ(f),s),11),oQ(G(_Q(f),s),11))+8,m=Pj(u,d,n.width-p-12);return{...i.base,grid:{left:4,right:8,top:28,bottom:4,outerBoundsMode:`same`},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`shadow`,shadowStyle:{color:vj(t.neutral,.1)}},formatter:t=>nj($A(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:pQ(t,u,{axisLabel:{color:t.label,fontSize:m.nameSize,margin:12,...m.category}}),yAxis:mQ(t,e=>G(e,s),{min:0,splitNumber:5,...c?{breaks:[{start:c.start,end:c.end,gap:`6%`}],breakArea:{show:!0,itemStyle:{color:t.surface,borderColor:t.axis,borderWidth:1,borderType:`solid`,opacity:1},zigzagAmplitude:3,zigzagZ:200}}:{}}),series:[{type:`line`,step:`end`,data:o.map(e=>e.level),symbol:`none`,silent:!0,z:1,lineStyle:{color:t.axis,width:1},tooltip:{show:!1},animation:!1,emphasis:{disabled:!0}},{type:`bar`,stack:`w`,data:o.map(e=>Math.min(e.from,e.to)),silent:!0,itemStyle:{color:`transparent`},emphasis:{disabled:!0},tooltip:{show:!1},barMaxWidth:48},{name:a.key,type:`bar`,stack:`w`,z:3,barMaxWidth:48,barCategoryGap:`34%`,itemStyle:{borderRadius:5},emphasis:{itemStyle:{shadowBlur:10,shadowColor:`rgba(0,0,0,0.15)`}},animationDelay:i.animate?e=>e*140:0,label:{show:m.showValues,position:`top`,distance:6,fontFamily:t.font,fontSize:m.valueSize,fontWeight:600,color:t.text,formatter:e=>d[e.dataIndex]},data:o.map(e=>({value:Math.abs(e.to-e.from),itemStyle:{color:l(e)}}))}]}}function Ij(e){let t=e.series[0].key;return IA(e).map(n=>({name:n,rows:e.data.map((e,t)=>t).filter(t=>PA(e,t)===n).sort((n,r)=>K(e,t,r)-K(e,t,n)||n-r)}))}function Lj(e,t,n,r,i){let a=e.series[0],o=ZA(e),s=[...o.values()].reduce((e,t)=>e+t,0),c=(e,t)=>{let r=e/s*n.width*n.height*.82;return r>5200&&Math.max(oQ(t[0],12),oQ(t[1],11.5))+20<=Math.sqrt(r)},l=Ij(e).map(({name:n,rows:r},i)=>{let s=o.get(n),l=t.palette[i%t.palette.length],u=bj(l,t);return{name:n,value:s,itemStyle:{color:l,borderColor:l},upperLabel:{color:u,formatter:`{n|${tQ(n)}} {v|${tQ(G(s,a.format))}}`,rich:{n:{fontWeight:600,fontSize:12,color:u,fontFamily:t.font},v:{fontSize:12,color:vj(u,.8),fontFamily:t.font}}},children:r.map((n,r)=>{let i=yj(l,t.surface,Math.min(.55,r*.14)),o=bj(i,t),s=K(e,a.key,n);return{name:MA(e,n),value:s,row:n,itemStyle:{color:i},label:{show:c(s,[MA(e,n),G(s,a.format)]),formatter:`{n|${tQ(MA(e,n))}}\n{v|${tQ(G(s,a.format))}}`,rich:{n:{color:o,fontSize:12,fontWeight:500,fontFamily:t.font,lineHeight:16},v:{color:vj(o,.82),fontSize:12,fontFamily:t.font}}}}})}});return{...i.base,tooltip:Ej(i.tooltipBase,t=>t.data?.row==null?nj({title:t.name,rows:[{color:t.color,label:a.label,value:G(t.value,a.format)},{label:`Share of all`,value:qZ(t.value,s)}],foot:``}):nj($A(e,t.data.row,r.hidden,i.colours))),series:[{type:`treemap`,roam:!1,nodeClick:!1,breadcrumb:{show:!1},left:0,right:0,top:0,bottom:0,animationDurationUpdate:700,label:{show:!0,position:`insideTopLeft`,padding:[8,10],overflow:`truncate`,fontFamily:t.font},upperLabel:{show:!0,height:28,padding:[0,10],fontFamily:t.font},levels:[{itemStyle:{borderWidth:0,gapWidth:4,borderColor:t.surface}},{itemStyle:{borderWidth:3,gapWidth:2,borderRadius:8}},{itemStyle:{borderWidth:0,gapWidth:0,borderRadius:5},emphasis:{itemStyle:{borderColor:t.text,borderWidth:0}}}],data:l}]}}function Rj(e){let t=e.data.map(t=>[String(t[e.x.key]),String(t[e.to.key])]),n=new Map(t.flatMap(([e,t])=>[[e,0],[t,0]]));for(let e=0;e<n.size;e+=1)for(let[e,r]of t)n.set(r,Math.max(n.get(r),n.get(e)+1));return n}function zj(e,t,n,r,i){let a=e.series[0],o=XA(e,t.palette),s=Rj(e),c=vQ([...s.values()]),l=new Map,u=new Map;e.data.forEach((t,n)=>{let r=K(e,a.key,n)??0;l.set(String(t[e.x.key]),(l.get(String(t[e.x.key]))??0)+r),u.set(String(t[e.to.key]),(u.get(String(t[e.to.key]))??0)+r)});let d=e=>u.get(e)??l.get(e)??0,f=e=>({position:e,color:t.text,fontFamily:t.font,fontSize:12,formatter:e=>`{n|${tQ(e.name)}}\n{v|${G(d(e.name),{style:`compact`})}}`,rich:{n:{color:t.textBody,fontSize:12,fontFamily:t.font,lineHeight:15},v:{color:t.label,fontSize:12,fontFamily:t.font}}});return{...i.base,tooltip:Ej(i.tooltipBase,t=>nj(t.dataType===`edge`?$A(e,t.dataIndex,r.hidden,i.colours):{title:t.name,rows:[{color:t.color,label:a.label,value:G(d(t.name),a.format)}],foot:``})),series:[{type:`sankey`,left:0,right:0,top:6,bottom:6,nodeWidth:10,nodeGap:i.compact?10:14,nodeAlign:`justify`,draggable:!1,layoutIterations:64,animationDuration:1200,emphasis:{focus:`adjacency`,lineStyle:{opacity:.55}},itemStyle:{borderWidth:0,borderRadius:3},lineStyle:{curveness:.5},levels:Array.from({length:c+1},(e,t)=>({depth:t,label:f(t===c&&c>0?`left`:`right`)})),data:[...s.keys()].map(e=>({name:e,itemStyle:{color:o.get(e)}})),links:e.data.map(n=>({source:String(n[e.x.key]),target:String(n[e.to.key]),value:n[a.key],lineStyle:{color:o.get(String(n[e.x.key])),opacity:t.dark?.32:.26}}))}]}}function Bj(e){let t=e.length,n=e.reduce((e,t)=>e+t[0],0)/t,r=e.reduce((e,t)=>e+t[1],0)/t,i=e.reduce((e,t)=>e+(t[0]-n)**2,0);if(!t||!i)return null;let a=e.reduce((e,t)=>e+(t[0]-n)*(t[1]-r),0)/i,o=_Q(e.map(e=>e[1])),s=vQ(e.map(e=>e[1])),c=e=>{let t=r+a*(e-n);return t<o?[e+(o-t)/a,o]:t>s?[e+(s-t)/a,s]:[e,t]};return[c(_Q(e.map(e=>e[0]))),c(vQ(e.map(e=>e[0])))]}function Vj(e,t,n,r,i){let a=e.series[0],o=IA(e),s=e.type===`bubble`,c=vQ(s?e.data.map(t=>t[e.size.key]):[]),l=e=>Math.max(TQ,(i.compact?wQ:CQ)*Math.sqrt(e/c)),u=t=>e.data.map((e,t)=>t).filter(n=>!e.group||PA(e,n)===t),d=(e.group?o:[null]).filter(e=>e==null||!r.hidden.has(e)).flatMap(e=>u(e)),f=e.trend?Bj(d.map(t=>[e.data[t][e.x.key],K(e,a.key,t)])):null,p=e.data.map(t=>t[e.x.key]),m=e.data.map((t,n)=>K(e,a.key,n)),[h,g]=nQ(p,!1),[_,v]=nQ(m,!1),y=gj(e.y.format,e.y.min??_,e.y.max??v,4),b=gj(e.x.format,h,g,4),x=(e.group?o:[null]).map((n,r)=>({name:n??a.key,type:`scatter`,symbolSize:s?e=>l(e[2]):i.compact?8:10,itemStyle:{color:vj(t.palette[r],.85),borderColor:t.surface,borderWidth:1.5},emphasis:{focus:`series`,scale:1.5,itemStyle:{color:t.palette[r]}},blur:{itemStyle:{opacity:.15}},animationDelay:i.animate?e=>e*6+r*120:0,data:u(n).map(t=>({value:[e.data[t][e.x.key],K(e,a.key,t),...s?[e.data[t][e.size.key]]:[]],row:t}))}));return f&&x.push({name:`Trend`,type:`line`,data:f,symbol:`none`,silent:!0,z:1,tooltip:{show:!1},lineStyle:{color:t.label,width:1.5,type:[6,4]},emphasis:{disabled:!0},endLabel:{show:!0,formatter:`Trend`,color:t.label,fontSize:12,fontFamily:t.font,offset:[-30,-12]}}),{...i.base,grid:{left:4,right:16,top:e.y.label?28:12,bottom:e.x.label?24:4,outerBoundsMode:`same`},tooltip:Ej(i.tooltipBase,t=>t.data?.row==null?``:nj($A(e,t.data.row,r.hidden,i.colours))),xAxis:mQ(t,e=>G(e,b),{scale:!0,splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:t.axis}},...e.x.label?{name:e.x.label,nameLocation:`middle`,nameGap:28,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font}}:{}}),yAxis:mQ(t,e=>G(e,y),{min:e.y.min,max:e.y.max,...e.y.label?{name:e.y.label,nameLocation:`end`,nameGap:12,nameTextStyle:{color:t.label,fontSize:12,fontFamily:t.font,align:`left`}}:{}}),series:x}}function Hj(e,t,n,r,i){let a=e.x.kind===`time`,o=e.series.length,s=(n.height-6-OQ)/o,c=s-EQ-DQ,l=t.palette[0],u=e.data.map((t,n)=>MA(e,n)),d=e.series.flatMap((n,r)=>{let i=fQ(e,n.key).filter(e=>e!=null).pop();return[{text:n.label,left:0,top:6+r*s,textStyle:{fontSize:12.5,fontWeight:600,color:t.text,fontFamily:t.font}},{text:`Latest ${G(i,n.format)}`,right:8,top:7+r*s,textStyle:{fontSize:12,fontWeight:500,color:t.label,fontFamily:t.font}}]}),f=(t,n)=>{let r=K(e,t.key,n);return a?[uQ(NA(e,n),e.timeZone),r]:r};return{...i.base,useUTC:a,title:d,grid:e.series.map((e,t)=>({left:52,right:8,top:6+t*s+EQ,height:c})),axisPointer:{link:[{xAxisIndex:`all`}],lineStyle:{color:t.axis},label:{show:!1}},tooltip:{...i.tooltipBase,trigger:`axis`,axisPointer:{type:`line`,lineStyle:{color:t.axis}},formatter:t=>nj($A(e,(Array.isArray(t)?t:[t])[0]?.dataIndex??0,r.hidden,i.colours))},xAxis:e.series.map((n,r)=>({...a?{type:`time`}:pQ(t,u,{boundaryGap:!1}),gridIndex:r,axisLine:{lineStyle:{color:r===o-1?t.axis:t.grid}},axisTick:{show:!1},splitLine:{show:!1},axisLabel:{show:r===o-1,color:t.label,fontSize:12,hideOverlap:!0,margin:10,...a?{formatter:xj(e)}:{}}})),yAxis:e.series.map((n,r)=>{let[i,a]=nQ(fQ(e,n.key),!1),o=gj(n.format,e.y.min??i,e.y.max??a,2);return mQ(t,e=>G(e,o),{gridIndex:r,splitNumber:2,scale:e.y.min==null,min:e.y.min,max:e.y.max,axisLabel:{color:t.label,fontSize:12,formatter:e=>G(e,o)}})}),series:e.series.map((n,r)=>({id:n.key,name:n.key,type:`line`,xAxisIndex:r,yAxisIndex:r,data:e.data.map((e,t)=>f(n,t)),smooth:.3,symbol:`circle`,showSymbol:!1,symbolSize:7,lineStyle:{width:1.75,color:l},itemStyle:{color:l,borderColor:t.surface,borderWidth:2},areaStyle:{color:lQ(l,t.dark?.26:.16)},animationDelay:i.animate?r*160:0,emphasis:{disabled:!0}}))}}function Uj(e,t,n,r){let i=r?.start??(e.data.length>5e3?70:0),a=r?.end??100;return[{type:`inside`,start:i,end:a},{type:`slider`,start:i,end:a,height:26,bottom:8,left:52,right:12,borderColor:`transparent`,backgroundColor:t.grid,borderRadius:6,fillerColor:vj(n,t.dark?.22:.12),handleStyle:{color:t.surface,borderColor:t.axis},moveHandleSize:0,brushSelect:!1,dataBackground:{lineStyle:{color:t.axis,width:.75},areaStyle:{color:vj(t.neutral,.15)}},selectedDataBackground:{lineStyle:{color:n,width:.75},areaStyle:{color:vj(n,.18)}},textStyle:{color:t.label,fontSize:12,fontFamily:t.font}}]}function Wj(e,t,n){switch(e.type){case`scatter`:case`bubble`:{if(!e.group)return{seriesIndex:0,dataIndex:n};let t=PA(e,n),r=e.data.map((e,t)=>t).filter(n=>PA(e,n)===t);return{seriesIndex:IA(e).indexOf(t),dataIndex:r.indexOf(n)}}case`waterfall`:return{seriesIndex:2,dataIndex:n};case`sankey`:return{seriesIndex:0,dataIndex:n,dataType:`edge`,tip:!1};case`treemap`:{let t=1;for(let r of Ij(e)){let e=r.rows.indexOf(n);if(e>=0)return{seriesIndex:0,dataIndex:t+1+e};t+=1+r.rows.length}return{seriesIndex:0,dataIndex:n}}case`gauge`:case`donut`:case`heatmap`:case`calendar`:case`funnel`:return{seriesIndex:0,dataIndex:n};default:return{seriesIndex:t,dataIndex:n}}}function Gj(e,t){switch(e.type){case`scatter`:case`bubble`:return t.data?.row==null?null:{series:0,row:t.data.row};case`treemap`:return t.data?.row==null?null:{series:0,row:t.data.row};case`sankey`:return t.dataType===`edge`?{series:0,row:t.dataIndex}:null;case`waterfall`:return t.seriesIndex===2?{series:0,row:t.dataIndex}:null;case`line`:case`area`:case`column`:case`bar`:case`multiples`:return{series:t.seriesIndex,row:t.dataIndex};default:return{series:0,row:t.dataIndex}}}function Kj(e,t,n,r,{pixelRatio:i=2}={}){let a=document.createElement(`div`);a.style.cssText=`position:fixed;left:-10000px;top:0;width:${n.width}px;height:${n.height}px;`,document.body.append(a);let o=hx(a,null,{renderer:`canvas`,devicePixelRatio:i,width:n.width,height:n.height});try{return o.setOption(Cj(e,t,n,{...r,renderer:`canvas`,animation:!1})),o.getDataURL({type:`png`,pixelRatio:i,backgroundColor:t.surface})}finally{o.dispose(),a.remove()}}function qj(e,{renderer:t}){let n=hx(e,null,{renderer:t}),r=!1,i=null;return{renderer:t,render(e,t,a,o,{replace:s=!1}={}){let c=r&&!s?n.getOption()?.dataZoom?.[0]:null,l=Number.isFinite(c?.start)&&Number.isFinite(c?.end)?{start:c.start,end:c.end}:null,u=Cj(e,t,a,{...o,zoom:l});i=e,n.setOption(u,s||!r?{notMerge:!0}:{replaceMerge:eQ}),r=!0},focusPoint(e,t){let{tip:r=!0,...a}=Wj(i,e,t);n.dispatchAction({type:`downplay`}),n.dispatchAction({type:`highlight`,...a}),r&&n.dispatchAction({type:`showTip`,...a})},clearFocus(){n.dispatchAction({type:`hideTip`}),n.dispatchAction({type:`downplay`})},resize(){n.resize()},onSelect(e){n.on(`click`,t=>{if(t.componentType!==`series`)return;let n=Gj(i,t);n&&e({seriesIndex:n.series,dataIndex:n.row})})},onFinished(e){n.on(`finished`,e)},dispose(){n.dispose()}}}function Jj(e){let t=getComputedStyle(e),n=e=>t.getPropertyValue(e).trim(),r=e.closest(`[data-bs-theme], [data-theme]`)??document.documentElement,i=r.getAttribute(`data-bs-theme`)||r.getAttribute(`data-theme`),a={palette:[1,2,3,4,5,6,7,8].map(e=>n(`--color-chart-${e}`)),seq:[0,1,2,3,4,5,6].map(e=>n(`--color-chart-seq-${e}`)),neutral:n(`--color-chart-neutral`),grid:n(`--color-chart-grid`),axis:n(`--color-chart-axis`),label:n(`--color-chart-label`),surface:n(`--color-surface`),text:n(`--color-text`),textBody:n(`--color-text-body`),textMuted:n(`--color-text-muted`),shadow:n(`--wui-shadow-popover`),font:t.fontFamily,dark:i===`dark`||i===`auto`&&!!LQ(FQ)?.matches,reducedMotion:!!LQ(IQ)?.matches};return!a.palette[0]&&!RQ&&(RQ=!0,oA(`[@webority/ui-elements] <wui-chart> found no --color-chart-* colours: load @webority/theme on the page.`)),a}function Yj(e){if(zQ.add(e),BQ)return;let t=()=>{for(let e of zQ)e._themeChanged()},n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`data-bs-theme`,`class`]});let r=new MutationObserver(t);r.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:[`data-theme`,`data-bs-theme`]});let i=[LQ(FQ),LQ(IQ)].filter(Boolean);for(let e of i)e.addEventListener?.(`change`,t);BQ=()=>{n.disconnect(),r.disconnect();for(let e of i)e.removeEventListener?.(`change`,t);BQ=null}}function Xj(e){zQ.delete(e),zQ.size||BQ?.()}function Zj(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,document.body.append(n),n.click(),n.remove()}var Qj,$j,eM,tM,nM,rM,iM,aM,oM,sM,cM,lM,uM,dM,fM,pM,mM,hM,gM,_M,vM,yM,q,bM,xM,SM,CM,wM,TM,EM,DM,OM,kM,AM,jM,MM,NM,PM,FM,IM,LM,RM,J,zM,BM,VM,HM,UM,WM,GM,KM,qM,JM,YM,XM,ZM,Y,QM,$M,eN,tN,nN,rN,iN,aN,oN,sN,cN,lN,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,bN,xN,SN,CN,wN,TN,EN,DN,ON,kN,AN,jN,MN,NN,PN,FN,IN,LN,RN,zN,BN,VN,HN,UN,WN,GN,KN,qN,JN,YN,XN,ZN,QN,$N,eP,tP,nP,rP,iP,aP,oP,sP,cP,lP,uP,dP,fP,pP,mP,hP,gP,_P,vP,yP,bP,xP,SP,CP,wP,TP,EP,DP,OP,kP,AP,jP,MP,NP,PP,FP,IP,LP,RP,zP,BP,VP,HP,UP,WP,GP,KP,qP,JP,YP,XP,ZP,QP,$P,eF,tF,nF,rF,iF,aF,oF,sF,cF,lF,uF,dF,fF,pF,mF,hF,gF,_F,vF,yF,bF,xF,SF,CF,wF,TF,EF,DF,OF,kF,AF,jF,MF,NF,PF,FF,IF,LF,RF,X,zF,BF,VF,HF,UF,WF,GF,KF,qF,JF,YF,XF,ZF,QF,$F,eI,tI,nI,rI,iI,aI,oI,sI,cI,lI,uI,dI,fI,pI,mI,hI,gI,_I,vI,yI,bI,xI,SI,CI,wI,TI,EI,DI,OI,kI,AI,jI,MI,NI,PI,FI,II,LI,RI,zI,BI,VI,HI,UI,WI,GI,KI,qI,JI,YI,XI,ZI,QI,$I,eL,tL,nL,rL,iL,aL,oL,sL,cL,lL,uL,dL,fL,pL,mL,hL,gL,_L,vL,yL,bL,xL,SL,CL,wL,TL,EL,DL,OL,kL,AL,jL,ML,NL,PL,FL,IL,LL,RL,zL,BL,VL,HL,UL,WL,GL,KL,qL,JL,YL,XL,ZL,QL,$L,eR,tR,nR,rR,iR,aR,oR,sR,cR,lR,uR,dR,fR,pR,mR,hR,gR,_R,vR,yR,bR,xR,SR,CR,wR,TR,ER,DR,OR,kR,AR,jR,MR,NR,PR,FR,IR,LR,RR,zR,BR,VR,HR,UR,WR,GR,KR,qR,JR,YR,XR,ZR,QR,$R,ez,tz,nz,rz,iz,az,oz,sz,cz,lz,uz,dz,fz,pz,mz,hz,gz,_z,vz,yz,bz,xz,Sz,Cz,wz,Tz,Ez,Dz,Oz,kz,Az,jz,Mz,Nz,Pz,Fz,Iz,Lz,Rz,zz,Bz,Vz,Hz,Uz,Wz,Gz,Kz,qz,Jz,Yz,Z,Xz,Zz,Qz,$z,eB,tB,nB,rB,iB,aB,oB,sB,cB,lB,uB,dB,fB,pB,mB,hB,gB,_B,vB,yB,bB,xB,SB,CB,wB,TB,EB,DB,OB,kB,AB,jB,MB,NB,PB,FB,IB,LB,RB,zB,BB,VB,HB,UB,WB,GB,KB,qB,JB,YB,XB,ZB,QB,$B,eV,tV,nV,rV,iV,aV,oV,sV,cV,lV,uV,dV,fV,pV,mV,hV,gV,_V,vV,yV,bV,xV,SV,CV,wV,TV,EV,DV,OV,kV,AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV,VV,HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V,eH,tH,nH,rH,iH,aH,oH,sH,cH,lH,uH,dH,fH,pH,mH,hH,gH,_H,vH,yH,bH,xH,SH,CH,wH,TH,EH,DH,OH,kH,AH,jH,MH,NH,PH,FH,IH,LH,RH,zH,BH,VH,HH,UH,WH,GH,KH,qH,JH,YH,XH,ZH,QH,$H,eU,tU,nU,rU,iU,aU,oU,sU,cU,lU,uU,dU,fU,pU,mU,hU,gU,_U,vU,yU,bU,xU,SU,CU,wU,TU,EU,DU,OU,kU,AU,jU,MU,NU,PU,FU,IU,LU,RU,zU,BU,VU,HU,UU,WU,GU,KU,qU,JU,Q,YU,XU,ZU,QU,$U,eW,tW,nW,rW,iW,aW,oW,sW,cW,lW,uW,dW,fW,pW,mW,hW,gW,_W,vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,IW,LW,RW,zW,BW,VW,HW,UW,WW,GW,KW,qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq,kq,Aq,jq,Mq,Nq,Pq,Fq,Iq,Lq,Rq,zq,Bq,Vq,Hq,Uq,Wq,Gq,Kq,qq,Jq,Yq,Xq,Zq,Qq,$q,eJ,tJ,nJ,rJ,iJ,aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY,UY,WY,GY,KY,qY,JY,YY,XY,ZY,QY,$Y,eX,tX,nX,rX,iX,aX,oX,sX,cX,lX,uX,dX,fX,pX,mX,hX,gX,_X,vX,yX,bX,xX,SX,CX,wX,TX,EX,DX,OX,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,VX,HX,UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,wZ,TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ,NZ,PZ,FZ,IZ,LZ,RZ,zZ,BZ,VZ,HZ,UZ,WZ,GZ,KZ,qZ,JZ,YZ,XZ,ZZ,QZ,$Z,eQ,tQ,nQ,rQ,iQ,aQ,oQ,sQ,cQ,lQ,uQ,dQ,fQ,pQ,mQ,hQ,gQ,_Q,vQ,yQ,bQ,xQ,SQ,CQ,wQ,TQ,EQ,DQ,OQ,kQ,AQ,jQ,MQ,NQ,PQ,FQ,IQ,LQ,RQ,zQ,BQ,VQ,HQ,UQ,WQ=t((()=>{for(var e in Qj=Object.defineProperty,$j=(e,t)=>{let n={};for(var r in e)Qj(n,r,{get:e[r],enumerable:!0});return t||Qj(n,Symbol.toStringTag,{value:`Module`}),n},eM=function(e,t){return eM=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])},eM(e,t)},tM=`12px sans-serif`,nM=20,rM=100,iM=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`,aM=$n(iM),oM={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=oM.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=aM[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}},sM=lr([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),cM=lr([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),lM=Object.prototype.toString,uM=Array.prototype,dM=uM.forEach,fM=uM.filter,pM=uM.slice,mM=uM.map,hM=function(){}.constructor,gM=hM?hM.prototype:null,_M=`__proto__`,vM=2311,yM=2**53-1,oM.createCanvas,q=gM&&B(gM.bind)?gM.call.bind(gM.bind):pr,bM=`__ec_primitive__`,xM=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 fr(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),SM=typeof Map==`function`,CM=function(){function e(t){var n=z(t);this.data=jr();var r=this;t instanceof e?t.each(i):t&&L(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 SM?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}(),wM=180/Math.PI,TM=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),EM=new(function(){function e(){this.browser=new TM,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`?(EM.wxa=!0,EM.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?EM.worker=!0:!EM.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(EM.node=!0,EM.svgSupported=!0):Lr(navigator.userAgent,EM),DM=`.`,OM=`___EC__COMPONENT__CONTAINER___`,kM=`___EC__EXTENDED_CLASS___`,AM=Math.round(Math.random()*10),jM=Jr([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),MM=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return jM(this,e,t)},e}(),NM=function(){function e(e){this.value=e}return e}(),PM=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new NM(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}(),FM=function(){function e(e){this._list=new PM,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 NM(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}(),IM=new FM(50),LM=_i,RM=vi,J=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}(),zM=Math.min,BM=Math.max,VM=Math.abs,HM=[`x`,`y`],UM=[`width`,`height`],WM=new J,GM=new J,KM=new J,qM=new J,JM=wi(),YM=JM.minTv,XM=JM.maxTv,ZM=[0,0],Y=function(){function e(e,t,n,r){$M(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=zM(e.x,this.x),n=zM(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?BM(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?BM(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return tN($r(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&J.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=$M(iN,t.x,t.y,t.width,t.height)),n instanceof e||(n=$M(aN,n.x,n.y,n.width,n.height));var s=!!r;JM.reset(i,s);var c=JM.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(ZM[0]=1/0,ZM[1]=0,Ci(l,u,p,m,0,s,a,o),Ci(d,f,h,g,1,s,a,o),s&&J.copy(r,_?JM.useDir?JM.dirMinTv:YM:XM)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){eN(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n)e!==t&&eN(e,t);else if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)}else{WM.x=KM.x=t.x,WM.y=qM.y=t.y,GM.x=qM.x=t.x+t.width,GM.y=KM.y=t.y+t.height,WM.transform(n),qM.transform(n),GM.transform(n),KM.transform(n),e.x=zM(WM.x,GM.x,KM.x,qM.x),e.y=zM(WM.y,GM.y,KM.y,qM.y);var s=BM(WM.x,GM.x,KM.x,qM.x),c=BM(WM.y,GM.y,KM.y,qM.y);e.width=s-e.x,e.height=c-e.y}},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=ei(e||[]),ri(e,e,ui(oN,-t.x,-t.y)),ai(e,e,ui(oN,r,i)),ri(e,e,ui(oN,n.x,n.y)),e},e}(),QM=Y.create,$M=Y.set,eN=Y.copy,tN=Y.calculateTransform,nN=Y.applyTransform,rN=Y.contain,iN=new Y(0,0,0,0),aN=new Y(0,0,0,0),oN=[],cN=0,lN=5,uN=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,dN=function(){function e(){}return e}(),fN=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),pN=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}(),mN=lr(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{}),hN=new Y(0,0,0,0),gN={outIntersectRect:{},clamp:!0},_N=ei,vN=5e-5,yN=[],bN=[],xN=$r(),SN=Math.abs,CN=function(){function e(){}return e.prototype.getLocalTransform=function(e){return wN(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Zi(this.rotation)||Zi(this.x)||Zi(this.y)||Zi(this.scaleX-1)||Zi(this.scaleY-1)||Zi(this.skewX)||Zi(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n||=$r(),t?this.getLocalTransform(n):_N(n),e&&(t?ni(n,e,n):ti(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||$r(),oi(this.invTransform,n)):n&&(_N(n),this.invTransform=null)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(yN);var n=yN[0]<0?-1:1,r=yN[1]<0?-1:1,i=((yN[0]-n)*t+n)/yN[0]||0,a=((yN[1]-r)*t+r)/yN[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||$r(),ni(bN,e.invTransform,t),t=bN);var n=this.originX,r=this.originY;(n||r)&&(xN[4]=n,xN[5]=r,ni(bN,t,xN),bN[4]-=n,bN[5]-=r,t=bN),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&bi(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&bi(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&SN(e[0]-1)>1e-10&&SN(e[3]-1)>1e-10?Math.sqrt(SN(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){$i(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&ii(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}(),wN=CN.getLocalTransform,TN=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`],EN={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-EN.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?EN.bounceIn(e*2)*.5:EN.bounceOut(e*2-1)*.5+.5}},DN=Math.pow,ON=Math.sqrt,kN=1e-8,AN=1e-4,jN=ON(3),MN=1/3,NN=si(),PN=si(),FN=si(),IN=/cubic-bezier\(([0-9,\.e ]+)\)/,LN=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||Ir,this.ondestroy=e.ondestroy||Ir,this.onrestart=e.onrestart||Ir,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused)this._pausedTime+=t;else{var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1}},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=B(e)?e:EN[e]||ga(e)},e}(),RN={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]},zN=new FM(20),BN=null,VN=new FM(100),HN=Math.round,UN=1e-4,WN={left:`start`,right:`end`,center:`middle`,middle:`middle`},GN=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),KN=Array.prototype.slice,qN=0,JN=1,YN=2,XN=3,ZN=4,QN=5,$N=6,eP=[0,0,0,0],tP=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=$N,s=t;if(cr(t)){var c=uo(t);o=c,(c===1&&!gr(t[0])||c===2&&!gr(t[0][0]))&&(a=!0)}else if(gr(t)&&!Sr(t))o=qN;else if(V(t)){if(!isNaN(+t))o=qN;else{var l=Da(t);l&&(s=l,o=XN)}}else if(br(t)){var u=I({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:Da(e.color)}}),Ya(t)?o=ZN:Xa(t)&&(o=QN),s=u}i===0?this.valType=o:(o!==this.valType||o===$N)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=B(n)?n:EN[n]||ga(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=po(r),c=fo(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?so(d,f,r):c&&oo(d.colorStops,f.colorStops))}if(!o&&r!==QN&&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===qN?n[l].additiveValue=n[l].value-p:r===XN?n[l].additiveValue=io([],n[l].value,p,-1):po(r)&&(n[l].additiveValue=r===JN?io([],n[l].value,p,-1):ao([],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===XN,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?eP:e[s];if((po(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(po(i))i===JN?no(g,f[r],p[r],h):ro(g,f[r],p[r],h);else if(fo(i)){var _=f[r],v=p[r],y=i===ZN;e[s]={type:y?`linear`:`radial`,x:to(_.x,v.x,h),y:to(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:to(e.offset,n.offset,h),color:lo(no([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=to(_.x2,v.x2,h),e[s].y2=to(_.y2,v.y2,h)):e[s].r=to(_.r,v.r,h)}else if(c)no(g,f[r],p[r],h),n||(e[s]=lo(g));else{var b=to(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===qN?e[n]=e[n]+r:t===XN?(Da(e[n],eP),io(eP,eP,r,1),e[n]=lo(eP)):t===JN?io(e[n],e[n],r,1):t===YN&&ao(e[n],e[n],r,1)},e}(),nP=function(){function e(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r?tr(`Can' use additive animation on looped animation.`):(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,fr(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 tP(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===XN&&c&&(c=lo(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,co(c),r),this._trackKeys.push(o)}s.addKeyframe(e,co(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 LN({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return R(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a&&!a.isFinished()){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=co(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=fr(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}(),rP=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t)}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1))}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),iP=1,EM.hasGlobalWindow&&(iP=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1)),aP=iP,oP=.4,sP=`#333`,cP=`#ccc`,lP=`#eee`,uP=`__zr_normal__`,dP=TN.concat([`ignore`]),fP=lr(TN,function(e,t){return e[t]=!0,e},{ignore:!1}),pP={},mP=new Y(0,0,0,0),hP=[],gP=function(){function e(e){this.id=er(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=mP,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(pP,n,d):Fi(pP,n,d),i.x=pP.x,i.y=pP.y,a=pP.align,o=pP.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Pi(f[0],d.width),m=Pi(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new Y(0,0,0,0);i.getLocalTransform(hP),oi(hP,hP),Y.copy(_,d),_.applyTransform(hP)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?cP:sP},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Da(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Fa(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||{},I(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(H(e))for(var n=fr(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,dP)},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(uP,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===uP;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(ar(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i)tr(`State `+e+` not exists.`);else{i||this.saveCurrentToNormalState(s);var c=this._textContent,l=xo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Co(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=xo(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,Co(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=ar(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=ar(r,e),a=ar(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];I(t,i),i.textConfig&&(n||={},I(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=I({},r?this.textConfig:n.textConfig),I(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<dP.length;l++){var u=dP[l],d=i&&fP[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if((!e.__zr||e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new CN,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},I(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},e.prototype.animate=function(e,t,n){var r=new nP(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=ar(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){mo(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){mo(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=mo(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}(),sr(gP,rP),sr(gP,CN),_P=`__zr_style_`+Math.round(Math.random()*10),vP={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},yP={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}},vP[_P]=!0,bP=[`z`,`z2`,`invisible`],xP=[`invisible`],SP=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=fr(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&wo(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new Y(0,0,0,0),t?Y.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 Y(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:I(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Nr(vP,e)},t.prototype.useStyle=function(e){e[_P]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[_P]},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,bP)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l){if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=fr(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=fr(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l)}if(!c)for(var h=this.__inHover?xP:bP,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return I(e,t),e},t.prototype.getAnimationStyleProps=function(){return yP},t.initDefaultProps=(function(){var e=t.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})(),t}(gP),CP=new Y(0,0,0,0),wP=new Y(0,0,0,0),TP=Math.min,EP=Math.max,DP=Math.sin,OP=Math.cos,kP=Math.PI*2,AP=si(),jP=si(),MP=si(),NP=[],PP=[],FP={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},IP=[],LP=[],RP=[],zP=[],BP=[],VP=[],HP=Math.min,UP=Math.max,WP=Math.cos,GP=Math.sin,KP=Math.abs,qP=Math.PI,JP=qP*2,YP=typeof Float32Array<`u`,XP=[],ZP=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=KP(n/aP/e)||0,this._uy=KP(n/aP/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(FP.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=KP(e-this._xi),r=KP(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(FP.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(FP.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(FP.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(),XP[0]=r,XP[1]=i,Ao(XP,a),r=XP[0],i=XP[1];var o=i-r;return this.addData(FP.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=WP(i)*n+e,this._yi=GP(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(FP.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(FP.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&YP&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(YP&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,YP&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){RP[0]=RP[1]=BP[0]=BP[1]=Number.MAX_VALUE,zP[0]=zP[1]=VP[0]=VP[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,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 FP.M:t=r=e[a++],n=i=e[a++],BP[0]=r,BP[1]=i,VP[0]=r,VP[1]=i;break;case FP.L:To(t,n,e[a],e[a+1],BP,VP),t=e[a++],n=e[a++];break;case FP.C:Eo(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],BP,VP),t=e[a++],n=e[a++];break;case FP.Q:Do(t,n,e[a++],e[a++],e[a],e[a+1],BP,VP),t=e[a++],n=e[a++];break;case FP.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=WP(f)*u+c,i=GP(f)*d+l),Oo(c,l,u,d,f,p,m,BP,VP),t=WP(p)*u+c,n=GP(p)*d+l;break;case FP.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];To(r,i,r+h,i+g,BP,VP);break;case FP.Z:t=r,n=i}xi(RP,RP,BP),Si(zP,zP,VP)}return a===0&&(RP[0]=RP[1]=zP[0]=zP[1]=0),new Y(RP[0],RP[1],zP[0]-RP[0],zP[1]-RP[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case FP.M:i=o=e[d++],a=s=e[d++];break;case FP.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(KP(_)>n||KP(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case FP.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=ca(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case FP.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=ha(i,a,y,b,h,g,10),i=h,a=g;break;case FP.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=WP(D)*T+C,s=GP(D)*E+w),m=UP(T,E)*HP(JP,Math.abs(O)),i=WP(k)*T+C,a=GP(k)*E+w;break;case FP.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case FP.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==FP.L&&v>0&&(e.lineTo(y,b),v=0),S){case FP.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case FP.L:u=n[x++],d=n[x++];var w=KP(u-c),T=KP(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 FP.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],te=n[x++],ne=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;oa(c,k,j,te,D,IP),oa(l,A,ee,ne,D,LP),e.bezierCurveTo(IP[1],LP[1],IP[2],LP[2],IP[3],LP[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,ne),c=te,l=ne;break;case FP.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pa(c,k,j,D,IP),pa(l,A,ee,D,LP),e.quadraticCurveTo(IP[1],LP[1],IP[2],LP[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case FP.A:var re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=n[x++],ce=n[x++],le=n[x++],ue=!n[x++],de=ae>oe?ae:oe,fe=KP(ae-oe)>.001,pe=se+ce,me=!1;if(f){var E=p[g++];h+E>_&&(pe=se+ce*(_-h)/E,me=!0),h+=E}if(fe&&e.ellipse?e.ellipse(re,ie,ae,oe,le,se,pe,ue):e.arc(re,ie,de,se,pe,ue),me)break lo;C&&(o=WP(se)*ae+re,s=GP(se)*oe+ie),c=WP(pe)*ae+re,l=GP(pe)*oe+ie;break;case FP.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var he=n[x++],ge=n[x++];if(f){var E=p[g++];if(h+E>_){var M=_-h;e.moveTo(u,d),e.lineTo(u+HP(M,he),d),M-=he,M>0&&e.lineTo(u+he,d+HP(M,ge)),M-=ge,M>0&&e.lineTo(u+UP(he-M,0),d+ge),M-=he,M>0&&e.lineTo(u,d+UP(ge-M,0));break lo}h+=E}e.rect(u,d,he,ge);break;case FP.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=FP,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}(),QP=Math.PI*2,$P=Math.PI*2,eF=ZP.CMD,tF=Math.PI*2,nF=1e-4,rF=[-1,-1,-1],iF=[-1,-1],aF=ir({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},vP),oF={style:ir({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},yP.style)},sF=TN.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),cF=function(e){P(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<sF.length;++s)i[sF[s]]=this[sF[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=fr(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?I(this.style,o):this.useStyle(o):a===`shape`?I(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(V(e)){var t=Ia(e,0);return t>.5?sP:t>.2?lP:cP}if(e)return cP}return sP},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Ia(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ZP(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Wo(a,o/s,e,t)))return!0}if(this.hasFill())return Uo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Nr(aF,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=fr(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return oF},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){P(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 F(e.style)},n.prototype.getDefaultShape=function(){return F(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(SP),lF=ir({strokeFirst:!0,font:tM,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},aF),uF=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return Xi(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Nr(lF,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=Ji(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(SP),uF.prototype.type=`tspan`,dF=ir({x:0,y:0},vP),fF={style:ir({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},yP.style)},pF=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Nr(dF,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=Go(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 fF},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new Y(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(SP),pF.prototype.type=`image`,mF=Math.round,hF=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),gF={},_F=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new hF},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Jo(gF,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?Ko(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(cF),_F.prototype.type=`rect`,vF={fill:`#000`},yF=2,bF={},xF={style:ir({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},yP.style)},SF=function(e){P(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=vF,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,$o(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 Y(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||vF},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return I(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=fr(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},I(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return xF},t.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;Ki(bF,r.overflowRect,i,a,o,s),i=bF.baseX,a=bF.baseY;var c=Bi(is(e),e,bF.outerWidth,bF.outerHeight),l=as(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Mi(a,c.contentHeight,s);if(l||n){var _=ji(i,f,o),v=Mi(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=rs(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=ns(`fill`in e?e.fill:(x=!0,r.fill)),C=ts(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=yF,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(uF),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,Zo(D,e),g+=m,E.setBoundingRect(Yi(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;Ki(bF,t.overflowRect,i,a,n,r),i=bF.baseX,a=bF.baseY;var o=Vi(is(e),e,bF.outerWidth,bF.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=ji(i,c,n),f=Mi(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;as(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&as(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=rs(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(uF),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ns(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=ts(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=yF,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=wr(s.opacity,t.opacity,1),Zo(p,s),y&&(p.lineWidth=wr(s.lineWidth,t.lineWidth,g),p.lineDash=U(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Yi(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(_F),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=U(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(pF),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=U(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=wr(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Qo(e)&&(t=[e.fontStyle,e.fontWeight,Xo(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Or(t)||e.textFont||e.font},t}(SP),CF={left:!0,right:1,center:1},wF={top:1,bottom:1,middle:1},TF=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`],EF=1e-4,DF=20,OF=Math.min,kF=Math.max,AF=Math.abs,jF=Math.round,MF=Math.floor,NF=Math.ceil,PF=Math.pow,FF=Math.log,IF=Math.LN10,LF=Math.PI,RF=Math.random,X=cs,zF=PF(2,53)-1,BF=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,VF=`[ECharts] `,HF={},UF=typeof console<`u`&&console.warn&&console.log,WF=`series\0`,GF=`\0_ec_\0`,KF=`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(`.`),qF=Os(),JF={useDefault:!0,enableAll:!1,enableNone:!1},YF={useDefault:!1,enableAll:!0,enableNone:!0},(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})(),XF=Os(),ZF=tc(),QF=function(e,t,n,r){if(r){var i=ZF(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=ZF(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},$F=`series`,eI=W([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),tI=`original`,nI=`arrayRows`,rI=`objectRows`,iI=`keyedColumns`,aI=`typedArray`,oI=`unknown`,sI=`column`,cI=`Roam`,lI=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],uI=function(){function e(e){L(lI,function(t){this[t]=q(e[t],e)},this)}return e}(),dI=1,fI={},pI=tc(),mI=tc(),hI=[`emphasis`,`blur`,`select`],gI=[`normal`,`emphasis`,`blur`,`select`],_I=`highlight`,vI=`downplay`,yI=`select`,bI=`unselect`,xI=`toggleSelect`,SI=`selectchanged`,CI=[`emphasis`,`blur`,`select`],wI={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`},TI=ZP.CMD,EI=[[],[],[]],DI=Math.sqrt,OI=Math.atan2,kI=Math.sqrt,AI=Math.sin,jI=Math.cos,MI=Math.PI,NI=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,PI=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,FI=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(cF),II=function(e){P(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ar(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=ar(n,e);return r<0||(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 Y(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?(Y.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(gP),II.prototype.type=`group`,LI=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),RI=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new LI},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}(cF),RI.prototype.type=`circle`,zI=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),BI=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new zI},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}(cF),BI.prototype.type=`ellipse`,VI=Math.PI,HI=VI*2,UI=Math.sin,WI=Math.cos,GI=Math.acos,KI=Math.atan2,qI=Math.abs,JI=Math.sqrt,YI=Math.max,XI=Math.min,ZI=1e-4,QI=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}(),$I=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new QI},t.prototype.buildPath=function(e,t){Il(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(cF),$I.prototype.type=`sector`,eL=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),tL=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new eL},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}(cF),tL.prototype.type=`ring`,nL=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),rL=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new nL},t.prototype.buildPath=function(e,t){Rl(e,t,!0)},t}(cF),rL.prototype.type=`polygon`,iL=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),aL=function(e){P(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 iL},t.prototype.buildPath=function(e,t){Rl(e,t,!1)},t}(cF),aL.prototype.type=`polyline`,oL={},sL=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),cL=function(e){P(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 sL},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=qo(oL,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}(cF),cL.prototype.type=`line`,lL=[],uL=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}(),dL=function(e){P(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 uL},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&&(pa(n,o,i,u,lL),o=lL[1],i=lL[2],pa(r,s,a,u,lL),s=lL[1],a=lL[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(oa(n,o,c,i,u,lL),o=lL[1],c=lL[2],i=lL[3],oa(r,s,l,a,u,lL),s=lL[1],l=lL[2],a=lL[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return zl(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=zl(this.shape,e,!0);return gi(t,t)},t}(cF),dL.prototype.type=`bezier-curve`,fL=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}(),pL=function(e){P(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 fL},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}(cF),pL.prototype.type=`arc`,mL=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),cF.prototype.getBoundingRect.call(this)},t}(cF),hL=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),gL=function(e){P(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}(hL),_L=function(e){P(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}(hL),vL=Math.min,yL=Math.max,bL=Math.abs,xL=[0,0],SL=[0,0],CL=wi(),wL=CL.minTv,TL=CL.maxTv,EL=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new J;for(var n=0;n<2;n++)this._axes[n]=new J;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);J.sub(r[0],n[1],n[0]),J.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&J.set(t,0,0),CL.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!CL.negativeSize&&J.copy(t,r?CL.useDir?CL.dirMinTv:wL:TL),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,xL),e._getProjMinMaxOnAxis(a,t._corners,SL),CL.negativeSize||xL[1]<SL[0]||xL[0]>SL[1]){if(i=!1,CL.negativeSize||n)return i;var s=bL(SL[0]-xL[1]),c=bL(xL[0]-SL[1]);vL(s,c)>TL.len()&&(s<c?J.scale(TL,o,-s*r):J.scale(TL,o,c*r))}else if(!n){var s=bL(SL[0]-xL[1]),c=bL(xL[0]-SL[1]);(CL.useDir||vL(s,c)<wL.len())&&((s<c||!CL.bidirectional)&&(J.scale(wL,o,s*r),CL.useDir&&CL.calcDirMTV()),(s>=c||!CL.bidirectional)&&(J.scale(wL,o,-c*r),CL.useDir&&CL.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=vL(l,o),s=yL(l,s)}n[0]=o+CL.touchThreshold,n[1]=s-CL.touchThreshold,CL.negativeSize=n[1]<n[0]},e}(),DL=[],OL=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Y(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(DL)),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}(SP),kL=tc(),AL=$j({Arc:()=>pL,BezierCurve:()=>dL,BoundingRect:()=>Y,Circle:()=>RI,CompoundPath:()=>mL,Ellipse:()=>BI,Group:()=>II,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>pF,IncrementalDisplayable:()=>OL,Line:()=>cL,LinearGradient:()=>gL,OrientedBoundingRect:()=>EL,Path:()=>cF,Point:()=>J,Polygon:()=>rL,Polyline:()=>aL,RadialGradient:()=>_L,Rect:()=>_F,Ring:()=>tL,Sector:()=>$I,Text:()=>SF,WH:()=>NL,XY:()=>ML,applyTransform:()=>ou,calcZ2Range:()=>Du,clipPointsByRect:()=>du,clipRectByRect:()=>fu,createIcon:()=>pu,decomposeTransform:()=>ju,ensureCopyRect:()=>wu,ensureCopyTransform:()=>Tu,expandOrShrinkRect:()=>vu,extendPath:()=>Xl,extendShape:()=>Yl,getCurrentCanvasPainter:()=>Mu,getShapeClass:()=>Ql,getTransform:()=>au,groupTransition:()=>uu,initProps:()=>Ul,isBoundingRectAxisAligned:()=>Cu,isElementRemoved:()=>Wl,lineLineIntersect:()=>hu,linePolygonIntersect:()=>mu,makeImage:()=>eu,makePath:()=>$l,mergePath:()=>FL,payloadDisableAnimation:()=>Au,registerShape:()=>Zl,removeElement:()=>Gl,removeElementWithFadeOut:()=>ql,resizePath:()=>nu,retrieveZInfo:()=>Eu,setTooltipConfig:()=>bu,subPixelOptimize:()=>IL,subPixelOptimizeLine:()=>ru,subPixelOptimizeRect:()=>iu,transformDirection:()=>su,traverseElements:()=>Su,traverseUpdateZ:()=>Ou,updateProps:()=>Hl}),jL={},ML=[`x`,`y`],NL=[`width`,`height`],PL=jl,FL=Ml,IL=Yo,LL=[0,0,0,0],RL=1e-5,zL=new CN,zL.transform=$r(),Zl(`circle`,RI),Zl(`ellipse`,BI),Zl(`sector`,$I),Zl(`ring`,tL),Zl(`polygon`,rL),Zl(`polyline`,aL),Zl(`rect`,_F),Zl(`line`,cL),Zl(`bezierCurve`,dL),Zl(`arc`,pL),BL={},VL=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],HL=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],UL=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],WL=tc(),GL={minMargin:1,textMargin:2},KL=[`textStyle`,`color`],qL=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],JL=new SF,YL=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(KL):null)},e.prototype.getFont=function(){return Hu({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<qL.length;n++)t[qL[n]]=this.getShallow(qL[n]);return JL.useStyle(t),JL.update(),JL.getBoundingRect()},e}(),XL=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],ZL=Jr(XL),QL=function(){function e(){}return e.prototype.getLineStyle=function(e){return ZL(this,e)},e}(),$L=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],eR=Jr($L),tR=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return eR(this,e,t)},e}(),nR=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){nr(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(F(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(!EM.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}(),Vr(nR),Wr(nR),sr(nR,QL),sr(nR,tR),sr(nR,MM),sr(nR,YL),rR=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Ku,this._newKeyGetter=r||Ku,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=Gu(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=Gu(c),d=Gu(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=Gu(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=Gu(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),iR={Must:1,Might:2,Not:3},aR=tc(),oR=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&Qu(this,n)===iR.Must&&(r.type=`ordinal`)}}return e}(),pR=function(){function e(e,t){var n=ed(e)?e:nd(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),fR(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;fR=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=dR[pd(o,s)];I(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=q(ud(o,s),null,i,c,l),e.count=q(dd(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};dR=(e={},e[nI+`_`+sI]={pure:!0,appendData:i},e[nI+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[rI]={pure:!0,appendData:i},e[iI]={pure:!0,appendData:function(e){var t=this._data;L(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[tI]={appendData:i},e[aI]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),mR=function(e){z(e)||Ns(`series.data or dataset.source must be an array.`)},sR={},sR[nI+`_`+sI]=mR,sR[nI+`_row`]=mR,sR[rI]=mR,sR[iI]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??Ns(`dimension name must not be null/undefined.`)},sR[tI]=mR,hR=function(e,t,n,r){return e[r]},gR=(cR={},cR[nI+`_`+sI]=function(e,t,n,r){return e[r+t]},cR[nI+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},cR[rI]=hR,cR[iI]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},cR[tI]=hR,cR),_R=function(e,t,n){return e.length},vR=(lR={},lR[nI+`_`+sI]=function(e,t,n){return Math.max(0,e.length-t)},lR[nI+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},lR[rI]=_R,lR[iI]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},lR[tI]=_R,lR),yR=function(e,t,n){return e[t]},bR=(uR={},uR[nI]=yR,uR[rI]=function(e,t,n){return e[n]},uR[iI]=yR,uR[tI]=function(e,t,n){var r=Rs(e);return r instanceof Array?r[t]:r},uR[aI]=yR,uR),xR=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}(),SR=function(){function e(e){this.otherDims={},e!=null&&I(this,e)}return e}(),W({number:function(e){return parseFloat(e)},time:function(e){return+xs(e)},trim:function(e){return V(e)?Or(e):e}}),CR={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}},(function(){function e(e,t){gr(t)||Ps(``),this._opFn=CR[e],this._rvalFloat=Es(t)}return e.prototype.evaluate=function(e){return gr(e)?this._opFn(e,this._rvalFloat):this._opFn(Es(e),this._rvalFloat)},e})(),wR=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=gr(e)?e:Es(e),r=gr(t)?t:Es(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}(),(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Es(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=Es(e)===this._rvalFloat)}return this._isEQ?t:!t},e})(),TR=typeof Uint32Array>`u`?Array:Uint32Array,ER=typeof Uint16Array>`u`?Array:Uint16Array,DR=typeof Int32Array>`u`?Array:Int32Array,OR=typeof Float64Array>`u`?Array:Float64Array,kR={float:OR,int:DR,ordinal:Array,number:Array,time:OR},jR=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=W()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=AR[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],ld(r),this._dimensions=R(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new kR[t||`float`](this._rawCount),this._rawExtent[i]=dc(),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]=dc());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];wd(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=AR.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=R(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=dc()),wd(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)}),ps(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=Sd(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(Sd(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=fr(e),i=r.length;if(!i)return this;var a=t.count(),o=new(Sd(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]]=dc();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(Sd(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];isNaN(y)?(T++,w<0&&(w=v)):(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(Sd(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]=dc(),d=new(Sd(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++){var h=this.getRawIndex(p+m);o[m]=c[h]}var g=n(o),_=this.getRawIndex(Math.min(p+r(o,g)||0,l-1));c[_]=g,g<u[0]&&(u[0]=g),g>u[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=dc();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=bd(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||xd(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&lr(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?Cd(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=F(this._extent),e._rawExtent=F(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 yd(e[r],this._dimensions[r])}AR={arrayRows:e,objectRows:function(e,t,n,r){return yd(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return yd(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),MR=tc(),NR={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},PR=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||=Dd(this.source))},e.prototype.getSourceDimensionIndex=function(e){return U(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=ld(this.source),n=!Od(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+=NR[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}(),FR=H,IR=R,LR=typeof Int32Array>`u`?Array:Int32Array,RR=`e\0\0`,zR=-1,BR=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],VR=[`_approximateExtent`],YR=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;Td(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=V(u)?new SR({name:u}):u instanceof SR?u:new SR(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=W();L(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(gr(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof jR&&(i=e),!i){var a=this.dimensions,o=ed(e)||cr(e)?new pR(e,a.length):e;i=new jR;var s=IR(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=hd(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&&JR(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&zs(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=Ys(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=Ys(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)JR(this,o);HR(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){FR(e)?I(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=WR(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return UR(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return z(e)?r.getValues(IR(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?zR:r},e.prototype.each=function(e,t,n){B(e)&&(n=t,t=e,e=[]);var r=n||this,i=IR(GR(e),this._getStoreDimIndex,this);this._store.each(i,r?q(t,r):t)},e.prototype.filterSelf=function(e,t,n){B(e)&&(n=t,t=e,e=[]);var r=n||this,i=IR(GR(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?q(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=fr(e),i=[];return L(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){B(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=IR(GR(e),this._getStoreDimIndex,this),o=qR(this);return o._store=this._store.map(a,i?q(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=IR(GR(e),this._getStoreDimIndex,this);this._store.modify(a,i?q(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=qR(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=qR(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=qR(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 nR(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new rR(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return UR(e,t)},function(e){return UR(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||{},FR(e)?I(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),z(i)?i=i.slice():FR(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,FR(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){FR(e)?I(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?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){QF(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){L(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:IR(this.dimensions,this._getDimInfo,this),this.hostModel),KR(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];B(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Tr(arguments)))})},e.internalField=function(){HR=function(e){var t=e._invertedIndicesMap;L(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new LR(a.categories.length);for(var s=0;s<n.length;s++)n[s]=zR;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},WR=function(e,t,n){return Ys(e._getCategory(t,n),null)},UR=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=WR(e,e._idDimIdx,t)),n??=RR+t,n},GR=function(e){return z(e)||(e=e==null?[]:[e]),e},qR=function(t){var n=new e(t._schema?t._schema:IR(t.dimensions,t._getDimInfo,t),t.hostModel);return KR(n,t),n},KR=function(e,t){L(BR.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,L(VR,function(n){e[n]=F(t[n])}),e._calculationInfo=I({},t._calculationInfo)},JR=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=WR(e,i,t)),s==null&&a!=null&&(r[t]=s=WR(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}(),XR={},ZR={},QR=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(XR,!0),this._normalMasterList=n(ZR,!1);function n(n,r){var i=[];return L(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){L(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){e===`matrix`||e===`calendar`?XR[e]=t:ZR[e]=t},e.get=function(e){return ZR[e]||XR[e]},e}(),$R=W(),ez=function(e,t){var n=t.getReferringComponents(e,JF).models[0];return n&&n.coordinateSystem},tz=function(){function e(e){this.coordSysDims=[],this.axisMap=W(),this.categoryAxisMap=W(),this.coordSysName=e}return e}(),nz={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,JF).models[0],a=e.getReferringComponents(`yAxis`,JF).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),Rd(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),Rd(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,JF).models[0];t.coordSysDims=[`single`],n.set(`single`,i),Rd(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,JF).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),Rd(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),Rd(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();L(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),Rd(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,JF).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}},rz=Math.round(Math.random()*10),iz=Math.log(2),az=`___zrEVENTSAVED`,oz=[],sz=/([&<>"'])/g,cz={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},lz={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:`. `}}}},uz={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:``}}}},dz=`ZH`,fz=`EN`,pz=fz,mz={},hz={},gz=EM.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||pz).toUpperCase().indexOf(dz)>-1?dz:pz}():pz,cf(fz,lz),cf(dz,uz),_z=null,vz=1e3,yz=vz*60,bz=yz*60,xz=bz*24,Sz=xz*365,Cz={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},wz={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Tz=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Ez=`{yyyy}-{MM}-{dd}`,Dz={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Ez,hour:Ez+` `+wz.hour,minute:Ez+` `+wz.minute,second:Ez+` `+wz.second,millisecond:Tz},Oz=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],kz=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`],Az=Er,jz=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Mz=function(e,t){return`{`+e+(t??``)+`}`},Nz=L,Pz=[`left`,`right`,`top`,`bottom`,`width`,`height`],Fz=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]],Iz=Yf,mr(Yf,`vertical`),mr(Yf,`horizontal`),Lz={rect:1,point:2},Rz=tc(),zz=function(e){P(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=Jd(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=rp(this),r=n?ap(e):{};nr(e,t.getTheme().get(this.mainType)),nr(e,this.getDefaultOption()),n&&ip(e,r,n)},t.prototype.mergeOption=function(e,t){nr(this.option,e,!0);var n=rp(this);n&&ip(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Br(e))return e.defaultOption;var t=Rz(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=nr(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return ic(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Xf(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(nR),Ur(zz,nR),qr(zz),Yd(zz),Xd(zz,sp),Bz=tc(),Vz=tc(),Hz=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Is(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return up(this,Bz,r,i,e,t,n)},e.prototype.clearColorPalette=function(){dp(this,Bz)},e}(),Uz=/\{@(.+?)\}/g,Wz=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&z(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),B(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return Wf(i,s).replace(Uz,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=md(o,e,i);if(a&&z(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return md(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}(),Gz=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(z(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){Kz.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:Kz.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),z(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),Kz=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}}(),qz=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 yd(e,t)},e}(),Jz=W(),Yz=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(Cp(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=vr(o)?aI:tI,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=U(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=U(u.sourceHeader,d.sourceHeader),m=U(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[td(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=[td(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&wp(``);var i,a=[],o=[];return L(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&wp(``),a.push(t),o.push(e._getVersionSign())}),n?i=bp(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[rd(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];Cp(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new jR,o.initData(new pR(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Cp(e)){var t=Xu(e);return t?[t.getSourceManager()]:[]}return R(Zu(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(Cp(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}(),Z={color:{},darkColor:{},size:{}},Xz=Z.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`},I(Xz,{primary:Xz.neutral80,secondary:Xz.neutral70,tertiary:Xz.neutral60,quaternary:Xz.neutral50,disabled:Xz.neutral20,border:Xz.neutral30,borderTint:Xz.neutral20,borderShade:Xz.neutral40,background:Xz.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Xz.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Xz.neutral70,axisLineTint:Xz.neutral40,axisTick:Xz.neutral70,axisTickMinor:Xz.neutral60,axisLabel:Xz.neutral70,axisSplitLine:Xz.neutral15,axisMinorSplitLine:Xz.neutral05}),Xz)Xz.hasOwnProperty(e)&&(Zz=Xz[e],e===`theme`?Z.darkColor.theme=Xz.theme.slice():e===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:e.indexOf(`accent`)===0?Z.darkColor[e]=Na(Zz,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[e]=Na(Zz,null,function(e){return e*.9},function(e){return 1-e**1.5}));Z.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50},Qz=`line-height:1`,$z=[0,10,20,30],eB=[``,`
33
+ `,`
34
+
35
+ `,`
36
+
37
+
38
+ `],tB=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Os()}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=Kf({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};z(t)?L(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}(),nB=tc(),rB=function(e){P(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=pp({count:qp,reset:Jp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(nB(this).sourceManager=new Yz(this)).prepareSource();var r=this.getInitialData(e,n);Xp(r,this),this.dataTask.context.data=r,nB(this).dataBeforeProcessed=r,Gp(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=rp(this),r=n?ap(e):{},i=this.subType;zz.hasClass(i)&&(i+=`Series`),nr(e,t.getTheme().get(this.subType)),nr(e,this.getDefaultOption()),Ls(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&ip(e,r,n)},t.prototype.mergeOption=function(e,t){e=nr(this.option,e,!0),this.fillDataTextStyle(e.data);var n=rp(this);n&&ip(this.option,e,n);var r=nB(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Xp(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,nB(this).dataBeforeProcessed=i,Gp(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!vr(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&Ls(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=Qp(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return nB(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=Qp(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}nB(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return W(e)},t.prototype.getSourceManager=function(){return nB(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return nB(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Hp({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(EM.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=Hz.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var a=0;a<e.length;a++){var o=e[a],s=Wp(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=fr(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[Wp(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){H(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=Wp(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=Wp(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 zz.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}(zz),sr(rB,Wz),sr(rB,Hz),Ur(rB,zz),iB=cF.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()}}),aB={line:cL,rect:_F,roundRect:_F,square:_F,circle:RI,diamond:cF.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:cF.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:cF.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:iB},oB={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}},sB={},L(aB,function(e,t){sB[t]=new e}),cB=cF.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Fi(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=sB[r];i||=(r=`rect`,sB[r]),oB[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}}),lB=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return Gd(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new II,n=em(`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=em(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=Z.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(rB),uB=function(e){P(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=em(e,-1,-1,2,2,null,a);o.attr({z2:U(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=am,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Jc(this.childAt(0))},t.prototype.downplay=function(){Yc(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Hl(f,p,o,n),Jl(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Ul(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Iu(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=nm(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 pF){var S=a.style;a.useStyle(I({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(I({},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;Fu(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):rm(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),pl(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=ZF(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Gl(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Gl(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return tm(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(II),dB=function(){function e(e){this.group=new II,this._SymbolCtor=e||uB}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=sm(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=cm(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);om(e,i,r,t)&&lm(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!om(e,p,u,t))n.remove(f);else{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):Hl(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);om(t,s,i,e)?(o||=lm(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=cm(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=sm(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(om(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){Su(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}(),fB=typeof Float32Array<`u`?Float32Array:void 0,pB=typeof Float64Array<`u`?Float64Array:void 0,mB=Math.min,hB=Math.max,gB=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),_B=function(e){P(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:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new gB},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&pm(n[i*2-2],n[i*2-1]);i--);for(;r<i&&pm(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=vm(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=ZP.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?ia(i,u,f,m,e,s):ia(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?na(a,d,p,h,b):na(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(cF),vB=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(gB),yB=function(e){P(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 vB},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&&pm(n[a*2-2],n[a*2-1]);a--);for(;i<a&&pm(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=vm(e,n,i,a,a,1,t.smooth,o,t.connectNulls);vm(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(cF),bB=tc(),xB=ym(),SB=function(){function e(){this.group=new II,this.uid=Jd(`viewChart`),this.renderTask=pp({plan:Sm,reset:Cm}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&xm(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&xm(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){Su(this.group,e)},e.markUpdateMethod=function(e,t){bB(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}(),Vr(SB,[`dispose`]),qr(SB),CB={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)}}},wB=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}(),qr(wB),TB=0,EB=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++TB,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&R(r,Nm);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(!V(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=W(this.categories)},e}(),DB=fr({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1}),OB={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=Rm(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Hm(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Hm(r,e,t,n)},freeze:function(){}},kB=function(e){P(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Fm(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new EB({}),z(i)&&(i=new EB({categories:R(i,function(e){return H(e)?e.value:e})})),r._ordinalMeta=i;var a=Pm(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Im(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=jF(e),e},t.prototype.getTicks=function(){var e=[];return th(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=OF(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=Lm(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(jF(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(wB),wB.registerClass(kB),AB=function(e){P(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=Pm(r,mf(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return F(this._cfg)},t.prototype.setConfig=function(e){var t=Lm(this);this._cfg=e=F(e),e.niceExtent??(e.niceExtent=t.slice()),e.intervalPrecision??(e.intervalPrecision=Ym(e.interval))},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=Lm(this),i=t.niceExtent,a=t.intervalPrecision,o=pf(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?fs(i[0]-n,a):r[0]});for(var d=function(e,t){return jF((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=OF(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=fs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=fs(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?fs(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return nh(this,e,hf(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=ms(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Vf(fs(e.value,n,!0))},t.type=`interval`,t}(wB),wB.registerClass(AB),jB=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},MB=function(e){P(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=Pm(r,mf(r,n),null).brk,r}return t.prototype.getLabel=function(e){return Cf(e.value,Dz[Sf(bf(this._minLevelUnit))]||Dz.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return wf(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=Lm(this),r=pf(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return pf().addBreaksToTicks(o,i.breaks,n),o;o=dh(this._minLevelUnit,this._approxInterval,s,n,Bm(this),i);var c=Oz.length-1,l=0;return L(o,function(e){e.time&&(c=Math.min(c,ar(Oz,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&pf().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&pf().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(ar(Oz,Tf(e.vmin,s)),ar(Oz,Tf(e.vmax,s))),n=0,r=0;r<Oz.length;r++)if(!rh(Oz[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:Oz[Math.max(i,t)],upperTimeUnit:Oz[i]}}),o},t.prototype.getMinorTicks=function(e){return nh(this,e,hf(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return gr(e)?Math.round(e):+xs(e)},t.type=`time`,t}(wB),NB=[[`second`,vz],[`minute`,yz],[`hour`,bz],[`quarter-day`,bz*6],[`half-day`,bz*12],[`day`,xz*1.2],[`half-week`,xz*3.5],[`week`,xz*7],[`month`,xz*31],[`quarter`,xz*95],[`half-year`,Sz/2],[`year`,Sz]],PB=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=xz,n[1]+=xz),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-xz}e.setExtent(n[0],n[1]);var i=eh(t.splitNumber,10),a=Bm(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=NB.length,l=Math.min(jB(NB,a,0,c),c-1),u=NB[l][1],d=NB[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})},wB.registerClass(MB),FB=0,IB=1,LB=2,RB=function(e){P(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=AB.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[FB]=i[IB]=a[FB]=a[IB]=NaN,Fm(r,t.mapperMethods);var s=pf(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},LB,l),r.powStub=new AB({breakParsed:l.original}),r.intervalStub=new AB({breakParsed:l.transformed}),Im(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=pf(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return R(i.getTicks(e||{}),function(e){var i=e.value,o=Zm(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,hf(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return nh(this,e,hf(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Xm(e,this.base))},scale:function(e){return Zm(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Xm(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return zB.depth=n,BB.lookup=this._lookup,Zm(n===2?e:this.intervalStub.transformOut(e,zB),this.base,BB)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!_c(t,n)||t<=0||n<=0)){var r=VB,i=VB;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[FB]=t,r[IB]=n);var o=this.base;this.intervalStub.setExtent2(e,i[FB]=Xm(t,o),i[IB]=Xm(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return _c(t[0],t[1])&&js(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(wB),wB.registerClass(RB),zB={},BB={},VB=[],HB={value:1,category:1,time:1,log:1},UB=tc(),WB=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new II,t=new dB;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=q(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=um(r,a,_),y=g&&Nh(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Lh(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Ih(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&&=Ph(y,c,r,w,x),c=Ph(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,qf(E)),m.setClipPath(Uh(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,qf(E));var D=m.getClipPath();D?Ul(D,{shape:Uh(this,r,!1,e).shape},e):m.setClipPath(Uh(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]]}}),kh(this._stackedOnPoints,y)&&kh(this._points,c)||(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Ph(y,c,r,w,x),c=Ph(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(ir(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),hl(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}ZF(f).seriesIndex=e.seriesIndex,pl(f,k,A,j);var te=Mh(e.get(`smooth`)),ne=e.get(`smoothMonotone`);if(f.setShape({smooth:te,smoothMonotone:ne,connectNulls:x}),p){var re=a.getCalculationInfo(`stackedOnSeries`),ie=0;p.useStyle(ir(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),re&&(ie=Mh(re.get(`smooth`))),p.setShape({smooth:te,stackedOnSmooth:ie,smoothMonotone:ne,connectNulls:x}),hl(p,e,`areaStyle`),ZF(p).seriesIndex=e.seriesIndex,pl(p,k,A,j)}var ae=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ae)}),this._polyline.onHoverStateChange=ae,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var oe=e.get(`triggerEvent`),se=e.get(`triggerLineEvent`),ce=se===!0||oe===!0||oe===`line`,le=se===!0||oe===!0||oe===`area`;this.packEventData(e,f,ce),p&&this.packEventData(e,p,le)},t.prototype.packEventData=function(e,t,n){ZF(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=ec(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(pm(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new uB(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 SB.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=ec(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 SB.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;zc(this._polyline,e),t&&zc(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new _B({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 yB({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`);B(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=B(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=B(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(Hh(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 SF({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=zh(o);c>=0&&(Fu(a,Iu(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?rm(i,e):im(i,n)},enableTextSetter:!0},Wh(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Vh(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Bh(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=uc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Bh(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=WL(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=_m(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=Ph(u.stackedOnCurrent,u.current,n,i,o),d=Ph(u.current,null,n,i,o),m=Ph(u.stackedOnNext,u.next,n,i,o),p=Ph(u.next,null,n,i,o)),jh(d,p)>3e3||c&&jh(f,m)>3e3)s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));else{s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Hl(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Hl(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}(SB),GB={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]}},KB=function(e){return Math.round(e.length/2)},qB=tc(),JB=tc(),YB={estimate:1,determine:2},XB=ng(`axisTick`),ZB=ng(`axisLabel`),QB=tc(),$B=bc(),eV=tc(),tV=tc(),nV={},rV=W(),iV=.8,aV=[0,1],oV=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ss(e,aV,Ng(this),t)},e.prototype.coordToData=function(e,t){var n=ss(e,Ng(this),aV,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=R(Xh(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Dh(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Pg(this,n,r);return R(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(qm(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=Jh(YB.determine),Yh(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Ag(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=Jh(YB.determine),og(this,e)},e}(),sV=function(e){P(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}(oV),cV=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],lV=1,uV=2,dV=lV|uV,fV=[0,0,0,0],pV=null,mV=`expandAxisBreak`,hV=`collapseAxisBreak`,gV=`toggleAxisBreak`,_V=`axisbreakchanged`,vV={type:mV,event:_V,update:`update`,refineEvent:Yg},yV={type:hV,event:_V,update:`update`,refineEvent:Yg},bV={type:gV,event:_V,update:`update`,refineEvent:Yg},xV=Math.PI,SV=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],CV=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],wV=tc(),TV=tc(),EV=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}(),DV=$r(),OV=new Y(0,0,0,0),kV=function(e,t,n,r,i,a){if(Sh(e.nameLocation)){var o=a.stOccupiedRect;o&&Qg(zg({},o,a.transGroup.transform),r,i)}else $g(a.labelInfoList,a.dirVec,r,i)},AV=function(){function e(e,t,n,r){this.group=new II,this._axisModel=e,this._api=t,this._local={},this._shared=r||new EV(kV),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=U(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=U(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:U(e.nameDirection,1),tickDirection:U(e.tickDirection,1),labelDirection:U(e.labelDirection,1),labelOffset:U(e.labelOffset,0),silent:U(e.silent,!0),axisName:r,nameLocation:wr(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:p_(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new II({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new J(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},L(jV,function(r){e[r]&&MV[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=ys(t-e),i,a;return bs(r)?(a=n>0?`top`:`bottom`,i=`center`):bs(r-xV)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<xV?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}(),jV=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],MV={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(bi(u,u,l),bi(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&gf(r.axis.scale))Jg().buildAxisBreakLine(r,i,a,m);else{var h=new cL(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));ru(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||gr(_))&&(_=[_,_]);var v=nm(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];L([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=em(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){c_(t,i,s)&&e_(e,t,n,r,i,a,o,YB.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){c_(t,i,s)&&e_(e,t,n,r,i,a,o,YB.determine);var c=o_(e,i,a,r);r_(e,t.labelLayoutList,c),s_(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(p_(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new J(0,0),_=new J(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=$r();_.transform(ii(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*xV/180);var b,x;Sh(u)?b=AV.innerTextLayout(e.rotation,y??e.rotation,d):(b=t_(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Cr(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new SF({x:g.x,y:g.y,rotation:b.rotation,silent:AV.isLabelSilent(r),style:Lu(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(bu({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=AV.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,ZF(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Lg({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Sh(u)?SV[E]:CV[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}},NV=new _F,PV=new _F,FV=tc(),IV=3,LV=function(){function e(e,t,n,r,i){var a=qm(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(Wm(e)||Km(e)||Gm(e))&&(pc(l,S_(e,t.get(`dataMin`,!0))),mc(l,S_(e,t.get(`dataMax`,!0)))),vc(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=S_(e,B(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=S_(e,B(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=C_(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!gc(u[0])&&(u[0]=NaN),!gc(u[1])&&(u[1]=NaN);var g=s||Sr(u[0])||Sr(u[1])||a&&!o,_=Wm(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=S_(e,t.get(`startValue`,!0)),x=b!=null;!js(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),js(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),x_(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),x_(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}(),RV=W(),zV=hm({ctor:pB},50),BV={left:0,right:0,top:0,bottom:0},VV=[`25%`,`25%`],HV=`cartesian2d`,UV=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=ap(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&ip(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&ip(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:BV,outerBoundsContain:`all`,outerBoundsClampWidth:VV[0],outerBoundsClampHeight:VV[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(zz),WV=bc(),GV=`__ec_stack_`,KV=function(e){P(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 Gd(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)L(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(rB),rB.registerClass(KV),qV=function(e){P(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 Gd(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Tc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Zd(KV.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:Z.color.primary,borderWidth:2}},realtimeSort:!1}),t}(KV),JV=`\0__throttleOriginMethod`,YV=`\0__throttleRate`,XV=`\0__throttleType`,ZV=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}(),QV=function(e){P(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new ZV},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}(cF),$V=Math.max,eH=Math.min,tH=function(e){P(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){Su(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=av(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){var t=sH[s.type](a,e);if(!t)return null;var n=hv(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=sH[s.type](a,t,n);if(r&&(h&&S(t),a.hasValue(t)&&oH[s.type](r))){var o=!1;f&&(o=nH[s.type](p,r));var g=rH[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),uv(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?ov(d,u,g,r,t,l,!1,!1):Ul(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=sH[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=sH[s.type](a,t),E=mv(l,T,s);Hl(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!oH[s.type](C))i.remove(D);else{var O=!1;if(f&&(O=nH[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&ql(D,e,n),D=null),D?Jl(D):D=rH[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=WL(k);A.prevValue!=null&&(A.prevValue=A.value)}}else uv(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?ov(d,u,D,C,t,l,!0,x):Hl(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&&ql(n,e,t)}).execute();var C=this._backgroundGroup||=new II;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(),fv(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),fv(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&Em(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:R(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){ql(t,e,ZF(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}(SB),nH={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=$V(t.x,e.x),s=eH(t.x+t.width,i),c=$V(t.y,e.y),l=eH(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=eH(t.r,e.r),a=$V(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}},rH={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new _F({shape:I({},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?QV:$I,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=ev(lv(i),{isRoundCap:l===QV}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Hl:Ul)(u,{shape:p},a)}return u}},iH=[`x`,`y`,`width`,`height`],aH=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],oH={cartesian2d:function(e){return!sv(e,iH)},polar:function(e){return!sv(e,aH)}},sH={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?dv(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}}},cH=function(){function e(){}return e}(),lH=function(e){P(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new cH},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}(cF),uH=Z_(function(e){var t=this,n=pv(t,e.offsetX,e.offsetY);ZF(t).dataIndex=n>=0?n:null},30,!1),dH=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),fH=tc(),pH=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new dH(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Cv(this,{coordDimensions:[`value`],encodeDefaulter:mr(Yu,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=fH(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=_s(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){Ls(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(rB),Nd({fullType:pH.type,getCoord2:function(e){return e.getShallow(`center`)}}),mH=Math.PI*2,hH=ZP.CMD,gH=[`top`,`right`,`bottom`,`left`],_H=[],vH=new J,yH=new J,bH=new J,xH=new J,SH=new J,CH=[],wH=new J,TH=Math.PI/180,EH={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},DH={},OH=Math.PI*2,kH=Math.PI/180,AH=Ec(`pie`,Uv),jH=tc(),MH=function(e){P(t,e);function t(t,n,r){var i=e.call(this)||this;i.z2=2;var a=new SF;return i.setTextContent(a),i.updateData(t,n,r,!0),i}return t.prototype.updateData=function(e,t,n,r){var i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=I(iv(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle))i.setShape(l);else{if(r){i.setShape(l);var u=a.getShallow(`animationType`);a.ecModel.ssr?(Ul(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):u===`scale`?(i.shape.r=c.r0,Ul(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,Hl(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),Ul(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else Jl(i),Hl(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),hl(i,o);var d=(c.startAngle+c.endAngle)/2,f=a.get(`selectedOffset`),p=Math.cos(d)*f,m=Math.sin(d)*f,h=o.getShallow(`cursor`);h&&i.attr(`cursor`,h),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=I({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},iv(s.getModel(`itemStyle`),c)),I(i.ensureState(`select`),{x:p,y:m,shape:iv(o.getModel([`select`,`itemStyle`]),c)}),I(i.ensureState(`blur`),{shape:iv(o.getModel([`blur`,`itemStyle`]),c)});var g=i.getTextGuideLine(),_=i.getTextContent();g&&I(g.ensureState(`select`),{x:p,y:m}),I(_.ensureState(`select`),{x:p,y:m}),pl(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}},t.prototype._updateLabel=function(e,t,n){var r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;Fu(r,Iu(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});var l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});var u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new aL,this.setTextGuideLine(d)),Fv(this,Iv(i),{stroke:s,opacity:wr(a.get([`lineStyle`,`opacity`]),c,1)})}},t}($I),NH=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`pie`,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n,r){var i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l<i.count();++l)c=i.getItemLayout(l);c&&(s=c.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){var u=new $I({shape:F(jH(e))});u.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=u,o.add(u)}i.diff(a).add(function(e){var t=new MH(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){ql(a.getItemGraphicEl(t),e,t)}).execute(),Hv(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,t){var n=t.getData().getItemLayout(0);if(n){var r=e[0]-n.cx,i=e[1]-n.cy,a=Math.sqrt(r*r+i*i);return a<=n.r&&a>=n.r0}},t.type=`pie`,t}(SB),PH=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),FH=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 PH(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 PH(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 PH(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new PH(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new PH(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new PH(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),IH=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,LH=[],RH=EM.browser.firefox&&+EM.browser.version.split(`.`)[0]<39,zH=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},BH=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=Kv(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 VH)if(VH.hasOwnProperty(t)){var n=VH[t](this._track,e);if(n)return n}},e}(),VH={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=ey(r)/ey(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ty(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},HH=`silent`,UH=function(e){P(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}(rP),WH=function(){function e(e,t){this.x=e,this.y=t}return e}(),GH=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],KH=new Y(0,0,0,0),qH=function(e){P(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new WH(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new UH,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new FH(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(GH,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=oy(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 WH(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 WH(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=ny(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 WH(e,t);if(ay(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Y(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||(KH.copy(u.getBoundingRect()),u.transform&&KH.applyTransform(u.transform),KH.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(ay(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new BH;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 WH;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(rP),L([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){qH.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=oy(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||LM(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}}),JH=32,YH=7,XH=!1,ZH=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=gy}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,my(n,gy)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(hy(),p.z=0),isNaN(p.z2)&&(hy(),p.z2=0),isNaN(p.zlevel)&&(hy(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=ar(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}(),QH=EM.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},$H=function(e){P(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=_y()-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}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&&(QH(t),!e._paused&&e.update())}QH(t)},t.prototype.start=function(){this._running||(this._time=_y(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=_y(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=_y()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new nP(e,t.loop);return this.addAnimator(n),n},t}(rP),eU=300,tU=EM.domSupported,nU=(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:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),rU={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},iU=!1,aU=function(){function e(e,t){this.stopPropagation=Ir,this.stopImmediatePropagation=Ir,this.preventDefault=Ir,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),oU={mousedown:function(e){e=Yv(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Yv(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=Yv(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Yv(this.dom,e);var t=e.toElement||e.relatedTarget;Sy(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){iU=!0,e=Yv(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){iU||(e=Yv(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Yv(this.dom,e),by(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),oU.mousemove.call(this,e),oU.mousedown.call(this,e)},touchmove:function(e){e=Yv(this.dom,e),by(e),this.handler.processGesture(e,`change`),oU.mousemove.call(this,e)},touchend:function(e){e=Yv(this.dom,e),by(e),this.handler.processGesture(e,`end`),oU.mouseup.call(this,e),+new Date-this.__lastTouchMoment<eU&&oU.click.call(this,e)},pointerdown:function(e){oU.mousedown.call(this,e)},pointermove:function(e){vy(e)||oU.mousemove.call(this,e)},pointerup:function(e){oU.mouseup.call(this,e)},pointerout:function(e){vy(e)||oU.mouseout.call(this,e)}},L([`click`,`dblclick`,`contextmenu`],function(e){oU[e]=function(t){t=Yv(this.dom,t),this.trigger(e,t)}}),sU={pointermove:function(e){vy(e)||sU.mousemove.call(this,e)},pointerup:function(e){sU.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))}},cU=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),lU=function(e){P(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 cU(t,oU),tU&&(r._globalHandlerScope=new cU(document,sU)),Cy(r,r._localHandlerScope),r}return t.prototype.dispose=function(){Ey(this._localHandlerScope),tU&&Ey(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,tU&&+this.__pointerCapturing^e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?wy(this,t):Ey(t)}},t}(rP),uU={},dU={},fU=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new ZH,a=n.renderer||`canvas`;uU[a]||(a=fr(uU)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;var o=new uU[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!EM.node&&!EM.worker&&!s?new lU(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?EM.touchEventsSupported:!!l,d=44,f;u&&(f=U(n.pointerSize,d)),this.handler=new qH(i,o,c,o.root,f),this.animation=new $H({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Oy(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=_y(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=_y();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof II&&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,Dy(this.id))},e}(),mU=``,typeof navigator<`u`&&(mU=navigator.platform||``),hU=`rgba(0, 0, 0, 0.2)`,gU=Z.color.theme[0],_U=Na(gU,null,null,.9),vU={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[_U,gU],aria:{decal:{decals:[{color:hU,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:hU,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:hU,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:hU,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:hU,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:hU,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:mU.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},yU=W(),CU=`\0_ec_inner`,wU=1,TU=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new nR(r),this._locale=new nR(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Ry(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Ry(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?SU(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&&L(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=W(),s=t&&t.replaceMergeMainTypeMap;qu(this),L(e,function(e,t){e!=null&&(zz.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?F(e):nr(n[t],e,!0))}),s&&s.each(function(e,t){zz.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),zz.topologicalTravel(a,zz.getAllClassMainTypes(),c,this);function c(t){var a=Ny(this,t,Is(e[t])),o=r.get(t),c=Bs(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Qs(c,t,zz),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;L(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=zz.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=I({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),I(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&bU(this)}this._seriesIndices||bU(this)},t.prototype.getOption=function(){var e=F(this.option);return L(e,function(t,n){if(zz.hasClass(n)){for(var r=Is(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[CU],e},t.prototype.setTheme=function(e){this._theme=new nR(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?ur(a,function(e){return!!e}):Iy(`name`,i,a):Iy(`id`,r,a):(o=[],L(Is(n),function(e){a[e]&&o.push(a[e])})),Ly(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(Ly(r?this.queryComponents(r):ur(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?ur(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(B(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=V(e)?r.get(e):H(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=Ys(e,null);return ur(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 ur(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return ur(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){xU(this),L(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){L(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){xU(this),L(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 L(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return xU(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){xU(this);var n=[];L(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=W(n)},t.prototype.restoreData=function(e){bU(this);var t=this._componentsMap,n=[];t.each(function(e,t){zz.hasClass(t)&&n.push(t)}),zz.topologicalTravel(n,zz.getAllClassMainTypes(),function(n){L(t.get(n),function(t){t&&(n!==`series`||!Py(t,e))&&t.restoreData()})})},t.internalField=function(){bU=function(e){var t=e._seriesIndices=[];L(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=W(t)},xU=function(e){},SU=function(e,t){e.option={},e.option[CU]=wU,e._componentsMap=W({series:[]}),e._componentsCount=W();var n=t.aria;H(n)&&n.enabled==null&&(n.enabled=!0),Fy(t,e._theme.option),nr(t,vU,!1),e._mergeOption(t,null)}}(),t}(nR),sr(TU,Hz),EU=/^(min|max)?(.+)$/,DU=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(L(Is(e.series),function(e){e&&e.data&&vr(e.data)&&kr(e.data)}),L(Is(e.dataset),function(e){e&&e.source&&vr(e.source)&&kr(e.source)})),e=F(e);var r=this._optionBackup,i=zy(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=[],F(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=F(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++)By(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!Hy(a,this._currentMediaIndices)&&(o=R(a,function(e){return F(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}(),OU=L,kU=H,AU=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`],jU=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],MU=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],NU=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]],PU=Dc(sb),FU=function(){function e(){this.group=new II,this.uid=Jd(`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}(),Vr(FU),qr(FU),IU=tc(),LU={itemStyle:Jr($L,!0),lineStyle:Jr(XL,!0)},RU={lineStyle:`stroke`,itemStyle:`fill`},zU={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=lb(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=ub(e,r),c=a[s],l=B(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`||B(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||B(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=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},BU=new nR,VU={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=lb(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){BU.option=n[r];var o=i(BU);I(e.ensureUniqueItemVisual(t,`style`),o),BU.option.decal&&(e.setItemVisual(t,`decal`,BU.option.decal),BU.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},HU={performRawSeries:!0,overallReset:function(e){var t=W();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();IU(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=IU(e).scope,a=ub(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},UU=Math.PI,WU=function(){function e(e,t,n,r){this._stageTaskMap=W(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Tc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=W();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Dr(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(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=W(),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)||pp({plan:gb,reset:_b,count:yb}));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||pp({reset:fb});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=W(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Dr(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):L(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,pp({reset:pb,onDirty:hb})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return B(e)&&(e={overallReset:e,seriesType:bb(e)}),e.uid=Jd(`stageHandler`),t&&(e.visualType=t),e},e}(),GU=vb(0),KU={},qU={},xb(KU,TU),xb(qU,uI),KU.eachSeriesByType=KU.eachRawSeriesByType=function(e){JU=e},KU.eachComponent=function(e){e.mainType===`series`&&e.subType&&(JU=e.subType)},Q=Z.darkColor,YU=Q.background,XU=function(){return{axisLine:{lineStyle:{color:Q.axisLine}},splitLine:{lineStyle:{color:Q.axisSplitLine}},splitArea:{areaStyle:{color:[Q.backgroundTint,Q.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Q.axisMinorSplitLine}},axisLabel:{color:Q.axisLabel},axisName:{}}},ZU={label:{color:Q.secondary},itemStyle:{borderColor:Q.borderTint},dividerLineStyle:{color:Q.border}},QU={darkMode:!0,color:Q.theme,backgroundColor:YU,axisPointer:{lineStyle:{color:Q.border},crossStyle:{color:Q.borderShade},label:{color:Q.tertiary}},legend:{textStyle:{color:Q.secondary},pageTextStyle:{color:Q.tertiary}},textStyle:{color:Q.secondary},title:{textStyle:{color:Q.primary},subtextStyle:{color:Q.quaternary}},toolbox:{iconStyle:{borderColor:Q.accent50},feature:{dataView:{backgroundColor:YU,textColor:Q.primary,textareaColor:Q.background,textareaBorderColor:Q.border,buttonColor:Q.accent50,buttonTextColor:Q.neutral00}}},tooltip:{backgroundColor:Q.neutral20,defaultBorderColor:Q.border,textStyle:{color:Q.tertiary}},dataZoom:{borderColor:Q.accent10,textStyle:{color:Q.tertiary},brushStyle:{color:Q.backgroundTint},handleStyle:{color:Q.neutral00,borderColor:Q.accent20},moveHandleStyle:{color:Q.accent40},emphasis:{handleStyle:{borderColor:Q.accent50}},dataBackground:{lineStyle:{color:Q.accent30},areaStyle:{color:Q.accent20}},selectedDataBackground:{lineStyle:{color:Q.accent50},areaStyle:{color:Q.accent30}}},visualMap:{textStyle:{color:Q.secondary},handleStyle:{borderColor:Q.neutral30}},timeline:{lineStyle:{color:Q.accent10},label:{color:Q.tertiary},controlStyle:{color:Q.accent30,borderColor:Q.accent30}},calendar:{itemStyle:{color:Q.neutral00,borderColor:Q.neutral20},dayLabel:{color:Q.tertiary},monthLabel:{color:Q.secondary},yearLabel:{color:Q.secondary}},matrix:{x:ZU,y:ZU,backgroundColor:{borderColor:Q.axisLine},body:{itemStyle:{borderColor:Q.borderTint}}},timeAxis:XU(),logAxis:XU(),valueAxis:XU(),categoryAxis:XU(),line:{symbol:`circle`},graph:{color:Q.theme},gauge:{title:{color:Q.secondary},axisLine:{lineStyle:{color:[[1,Q.neutral05]]}},axisLabel:{color:Q.axisLabel},detail:{color:Q.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:Q.background}},radar:function(){var e=XU();return e.axisName={color:Q.axisLabel},e.axisLine.lineStyle.color=Q.neutral20,e}(),treemap:{breadcrumb:{itemStyle:{color:Q.neutral20,textStyle:{color:Q.secondary}},emphasis:{itemStyle:{color:Q.neutral30}}}},sunburst:{itemStyle:{borderColor:Q.background}},map:{itemStyle:{borderColor:Q.border,areaColor:Q.neutral10},label:{color:Q.tertiary},emphasis:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}},select:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}}},geo:{itemStyle:{borderColor:Q.border,areaColor:Q.neutral10},emphasis:{label:{color:Q.primary},itemStyle:{areaColor:Q.highlight}},select:{label:{color:Q.primary},itemStyle:{color:Q.highlight}}}},QU.categoryAxis.splitLine.show=!1,$U=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(V(e)){var i=Rr(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};L(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}(),eW=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],tW=eW.concat([`symbolKeepAspect`]),nW={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<eW.length;o++){var s=eW[o],c=e.get(s);B(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(I({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=fr(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}}},rW={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<tW.length;r++){var i=tW[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}},iW=new rP,aW={},oW={},sW=Math.round(Math.random()*9),cW=typeof Object.defineProperty==`function`,lW=function(){function e(){this._id=`__ec_inner_`+sW++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return cW?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}(),uW=new ZP(!0),dW=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],fW=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]],pW=1,mW=2,hW=3,gW=4,_W=new lW,vW=new FM(100),yW=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`],bW=Dc(dx),xW=1,SW=800,CW=900,wW=920,TW=1e3,EW=2e3,DW=5e3,OW=1e3,kW=1100,AW=2e3,jW=3e3,MW=4e3,NW=4500,PW=4600,FW=5e3,IW=6e3,LW=7e3,RW={PROCESSOR:{SERIES_FILTER:SW,AXIS_STATISTICS:wW,FILTER:TW,STATISTIC:DW,STATISTICS:DW},VISUAL:{LAYOUT:OW,PROGRESSIVE_LAYOUT:kW,GLOBAL:AW,CHART:jW,POST_CHART_LAYOUT:PW,COMPONENT:MW,BRUSH:FW,CHART_ITEM:NW,ARIA:IW,DECAL:LW}},zW=`__flagInMainProcess`,BW=`__mainProcessVersion`,VW=`__pendingUpdate`,HW=`__needsUpdateStatus`,UW=/^[a-zA-Z0-9_]+$/,WW=`__connectUpdateStatus`,GW=0,KW=1,qW=2,JW=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rP),YW=JW.prototype,YW.on=px(`on`),YW.off=px(`off`),hG=function(e){P(t,e);function t(t,n,r){var i=e.call(this,new $U)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[BW]=1,r.ssr&&My(function(e){var t=ZF(e),n=t.dataIndex;if(n!=null){var r=W();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r}});var c=i._zr=ky(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:U(r.useDirtyRect,s),useCoarsePointer:U(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=Z_(q(c.flush,c),17),i._updateTheme(n),i._locale=lf(r.locale||gz),i._coordSysMgr=new QR;var l=i._api=uG(i);function u(e,t){return e.__prio-t.__prio}return my(CG,u),my(xG,u),i._scheduler=new WU(i,l,xG,CG),i._messageCenter=new JW,i._initEvents(),i.resize=q(i.resize,i),c.animation.on(`frame`,i._onframe,i),aG(c,i),oG(c,i),kr(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(pG(this),this[VW]){var r=this[VW].silent;this[zW]=!0,mG(this);try{XW(this),$W.update.call(this,null,this[VW].updateParams)}catch(e){throw this[zW]=!1,this[VW]=null,e}this._zr.flush(),this[zW]=!1,this[VW]=null,rG.call(this,r),iG.call(this,r)}else if(e.unfinished){var i=xW;do{e.unfinished=!1;var a=oM.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),tG(this,t),e.performVisualTasks(t),lG(this,this._model,n,`remain`,{}),i-=oM.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[zW]){if(this._disposed)this.id;else{var r,i,a;if(H(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[zW]=!0,mG(this),!this._model||t){var o=new DU(this._api),s=this._theme,c=this._model=new TU;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},SG);var l={seriesTransition:a,optionChanged:!0};if(n)this[VW]={silent:r,updateParams:l},this[zW]=!1,this.getZr().wakeUp();else{try{XW(this),$W.update.call(this,null,l)}catch(e){throw this[VW]=null,this[zW]=!1,e}this._ssr||this._zr.flush(),this[VW]=null,this[zW]=!1,rG.call(this,r),iG.call(this,r)}}}},t.prototype.setTheme=function(e,t){if(!this[zW]){if(this._disposed)this.id;else{var n=this._model;if(n){var r=t&&t.silent,i=null;this[VW]&&(r??=this[VW].silent,i=this[VW].updateParams,this[VW]=null),this[zW]=!0,mG(this);try{this._updateTheme(e),n.setTheme(this._theme),XW(this),$W.update.call(this,{type:`setTheme`},i)}catch(e){throw this[zW]=!1,e}this[zW]=!1,rG.call(this,r),iG.call(this,r)}}}},t.prototype._updateTheme=function(e){V(e)&&(e=wG[e]),e&&(e=F(e),e&&ob(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||EM.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed)this.id;else{e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(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 L(r,function(e){e.group.ignore=!1}),a}},t.prototype.getConnectedDataURL=function(e){if(this._disposed)this.id;else{var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(DG[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(EG,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(F(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=oM.createCanvas(),h=ky(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return L(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new _F({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new pF({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)}},t.prototype.convertToPixel=function(e,t,n){return eG(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return eG(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return eG(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed)this.id;else{var n=this._model,r;return L(nc(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r}},t.prototype.getVisual=function(e,t){var n=this._model,r=nc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Cb(i,t):Sb(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;L(_G,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&Tb(i,function(e){var t=ZF(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(bG,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),xv(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&oc(this.getDom(),kG,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(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 EG[e.id]}},t.prototype.resize=function(e){if(!this[zW]){if(this._disposed)this.id;else{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[VW]&&(r??=this[VW].silent,n=!0,this[VW]=null),this[zW]=!0,mG(this);try{n&&XW(this),$W.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[zW]=!1,e}this[zW]=!1,rG.call(this,r),iG.call(this,r)}}}},t.prototype.showLoading=function(e,t){if(this._disposed)this.id;else if(H(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),TG[e]){var n=TG[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=yG[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed)this.id;else if(H(t)||(t={silent:!!t}),vG[e.type]&&this._model){if(this[zW])this._pendingActions.push(e);else{var n=t.silent;nG.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&EM.browser.weChat&&this._throttledZrFlush(),rG.call(this,n),iG.call(this,n)}}},t.prototype.updateLabelLayout=function(){iW.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){XW=function(e){dg(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),ZW(e,!0),ZW(e,!1),t.plan()},ZW=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=Rr(e.type);u=new(t?FU.getClass(d.main,d.sub):SB.getClass(d.sub)),u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},QW=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){L([].concat(e._componentsViews,e._chartsViews),l);return}var o=ac(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=W(),L(Is(s),function(e){var t=Ys(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(bl(n)){if(t instanceof rB)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&il(t,n,e._api);else{var r=al(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&rl(t.mainType,t.componentIndex,e._api),a&&L(a,function(e){n.type===`highlight`?Jc(e):Yc(e)})}}else yl(n)&&t instanceof rB&&(cl(t,n,e._api),ll(t),fG(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},$W={prepareAndUpdate:function(e){XW(this),$W.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){fg(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),iW.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),tG(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),sG(this,r,i,e,n),iW.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}}});var a=W();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),lG(t,n,r,e,{},a),iW.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),SB.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),sG(this,n,this._api,e,{}),iW.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),SB.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),iW.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){$W.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed)e.id;else for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=nc(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}eG=e,tG=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},nG=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=vG[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&Rr(s[0]);this[zW]=!0,mG(this);var u=[e],d=!1;e.batch&&(d=!0,u=R(e.batch,function(t){return t=ir(I({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=yl(e),_=bl(e);if(_&&tl(this._api),L(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=I({},t),p.type=h,f.push(p),_){var a=rc(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;QW(n,c,t,u),fG(n)}else g?(QW(n,c,t,`series`),fG(n)):l&&QW(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[VW]?(XW(this),$W.update.call(this,e),this[VW]=null):$W[c].call(this,e)}catch(e){throw this[zW]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[zW]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;Dr(H(y)),v=ir({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},rG=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();nG.call(this,n,e)}},iG=function(e){!e&&this.trigger(`updated`)},aG=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[VW]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},oG=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=Tb(n,_l);r&&(ol(r,e,t._api),fG(t))}).on(`mouseout`,function(e){var n=e.target,r=Tb(n,_l);r&&(sl(r,e,t._api),fG(t))}).on(`click`,function(e){var n=e.target,r=Tb(n,function(e){return ZF(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=ZF(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;my(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),L(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}sG=function(e,t,r,i,a){n(t),cG(e,t,r,i,a),L(e._chartsViews,function(e){e.__alive=!1}),lG(e,t,r,i,a),L(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},cG=function(e,t,n,r,i,a){L(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},lG=function(e,t,n,r,l,u){var d=e._scheduler;l=I(l||{},{updatedSeries:t.getSeries()}),iW.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),ll(t)}),d.unfinished=f||d.unfinished,iW.trigger(`series:layoutlabels`,t,n,l),iW.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),iW.trigger(`series:afterupdate`,t,n,l)},fG=function(e){e[HW]=!0,e.getZr().wakeUp()},mG=function(e){e[BW]=(e[BW]+1)%1e6},pG=function(e){e[HW]&&(e.getZr().storage.traverse(function(e){Wl(e)||r(e)}),e[HW]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i!==`emphasis`&&i!==`blur`&&i!==`select`&&t.push(i)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>U(t.get(`hoverLayerThreshold`),vU.hoverLayerThreshold)&&!EM.node&&!EM.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Eu(e);t.eachRendered(function(e){return Ou(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Wl(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Wl(e))return;if(e instanceof cF&&xl(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}uG=function(e){return new(function(t){P(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){Jc(t,n),fG(e)},n.prototype.leaveEmphasis=function(t,n){Yc(t,n),fG(e)},n.prototype.enterBlur=function(t){Xc(t),fG(e)},n.prototype.leaveBlur=function(t){Zc(t),fG(e)},n.prototype.enterSelect=function(t){Qc(t),fG(e)},n.prototype.leaveSelect=function(t){$c(t),fG(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[BW]},n.prototype.usingTHL=function(){return e._usingTHL},n}(uI))(e)},dG=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[WW]=t}}L(yG,function(n,r){e._messageCenter.on(r,function(n){if(DG[e.group]&&e[WW]!==GW){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];L(EG,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,GW),L(i,function(e){e[WW]!==KW&&e.dispatchAction(r)}),t(i,qW)}})})}}(),t}(rP),gG=hG.prototype,gG.on=fx(`on`),gG.off=fx(`off`),gG.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)},_G=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],vG={},yG={},bG={},xG=[],SG=[],CG=[],wG={},TG={},EG={},DG={},OG=new Date-0,new Date-0,kG=`_echarts_instance_`,AG=[],jG=yp,Dx(AW,zU),Dx(NW,VU),Dx(NW,HU),Dx(AW,nW),Dx(NW,rW),Dx(LW,bW),vx(ob),yx(CW,PU),kx(`default`,db),Cx({type:_I,event:_I,update:_I},Ir),Cx({type:vI,event:vI,update:vI},Ir),Cx({type:yI,event:SI,update:yI,action:Ir,refineEvent:jx,publishNonRefinedEvent:!0}),Cx({type:bI,event:SI,update:bI,action:Ir,refineEvent:jx,publishNonRefinedEvent:!0}),Cx({type:xI,event:SI,update:xI,action:Ir,refineEvent:jx,publishNonRefinedEvent:!0}),_x(`default`,{}),_x(`dark`,QU),MG=[],NG={registerPreprocessor:vx,registerProcessor:yx,registerPostInit:bx,registerPostUpdate:xx,registerUpdateLifecycle:Sx,registerAction:Cx,registerCoordinateSystem:Tx,registerLayout:Ex,registerVisual:Dx,registerTransform:jG,registerLoading:kx,registerMap:Ax,registerImpl:Eb,PRIORITY:RW,ComponentModel:zz,ComponentView:FU,SeriesModel:rB,ChartView:SB,registerComponentModel:function(e){zz.registerClass(e)},registerComponentView:function(e){FU.registerClass(e)},registerSeriesModel:function(e){rB.registerClass(e)},registerChartView:function(e){SB.registerClass(e)},registerCustomSeries:function(e,t){Ob(e,t)},registerSubTypeDefaulter:function(e,t){zz.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Ay(e,t)}},PG=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e,t){return Gd(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?5e3:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?1e4:this.get(`progressiveThreshold`))},t.prototype.brushSelector=function(e,t,n){return n.point(t.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``},t.type=`series.scatter`,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Z.color.primary}},universalTransition:{divideShape:`clone`}},t}(rB),FG=4,IG=function(){function e(){}return e}(),LG=function(e){P(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new IG},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.buildPath=function(e,t){var n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<FG,c=this.softClipShape,l;if(s)this._ctx=o;else{for(this._ctx=null,l=this._off;l<n.length;){var u=n[l++],d=n[l++];isNaN(u)||isNaN(d)||(!c||c.contain(u,d))&&(a.x=u-r[0]/2,a.y=d-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)}},t.prototype.afterBrush=function(){var e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){var o=t[a++],s=t[a++];isNaN(o)||isNaN(s)||(!i||i.contain(o,s))&&r.fillRect(o-n[0]/2,s-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}},t.prototype.findDataIndex=function(e,t){for(var n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4),s=r.length/2-1;s>=0;s--){var c=s*2,l=r[c]-a/2,u=r[c+1]-o/2;if(e>=l&&t>=u&&e<=l+a&&t<=u+o)return s}return-1},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0,u=0;u<n.length;){var d=n[u++],f=n[u++];o=Math.min(d,o),c=Math.max(d,c),s=Math.min(f,s),l=Math.max(f,l)}e=this._rect=new Y(o-i/2,s-a/2,c-o+i,l-s+a)}return e},t}(cF),RG=function(){function e(){this.group=new II}return e.prototype.updateData=function(e,t){this._clear(),this._data=e;var n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)},e.prototype.updateLayout=function(e){var t=this._data;if(t){var n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){var t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}},e.prototype.incrementalPrepareUpdate=function(e){this._clear()},e.prototype.incrementalUpdate=function(e,t,n,r){var i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,c=new Float32Array(s+a.length);c.set(o),c.set(a,s),i.endIndex=e.end,i.setShape({points:c})}else{this._newAdded=[];var l=this._create();l.startIndex=e.start,l.endIndex=e.end,l.incremental=n,l.setShape({points:a}),this._setCommon(l,t,r)}},e.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},e.prototype._create=function(){var e=new LG({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},e.prototype._setCommon=function(e,t,n){var r=t.hostModel;n||={};var i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=em(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;var a=e.shape.size[0]<FG;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));var o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);var c=ZF(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;var n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),zG=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).updateData(r,Nx(e)),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),wc(t),Nx(t)),this._finished=e.end===t.getData().count()},t.prototype.updateTransform=function(e,t,n){var r=e.getData();if(this.group.dirty(),this._finished){var i=Gh(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(Nx(e))}else return{update:!0}},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._updateSymbolDraw=function(e,t){var n=this._symbolDraw,r=t.pipelineContext.large;return n&&r===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=r?new RG:new dB,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type=`scatter`,t}(SB),BG=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),VG=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,JF).models[0]},t.type=`cartesian2dAxis`,t}(zz),sr(VG,BG),HG={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Z.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Z.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Z.color.backgroundTint,Z.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Z.color.neutral00,borderColor:Z.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},UG=nr({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},HG),WG=nr({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Z.color.axisMinorSplitLine,width:1}}},HG),GG={category:UG,value:WG,time:nr({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},WG),log:ir({logBase:10},WG)},KG=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 R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ur(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}(),qG=[`x`,`y`],JG=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=HV,t.dimensions=qG,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(Ix(e)&&Ix(t)){var n=Rm(e,null),r=Rm(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=oi([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Y(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return bi(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return bi(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Y(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(KG),YG={interval:Rx,log:Rx,time:PB,ordinal:Ir},XG=[[3,1],[0,2]],ZG=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=qG,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;L(this._axesList,function(e){D_(e,1);var t=e.scale;qm(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=fr(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):Vx(i)}L(n,function(e){Jx(e,e.__alignTo)?Vx(e):Lx(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};L(n.x,function(e){Gx(n,`y`,e,i)}),L(n.y,function(e){Gx(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=ep(e,t),i=this._rect=$f(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(Xx(a,i),!n){var c=$x(i,o,a,s,t),l=void 0;if(s)QG?(QG(this._axesList,i),Xx(a,i)):l=Qx(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=tS(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=Qx(d,f,p,i,a,c,r))}eS(i,a,YB.determine,null,l,r),L(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}H(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`,JF).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,JF).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,ar(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,L(o.x,function(t,n){L(o.y,function(i,a){var o=`x`+n+`y`+a,s=new JG(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),qx(o.x),qx(o.y);function c(t){return function(n,r){if(Wx(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=fh(n),u=new sV(t,ph(n,l,!0),[0,0],l,c);u.onBand=Oh(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return L(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);ar(t,i)<0&&t.push(i),ar(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),L(o._axesList,function(t){E_(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;Id({targetModel:e,coordSysType:HV,coordSysProvider:r});function r(){var r=v_(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(Dg(t,e,HV),Dg(n,e,HV))},this),r},e.dimensions=qG,e.dimIdxMap=Ed(qG),e}(),$G=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;kV(e,t,n,r,i,a),Sh(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&$g(e.labelInfoList,e.dirVec,r,i)})},eK={},tK=function(e){P(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&&cS(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=uS(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){eK[e]=t},t.getAxisPointerClass=function(e){return e&&eK[e]},t.type=`axis`,t}(FU),nK=tc(),rK=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],iK=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new II,this.group.add(this._axisGroup),Ch(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),L(rK,function(e){t.get([e,`show`])&&aK[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||uu(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){mS(this)},t.type=`cartesianAxis`,t}(tK),aK={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=z(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new cL({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:ir({stroke:c[x]},_),silent:!0});ru(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new cL({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});ru(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){pS(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=Jg(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},oK=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(iK),sK=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=oK.type,t}return t.type=`yAxis`,t}(iK),cK=function(e){P(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 _F({shape:e.coordinateSystem.getRect(),style:ir({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(FU),lK={offset:0},uK=tc(),Cx({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Ir),dK={axisPointer:1,tooltip:1,brush:1},fK=function(e){P(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=q(n._mousedownHandler,n),i=q(n._mousemoveHandler,n),a=q(n._mouseupHandler,n),o=q(n._mousewheelHandler,n),s=q(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=Eu(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:U(c.z2,-1/0)},p=I({},n.triggerInfo);this._opt=ir(I({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,this._enabled&&this._controlType===e||(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(xS(t,`mousedown`,r,f),xS(t,`mousemove`,i,f),xS(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(xS(t,`mousewheel`,o,f),xS(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,SS(t,`mousedown`,r),SS(t,`mousemove`,i),SS(t,`mouseup`,a),SS(t,`mousewheel`,o),SS(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(vS(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!($v(e)||yS(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||_S(t,`globalPan`)||yS(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!ES(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i)}else{t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&zH(e.event),e.__ecRoamConsumed=!0,TS(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}}},t.prototype._mouseupHandler=function(e){if(!yS(e)){var t=this._zr;if(!$v(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!yS(e)){var t=ES(`zoomOnMouseWheel`,e,this._opt),n=ES(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(r!==0&&(t||n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(_S(this._zr,`globalPan`)||yS(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(zH(r.event),r.__ecRoamConsumed=!0,TS(e,t,n,r,i))},t}(rP),pK=tc(),mK=`view`,hK=function(e){P(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=mK,i.dimensions=[`x`,`y`];var a=DS(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Qi(),o[1]=Qi(),o[2]=Qi(),a.mtRaw=$r(),a.mtRawInv=$r(),a.mtOverall=$r(),a.mtOverallInv=$r(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return OS(null,this)},t.prototype.getViewRect=function(){return kS(null,this)},t.prototype.getRoamTransform=function(){return wN(DS(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?DS(this).mtRaw:DS(this).mtOverall;return n||=[],r?bi(n,e,r):ci(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=DS(this).mtOverallInv;return r?bi(n,e,r):ci(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=US(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=US(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=DS(this);return eN(gK,t.dataRect),nN(gK,gK,t.mtOverall),rN(gK,e[0],e[1])},t.dimensions=[`x`,`y`],t}(CN),gK=QM(),_K=$r(),vK=$r(),yK=QM(),bK=[],xK=$r(),SK=$r(),CK=[],wK=Qi(),TK=Qi(),EK=[],DK=new Y(0,0,0,0),OK=tc(),kK=function(){function e(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}return e.prototype.isRemoved=function(){return this.dataIndex<0},e.prototype.eachNode=function(e,t,n){B(e)&&(n=t,t=e,e=null),e||={},V(e)&&(e={order:e});var r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(var o=0;!a&&o<i.length;o++)i[o].eachNode(e,t,n);r===`postorder`&&t.call(n,this)},e.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1},e.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].getNodeById(e);if(i)return i}},e.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,r=n.length;t<r;t++){var i=n[t].contains(e);if(i)return i}},e.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},e.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},e.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},e.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)},e.prototype.setLayout=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},e.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},e.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},e.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},e.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},e.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},e.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1},e.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},e.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},e}(),AK=function(){function e(e){this.type=`tree`,this._nodes=[],this.hostModel=e}return e.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},e.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},e.prototype.getNodeById=function(e){return this.root.getNodeById(e)},e.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,r=t.length;n<r;n++)t[n].dataIndex=-1;for(var n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n},e.prototype.clearLayouts=function(){this.data.clearItemLayouts()},e.createTree=function(t,n,r){var i=new e(n),a=[],o=1;s(t);function s(e,t){var n=e.value;o=Math.max(o,z(n)?n.length:1),a.push(e);var r=new kK(Ys(e.name,``),i);t?yC(r,t):i.root=r,i._nodes.push(r);var c=e.children;if(c)for(var l=0;l<c.length;l++)s(c[l],r)}i.root.updateDepthAndHeight(0);var c=kd(a,{coordDimensions:[`value`],dimensionsCount:o}).dimensions,l=new YR(c,n);return l.initData(a),r&&r(l),uC({mainData:l,struct:i,structAttr:`tree`}),i.update(),i},e}(),jK=[`treemapZoomToNode`,`treemapRender`,`treemapMove`],MK=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventUsingHoverLayer=!0,n}return t.prototype.getInitialData=function(e,t){var n={name:e.name,children:e.data};EC(n);var r=e.levels||[],i=new nR({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=DC(r,t);var a=R(r||[],function(e){return new nR(e,i,t)},this),o=AK.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){var n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e);return Dp(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=CC(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},I(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=W(),this._idIndexMapCount=0);var n=t.get(e);return n??t.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)},t.prototype.enableAriaDecal=function(){TC(this)},t.type=`series.treemap`,t.layoutMode=`box`,t.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Z.size.l,top:Z.size.xxxl,right:Z.size.l,bottom:Z.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Z.size.m,emptyItemWidth:25,itemStyle:{color:Z.color.backgroundShade,textStyle:{color:Z.color.secondary}},emphasis:{itemStyle:{color:Z.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Z.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Z.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]},t}(rB),NK=8,PK=8,FK=5,IK=function(){function e(e){this.group=new II,e.add(this.group)}return e.prototype.render=function(e,t,n,r){var i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),i.get(`show`)&&n){var o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=ep(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=$f(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),tp(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=Ys(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+NK*2,t.emptyItemWidth);t.totalWidth+=o+PK,t.renderList.push({node:r,text:i,width:o})}},e.prototype._renderContent=function(e,t,n,r,i,a,o,s){for(var c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle(),m=f.length-1;m>=0;m--){var h=f[m],g=h.node,_=h.width,v=h.text;d>n.width&&(d-=_-l,_=l,v=null);var y=new rL({shape:{points:OC(c,0,_,u,m===f.length-1,m===0)},style:ir(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new SF({style:Lu(a,{text:v})}),textConfig:{position:`inside`},z2:1e5,onclick:mr(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Lu(o,{text:v}),y.ensureState(`emphasis`).style=p,pl(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),kC(y,e,g),c+=_+PK}},e.prototype.remove=function(){this.group.removeAll()},e}(),LK=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)},e.prototype.finished=function(e){return this._finishedCallback=e,this},e.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},r=0,i=this._storage.length;r<i;r++){var a=this._storage[r];a.el.animateTo(a.target,{duration:a.duration,delay:a.delay,easing:a.easing,setToFinal:!0,done:n,aborted:n})}return this},e}(),RK=Math.max,zK=Math.min,BK=L,VK=[`itemStyle`,`borderWidth`],HK=[`itemStyle`,`gapWidth`],UK=[`upperLabel`,`show`],WK=[`upperLabel`,`height`],GK={seriesType:`treemap`,reset:function(e,t,n,r){var i=e.option,a=ep(e,n).refContainer,o=$f(e.getBoxLayoutParams(),a),s=r&&r.type,c=bC(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=xC(u);if(s!==`treemapMove`){var f=!1,p=s===`treemapZoomToNode`?(f=!0,RC(e,c,u,o)):l?(f=!0,I({},l)):I({},o);if(f){var m=HC(o,p);m=UC(m,e),p.width=o.width*m,p.height=o.height*m}var h=i.sort;h&&h!==`asc`&&h!==`desc`&&(h=`desc`);var g={squareRatio:i.squareRatio,sort:h,leafDepth:i.leafDepth};u.hostTree.clearLayouts();var _={x:0,y:0,width:p.width,height:p.height,area:p.width*p.height};u.setLayout(_),jC(u,g,!1,0),_=u.getLayout(),BK(d,function(e,t){var n=(d[t+1]||u).getValue();e.setLayout(I({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))})}var v=e.getData().tree.root;v.setLayout(zC(o,l,c),!0),e.setLayoutInfo(o),BC(v,new Y(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}},KK=II,qK=_F,JK=3,YK=`label`,XK=`upperLabel`,ZK=100,QK=20,$K=30,eq=Jr([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),tq=function(e){var t=eq(e);return t.stroke=t.fill=t.lineWidth=null,t},nq=tc(),rq=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._state=`ready`,n._storage=WC(),n}return t.prototype.render=function(e,t,n,r){if(!(ar(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var i=bC(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}},t.prototype._giveContainerGroup=function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new KK,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t},t.prototype._doRender=function(e,t,n){var r=t.getData().tree,i=this._oldTree,a=WC(),o=WC(),s=this._storage,c=[];function l(e,r,i,l){return GC(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);var u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,L(e,function(e,t){!e.isRemoved()&&o(t,t)})):new rR(t,e,a,a).add(o).update(o).remove(mr(o,null)).execute();function a(e){return e.getId()}function o(a,o){var s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){var t=WC();return e&&L(e,function(e,n){var r=t[n];L(e,function(e){e&&(r.push(e),nq(e).willDelete=!0)})}),t}function p(){L(u,function(e){L(e,function(e){e.parent&&e.parent.remove(e)})}),L(c,function(e){e.invisible=!0,e.dirty()})}},t.prototype._doAnimation=function(e,t,n,r){var i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(B(i)?0:i)||0,s=(B(a)?null:a)||`cubicOut`,c=AC();L(t.willDeleteEls,function(e,t){L(e,function(e,n){if(!e.invisible){var i=e.parent,a,l=nq(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,d=0;l.willDelete||(u=l.nodeWidth/2,d=l.nodeHeight/2),a=t===`nodeGroup`?{x:u,y:d,style:{opacity:0}}:{shape:{x:u,y:d,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)}})}),L(this._storage,function(e,n){L(e,function(e,r){var i=t.lastsForAnimation[n][r],a={};i&&(e instanceof II?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=I({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(q(function(){this._state=`ready`,t.renderFinally()},this)).start()},t.prototype._resetController=function(e){var t=this,n=this.seriesModel,r=this._controller;r||(r=this._controller=new fK(e.getZr()),r.on(`pan`,q(this._onPan,this)),r.on(`zoom`,q(this._onZoom,this))),r.enable(n.get(`roam`),{api:e,zInfo:{component:n},triggerInfo:{roamTrigger:n.get(`roamTrigger`),isInSelf:function(e,n,r){var i=t._containerGroup;return i?i.getBoundingRect().contain(n-i.x,r-i.y):!1}}})},t.prototype._clearController=function(){var e=this._controller;e&&=(e.dispose(),null)},t.prototype._onPan=function(e){if(this._state!==`animating`&&(Math.abs(e.dx)>JK||Math.abs(e.dy)>JK)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){var a=i.getData().tree.root;if(!a)return;var o=a.getLayout();if(!o)return;var s=new Y(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=HC(c,o),u=l*r;u=UC(u,i);var d=u/l;t-=c.x,n-=c.y;var f=$r();ri(f,f,[-t,-n]),ai(f,f,[d,d]),ri(f,f,[t,n]),s.applyTransform(f),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},t.prototype._initEvents=function(e){var t=this;e.on(`click`,function(e){if(t._state===`ready`){var n=t.seriesModel.get(`nodeClick`,!0);if(n){var r=t.findTarget(e.offsetX,e.offsetY);if(r){var i=r.node;if(i.getLayout().isLeafRoot)t._rootToNode(r);else if(n===`zoomToNode`)t._zoomToNode(r);else if(n===`link`){var a=i.hostTree.data.getItemModel(i.dataIndex),o=a.get(`link`,!0),s=a.get(`target`,!0)||`blank`;o&&Jf(o,s)}}}}},this)},t.prototype._renderBreadcrumb=function(e,t,n){var r=this;n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||={node:e.getData().tree.root}),(this._breadcrumb||=new IK(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(SC(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=WC(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){var i=this._storage.background[r.getRawIndex()];if(i){var a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n},t.type=`treemap`,t}(SB),iq=L,aq=H,oq=-1,sq=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=F(t);this.type=r,this.mappingMethod=n,this._normalizeData=cq[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(YC(i),qC(i)):n===`category`?i.categories?JC(i):YC(i,!0):(Dr(n!==`linear`||i.dataExtent),YC(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return q(this._normalizeData,this)},e.listVisualTypes=function(){return fr(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){H(e)?L(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=z(t)?[]:H(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&iq(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(aq(e)){var t=[];iq(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(s!=null){if(s===e||V(s)&&s===e+``)return a;n&&d(s,a)}}for(var a=0,o=t.length;a<o;a++){var c=t[a],l=c.interval,u=c.close;if(l){if(l[0]===-1/0){if(iw(u[1],e,l[1]))return a}else if(l[1]===1/0){if(iw(u[0],l[0],e))return a}else if(iw(u[0],l[0],e)&&iw(u[1],e,l[1]))return a;n&&d(l[0],a),n&&d(l[1],a)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function d(t,n){var a=Math.abs(t-e);a<i&&(i=a,r=n)}},e.visualHandlers={color:{applyVisual:QC(`color`),getColorMapper:function(){var e=this.option;return q(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),$C.call(this,e)}:function(t,n,r){var i=!!r;return!n&&(t=this._normalizeData(t)),r=ja(t,e.parsedVisual,r),i?r:Fa(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return Fa(ja(e,this.option.parsedVisual),`rgba`)},category:$C,piecewise:function(e,t){var n=nw.call(this,t);return n??=Fa(ja(e,this.option.parsedVisual),`rgba`),n},fixed:ew}},colorHue:XC(function(e,t){return Na(e,t)}),colorSaturation:XC(function(e,t){return Na(e,null,t)}),colorLightness:XC(function(e,t){return Na(e,null,null,t)}),colorAlpha:XC(function(e,t){return Pa(e,t)}),decal:{applyVisual:QC(`decal`),_normalizedToVisual:{linear:null,category:$C,piecewise:null,fixed:null}},opacity:{applyVisual:QC(`opacity`),_normalizedToVisual:tw([0,1])},liftZ:{applyVisual:QC(`liftZ`),_normalizedToVisual:{linear:ew,category:ew,piecewise:ew,fixed:ew}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:ZC,category:$C,piecewise:function(e,t){var n=nw.call(this,t);return n??=ZC.call(this,e),n},fixed:ew}},symbolSize:{applyVisual:QC(`symbolSize`),_normalizedToVisual:tw([0,1])}},e}(),cq={linear:function(e){return ss(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=sq.findPieceIndex(e,t,!0);if(n!=null)return ss(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??oq},fixed:Ir},lq=`itemStyle`,uq=tc(),dq={seriesType:`treemap`,reset:function(e){var t=e.getData().tree.root;t.isRemoved()||aw(t,{},e.getViewRoot().getAncestors(),e)}},fq=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[mw(e)]){var r=new pq(e,t);return r.hostGraph=this,this.nodes.push(r),n[mw(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[mw(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(gr(e)&&(e=this.nodes[e]),gr(t)&&(t=this.nodes[t]),e instanceof pq||(e=r[mw(e)]),t instanceof pq||(t=r[mw(t)]),e&&t){var a=e.id+`-`+t.id,o=new mq(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof pq&&(e=e.id),t instanceof pq&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof pq||(t=this._nodesMap[mw(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),pq=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=W(),t=W(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),mq=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=W(),t=W();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}(),sr(pq,hw(`hostGraph`,`data`)),sr(mq,hw(`hostGraph`,`edgeData`)),hq=cL.prototype,gq=dL.prototype,_q=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),(function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(_q),vq=function(e){P(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new _q},t.prototype.buildPath=function(e,t){_w(t)?hq.buildPath.call(this,e,t):gq.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return _w(this.shape)?hq.pointAt.call(this,e):gq.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=_w(t)?[t.x2-t.x1,t.y2-t.y1]:gq.tangentAt.call(this,e);return gi(n,n)},t}(cF),yq=[`fromSymbol`,`toSymbol`],bq=function(e){P(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=xw(i);o.shape.percent=0,Ul(o,{z2:U(a,0),shape:{percent:1}},r,t),this.add(o),L(yq,function(n){var r=bw(n,e,t);this.add(r),this[vw(n)]=yw(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};Sw(o.shape,a),Hl(i,o,r,t),L(yq,function(n){var r=yw(n,e,t),i=vw(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=bw(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=Iu(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,L(yq,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<hI.length;n++){var r=hI[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);Fu(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Z.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?fs(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);z(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),pl(this,u,d,l)},t.prototype.highlight=function(){Jc(this)},t.prototype.downplay=function(){Yc(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);Sw(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=fi([],l,c);gi(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(II),xq=function(){function e(e){this.group=new II,this._LineCtor=e||bq}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=ww(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=ww(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!Cw(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(Ew(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){Su(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(Ew(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);Ew(t.getItemLayout(r))?(a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)):this.group.remove(a)},e}(),Sq=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),Cq=function(e){P(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new Sq},t.prototype.buildPath=function(e,t){var n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)},t}(cF),wq=function(e){P(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){this.group.removeAll();var r=e.get([`axisLine`,`lineStyle`,`color`]),i=Dw(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,t,n,r,i){var a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?QV:$I,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Ao(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v<r.length;v++){var y=Math.min(Math.max(r[v][0],0),1);c=s+h*y;var b=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});b.setStyle({fill:r[v][1]}),b.setStyle(f.getLineStyle([`color`,`width`])),_.push(b),g=c}_.reverse(),L(_,function(e){return a.add(e)});var x=function(e){if(e<=0)return r[0][1];for(var t=0;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,x,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,x,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,x,i,s,c,o,p)},t.prototype._renderTicks=function(e,t,n,r,i,a,o,s,c){for(var l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=X(h.get(`length`),f),x=X(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,k,A=0;A<=v;A++){if(O=Math.cos(S),k=Math.sin(S),h.get(`show`)){var j=D?D+c:c,ee=new cL({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-b-j)+u,y2:k*(f-b-j)+d},style:T,silent:!0});T.stroke===`auto`&&ee.setStyle({stroke:r(A/v)}),l.add(ee)}if(_.get(`show`)){var j=_.get(`distance`)+D,te=Ow(fs(A*(m-p)/v+p,14),_.get(`formatter`)),ne=r(A/v),re=O*(f-b-j)+u,ie=k*(f-b-j)+d,ae=_.get(`rotate`),oe=0;ae===`radial`?(oe=-S+2*Math.PI,oe>Math.PI/2&&(oe+=Math.PI)):ae===`tangential`?oe=-S-Math.PI/2:gr(ae)&&(oe=ae*Math.PI/180),oe===0?l.add(new SF({style:Lu(_,{text:te,x:re,y:ie,verticalAlign:k<-.8?`top`:k>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:ne}),silent:!0})):l.add(new SF({style:Lu(_,{text:te,x:re,y:ie,verticalAlign:`middle`,align:`center`},{inheritColor:ne}),silent:!0,originX:re,originY:ie,rotation:oe}))}if(g.get(`show`)&&A!==v){var j=g.get(`distance`);j=j?j+c:c;for(var se=0;se<=y;se++){O=Math.cos(S),k=Math.sin(S);var ce=new cL({shape:{x1:O*(f-j)+u,y1:k*(f-j)+d,x2:O*(f-x-j)+u,y2:k*(f-x-j)+d},silent:!0,style:E});E.stroke===`auto`&&ce.setStyle({stroke:r((A+se/y)/v)}),l.add(ce),S+=w}S-=w}else S+=C}},t.prototype._renderPointer=function(e,t,n,r,i,a,o,s,c){var l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){var r=g.getItemModel(t).getModel(`pointer`),a=X(r.get(`width`),i.r),o=X(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=X(c[0],i.r),u=X(c[1],i.r),d=r.get(`keepAspect`),f=s?em(s,l-a/2,u-o,a,o,null,d):new Cq({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}});return f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){var n=m.get(`roundCap`)?QV:$I,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=ss(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){var n=g.get(_,t);if(p){var r=S(t,a);Ul(r,{rotation:-((isNaN(+n)?x[0]:ss(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Ul(i,{shape:{endAngle:ss(n,b,x,m.get(`clip`))}},e),l.add(i),QF(e.seriesIndex,g.dataType,t,i),f[t]=i}}).update(function(t,n){var r=g.get(_,t);if(p){var i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,Hl(s,{rotation:-((isNaN(+r)?x[0]:ss(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){var c=d[n],v=C(t,c?c.shape.endAngle:a);Hl(v,{shape:{endAngle:ss(r,b,x,m.get(`clip`))}},e),l.add(v),QF(e.seriesIndex,g.dataType,t,v),f[t]=v}}).execute(),g.each(function(e){var t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(ss(g.get(_,e),b,[0,1],!0));if(p){var c=g.getItemGraphicEl(e),l=g.getItemVisual(e,`style`),u=l.fill;if(c instanceof pF){var d=c.style;c.useStyle(I({image:d.image,x:d.x,y:d.y,width:d.width,height:d.height},l))}else c.useStyle(l),c.type!==`pointer`&&c.setColor(u);c.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),c.style.fill===`auto`&&c.setStyle(`fill`,s),c.z2EmphasisLift=0,hl(c,t),pl(c,i,a,o)}if(h){var m=f[e];m.useStyle(g.getItemVisual(e,`style`)),m.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),m.style.fill===`auto`&&m.setStyle(`fill`,s),m.z2EmphasisLift=0,hl(m,t),pl(m,i,a,o)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,t){var n=e.getModel(`anchor`);if(n.get(`show`)){var r=n.get(`size`),i=n.get(`icon`),a=n.get(`offsetCenter`),o=n.get(`keepAspect`),s=em(i,t.cx-r/2+X(a[0],t.r),t.cy-r/2+X(a[1],t.r),r,r,null,o);s.z2=+!!n.get(`showAbove`),s.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(s)}},t.prototype._renderTitleAndDetail=function(e,t,n,r,i){var a=this,o=e.getData(),s=o.mapDimension(`value`),c=+e.get(`min`),l=+e.get(`max`),u=new II,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new SF({silent:!0}),f[e]=new SF({silent:!0})}).update(function(e,t){d[e]=a._titleEls[t],f[e]=a._detailEls[t]}).execute(),o.each(function(t){var n=o.getItemModel(t),a=o.get(s,t),h=new II,g=r(ss(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+X(v[0],i.r),b=i.cy+X(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Lu(_,{x:y,y:b,text:o.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(x)}var S=n.getModel(`detail`);if(S.get(`show`)){var C=S.get(`offsetCenter`),w=i.cx+X(C[0],i.r),T=i.cy+X(C[1],i.r),E=X(S.get(`width`),i.r),D=X(S.get(`height`),i.r),O=e.get([`progress`,`show`])?o.getItemVisual(t,`style`).fill:g,x=f[t],k=S.get(`formatter`);x.attr({z2:m?0:2,style:Lu(S,{x:w,y:T,text:Ow(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),Uu(x,{normal:S},a,function(e){return Ow(e,k)}),p&&Wu(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return Ow(o?o.interpolatedValue:a,k)}}),h.add(x)}u.add(h)}),this.group.add(u),this._titleEls=d,this._detailEls=f},t.type=`gauge`,t}(SB),Tq=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`itemStyle`,n}return t.prototype.getInitialData=function(e,t){return Cv(this,[`value`])},t.type=`series.gauge`,t.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Z.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Z.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Z.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Z.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Z.color.neutral00,borderWidth:0,borderColor:Z.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Z.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Z.color.transparent,borderWidth:0,borderColor:Z.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Z.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}},t}(rB),Eq=`funnel`,Dq=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new dH(q(this.getData,this),q(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return Cv(this,{coordDimensions:[`value`],encodeDefaulter:mr(Yu,this)})},t.prototype._defaultLabelLine=function(e){Ls(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(t){var n=this.getData(),r=e.prototype.getDataParams.call(this,t),i=n.mapDimension(`value`),a=n.getSum(i);return r.percent=a?+(n.get(i,t)/a*100).toFixed(2):0,r.$vars.push(`percent`),r},t.type=`series.`+Eq,t.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Z.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(rB),Oq=[`itemStyle`,`opacity`],kq=function(e){P(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new aL,o=new SF;return i.setTextContent(o),r.setTextGuideLine(a),r.updateData(t,n,!0),r}return t.prototype.updateData=function(e,t,n){var r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(Oq);c??=1,n||Jl(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Ul(r,{style:{opacity:c}},i,t)):Hl(r,{style:{opacity:c},shape:{points:o.points}},i,t),hl(r,a),this._updateLabel(e,t),pl(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e,t){var n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;Fu(i,Iu(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});var u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new J(d[0][0],d[0][1]):null},Hl(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),Fv(n,Iv(o),{stroke:l})},t}(rL),Aq=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Eq,t.ignoreLabelLineUpdate=!0,t}return t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){var t=new kq(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){var n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){ql(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type=Eq,t}(SB),jq=Ec(Eq,Mw),Mq=`sankey`,Nq=function(e){P(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){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o<i.length;o++)i[o].depth!=null&&i[o].depth>=0&&(a[i[o].depth]=new nR(i[o],this,t));return gw(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return Dp(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return Dp(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+Mq,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Z.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Z.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(rB),Pq=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),Fq=function(e){P(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Pq},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Jc(this)},t.prototype.downplay=function(){Yc(this)},t}(cF),Iq=function(e){P(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Mq,t._mainGroup=new II,t}return t.prototype.init=function(e,t){this._controller=new fK(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),aC(e,n,this._controller,oC(i),null),r.eachEdge(function(t){var n=new Fq,r=ZF(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),Rw(n.style,u,t);var k=``+a.get(`value`),A=Iu(a,`edgeLabel`);Fu(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,wr(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);hl(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return Rw(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);pl(n,ee===`adjacency`?t.getAdjacentDataIndices():ee===`trajectory`?t.getTrajectoryDataIndices():ee,j.get(`blurScope`),j.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new _F({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});Fu(f,Iu(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),hl(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),ZF(f).dataType=`node`;var p=u.get(`focus`);pl(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(zw(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){GS(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=lC(e,t,n.x,n.y,n.width,n.height);GS(this.group,2,r,this._firstRender?null:e)},t.type=Mq,t}(SB),Lq=Ec(Mq,Bw),Rq=Ec(Mq,cT),zq=256,Bq=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=oM.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p<f;++p){var m=e[p],h=m[0],g=m[1],_=m[2],v=r(_);d.globalAlpha=v,d.drawImage(o,h-l,g-l)}if(!u.width||!u.height)return u;for(var y=d.getImageData(0,0,u.width,u.height),b=y.data,x=0,S=b.length,C=this.minOpacity,w=this.maxOpacity-C;x<S;){var v=b[x+3]/256,T=Math.floor(v*(zq-1))*4;if(v>0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=oM.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Z.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}(),Vq=function(e){P(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.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):km(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(km(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Su(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=Om(a,`cartesian2d`),s=Om(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Ag(f).w+.5,l=Ag(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Iu(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;E<r;E++){var D=void 0,O=h.getItemVisual(E,`style`);if(o){var k=h.get(T[0],E),A=h.get(T[1],E);if(isNaN(h.get(T[2],E))||isNaN(k)||isNaN(A)||k<u[0]||k>u[1]||A<d[0]||A>d[1])continue;var j=a.dataToPoint([k,A]);D=new _F({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Sr(ee.x))continue;D=new _F({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var te=a.dataToLayout([h.get(T[0],E)]),ee=te.contentRect||te.rect;if(Sr(ee.x)||Sr(ee.y))continue;D=new _F({z2:1,shape:ee,style:O})}if(h.hasItemOption){var ne=h.getItemModel(E),re=ne.getModel(`emphasis`);g=re.getModel(`itemStyle`).getItemStyle(),_=ne.getModel([`blur`,`itemStyle`]).getItemStyle(),v=ne.getModel([`select`,`itemStyle`]).getItemStyle(),y=ne.get([`itemStyle`,`borderRadius`]),S=re.get(`focus`),C=re.get(`blurScope`),w=re.get(`disabled`),b=Iu(ne)}D.shape.r=y;var ie=e.getRawValue(E),ae=`-`;ie&&ie[2]!=null&&(ae=ie[2]+``),Fu(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:ae}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,pl(D,S,C,w),D.incremental=wc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new Bq;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?dT(v,n.option.range):uT(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new pF({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(SB),Hq=function(e){P(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 Gd(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=QR.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Z.color.primary}}},t}(rB),Uq={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},Wq=fr(Uq),lr(TN,function(e,t){return e[t]=1,e},{}),TN.join(`, `),Gq=[``,`style`,`shape`,`extra`],Kq=tc(),qq={},Jq={setTransform:function(e,t){return qq.el[e]=t,this},getTransform:function(e){return qq.el[e]},setShape:function(e,t){var n=qq.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=qq.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=qq.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=qq.el.style;if(t)return t[e]},setExtra:function(e,t){var n=qq.el.extra||(qq.el.extra={});return n[e]=t,this},getExtra:function(e){var t=qq.el.extra;if(t)return t[e]}},Yq=tc(),Xq=[`percent`,`easing`,`shape`,`style`,`extra`],Zq=tc(),Qq=F,$q=q,eJ=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();else{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 II,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=mr(AT,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}PT(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&&Ag(r).w>o)return!0;if(a){var s=lS(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=Zq(e).pointerEl=new AL[i.type](Qq(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Zq(e).labelEl=new SF(Qq(t.label));e.add(i),MT(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Zq(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=Zq(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),MT(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;else{var o;this._handle||(o=!0,r=this._handle=pu(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){zH(e.event)},onmousedown:$q(this._onHandleDragMove,this,0,0),drift:$q(this._onHandleDragMove,this),ondragend:$q(this._onHandleDragEnd,this)}),n.add(r)),PT(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);z(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Q_(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}}},e.prototype._moveHandleToValue=function(e,t){AT(this._axisPointerModel,!t&&this._moveAnimation,this._handle,NT(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(NT(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(NT(r)),Zq(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),$_(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}(),tJ=function(e){P(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=GT(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=FT(r),f=nJ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}BT(t,e,g_(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=g_(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=zT(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=GT(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=OF(o[1],l[c]),l[c]=kF(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}(eJ),nJ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:VT([t,r[0]],[t,r[1]],KT(e))}},shadow:function(e,t,n,r,i,a){var o=UT(e,i,a),s=r[1]-r[0],c=WT(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:HT([l,r[0]],[u-l,s],KT(e))}}},rJ=function(e){P(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:Z.color.border,width:1,type:`dashed`},shadowStyle:{color:Z.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Z.color.neutral00,padding:[5,7,5,7],backgroundColor:Z.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Z.color.accent40,throttle:40}},t}(zz),iJ=tc(),aJ=L,oJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;qT(`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){$T(`axisPointer`,t)},t.prototype.dispose=function(e,t){$T(`axisPointer`,t)},t.type=`axisPointer`,t}(FU),sJ=tc(),cJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(t,n,r){var i=ap(t);e.prototype.init.apply(this,arguments),mE(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),mE(this.option,t)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type=`calendar`,t.layoutMode=`box`,t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Z.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Z.color.neutral00,borderWidth:1,borderColor:Z.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Z.size.s,color:Z.color.secondary},monthLabel:{show:!0,position:`start`,margin:Z.size.s,align:`center`,formatter:null,color:Z.color.secondary},yearLabel:{show:!0,position:null,margin:Z.size.xl,formatter:null,color:Z.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}},t}(zz),lJ=function(e){P(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=this.group;r.removeAll();var i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)},t.prototype._renderDayRect=function(e,t,n){for(var r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight(),s=t.start.time;s<=t.end.time;s=r.getNextNDay(s,1).time){var c=r.dataToCalendarLayout([s],!1).tl,l=new _F({shape:{x:c[0],y:c[1],width:a,height:o},cursor:`default`,style:i});n.add(l)}},t.prototype._renderLines=function(e,t,n,r){var i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var l=t.start,u=0;l.time<=t.end.time;u++){f(l.formatedDate),u===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));var d=l.date;d.setMonth(d.getMonth()+1),l=a.getDateInfo(d)}f(a.getNextNDay(t.end.time,1).formatedDate);function f(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);var c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)},t.prototype._getEdgesPoints=function(e,t,n){var r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r},t.prototype._drawSplitline=function(e,t,n){var r=new aL({z2:20,shape:{points:e},style:t});n.add(r)},t.prototype._getLinePointsOfOneWeek=function(e,t,n){for(var r=e.coordinateSystem,i=r.getDateInfo(t),a=[],o=0;o<7;o++){var s=r.getNextNDay(i.time,o),c=r.dataToCalendarLayout([s.time],!1);a[2*s.day]=c.tl,a[2*s.day+1]=c[n===`horizontal`?`bl`:`tr`]}return a},t.prototype._formatterLabel=function(e,t){return V(e)&&e?Gf(e,t):B(e)?e(t):t.nameMap},t.prototype._yearTextPositionControl=function(e,t,n,r,i){var a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;var c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}},t.prototype._renderYearText=function(e,t,n,r){var i=e.getModel(`yearLabel`);if(i.get(`show`)){var a=i.get(`margin`),o=i.get(`position`);o||=n===`horizontal`?`left`:`top`;var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);var p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new SF({z2:30,style:Lu(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}},t.prototype._monthTextPositionControl=function(e,t,n,r,i){var a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderMonthText=function(e,t,n,r){var i=e.getModel(`monthLabel`);if(i.get(`show`)){var a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||V(a))&&(a&&(t=uf(a)||t),a=t.get([`time`,`monthAbbr`])||[]);var u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;for(var f=c===`center`,p=i.get(`silent`),m=0;m<l[u].length-1;m++){var h=l[u][m].slice(),g=this._firstDayOfMonth[m];f&&(h[d]=(this._firstDayPoints[m][d]+l[0][m+1][d])/2);var _=i.get(`formatter`),v=a[g.m-1],y={yyyy:g.y,yy:(g.y+``).slice(2),MM:g.m,M:+g.m,nameMap:v},b=new SF({z2:30,style:I(Lu(i,{text:this._formatterLabel(_,y)}),this._monthTextPositionControl(h,f,n,s,o)),silent:p});r.add(b)}}},t.prototype._weekTextPositionControl=function(e,t,n,r,i){var a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}},t.prototype._renderWeekText=function(e,t,n,r,i){var a=e.getModel(`dayLabel`);if(a.get(`show`)){var o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),u=o.getFirstDayOfWeek();(!c||V(c))&&(c&&(t=uf(c)||t),c=t.get([`time`,`dayOfWeekShort`])||R(t.get([`time`,`dayOfWeekAbbr`]),function(e){return e[0]}));var d=o.getNextNDay(n.end.time,7-n.lweek).time,f=[o.getCellWidth(),o.getCellHeight()];l=X(l,Math.min(f[1],f[0])),s===`start`&&(d=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);for(var p=a.get(`silent`),m=0;m<7;m++){var h=o.getNextNDay(d,m),g=o.dataToCalendarLayout([h.time],!1).center,_=m;_=Math.abs((m+u)%7);var v=new SF({z2:30,style:I(Lu(a,{text:c[_]}),this._weekTextPositionControl(g,r,s,l,f)),silent:p});i.add(v)}}},t.type=`calendar`,t}(FU),uJ=864e5,dJ=function(){function e(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}return e.getDimensionsInfo=function(){return[{name:`time`,type:`time`},`value`]},e.prototype.getRangeInfo=function(){return this._rangeInfo},e.prototype.getModel=function(){return this._model},e.prototype.getRect=function(){return this._rect},e.prototype.getCellWidth=function(){return this._sw},e.prototype.getCellHeight=function(){return this._sh},e.prototype.getOrient=function(){return this._orient},e.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},e.prototype.getDateInfo=function(e){e=xs(e);var t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}},e.prototype.getNextNDay=function(e,t){return t||=0,t===0||(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t)),this.getDateInfo(e)},e.prototype._update=function(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];L([0,1],function(e){l(i,e)&&(a[r[e]]=i[e]*o[e])});var s={width:t.getWidth(),height:t.getHeight()},c=this._rect=$f(a,s);L([0,1],function(e){l(i,e)||(i[e]=c[r[e]]/o[e])});function l(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]},e.prototype.dataToPoint=function(e,t,n){n||=[],z(e)&&(e=e[0]),t??=!0;var r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+uJ))return n[0]=n[1]=NaN,n;var o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n},e.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},e.prototype.dataToLayout=function(e,t,n){n||={};var r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,Y.copy(i,r),vu(i,this._lineWidth/2,!0,!0),n},e.prototype.dataToCalendarLayout=function(e,t){var n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},e.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)},e.prototype.convertToPixel=function(e,t,n){var r=hE(t);return r===this?r.dataToPoint(n):null},e.prototype.convertToLayout=function(e,t,n){var r=hE(t);return r===this?r.dataToLayout(n):null},e.prototype.convertFromPixel=function(e,t,n){var r=hE(t);return r===this?r.pointToData(n):null},e.prototype.containPoint=function(e){return console.warn(`Not implemented.`),!1},e.prototype._initRangeOption=function(){var e=this._model.get(`range`),t;if(z(e)&&e.length===1&&(e=e[0]),z(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var r=this.getDateInfo(n),i=r.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);t=[r.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var o=this._getRangeInfo(t);return o.start.time>o.end.time&&t.reverse(),t},e.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var r=Math.floor(t[1].time/uJ)-Math.floor(t[0].time/uJ)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);var s=i.getDate();if(s!==o)for(var c=i.getTime()-t[1].time>0?1:-1;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*c>0;)r-=c,i.setDate(s-c);var l=Math.floor((r+t[0].day+6)/7),u=n?-l+1:l-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},e.prototype._getDateByWeeksAndDay=function(e,t,n){var r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;var i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)},e.create=function(t,n){var r=[];return t.eachComponent(`calendar`,function(i){var a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent(function(e,t){Id({targetModel:t,coordSysType:`calendar`,coordSysProvider:ez})}),r},e.dimensions=[`time`,`value`],e}(),fJ=[`transition`,`enterFrom`,`leaveTo`],pJ=fJ.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]),mJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.preventAutoZ=!0,n}return t.prototype.mergeOption=function(t,n){var r=this.option.elements;this.option.elements=null,e.prototype.mergeOption.call(this,t,n),this.option.elements=r},t.prototype.optionUpdated=function(e,t){var n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,a=[];this._flatten(r,a,null);var o=Bs(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];L(o,function(e,t){var n=e.newOption;n&&(s.push(n),_E(e,n),yE(i,t,n),xE(i[t],n))},this),n.elements=ur(i,function(e){return e&&delete e.$action,e!=null})},t.prototype._flatten=function(e,t,n){L(e,function(e){if(e){n&&(e.parentOption=n),t.push(e);var r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children}},this)},t.prototype.useElOptionsToUpdate=function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e},t.type=`graphic`,t.defaultOption={elements:[]},t}(zz),hJ={path:null,compoundPath:null,group:II,image:pF,text:SF},gJ=tc(),_J=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this._elMap=W()},t.prototype.render=function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},t.prototype._updateElements=function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,r=this.group,i=e.get(`z`),a=e.get(`zlevel`);L(t,function(t){var o=Ys(t.id,null),s=o==null?null:n.get(o),c=Ys(t.parentId,null),l=c==null?r:n.get(c),u=t.type,d=t.style;u===`text`&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);var f=t.textContent,p=t.textConfig;if(d&&Am(d,u,!!p,!!f)){var m=jm(d,u,!0);!p&&m.textConfig&&(p=t.textConfig=m.textConfig),!f&&m.textContent&&(f=m.textContent)}var h=EE(t),g=t.$action||`merge`,_=g===`merge`,v=g===`replace`;if(_){var y=!s,b=s;y?b=CE(o,l,t.type,n):(b&&(gJ(b).isNew=!1),OT(b)),b&&(mT(b,h,e,{isInit:y}),TE(b,t,i,a))}else if(v){wE(s,t,n,e);var x=CE(o,l,t.type,n);x&&(mT(x,h,e,{isInit:!0}),TE(x,t,i,a))}else g===`remove`&&(hT(s,t),wE(s,t,n,e));var S=n.get(o);if(S&&f){if(_){var C=S.getTextContent();C?C.attr(f):S.setTextContent(new SF(f))}else v&&S.setTextContent(new SF(f))}if(S){var w=t.clipPath;if(w){var T=w.type,E=void 0,y=!1;if(_){var D=S.getClipPath();y=!D||gJ(D).type!==T,E=y?SE(T):D}else v&&(y=!0,E=SE(T));S.setClipPath(E),mT(E,w,e,{isInit:y}),kT(E,w.keyframeAnimation,e)}var O=gJ(S);S.setTextConfig(p),O.option=t,DE(S,e,t),bu({el:S,componentModel:e,itemName:S.name,itemTooltipOption:t.tooltip}),kT(S,t.keyframeAnimation,e)}})}},t.prototype._relocate=function(e,t){for(var n=e.option.elements,r=this.group,i=this._elMap,a=t.getWidth(),o=t.getHeight(),s=[`x`,`y`],c=0;c<n.length;c++){var l=n[c],u=Ys(l.id,null),d=u==null?null:i.get(u);if(d&&d.isGroup){var f=d.parent,p=f===r,m=gJ(d),h=gJ(f);m.width=X(m.option.width,p?a:h.width)||0,m.height=X(m.option.height,p?o:h.height)||0}}for(var c=n.length-1;c>=0;c--){var l=n[c],u=Ys(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=gJ(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=tp(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!gJ(d).isNew&&v){for(var y=l.transition,b={},x=0;x<s.length;x++){var S=s[x],C=_[S];y&&(_T(y)||ar(y,S)>=0)?b[S]=C:d[S]=C}Hl(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){wE(n,gJ(n).option,t,e._lastGraphicModel)}),this._elMap=W()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(FU),vJ=[`x`,`y`,`radius`,`angle`,`single`],yJ=tc(),bJ=[`cartesian2d`,`polar`,`singleAxis`],xJ=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}(),SJ=function(e){P(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=LE(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=LE(e);nr(this.option,e,!0),nr(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;L([[`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=W();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 L(vJ,function(n){var r=this.getReferringComponents(AE(n),YF);if(r.specified){t=!0;var i=new xJ;L(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 xJ;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,JF).models[0];o&&L(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,JF).models[0]&&a.add(e.componentIndex)})}}}r&&L(vJ,function(t){if(r){var i=n.findComponents({mainType:AE(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new xJ;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`);L([[`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??=this.ecModel.getComponent(AE(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){L(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return PE(this.getAxisModel(e,t))},t.prototype.getAxisModel=function(e,t){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(AE(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;L([[`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;L([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent},t.prototype.getValueRange=function(e,t){if(e==null&&t==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return PE(e);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||=s}return t},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return 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}(zz),CJ=function(e){P(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}(FU),wJ=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.getWindow=function(){return F(this._window)},e.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(kE(t)){var n=AE(this._dimName),r=t.getReferringComponents(n,JF).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 F(this._minMaxSpan)},e.prototype.calculateDataWindow=function(e){var t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],c,l=[!1,!1];L([`start`,`end`],function(n,u){var d=e[n],f=e[n+`Value`];i[u]===`percent`?(d??=a[u],f=ss(d,a,t),l[u]=!0):(c=!0,f==null?f=t[u]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=ss(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),ps(s),ps(o);var u=this._minMaxSpan;c?d(s,o,t,a,!1):d(o,s,a,t,!0);function d(e,t,n,r,i){var a=i?`Span`:`ValueSpan`;Fw(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(var o=0;o<2;o++)t[o]=ss(e[o],n,r,!0),i&&(t[o]=t[o],l[o]=!0);yc(t)}var f=qm(r)||Gm(r),p=n.getExtent(),m=AF(p[1]-p[0]),h=f?0:gs(s,m,.5);L([[0,NF],[1,MF]],function(e){var n=e[0],r=e[1];l[n]&&isFinite(h)&&(s[n]=fs(s[n],h),s[n]=OF(t[1],kF(t[0],s[n])),o[n]===a[n]&&(s[n]=t[n],f&&(s[n]=r(s[n]))))}),yc(s);var g=[ss(s[0],t,a,!0),ss(s[1],t,a,!0)];return yc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}},e.prototype.reset=function(e,t){if(this.hostedBy(e)){var n=this.getAxisModel().axis;D_(n,2);var r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();var i=e.settledOption;t&&(i=ir({start:t[0],end:t[1]},i));var a=this._window=this.calculateDataWindow(i),o=a.percent,s=a.value;o[0]!==0&&r.setZoomMM(0,s[0]),o[1]!==100&&r.setZoomMM(1,s[1])}},e.prototype.filterData=function(e,t){if(!this.hostedBy(e))return;var n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;L(r,function(e){var t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){var s=t.getStore(),c=R(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 L(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)}});L(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._extent;L([`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=ss(i,[0,100],n,!0)-n[0]):i=ss(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),TJ={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(AE(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!PE(i)){var o=new wJ(t,r,a,e);n.push(o),FE(i,o)}});var r=W();return L(n,function(e){L(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset:function(e,t){e.eachComponent(`dataZoom`,function(e){var n=[];e.eachTargetAxis(function(t,r){var i=e.getAxisProxy(t,r),a=IE(e,i);a?n.push([i,a]):i.reset(e,null)}),L(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),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.getWindow(),r=n.percent,i=n.value;e.setCalculatedRange({start:r[0],end:r[1],startValue:i[0],endValue:i[1]})}})}},EJ=bc(),DJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Z.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Z.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Z.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Z.color.tertiary,fontSize:14}},t}(zz),OJ=HE([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),kJ=HE([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]),AJ=UE(kJ,`transition`),jJ=UE(OJ,`transform`),MJ=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(EM.transform3dSupported?`will-change:transform;`:``),NJ=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,EM.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&&(V(i)?document.querySelector(i):yr(i)?i:B(i)&&i(e.getDom()));ZE(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;Yv(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=WE(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=MJ+XE(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+JE(i[0],i[1],!0)+(`border-color:`+qf(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=``;else{var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!VE(n)&&(o=KE(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,z(e)||(e=[e]);for(var s=0;s<e.length;s++)yr(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(ZE(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;L(JE(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,EM.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(q(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;tf(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),PJ=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),eD(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;H(e)&&Ps(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new SF({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:Vp(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),L([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),L([`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=$E(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;eD(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=QE(i.borderWidth||0),o=$E(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(q(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}(),FJ=new _F({shape:{x:-1,y:-1,width:2,height:2}}),IJ=function(e){P(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(!EM.node&&t.getDom()){var n=e.getComponent(`tooltip`),r=this._renderMode=cc(n.get(`renderMode`));this._tooltipContent=r===`richText`?new PJ(t):new NJ(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!EM.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`)?Q_(this,`_updatePosition`,50,`fixRate`):$_(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);qT(`itemTooltip`,this._api,q(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!EM.node&&n.getDom()){var i=nD(r,n);this._ticket=``;var a=r.dataByCoordSys,o=sD(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=FJ;c.x=r.x,c.y=r.y,c.update(),ZF(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=eE(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(nD(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&&tD([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(ZF(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;Tb(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(ZF(e).dataIndex==null?ZF(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=q(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=tD([t.tooltipOption],r),o=this._renderMode,s=[],c=Dp(`section`,{blocks:[],noHeader:!0}),l=[],u=new tB;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=RT(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Dp(`section`,{header:f,noHeader:!Or(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),L(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=vh(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,qf(m.color),o);var h=fp(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=tD([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Np(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
39
+
40
+ `:`<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=ZF(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=tD([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 tB;h.marker=g.makeTooltipMarker(`item`,qf(h.color),d);var _=fp(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Np(y?I({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=ZF(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=F(a),a.content=sf(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=tD(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new tB;this._showOrMove(d,function(){var n=F(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=z(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Cf(m.axisValue,d,p)),d=Wf(d,n,!0)}else if(B(u)){var g=q(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||z(t))return{color:r||i};if(!z(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),B(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),z(t))n=X(t[0],s),r=X(t[1],c);else if(H(t)){var p=t;p.width=l[0],p.height=l[1];var m=$f(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=aD(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=rD(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=oD(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=oD(d)?l[1]/2:d===`bottom`?l[1]:0),VE(e)){var h=iD(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&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(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&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!EM.node&&t.getDom()&&($_(this,`_updatePosition`),this._tooltipContent.dispose(),$T(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(FU),LJ=L,RJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Z.size.m,backgroundColor:Z.color.transparent,borderColor:Z.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Z.color.primary},subtextStyle:{fontSize:12,color:Z.color.quaternary}},t}(zz),zJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=U(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new SF({style:Lu(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new SF({style:Lu(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){Jf(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Jf(p,`_`+e.get(`subtarget`))}),ZF(c).eventData=ZF(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=$f(g,ep(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new _F({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(FU),BJ=tc(),VJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.createdBySelf=!1,n.preventAutoZ=!0,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},t.prototype.isAnimationEnabled=function(){if(EM.node)return!1;var e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()},t.prototype.mergeOption=function(e,t){this._mergeOption(e,t,!1,!1)},t.prototype._mergeOption=function(e,t,n,r){var i=this.mainType;n||t.eachSeries(function(e){var n=e.get(this.mainType,!0),a=BJ(e)[i];!n||!n.data?BJ(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&hD(n),L(n.data,function(e){e instanceof Array?(hD(e[0]),hD(e[1])):hD(e)}),a=this.createMarkerModelFromSeries(n,this,t),I(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),BJ(e)[i]=a)},this)},t.prototype.formatTooltip=function(e,t,n){var r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return Dp(`section`,{header:this.name,blocks:[Dp(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})},t.prototype.getData=function(){return this._data},t.prototype.setData=function(e){this._data=e},t.prototype.getDataParams=function(e,t){var n=Wz.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n},t.getMarkerModelFromSeries=function(e,t){return BJ(e)[t]},t.type=`marker`,t.dependencies=[`series`,`grid`,`polar`,`geo`],t}(zz),sr(VJ,Wz.prototype),HJ={min:mr(vD,`min`),max:mr(vD,`max`),average:mr(vD,`average`),median:mr(vD,`median`)},UJ=tc(),WJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(){this.markerGroupMap=W()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){UJ(e).keep=!1}),t.eachSeries(function(e){var i=VJ.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!UJ(e).keep&&r.group.remove(e.group)}),TD(t,i,this.type)},t.prototype.markKeep=function(e){UJ(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;L(e,function(e){var r=VJ.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?Xc(e):Zc(e))})})},t.type=`marker`,t}(FU),GJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.createMarkerModelFromSeries=function(e,n,r){return new t(e,n,r)},t.type=`markLine`,t.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`},t}(VJ),KJ=tc(),qJ=function(e,t,n,r){var i=e.getData(),a;if(z(r))a=r;else{var o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){var s=void 0,c=void 0;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Cr(r.yAxis,r.xAxis);else{var l=bD(r,i,t,e);s=l.valueAxis,c=wD(i,Hd(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=F(r),p={coord:[]};f.type=null,f.coord=[],f.coord[d]=-1/0,p.coord[d]=1/0;var m=n.get(`precision`);m>=0&&gr(c)&&(c=+c.toFixed(Math.min(m,20))),f.coord[u]=p.coord[u]=c,a=[f,p,{type:o,valueIndex:r.valueIndex,value:c}]}else a=[]}var h=[yD(e,a[0]),yD(e,a[1]),I({},a[2])];return h[2].type=h[2].type||null,nr(h[2],h[0]),nr(h[2],h[1]),h},JJ=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.updateTransform=function(e,t,n){t.eachSeries(function(e){var t=VJ.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=KJ(t).from,a=KJ(t).to;i.each(function(t){kD(i,t,!0,e,n),kD(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,t,n,r){var i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new xq);this.group.add(c.group);var l=AD(i,e,t),u=l.from,d=l.to,f=l.line;KJ(t).from=u,KJ(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);z(p)||(p=[p,p]),z(m)||(m=[m,m]),z(h)||(h=[h,h]),z(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){var t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);var r=t.get(`z2`);n.stroke??=u.getItemVisual(e,`style`).fill,f.setItemVisual(e,{z2:U(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){ZF(e).dataModel=t,e.traverse(function(e){ZF(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);kD(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=Cb(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:U(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:U(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:U(a.get(`symbolSize`),m[+!i]),symbol:U(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(WJ),YJ=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`])}},XJ=function(e){P(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`]),z(t)&&L(t,function(e,r){V(e)&&(e={type:e}),t[r]=nr(e,YJ(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&&Xs(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=W(),a=R(r,function(e){return(V(e)||gr(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new nR(e,this,this.ecModel))},this);this._data=ur(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;L(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;L(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;L(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])&&ar(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Z.size.m,align:`auto`,backgroundColor:Z.color.transparent,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Z.color.disabled,inactiveBorderColor:Z.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Z.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Z.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Z.color.tertiary,borderWidth:1,borderColor:Z.color.border},emphasis:{selectorLabel:{show:!0,color:Z.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(zz),ZJ=mr,QJ=L,$J=II,eY=function(e){P(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 $J),this.group.add(this._selectorGroup=new $J),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=ep(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=$f(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=$f(ir({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=BE(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=W(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),QJ(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
41
+ `)){var p=new $J;p.newline=!0,s.add(p)}else{var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,ZJ(PD,f,null,r,d)).on(`mouseover`,ZJ(FD,m.name,null,r,d)).on(`mouseout`,ZJ(ID,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=ZF(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Da(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:Fa(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,ZJ(PD,null,f,r,d)).on(`mouseover`,ZJ(FD,null,f,r,d)).on(`mouseout`,ZJ(ID,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=ZF(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};ZF(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();QJ(e,function(e){var r=e.type,i=new SF({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Fu(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),dl(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=MD(c,r,o,s,d,m,u),y=new $J,b=r.getModel(`textStyle`);if(B(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(ND({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;V(w)&&w?T=w.replace(`{name}`,t??``):B(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new SF({style:Lu(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new _F({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&bu({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),dl(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Iz(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){Iz(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(FU),tY=Dc(BD),nY=function(e){P(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=ap(t);e.prototype.init.call(this,t,n,r),HD(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),HD(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=Zd(XJ.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:Z.color.accent50,pageIconInactiveColor:Z.color.accent10,pageIconSize:15,pageTextStyle:{color:Z.color.tertiary},animationDurationUpdate:800}),t}(XJ),rY=II,iY=[`width`,`height`],aY=[`x`,`y`],oY=function(e){P(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 rY),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rY)},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=z(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new SF({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=pu(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:q(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=iY[s],l=aY[s],u=iY[1-s],d=aY[1-s];i&&Iz(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=F(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;Iz(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),Iz(`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],_=U(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 _F({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&&Hl(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;L([`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`,V(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=iY[i],o=aY[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(eY),sY=function(e){P(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=Zd(SJ.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(SJ),cY=tc(),lY=function(e){P(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){e.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),KD(r,t,{pan:q(uY.pan,this),zoom:q(uY.zoom,this),scrollMove:q(uY.scrollMove,this)}))},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){qD(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(CJ),uY={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=dY[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(Fw(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:eO(function(e,t,n,r,i,a){var o=dY[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:eO(function(e,t,n,r,i,a){return dY[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})},dY={grid:function(e,t,n,r,i){var a=n.axis,o={},s=i.model.coordinateSystem.getRect();return 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||=[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}},fY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`dataZoom.slider`,t.layoutMode=`box`,t.defaultOption=Zd(SJ.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Z.color.accent10,borderRadius:0,backgroundColor:Z.color.transparent,dataBackground:{lineStyle:{color:Z.color.accent30,width:.5},areaStyle:{color:Z.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Z.color.accent40,width:.5},areaStyle:{color:Z.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Z.color.neutral00,borderColor:Z.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Z.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Z.color.tertiary},brushSelect:!0,brushStyle:{color:Z.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Z.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(SJ),pY=_F,mY=1,hY=30,gY=7,_Y=`horizontal`,vY=`vertical`,yY=5,bY=[`line`,`bar`,`candlestick`,`scatter`],xY={easing:`cubicOut`,duration:100,delay:0},SY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._displayables={},n}return t.prototype.init=function(e,t){this.api=t,this._onBrush=q(this._onBrush,this),this._onBrushEnd=q(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){e.prototype.render.apply(this,arguments),Q_(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&i.type===`dataZoom`&&i.from===this.uid||this._buildView(),this._updateView())},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){$_(this,`_dispatchZoomAction`);var e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var t=this._displayables.sliderGroup=new II;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?gY:0,r=ep(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===_Y?{right:r.width-i.x-i.width,top:r.height-hY-a-n,width:i.width,height:hY}:{right:a,top:i.y,width:hY,height:i.height},s=ap(e.option);L([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=$f(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===vY&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===_Y&&!i?{scaleY:o?1:-1,scaleX:1}:n===_Y&&i?{scaleY:o?1:-1,scaleX:-1}:n===vY&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});var s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new pY({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new pY({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:q(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;var s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){var l=i.getDataExtent(e.thisDim),u=i.getDataExtent(o),d=(u[1]-u[0])*.3;u=[u[0]-d,u[1]+d];var f=[0,t[1]],p=[0,t[0]],m=[[t[0],0],[0,0]],h=[],g=p[1]/Math.max(1,i.count()-1),_=t[0]/(l[1]-l[0]),v=e.thisAxis.type===`time`,y=-g,b=Math.round(i.count()/t[0]),x;i.each([e.thisDim,o],function(e,t,n){if(b>0&&n%b)v||(y+=g);else{y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:ss(t,u,f,!0);r&&!x&&n?(m.push([m[m.length-1][0],0]),h.push([h[h.length-1][0],0])):!r&&x&&(m.push([y,0]),h.push([y,0])),r||(m.push([y,i]),h.push([y,i])),x=r}}),s=this._shadowPolygonPts=m,c=this._shadowPolylinePts=h}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];var S=this.dataZoomModel;function C(e){var t=S.getModel(e?`selectedDataBackground`:`dataBackground`),n=new II,r=new rL({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new aL({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(var w=0;w<3;w++){var T=C(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t!==!1){var n,r=this.ecModel;return e.eachTargetAxis(function(i,a){L(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&ar(bY,e.get(`type`))<0)){var o=r.getComponent(AE(i),a).axis,s=rO(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new pY({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new pY({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:mY,fill:Z.color.transparent}})),L([0,1],function(t){var a=o.get(`handleIcon`);!sB[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=em(a,-1,0,2,2,null,!0);s.attr({cursor:iO(this._orient),draggable:!0,drift:q(this._onDragMove,this,t),ondragend:q(this._onDragEnd,this),onmouseover:q(this._onOverDataInfoTriggerArea,this,!0),onmouseout:q(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=X(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),dl(s);var u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);var d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new SF({silent:!0,invisible:!f,style:Lu(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);var d=u;if(l){var f=X(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new _F({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:f}}),m=f*.8,h=t.moveHandleIcon=em(o.get(`moveHandleIcon`),-m/2,-m/2,m,m,Z.color.neutral00,!0);h.silent=!0,h.y=a[1]+f/2-.5,p.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();var g=Math.min(a[1]/2,Math.max(f,10));d=t.moveZone=new _F({invisible:!0,shape:{y:a[1]-g,height:f+g}}),d.on(`mouseover`,function(){s.enterEmphasis(p)}).on(`mouseout`,function(){s.leaveEmphasis(p)}),i.add(p),i.add(h),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:q(this._onActualMoveZoneDrift,this),ondragstart:q(this._onActualMoveZoneDragStart,this),ondragend:q(this._onActualMoveZoneDragEnd,this),onmouseover:q(this._onOverDataInfoTriggerArea,this,!0),onmouseout:q(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ss(e[0],[0,100],t,!0),ss(e[1],[0,100],t,!0)]},t.prototype._updateInterval=function(e,t){var n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];Fw(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:ss(a.minSpan,o,i,!0),a.maxSpan==null?null:ss(a.maxSpan,o,i,!0));var s=this._range,c=this._range=ps([ss(r[0],i,o,!0),ss(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]},t.prototype._updateView=function(e){var t=this._displayables,n=this._handleEnds,r=ps(n.slice()),i=this._size;L([0,1],function(e){var r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});var a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));for(var o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]],c=0;c<o.length;c++){var l=o[c],u=l.getClipPath();u||(u=new _F,l.setClipPath(u)),u.setShape({x:s[c],y:0,width:s[c+1]-s[c],height:i[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){var o=t.findRepresentativeAxisProxy(),s=o.getAxisModel().axis.scale;if(o){var c=this._range,l;if(e){var u={start:c[0],end:c[1]},d=IE(t,o);if(d){var f=d.calculateDataWindow(u).percentInverted;u={start:f[0],end:f[1]}}l=o.calculateDataWindow(u)}else l=o.getWindow();a=[nO(t,0,l,s),nO(t,1,l,s)]}}var p=ps(this._handleEnds.slice());m.call(this,0),m.call(this,1);function m(e){var t=au(n.handles[e].parent,this.group),o=su(e===0?`right`:`left`,t),s=this._handleWidth/2+yY,c=ou([p[e]+(e===0?-s:s),this._size[1]/2],t);r[e].setStyle({x:c[0],y:c[1],verticalAlign:i===_Y?`middle`:o,align:i===_Y?o:`center`,text:a[e]})}},t.prototype._onOverDataInfoTriggerArea=function(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)},t.prototype._showDataInfo=function(e){var t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)},t.prototype._onActualMoveZoneDrift=function(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)},t.prototype._onActualMoveZoneDragStart=function(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)},t.prototype._onActualMoveZoneDragEnd=function(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()},t.prototype._onDragMove=function(e,t,n,r){this._dragging=!0,zH(r.event);var i=this._displayables.sliderGroup.getLocalTransform(),a=ou([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var t=e.offsetX,n=e.offsetY;this._brushStart=new J(t,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var t=this._displayables.brushRect;if(this._brushing=!1,t){t.attr(`ignore`,!0);var n=t.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Fw(0,a,r,0,o.minSpan==null?null:ss(o.minSpan,i,r,!0),o.maxSpan==null?null:ss(o.maxSpan,i,r,!0)),this._range=ps([ss(a[0],r,i,!0),ss(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(zH(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,t){var n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new pY({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);var a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})},t.prototype._dispatchZoomAction=function(e){var t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?xY:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=ME(this.dataZoomModel).infoList;if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var r=this.api.getWidth(),i=this.api.getHeight();e={x:r*.2,y:i*.2,width:r*.6,height:i*.6}}return e},t.type=`dataZoom.slider`,t}(CJ),CY={get:function(e,t,n){var r=F((wY[e]||{})[t]);return n&&z(r)?r[r.length-1]:r}},wY={color:{active:[`#006edd`,`#e0ffff`],inactive:[Z.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},TY=sq.mapVisual,EY=sq.eachVisual,DY=z,OY=L,kY=ps,AY=ss,jY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&dD(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=q(e,this),this.controllerVisuals=uD(this.option.controller,t,e),this.targetVisuals=uD(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return OY(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=ic(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],z(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);return V(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):B(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=kY([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=dr(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};nr(r,n),nr(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){DY(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},OY(r,function(e,t){if(sq.isValidType(t)){var n=CY.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;OY(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&F(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&F(n)||(a?s[0]:[s[0],s[0]])),c.symbol=TY(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;EY(l,function(e){e>u&&(u=e)}),c.symbolSize=TY(l,function(e){return AY(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Z.color.transparent,borderColor:Z.color.borderTint,contentColor:Z.color.theme[0],inactiveColor:Z.color.disabled,borderWidth:0,padding:Z.size.m,textGap:10,precision:0,textStyle:{color:Z.color.secondary}},t}(zz),MY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.autoPositionValues={left:1,right:1,top:1,bottom:1},n}return t.prototype.init=function(e,t){this.ecModel=e,this.api=t},t.prototype.render=function(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)},t.prototype.renderBackground=function(e){var t=this.visualMapModel,n=Az(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new _F({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))},t.prototype.getControllerVisual=function(e,t,n){n||={};var r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}var c=i.controllerVisuals[r||i.getValueState(e)];return L(sq.prepareVisualTypes(c),function(r){var i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),sq.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]},t.prototype.positionGroup=function(e){var t=this.visualMapModel,n=this.api,r=ep(t,n).refContainer;tp(e,t.getBoxLayoutParams(),r)},t.prototype.doRender=function(e,t,n,r){},t.type=`visualMap`,t}(FU),NY=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]],PY={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},FY=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},IY=[{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent(`visualMap`,function(t){var r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(fD(t.stateList,t.targetVisuals,q(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){var i=t.getVisualMeta(q(lO,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}],LY=L,RY=!1,zY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],BY[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=F(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=F(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=sq.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=CY.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=F(e)},t.prototype.getValueState=function(e){var t=sq.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){sq.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Zd(jY.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(jY),BY={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o<i;s+=a,o++){var c=o===i-1?r[1]:s+a;e.push({interval:[s,c],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),Ts(e),L(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories:function(e){var t=this.option;L(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),pO(t,e)},pieces:function(e){var t=this.option;L(t.pieces,function(t,n){H(t)||(t={value:t});var r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){var i=r.value=t.value;r.interval=[i,i],r.close=[1,1]}else{for(var a=r.interval=[],o=r.close=[0,0],s=[1,0,1],c=[-1/0,1/0],l=[],u=0;u<2;u++){for(var d=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][u],f=0;f<3&&a[u]==null;f++)a[u]=t[d[f]],o[u]=s[f],l[u]=f===2;a[u]??(a[u]=c[u])}l[0]&&a[1]===1/0&&(o[0]=0),l[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(r.value=a[0])}r.visual=sq.retrieveVisuals(t),e.push(r)},this),pO(t,e),Ts(e),L(e,function(e){var t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}},VY=function(e){P(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Cr(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new II;u.onclick=q(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new SF({style:Lu(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:U(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Iz(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:cO(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return sO(e,this.api,e.itemSize);var n=t.align;return n&&n!==`auto`||(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new II,o=this.visualMapModel.textStyleModel;a.add(new SF({style:Lu(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=em(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=F(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(MY),HY=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],UY=new CN,WY=tc(),GY=tc(),KY=[`x`,`y`,`rotation`],qY=function(){function e(){this._labelList=[],this._chartViewList=[]}return e.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},e.prototype._addLabel=function(e,t,n,r,i){var a=r.style,o=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),c=r.getBoundingRect().plain();Y.applyTransform(c,c,s),s?UY.setLocalTransform(s):(UY.x=UY.y=UY.rotation=UY.originX=UY.originY=0,UY.scaleX=UY.scaleY=1),UY.rotation=Po(UY.rotation);var l=r.__hostTarget,u;if(l){u=l.getBoundingRect().plain();var d=l.getComputedTransform();Y.applyTransform(u,u,d)}var f=u&&l.getTextGuideLine();this._labelList.push({label:r,labelLine:f,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:f&&f.ignore,x:UY.x,y:UY.y,scaleX:UY.scaleX,scaleY:UY.scaleY,rotation:UY.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:o.position,attachedRot:o.rotation}})},e.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,r=n.get(`labelLayout`);(B(r)||fr(r).length)&&e.group.traverse(function(e){if(e.ignore)return!0;var i=e.getTextContent(),a=ZF(e);i&&!i.disableLabelLayout&&t._addLabel(a.dataIndex,a.dataType,n,i,r)})},e.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){Av(e,t)}}for(var i=0;i<this._labelList.length;i++){var a=this._labelList[i],o=a.label,s=o.__hostTarget,c=a.defaultAttr,l=void 0;l=B(a.layoutOptionOrCb)?a.layoutOptionOrCb(gO(a,s)):a.layoutOptionOrCb,l||={},a.layoutOption=l;var u=Math.PI/180;s&&s.setTextConfig({local:!1,position:l.x!=null||l.y!=null?null:c.attachedPos,rotation:l.rotate==null?c.attachedRot:l.rotate*u,offset:[l.dx||0,l.dy||0]});var d=!1;if(l.x==null?(o.x=c.x,o.setStyle(`x`,c.style.x)):(o.x=X(l.x,t),o.setStyle(`x`,0),d=!0),l.y==null?(o.y=c.y,o.setStyle(`y`,c.style.y)):(o.y=X(l.y,n),o.setStyle(`y`,0),d=!0),l.labelLinePoints){var f=s.getTextGuideLine();f&&(f.setShape({points:l.labelLinePoints}),d=!1)}var p=WY(o);p.needsUpdateLabelLine=d,o.rotation=l.rotate==null?c.rotation:l.rotate*u,o.scaleX=c.scaleX,o.scaleY=c.scaleY;for(var m=0;m<HY.length;m++){var h=HY[m];o.setStyle(h,l[h]==null?c.style[h]:l[h])}if(l.draggable){if(o.draggable=!0,o.cursor=`move`,s){var g=a.seriesModel;a.dataIndex!=null&&(g=a.seriesModel.getData(a.dataType).getItemModel(a.dataIndex)),o.on(`drag`,r(s,g.getModel(`labelLine`)))}}else o.off(`drag`),o.cursor=c.cursor}},e.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),r=[];L(this._labelList,function(e){e.defaultAttr.ignore||r.push(Vg({},e))});var i=ur(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=ur(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});Ug(i,0,0,t),Ug(a,1,0,n);var o=ur(r,function(e){return e.layoutOption.hideOverlap});Wg(o),Gg(o)},e.prototype.processLabelsOverall=function(){var e=this;L(this._chartViewList,function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var a=!r,o=t.getTextContent();!a&&o&&(a=WY(o).needsUpdateLabelLine),a&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)})})},e.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=ZF(e),i=r.dataIndex;if(n&&i!=null){var a=t.getData(r.dataType),o=a.getItemModel(i),s={},c=a.getItemVisual(i,`style`);c&&(s.stroke=c[a.getVisual(`drawType`)]);var l=o.getModel(`labelLine`);Fv(e,Iv(o),s),Av(e,l)}},e.prototype._animateLabels=function(e,t){var n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Wl(e))){var i=WY(n),a=i.oldLayout,o=ZF(e),s=o.dataIndex,c={x:n.x,y:n.y,rotation:n.rotation},l=t.getData(o.dataType);if(a){n.attr(a);var u=e.prevStates;u&&(ar(u,`select`)>=0&&n.attr(i.oldLayoutSelect),ar(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),Hl(n,c,t,s)}else if(n.attr(c),!WL(n).valueAnimation){var d=U(n.style.opacity,1);n.style.opacity=0,Ul(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};_O(f,c,KY),_O(f,n.states.select,KY)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};_O(p,c,KY),_O(p,n.states.emphasis,KY)}Wu(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=GY(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),Hl(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Ul(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),JY=tc(),YY=function(){function e(t,n){Fm(this,e.decoratedMethods),this._outOfBrk=Vm(null,n);var r=this._linear=Vm(null,n);Im(this,r),this.breaks=t&&t.breaks||[]}return e.prototype.hasBreaks=function(){return!!this.breaks.length},e.prototype.calcNiceTickMultiple=function(e,t){for(var n=0;n<this.breaks.length;n++){var r=this.breaks[n];if(r.vmin<e&&e<r.vmax)return t(e,r.vmax)}return 0},e.decoratedMethods={needTransform:function(){return!this.breaks.length},getExtent:function(){return this._outOfBrk.getExtent()},getExtentUnsafe:function(e,t){return t==null||t===2?this._outOfBrk.getExtentUnsafe(e,null):this._linear.getExtentUnsafe(e,null)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){_c(t,n)&&(e===0&&bO(this,[t,n]),this._outOfBrk.setExtent2(e,t,n),this._linear.setExtent2(e,this.transformIn(t,null),this.transformIn(n,null)))},normalize:function(e){return this._linear.normalize(this.transformIn(e,null))},scale:function(e){return this.transformOut(this._linear.scale(e),null)},contain:function(e){return this._outOfBrk.contain(e)},transformIn:function(e,t){if(t&&t.depth===2)return e;for(var n=XY,r=ZY,i=!0,a=0;a<this.breaks.length;a++){var o=this.breaks[a];if(e<=o.vmax){e>o.vmin?n+=o.vmin-r+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:n+=e-r,r=o.vmax,i=!1;break}n+=o.vmin-r+o.gapReal,r=o.vmax}return i&&(n+=e-r),n},transformOut:function(e,t){if(t&&t.depth===2)return e;for(var n=XY,r=ZY,i=!0,a=0,o=0;o<this.breaks.length;o++){var s=this.breaks[o],c=n+s.vmin-r,l=c+s.gapReal;if(e<=l){a=e>c?s.vmin+(e-c)/(l-c)*(s.vmax-s.vmin):r+e-n,r=s.vmax,i=!1;break}n=l,r=s.vmax}return i&&(a=r+e-n),a}},e}(),XY=0,ZY=0,QY={vmin:`start`,vmax:`end`},$Y=tc(),eX=Math.sin,tX=Math.cos,nX=Math.PI,rX=Math.PI*2,iX=180/nX,aX=function(){function e(){}return e.prototype.reset=function(e){this._start=!0,this._d=[],this._str=``,this._p=10**(e||4)},e.prototype.moveTo=function(e,t){this._add(`M`,e,t)},e.prototype.lineTo=function(e,t){this._add(`L`,e,t)},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)},e.prototype.quadraticCurveTo=function(e,t,n,r){this._add(`Q`,e,t,n,r)},e.prototype.arc=function(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)},e.prototype.ellipse=function(e,t,n,r,i,a,o,s){var c=o-a,l=!s,u=Math.abs(c),d=za(u-rX)||(l?c>=rX:-c>=rX),f=c>0?c%rX:c%rX+rX,p=!1;p=d?!0:!za(u)&&f>=nX==!!l;var m=e+n*tX(a),h=t+r*eX(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*iX);if(d){var _=1/this._p,v=(l?1:-1)*(rX-_);this._add(`A`,n,r,g,1,+l,e+n*tX(a+v),t+r*eX(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*tX(o),b=t+r*eX(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d<arguments.length;d++){var f=arguments[d];if(isNaN(f)){this._invalid=!0;return}l.push(Math.round(f*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`},e.prototype.generateStr=function(){this._str=this._invalid?``:this._d.join(``),this._d=[]},e.prototype.getStr=function(){return this._str},e}(),oX=`none`,sX=Math.round,cX=[`lineCap`,`miterLimit`,`lineJoin`],lX=R(cX,function(e){return`stroke-`+e.toLowerCase()}),uX=`http://www.w3.org/2000/svg`,dX=`http://www.w3.org/1999/xlink`,fX=`http://www.w3.org/2000/xmlns/`,pX=`http://www.w3.org/XML/1998/namespace`,mX=`ecmeta_`,hX=0,gX={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},_X=`transform-origin`,vX={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`},yX=Math.round,bX={circle:[gk([`cx`,`cy`,`r`])],polyline:[mk,hk],polygon:[mk,hk]},xX=58,SX=120,CX=GO(``,``),wX=0,TX=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=Wk(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+wX++,this._oldVNode=ZO(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=WO(`svg`);Bk(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Uk(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return xk(e,XO(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=XO(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=Gk(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=GO(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(fr(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(GO(`defs`,`defs`,{},c)),e.animation){var l=YO(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=GO(`style`,`stl`,{},[],l);a.push(u)}}return ZO(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},JO(this.renderToVNode({animation:U(e.cssAnimation,!0),emphasis:U(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:U(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l<r;l++){var u=e[l];if(!u.invisible){var d=u.__clipPaths,f=d&&d.length||0,p=s&&s.length||0,m=void 0;for(m=Math.max(f-1,p-1);m>=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g<f;g++){var _={};Tk(d[g],_,t);var v=GO(`g`,`clip-g-`+c++,_,[]);(o?o.children:n).push(v),i[a++]=v,o=v}s=d;var y=xk(u,t);y&&(o?o.children:n).push(y)}}},e.prototype.resize=function(e,t){var n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=Fb(r,0,n),t=Fb(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){var a=i.style;a.width=e+`px`,a.height=t+`px`}if(Ja(this._backgroundColor))this.refresh();else{var o=this._svgDom;o&&(o.setAttribute(`width`,e),o.setAttribute(`height`,t));var s=this._bgVNode&&this._bgVNode.elm;s&&(s.setAttribute(`width`,e),s.setAttribute(`height`,t))}}},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e.prototype.dispose=function(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},e.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},e.prototype.toDataURL=function(e){var t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=GN(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)},e}(),EX=function(e){P(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=aP,typeof t==`string`?a=qk(t,n,r):H(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Pr(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=Yk(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=qk(`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 Y(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero()){if(i.length===0){var t=new Y(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 Y(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new Y(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}}for(var l=Yk(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;)if(i[u].isZero())i.splice(u,1);else{for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;br(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||Mb(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):xr(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=Ub(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&&L(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(rP),DX=1e5,OX=314159,kX=void 0,AX=1,jX=2,MX=1,NX=2,PX=4,FX=MX|PX,IX=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=I({},n||{}),this.dpr=n.devicePixelRatio||aP,this._singleCanvas=i,this.root=e,e.style&&(Pr(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=Qk(a,this,OX,0);c.initContext(),this._insertLayer(c,OX,0,!0),this._domRoot=e}else{this._width=Fb(e,0,n),this._height=Fb(e,1,n);var l=this._domRoot=Zk(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!H(e)?{paintAll:!!e}:e||{},n=U(t.refresh,!0),r=U(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=jX),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return iA(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},NX),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=kX,n!==kX&&(!t&&n===jX&&(t=this._i.hoverlayer=this._ensureLayer(DX)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),nx(i,s,r),c&&(s.style=l)}}i&&(rx(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(DX)},e.prototype.paintOne=function(e,t){tx(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)iA(this._i,function(e){e.afterBrush&&e.afterBrush()},FX),this._paintHoverList(e);else{var i=this;QH(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(OX).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),iA(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},MX)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return iA(this._i,function(i){var a=!1;if(nA(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),a||i.__dirty){var o=n._opts.useDirtyRect&&!Jk(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}nA(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},FX),EM.wxa&&iA(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=Jk(e),c=s&&oM.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=jX),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(nx(o,f,a),f.setPrevPaintRect(p))}else nx(o,f,a);if(s&&oM.getTime()-c>15){d++;break}}}rx(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=OX,t=0);var i=rA(this._i,e)[t];return i||(i=Qk(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&nr(i,this._layerConfig[e],!0),(n||r&&e!==OX)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&Xk(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=rA(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),rA(i,t)[n]=e,!r&&!e.virtual){if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||=this}},e.prototype.eachLayer=function(e,t){return iA(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return iA(this._i,function(n,r){e.call(t,n,r)},MX)},e.prototype.eachOtherLayer=function(e,t){return iA(this._i,function(n,r){e.call(t,n,r)},NX)},e.prototype.getLayers=function(){var e={};return iA(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}iA(n._i,function(e){e.__dirty=!1,nA(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},FX);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__))tr(`ZLevel `+d+` has been used by unknown layer `+o.id);else{if((!s||f!==s.key)&&(s=tA(o,f),!s.used)){if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1}s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}}iA(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(Jk(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(nA(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===kX&&(n._hoverLayerDirty=AX))},FX)},e.prototype.clear=function(){return iA(this._i,function(e){e.clear(),$k(e)},MX),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,iA(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?nr(n[e],t,!0):n[e]=t,iA(this._i,function(e,t){nr(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=Fb(i,0,r),t=Fb(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,iA(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(OX).resize(e,t)}return this},e.prototype.clearLayer=function(e){L(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[OX][0].dom;var t=new EX(`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;iA(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];nx(n,l,a)}rx(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}(),LX=Object.freeze({INR:`₹`,USD:`$`,EUR:`€`,GBP:`£`}),RX=e=>typeof e==`string`&&/^[A-Z]{3}$/.test(e),zX=(e=`INR`)=>LX[e]??`${e} `,BX=`Asia/Kolkata`,VX=198e5,HX=new Map,UX=[`number`,`currency`,`percent`,`compact`,`duration`,`date`],WX=[`rupees`,`paise`],GX=[`ms`,`s`,`min`,`h`],KX=[`day`,`month`,`year`,`datetime`,`time`],qX=`−`,JX=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],YX=[[1e7,`Cr`],[1e5,`L`],[1e3,`K`]],XX=(e,t)=>Number.isInteger(e)&&e>=0&&e<=20?e:t,ZX=new Map,QX=e=>(ZX.has(e)||ZX.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:0,maximumFractionDigits:e})),ZX.get(e)),$X=new Map,eZ=e=>($X.has(e)||$X.set(e,new Intl.NumberFormat(`en-IN`,{minimumFractionDigits:e,maximumFractionDigits:e})),$X.get(e)),tZ=e=>typeof e==`number`&&Number.isFinite(e),nZ=e=>e<0&&!Object.is(Math.abs(e),0)?qX:``,rZ=(e,t)=>t===`paise`?e/100:e,iZ=e=>e>0&&e<.1?Math.min(20,1-Math.floor(Math.log10(e))):2,aZ=[`line`,`area`,`column`,`bar`,`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`,`multiples`],oZ=[`none`,`stacked`,`percent`],sZ=[`category`,`time`,`value`],cZ=[`auto`,`svg`,`canvas`],lZ=[`ready`,`loading`,`empty`,`error`],uZ=[`chart`,`table`],dZ=`Other`,fZ=`No data to show for this chart.`,pZ=`This chart couldn't load. Try again in a moment.`,mZ=`Loading chart`,hZ=`This chart has more series than it can show clearly.`,gZ=`This chart has more groups than it can show clearly.`,_Z={line:`Line chart`,area:`Area chart`,column:`Column chart`,bar:`Bar chart`,donut:`Donut chart`,heatmap:`Heatmap`,calendar:`Calendar heatmap`,funnel:`Funnel chart`,gauge:`Gauge`,waterfall:`Waterfall chart`,treemap:`Treemap`,sankey:`Sankey diagram`,scatter:`Scatter plot`,bubble:`Bubble chart`,multiples:`Small multiples`},vZ=[`donut`,`heatmap`,`calendar`,`funnel`,`gauge`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],yZ=e=>vZ.includes(e),bZ=[`area`,`column`,`bar`],xZ=[`line`,`area`,`column`,`bar`,`multiples`],SZ={line:[`category`,`time`],area:[`category`,`time`],column:[`category`,`time`],bar:[`category`,`time`],multiples:[`category`,`time`],calendar:[`time`],scatter:[`value`],bubble:[`value`]},CZ={group:[`heatmap`,`treemap`,`scatter`,`bubble`],to:[`sankey`],size:[`bubble`],trend:[`scatter`,`bubble`],zoom:[`line`,`area`],bands:[`gauge`],centerLabel:[`donut`]},wZ={gauge:240,calendar:200,treemap:340,sankey:340},TZ=100,EZ=72,DZ=32,OZ=[`type`,`title`,`description`,`data`,`x`,`series`,`group`,`to`,`size`,`trend`,`zoom`,`bands`,`stack`,`y`,`target`,`centerLabel`,`height`,`state`,`emptyText`,`errorText`,`loadingText`,`renderer`,`timeZone`],kZ=[`key`,`kind`,`format`,`label`],AZ=[`key`,`label`,`format`],jZ=[`key`,`label`],MZ=[`key`,`label`,`format`],NZ=[`upTo`,`label`],PZ=[`label`,`format`,`min`,`max`,`wholeNumbers`],FZ=[`value`,`label`],IZ=[`style`,`currency`,`unit`,`decimals`,`pattern`],LZ=new Set,RZ=e=>e.map(e=>`"${e}"`).join(` | `),zZ=e=>typeof e==`number`&&Number.isFinite(e),BZ=e=>typeof e==`object`&&!!e&&!Array.isArray(e),VZ=e=>e?.currency==null||RX(e.currency)?e:{...e,currency:void 0},HZ=e=>[...new Set(e)],UZ=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],WZ=e=>e.reduce((e,t)=>t<e?t:e,1/0),GZ=e=>e.reduce((e,t)=>t>e?t:e,-1/0),KZ=(e,t)=>e.data.map((n,r)=>K(e,t,r)).filter(e=>e!=null),qZ=(e,t)=>t?G(e/t,{style:`percent`}):`-`,JZ=(e,t)=>t==null?`-`:qA(e,t).label,YZ=(e,t,n)=>{if(!t.length)return null;let r=WZ(t),i=GZ(t);return r===i?`${e} is ${G(r,n)}.`:`${e} runs from ${G(r,n)} to ${G(i,n)}.`},XZ=(e,t)=>G(K(e,e.series[0].key,t),e.series[0].format),ZZ=864e5,QZ={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},$Z=[`donut`,`funnel`,`waterfall`,`treemap`,`sankey`,`scatter`,`bubble`],Mx([qh,vv,Gv,fT,Pw,kw,pw,lT,gS,pE,cD,GD,jD,OE,gE,mO,oO,pD,BO,vO,Kk,aA]),eQ=[`series`,`graphic`,`grid`,`xAxis`,`yAxis`,`title`,`visualMap`,`calendar`,`dataZoom`],tQ=e=>String(e).replace(/[{}]/g,e=>e===`{`?`{`:`}`),nQ=(e,t)=>{let n=e.filter(e=>e!=null&&Number.isFinite(e));return[Math.min(...t?[0,...n]:n),Math.max(...t?[0,...n]:n)]},rQ=24,iQ=4,aQ=.6,oQ=(e,t)=>String(e).length*t*aQ,sQ=e=>e.map(e=>e/255).map(e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4).reduce((e,t,n)=>e+t*[.2126,.7152,.0722][n],0),cQ=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05),lQ=(e,t)=>({type:`linear`,x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:vj(e,t)},{offset:1,color:vj(e,0)}]}),uQ=(e,t)=>e+dA(e,t),dQ=e=>[...new Set(e)],fQ=(e,t)=>e.data.map((n,r)=>K(e,t,r)),pQ=(e,t,n={})=>({type:`category`,data:t,axisLine:{lineStyle:{color:e.axis}},axisTick:{show:!1},axisLabel:{color:e.label,fontSize:12,margin:12,hideOverlap:!0},...n}),mQ=(e,t,n={})=>({type:`value`,splitNumber:4,axisLine:{show:!1},axisTick:{show:!1},splitLine:{lineStyle:{color:e.grid,type:`solid`,width:1}},axisLabel:{color:e.label,fontSize:12,formatter:t},...n}),hQ=6048e5,gQ=(e,t)=>{let n=uA(e,t);return`${n.year}-${String(n.month+1).padStart(2,`0`)}-${String(n.day).padStart(2,`0`)}`},_Q=e=>e.reduce((e,t)=>t<e?t:e,1/0),vQ=e=>e.reduce((e,t)=>t>e?t:e,-1/0),yQ=9,bQ=24,xQ=4,SQ=72,CQ=44,wQ=28,TQ=8,EQ=32,DQ=8,OQ=26,kQ={donut:Tj,heatmap:Oj,calendar:Aj,funnel:jj,gauge:Mj,waterfall:Fj,treemap:Lj,sankey:zj,scatter:Vj,bubble:Vj,multiples:Hj},AQ=typeof HTMLElement>`u`?class{}:HTMLElement,jQ=`wui-chart:select`,MQ=`wui-chart:legend-change`,NQ=`wui-chart:ready`,PQ=[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`Escape`],FQ=`(prefers-color-scheme: dark)`,IQ=`(prefers-reduced-motion: reduce)`,LQ=e=>typeof window.matchMedia==`function`?window.matchMedia(e):null,RQ=!1,zQ=new Set,BQ=null,VQ=(e,t,n)=>{let r=document.createElement(e);return t&&(r.className=t),n!=null&&(r.textContent=n),r},HQ=0,UQ=class extends AQ{static get observedAttributes(){return[`view`]}constructor(){super(),HQ+=1,this.uid=`wui-chart-${HQ}`,this._spec=null,this._normal=null,this._hidden=new Set,this._focus=null}get spec(){return this._spec}set spec(e){this._spec=e??null,this._normal=null,this._clearFocus(),this._parts&&this._update()}get view(){return this.getAttribute(`view`)===`table`?`table`:`chart`}set view(e){this.setAttribute(`view`,String(e??`chart`))}connectedCallback(){if(Object.hasOwn(this,`spec`)){let e=this.spec;delete this.spec,this._spec=e??null}this._spec??=this._readScript(),this._spec==null&&!this.querySelector(`:scope > script[type='application/json']`)&&(this._awaitingSpec=!0,queueMicrotask(()=>{this._awaitingSpec=!1,this._parts&&this._update()})),this._build(),Yj(this),this._theme=Jj(this),this._width=this.clientWidth,this._resizeObserver=new ResizeObserver(()=>this._resized()),this._resizeObserver.observe(this),typeof IntersectionObserver==`function`?(this._visible=!1,this._intersection=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(this._intersection.disconnect(),this._visible=!0,this._update())},{threshold:.05}),this._intersection.observe(this)):this._visible=!0,this._update()}disconnectedCallback(){Xj(this),this._resizeObserver?.disconnect(),this._intersection?.disconnect(),this._engine?.dispose(),this._engine=null,this._drawn=!1,this._parts=null,this.removeAttribute(`data-ready`)}attributeChangedCallback(e,t,n){t!==n&&this._parts&&(wA(`view`,n,uZ),this._update())}toCsv(){let{spec:e}=this._normalized();return e?cj(e):``}toPng(){let{spec:e}=this._normalized();return e?Kj(e,this._theme??Jj(this),this._size(e),{hidden:this._hidden,renderer:RA(e)}):``}exportCsv(e){let t=URL.createObjectURL(new Blob([this.toCsv()],{type:`text/csv;charset=utf-8`}));Zj(t,e??`${lj(this._normalized().spec)}.csv`),setTimeout(()=>URL.revokeObjectURL(t),2e3)}exportPng(e){let t=this.toPng();t&&Zj(t,e??`${lj(this._normalized().spec)}.png`)}_readScript(){let e=this.querySelector(`:scope > script[type="application/json"]`);if(!e)return null;try{return JSON.parse(e.textContent)}catch(e){return sA(`[@webority/ui-elements] <wui-chart> could not read its JSON spec:`,e?.message),null}}_normalized(){return this._normal??=DA(this._spec),this._normal}_build(){let e=VQ(`div`,`wui-chart-legend`);e.setAttribute(`role`,`group`),e.setAttribute(`aria-label`,`Legend`),e.hidden=!0,e.addEventListener(`click`,e=>{let t=e.target.closest?.(`.wui-chart-legend-item`);t&&this._toggle(t.dataset.key)});let t=VQ(`div`,`wui-chart-surface`);t.tabIndex=0,t.setAttribute(`role`,`group`),t.setAttribute(`aria-roledescription`,`chart`),t.addEventListener(`keydown`,e=>this._onKey(e)),t.addEventListener(`blur`,()=>this._clearFocus());let n=VQ(`div`,`wui-chart-canvas`);n.setAttribute(`aria-hidden`,`true`),t.append(n);let r=VQ(`div`,`wui-chart-state`);r.setAttribute(`role`,`status`),r.hidden=!0;let i=VQ(`div`,`wui-chart-table-wrap visually-hidden`),a=VQ(`p`,`visually-hidden`);a.id=`${this.uid}-summary`;let o=VQ(`div`,`visually-hidden`);o.setAttribute(`aria-live`,`polite`),this.replaceChildren(e,t,r,i,a,o),this.setAttribute(`role`,`figure`),this.setAttribute(`aria-describedby`,a.id),this._parts={legend:e,surface:t,canvas:n,state:r,tableWrap:i,summary:a,live:o},this._legendSignature=null,this._tableSpec=null}_size(e){return{width:this._parts?.surface.clientWidth||this.clientWidth||800,height:e.height}}_update(){if(!this._parts||this._awaitingSpec&&this._spec==null)return;let{spec:e,problem:t}=this._normalized(),n=this._parts,r=t?`error`:e.state===`ready`&&(!e.data.length||!jA(e))?`empty`:e.state,i=`${e?.height??320}px`,a=this.view===`table`,o=e&&(r===`ready`||r===`loading`&&this._drawn),s=r===`loading`&&o;if(this.setAttribute(`aria-label`,e?.title||`Chart`),r===`loading`?this.setAttribute(`aria-busy`,`true`):this.removeAttribute(`aria-busy`),this.setAttribute(`data-state`,r),n.surface.setAttribute(`aria-label`,`${e?.title||`Chart`}: use the arrow keys to read the values`),n.summary.textContent=e?uj(e,this._hidden):``,e){if(!s){let t=new Set(zA(e));for(let e of this._hidden)t.has(e)||this._hidden.delete(e)}this._renderTable(e)}else n.tableWrap.replaceChildren();s||this._renderLegend(e,o&&!a),this._renderState(r,t??(r===`error`?e.errorText:r===`loading`?e?.loadingText??`Loading chart`:e?.emptyText),i,o);let c=r===`ready`&&!a;s||this.toggleAttribute(`data-ready`,!c);let l=n.surface.hidden&&o&&!a;n.surface.hidden=!o||a,n.surface.style.height=i,n.tableWrap.className=a&&e?`wui-chart-table-wrap`:`wui-chart-table-wrap visually-hidden`,n.tableWrap.style.height=a&&e?i:``,a&&e?(n.tableWrap.tabIndex=0,n.tableWrap.setAttribute(`role`,`region`),n.tableWrap.setAttribute(`aria-label`,`${e.title||`Chart`} data`)):(n.tableWrap.removeAttribute(`tabindex`),n.tableWrap.removeAttribute(`role`),n.tableWrap.removeAttribute(`aria-label`)),l&&this._engine?.resize(),r===`ready`&&!a&&this._visible&&this._draw()}_renderState(e,t,n,r){let i=this._parts.state,a=!r&&e!==`ready`;i.hidden=!a,a?(i.style.height=n,e===`loading`?i.replaceChildren(VQ(`div`,`skeleton wui-chart-skeleton`),VQ(`span`,`visually-hidden`,t)):i.replaceChildren(VQ(`p`,`wui-chart-state-text`,t))):i.replaceChildren()}_colour(e,t){return e.type===`donut`?QA(e,t,this._theme):this._theme.palette[t]}_renderLegend(e,t){let n=this._parts.legend,r=e?zA(e):[],i=!!e&&t&&r.length>=2;if(n.hidden=!i,!i)return;let a=BA(e),o=r.map((t,n)=>this._colour(e,n)),s=JSON.stringify([e.type,r,a,o]);s!==this._legendSignature&&(this._legendSignature=s,n.replaceChildren(...r.map((t,n)=>{let r=VQ(`button`,`wui-chart-legend-item`);r.type=`button`,r.dataset.key=t;let i=VQ(`span`,e.type===`line`?`wui-chart-legend-swatch wui-chart-legend-swatch-line`:`wui-chart-legend-swatch`);return i.style.background=o[n],r.append(i,VQ(`span`,`wui-chart-legend-label`,a[n])),r})));for(let e of n.children)e.setAttribute(`aria-pressed`,String(!this._hidden.has(e.dataset.key)))}_renderTable(e){if(this._tableSpec===e)return;this._tableSpec=e;let t=aj(e),n=VQ(`table`,`wui-chart-table`);n.append(VQ(`caption`,`visually-hidden`,t.caption));let r=VQ(`tr`);t.head.forEach((e,t)=>{let n=VQ(`th`,t?`wui-chart-num`:null,e);n.scope=`col`,r.append(n)});let i=VQ(`thead`);i.append(r),n.append(i);let a=VQ(`tbody`);for(let e of t.rows){let t=VQ(`tr`),n=VQ(`th`,null,e.head);n.scope=`row`,t.append(n,...e.cells.map(e=>VQ(`td`,`wui-chart-num`,e))),a.append(t)}n.append(a);let o=[n];t.truncated&&o.push(VQ(`p`,`wui-chart-table-note`,`Showing the first ${t.rows.length} of ${t.total} rows. Download the CSV for all of them.`)),this._parts.tableWrap.replaceChildren(...o)}_draw(){let{spec:e}=this._normalized(),t=RA(e),n=e.type!==this._drawnType;this._engine&&this._engine.renderer!==t&&(this._engine.dispose(),this._engine=null);let r=`${e.height}px`,i=this._parts.canvas.style.height!==r;this._parts.canvas.style.height=r,i&&this._engine?.resize(),this._engine||(this._engine=qj(this._parts.canvas,{renderer:t}),this._engine.onSelect(({seriesIndex:e,dataIndex:t})=>this._select(e,t)),this._engine.onFinished(()=>{this.setAttribute(`data-ready`,``),this._announcedReady||(this._announcedReady=!0,this.dispatchEvent(new CustomEvent(NQ,{bubbles:!0,detail:{renderer:t}})))}),n=!0),this._engine.render(e,this._theme,this._size(e),{hidden:this._hidden,renderer:t},{replace:n}),this._drawnType=e.type,this._drawn=!0}_themeChanged(){if(!this._parts)return;let e=Jj(this);JSON.stringify(e)!==JSON.stringify(this._theme)&&(this._theme=e,this._update())}_resized(){let e=this.clientWidth;e!==this._width&&(this._width=e,this._engine&&this._drawn&&(this._parts.surface.hidden||this._engine.resize(),this._update()))}_toggle(e){let{spec:t}=this._normalized();if(!t||e==null)return;this._hidden.has(e)?this._hidden.delete(e):this._hidden.add(e),this._clearFocus(),this._update();let n=Object.fromEntries(zA(t).map(e=>[e,!this._hidden.has(e)]));this.dispatchEvent(new CustomEvent(MQ,{bubbles:!0,detail:{visible:n}}))}_onKey(e){let{spec:t}=this._normalized();if(!t||!this._engine||this.view===`table`||e.altKey||e.ctrlKey||e.metaKey)return;if(e.key===`Enter`){if(!this._focus)return;e.preventDefault(),this._select(this._focus.series,this._focus.index);return}if(!PQ.includes(e.key)||e.key===`Escape`&&!this._focus)return;e.preventDefault();let n=mj(t,this._focus,e.key,this._hidden);n?(this._focus=n,this._engine.focusPoint(n.series,n.index),this._announce(rj($A(t,n.index,this._hidden,this._theme)))):this._clearFocus()}_announce(e){let t=this._parts.live;t.textContent=e===t.textContent?`${e}\u00a0`:e}_clearFocus(){this._focus&&(this._focus=null,this._engine?.clearFocus(),this._parts&&(this._parts.live.textContent=``))}_select(e,t){let{spec:n}=this._normalized(),r=n?.series[yZ(n.type)?0:e];if(!r)return;let i=n.data[t]??null;this.dispatchEvent(new CustomEvent(jQ,{bubbles:!0,detail:{series:r.key,label:r.label,x:i?.[n.x.key]??null,value:K(n,r.key,t),row:i,index:t}}))}},typeof customElements<`u`&&!customElements.get(`wui-chart`)&&customElements.define(`wui-chart`,UQ)})),GQ=null;async function KQ(){await Promise.resolve().then(()=>(WQ(),Qn)),await customElements.whenDefined(`wui-chart`)}async function qQ(){return GQ??=KQ().catch(e=>{throw GQ=null,e}),GQ}var JQ={sub:`wui-chat-sub`,sup:`wui-chat-sup`};function YQ(e,t){let n=e.ownerDocument;for(let r of t){if(JQ[r.kind]===void 0){e.append(n.createTextNode(r.text));continue}let t=n.createElement(r.kind);t.className=JQ[r.kind],t.textContent=r.text,e.append(t)}}function XQ(e,t){e.replaceChildren(),YQ(e,_e(String(t??``)))}function ZQ(e){return ve(String(e??``))}function QQ(e){return ye(e)}var $Q=8,e$={Bar:`column`,Line:`line`,Donut:`donut`};function t$(e,t){return e===`Bar`&&t>4?300:240}function n$(e,t){let n=e.chartType===`Donut`,r=n?e.series.slice(0,1):e.series.slice(0,$Q),i=r.map((e,n)=>({key:`s${n}`,label:ZQ(e.name)||t.chart})),a=Object.fromEntries(i.map(e=>[e.key,null])),o=new Map;r.forEach((e,t)=>{for(let n of e.points){let e=String(n.label);o.has(e)||o.set(e,{label:ZQ(e),...a}),o.get(e)[`s${t}`]=n.value}});let s=[...o.values()],c={type:e$[e.chartType],title:ZQ(e.title)||t.chart,x:{key:`label`,kind:`category`},series:i,data:s,height:t$(e.chartType,s.length)};return!n&&e.unit&&(c.y={label:ZQ(e.unit)}),s.length===0&&(c.state=`empty`,c.emptyText=t.chartEmpty),c}Vn(`wui-chat-part-chart`,class extends Bn{#e=null;#t=0;#n=!1;#r=null;#i=null;#a=null;#o=null;#s=null;renderPart(e,t,n){let r=JSON.stringify(e);if(r===this.#e)return;this.#e=r,this.#t+=1;let i=this.#t,a=this.ownerDocument;if(this.#r||(this.#r=N(a,`figure`,`wui-chat-chart`),this.#a=N(a,`div`,`wui-chat-chart-body`),this.#r.append(this.#a),this.replaceChildren(this.#r)),this.#i?.remove(),this.#i=null,e.title&&(this.#i=N(a,`figcaption`,`wui-chat-chart-title`),XQ(this.#i,e.title),this.#r.prepend(this.#i)),this.#n){let t=n$(e,n.labels);this.#o.spec=t,this.#c(t.state!==`empty`,n.labels)}else qQ().then(()=>{if(i!==this.#t||!this.isConnected)return;let t=n$(e,n.labels);this.#o=a.createElement(`wui-chart`),this.#o.spec=t,this.#n=!0,this.#a.replaceChildren(this.#o),this.#c(t.state!==`empty`,n.labels)},()=>{i===this.#t&&this.isConnected&&this.#u(n.labels)})}disposePart(){this.#t+=1,this.#e=null}#c(e,t){if(!e){this.#s?.remove(),this.#s=null;return}this.#s||(this.#s=N(this.ownerDocument,`button`,`btn btn-link btn-sm wui-chat-chart-toggle`),this.#s.type=`button`,this.#s.addEventListener(`click`,()=>this.#l()),this.#r.append(this.#s));let n=this.#o.getAttribute(`view`)===`table`;this.#s.setAttribute(`aria-pressed`,String(n)),this.#s.textContent=n?t.chartShowChart:t.chartShowTable}#l(){let e=this.#o.getAttribute(`view`)!==`table`;this.#o.setAttribute(`view`,e?`table`:`chart`),this.#c(!0,this.turn.labels)}#u(e){let t=N(this.ownerDocument,`p`,`wui-chat-chart-error`,e.chartLoadFailed);t.setAttribute(`role`,`status`),this.#a.replaceChildren(t),this.#s?.remove(),this.#s=null}});var r$={Positive:`wui-metric-tone-success`,Caution:`wui-metric-tone-warning`,Negative:`wui-metric-tone-danger`},i$=new Set([`Positive`,`Caution`,`Negative`]),a$=.001;function o$(e,t,n){let r=r$[t.status],i=N(e,`div`,r?`wui-metric ${r}`:`wui-metric`);i.dataset.status=t.status;let a=N(e,`div`,`wui-metric-label`);XQ(a,t.label);let o=N(e,`div`,`wui-metric-value`);if(YQ(o,t.value!==0&&Math.abs(t.value)<a$?QQ(t.value):[{kind:`text`,text:In(t.value)}]),t.unit){let n=N(e,`span`,`wui-chat-figure-unit`);XQ(n,t.unit),n.prepend(` `),o.append(n)}return i$.has(t.status)&&o.append(N(e,`span`,`visually-hidden`,n.figureStatus(t.status))),i.append(a,o),i}Vn(`wui-chat-part-figures`,class extends Bn{#e=null;renderPart(e,t,n){let r=JSON.stringify(e);if(r===this.#e)return;if(this.#e=r,!e.figures||e.figures.length===0){this.replaceChildren();return}let i=this.ownerDocument,a=N(i,`div`,`wui-chat-figures`),o=N(i,`div`,`wui-metric-strip wui-metric-strip-sm wui-chat-figures-strip`);o.setAttribute(`role`,`group`),o.setAttribute(`aria-label`,n.labels.figures);for(let t of e.figures)o.append(o$(i,t,n.labels));a.append(o),this.replaceChildren(a)}}),Vn(`wui-chat-part-file`,class extends Bn{renderPart(e,t,n){let r=typeof n.openAttachment==`function`,i=document.createElement(r?`button`:`span`);i.className=`wui-chat-file-chip`,r&&(i.type=`button`,i.setAttribute(`aria-label`,n.labels.fileOpen(e.fileName)),i.addEventListener(`click`,()=>n.openAttachment(e)));let a=Hn(document,`document-text`,16),o=document.createElement(`span`);o.className=`wui-chat-file-name`,o.textContent=e.fileName;let s=document.createElement(`span`);s.className=`wui-chat-file-size`,s.textContent=tt(e.length),i.append(...[a,o,s].filter(Boolean));let c=document.createElement(`div`);c.className=`wui-chat-file`,c.append(i),this.replaceChildren(c)}});var s$=`AppButton`,c$={primary:`btn-primary`,secondary:`btn-soft-primary`,ghost:`btn-ghost-primary`,outline:`btn-outline-primary`,neutral:`btn-soft-neutral`,danger:`btn-danger`};function $(e,t,n){let r=document.createElement(e);if(t&&(r.className=t),n)for(let[e,t]of Object.entries(n))t!=null&&r.setAttribute(e,t);return r}function l$(e,t=16){let n=Rn(e,{size:t});if(!n)return $(`span`,`d-inline-flex`);let r=document.createElement(`template`);return r.innerHTML=n,r.content.firstElementChild??$(`span`,`d-inline-flex`)}function u$(e=`primary`,t=`md`){if(!Object.hasOwn(c$,e))throw Error(`Unknown button variant "${e}". Use one of ${Object.keys(c$).join(`, `)}.`);return`btn ${c$[e]}${t===`sm`?` btn-sm`:``}`}function d$(e,t,n,r){let i=$(`button`,`${u$(e,`sm`)} wui-chat-action-btn`,{type:`button`});return i.dataset.wui=s$,n&&i.append(l$(n,14)),i.append(document.createTextNode(t)),i.addEventListener(`click`,r),i}function f$(e,t,n){let r=$(`button`,`wui-chat-icon-btn`,{type:`button`,"aria-label":e,title:e});return r.append(l$(t,20)),r.addEventListener(`click`,n),r}function p$(e,t){let n=e.getAttribute(t);if(n!=null&&n!==``)try{return JSON.parse(n)}catch{throw Error(`<wui-chat ${t}> must be valid JSON.`)}}function m$(e){let t=null;return n=>{let r=e.dataset.state;(!n||r!==`open`&&r!==`opening`)&&(n||r!==`closed`&&r!==`closing`)&&(clearTimeout(t),n?(e.dataset.state=`opening`,t=setTimeout(()=>{e.dataset.state=`open`},620)):(e.dataset.state=`closing`,t=setTimeout(()=>{e.dataset.state=`closed`},300)))}}function h$(e,t){t.position!==void 0&&(e.classList.toggle(`wui-chat--end`,t.position===`end`),e.classList.toggle(`wui-chat--start`,t.position===`start`)),t.reduced!==void 0&&e.classList.toggle(`wui-chat--reduced`,!!t.reduced),t.offsetX!==void 0&&e.style.setProperty(`--wui-chat-offset-x`,`${t.offsetX}px`),t.offsetY!==void 0&&e.style.setProperty(`--wui-chat-offset-y`,`${t.offsetY}px`),t.width!==void 0&&e.style.setProperty(`--wui-chat-width`,t.width),t.maxHeight!==void 0&&e.style.setProperty(`--wui-chat-panel-max-height`,`${t.maxHeight}px`),t.bottomGap!==void 0&&e.style.setProperty(`--wui-chat-bottom-gap`,`${t.bottomGap}px`)}var g$=[`Text`,`Sources`,`QuickReplies`,`InputRequest`,`Action`,`Notice`,`Table`,`Chart`,`Figures`,`RecordCard`,`Image`,`File`,`Ticket`,`Handoff`,`VoiceClip`],_$={launcher:`wui-chat--launcher`,docked:`wui-chat--docked`,"full-page":`wui-chat--full-page`,embedded:`wui-chat--embedded`};function v$(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function y$({id:e,layout:t,position:n,role:r,launcher:i,onToggle:a}){let o=$(`div`,`wui-chat ${_$[t]} wui-chat--${n}`),s=$(`section`,`wui-chat-panel`,{id:e,role:r}),c=i?m$(o):null;o.dataset.state=i?`closed`:`open`;let l=null,u=null,d=null,f=null,p=null,m=null,h=null,g=`round`,_=!1,v=`bubble`,y=null,b=null,x=!1,S=!1;function C(){let e=l.dataset.launcher,t=[`wui-chat-launcher-wrap`];e===`entering`&&y&&t.push(`wui-chat-launcher--entrance-${y}`),e===`idle`&&b&&b!==`none`&&(b!==`ring`||g===`pill`)&&t.push(`wui-chat-launcher--idle-${b}`),l.className=t.join(` `)}function w(){let e=[...u.classList].filter(e=>e.endsWith(`--opening`)||e.endsWith(`--closing`)),t=[`wui-chat-launcher`,`wui-chat-launcher--${g}`];g===`pill`&&_&&t.push(`wui-chat-launcher--compact`),t.push(`wui-chat-launcher--reveal-${v}`,...e),u.className=t.join(` `)}function T(){p&&m&&(p.textContent=h||m.launcher)}if(i){l=$(`div`,`wui-chat-launcher-wrap`),l.dataset.launcher=`idle`,u=$(`button`,`wui-chat-launcher`,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":`false`,"aria-controls":e}),d=$(`span`,`wui-chat-launcher-icon`,{"aria-hidden":`true`}),d.append(l$(`chat`,24));let t=$(`span`,`wui-chat-launcher-close`,{"aria-hidden":`true`});t.append(l$(`x`,24)),f=$(`span`,`wui-chat-launcher-label`),u.append(d,t,f),u.addEventListener(`click`,()=>a()),u.addEventListener(`animationend`,e=>{e.target===u&&u.classList.remove(`wui-chat-launcher--opening`,`wui-chat-launcher--closing`)}),p=$(`span`,`wui-chat-launcher-bubble`,{"aria-hidden":`true`}),l.append(u,p),l.addEventListener(`animationend`,e=>{e.target===l&&l.dataset.launcher===`entering`&&(l.dataset.launcher=`idle`,C())}),w(),C(),o.append(l,s)}else o.append(s);function E(e){if(c){if(e&&!S&&u){let e=u.getBoundingClientRect(),t=s.getBoundingClientRect();s.style.transformOrigin=`${e.left+e.width/2-t.left}px ${e.top+e.height/2-t.top}px`}e!==S&&u&&(u.classList.remove(`wui-chat-launcher--opening`,`wui-chat-launcher--closing`),u.classList.add(e?`wui-chat-launcher--opening`:`wui-chat-launcher--closing`)),S=e,c(e),u&&(u.setAttribute(`aria-expanded`,String(e)),m&&u.setAttribute(`aria-label`,e?m.launcherClose:m.launcher))}}function D(e){m=e,u&&(u.setAttribute(`aria-label`,S?e.launcherClose:e.launcher),f.textContent=e.launcher,T())}function O(e){if(h$(o,e),e.theme!==void 0&&(e.theme===`light`||e.theme===`dark`?o.dataset.theme=e.theme:delete o.dataset.theme),!u)return;e.launcherStyle!==void 0&&(g=e.launcherStyle===`Pill`?`pill`:`round`),e.compact!==void 0&&(_=e.compact),e.labelReveal!==void 0&&(v=e.labelReveal===`Expand`?`expand`:`bubble`),e.entrance!==void 0&&(y=e.entrance===`None`?null:v$(e.entrance)),e.idle!==void 0&&(b=e.idle===`None`?`none`:v$(e.idle)),e.phone!==void 0&&(x=e.phone),e.hoverLabel!==void 0&&(h=e.hoverLabel||null),e.icon!==void 0&&e.icon!==d.dataset.icon&&(d.dataset.icon=e.icon,d.replaceChildren(l$(e.icon,24)));let t=e.launcherState??l.dataset.launcher;x&&t===`entering`&&(t=`idle`),t===`entering`&&!y&&(t=`idle`),l.dataset.launcher=t,w(),C(),T()}return{root:o,panel:s,setOpen:E,setLabels:D,setAppearance:O,nudgeHost:l,launcherButton:u,role:r}}var b$={Open:`info`,InProgress:`info`,WaitingOnCustomer:`warning`,Resolved:`success`,Closed:`neutral`,Cancelled:`neutral`},x$=/^\/[/\\]/,S$=/^https?:\/\//i,C$=/[\t\r\n]/g;function w$(e){return typeof e==`string`&&e.trim()!==``}function T$(e){return e.replace(C$,``)}function E$(e){if(typeof e!=`string`)return!1;let t=T$(e);return t.startsWith(`/`)?!x$.test(t):S$.test(t)}function D$(e){if(typeof e!=`string`)return`?`;let t=e.split(/\s+/).filter(Boolean).slice(0,2).map(e=>[...e][0].toUpperCase()).join(``);return t===``?`?`:t}function O$(e,t){let n=D$(w$(e?.displayName)?e.displayName:t),r=$(`span`,`wui-chat-avatar`,{"aria-hidden":`true`}),i=typeof e?.avatarUrl==`string`?T$(e.avatarUrl):null;if(E$(i)){let e=$(`img`,null,{alt:``,src:i,loading:`lazy`});e.addEventListener(`error`,()=>{r.textContent=n}),r.append(e)}else r.textContent=n;return r}function k$(e,t){let n=$(`div`,`wui-chat-agent-head`),r=$(`span`,`wui-chat-agent-name`);r.textContent=w$(e?.displayName)?e.displayName:t.agent;let i=$(`span`,`wui-chat-agent-role wui-chat-agent-tag`);return i.textContent=t.agent,n.append(O$(e,t.agent),r,i),n}function A$(e,t){let n=e.displayName,r=$(`li`,`wui-chat-message wui-chat-message--agent wui-chat-message--typing`),i=$(`span`,`wui-chat-typing`);for(let e=0;e<3;e+=1)i.append($(`span`,`wui-chat-typing-dot`,{"aria-hidden":`true`}));let a=$(`span`,`visually-hidden`);return a.textContent=t.agentTyping(w$(n)?n:t.agent),r.append(k$({kind:`Agent`,displayName:n,avatarUrl:null},t),i,a),r}function j$(e){return Object.hasOwn(b$,e)?b$[e]:null}function M$(e,t){return j$(e)===null?``:t.ticketStatus(e)}var N$=new Set([`Requested`,`Waiting`]),P$=new Set([`Requested`,`Waiting`,`Joined`]),F$=P$;function I$(e,t){let n=e?.displayName;return typeof n==`string`&&n.trim()!==``?n:t.handoffAgentFallback}function L$(){let e=$(`div`,`wui-chat-handoff-pulses`);for(let t=0;t<3;t+=1)e.append($(`span`,`wui-chat-handoff-pulse`,{"aria-hidden":`true`}));return e}function R$(e,t,n){let r=$(e,t);return r.textContent=n,r}function z$(e,t){let n=$(`div`,`wui-chat-handoff-body`);return n.append(R$(`strong`,`wui-chat-handoff-title`,e),R$(`p`,`wui-chat-handoff-text`,t)),n}function B$(e,t){if(typeof e.queuePosition!=`number`){let e=$(`span`,`wui-chat-system-line-stack`);return e.append(R$(`p`,`wui-chat-handoff-text`,t.handoffWaiting),R$(`p`,`wui-chat-handoff-text`,t.handoffQueuedText)),[L$(),e]}let n=$(`span`,`wui-chat-handoff-position`,{"aria-hidden":`true`});return n.textContent=String(e.queuePosition),[n,z$(t.handoffQueued(e.queuePosition),t.handoffQueuedText)]}function V$(e,t){let n=I$(e.agent,t),r=$(`span`,`wui-chat-handoff-agent`);return r.append(O$(e.agent,t.handoffAgentFallback),$(`span`,`wui-chat-handoff-online`,{"aria-hidden":`true`})),[r,z$(t.handoffJoined(n),t.handoffJoinedText(n))]}function H$(e,t){switch(e.state){case`Requested`:return[L$(),R$(`p`,`wui-chat-handoff-text`,t.handoffRequested)];case`Waiting`:return B$(e,t);case`Joined`:return V$(e,t);case`Left`:return[z$(t.handoffLeft(I$(e.agent,t)),t.handoffLeftText)];case`Ended`:return[z$(t.handoffEnded,t.handoffEndedText)];default:return null}}Vn(`wui-chat-part-handoff`,class extends Bn{constructor(){super(),this._signature=null}renderPart(e,t,n){let r=n.isLast,i=n.handoffSettled===!0&&N$.has(e.state),a=JSON.stringify([e.state,e.queuePosition,e.agent,r,n.features.HumanHandoff,n.busy,i]);if(a===this._signature)return;if(this._signature=a,i){this.replaceChildren();return}let o=H$(e,n.labels);if(o===null){this.replaceChildren();return}let s=$(`div`,`wui-chat-handoff wui-chat-handoff--${e.state.toLowerCase()}`);if(r&&N$.has(e.state)&&s.classList.add(`wui-chat-handoff--live`),r&&P$.has(e.state)&&s.setAttribute(`role`,`status`),F$.has(e.state)){s.classList.add(`wui-chat-system-line`);let e=$(`span`,`wui-chat-system-line-content`);e.append(...o),s.append(e)}else s.append(...o);this.replaceChildren(s)}});function U$(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let e of Object.keys(r)){let i=Object.getOwnPropertyDescriptor(t.prototype,e);i&&(i.set||i.get)&&(n.push([r,e,r[e]]),delete r[e])}customElements.define(e,t);for(let[e,t,r]of n)e[t]=r}var W$=typeof HTMLElement>`u`?class{}:HTMLElement,G$=`a.wui-lightbox-item`,K$=1,q$=4,J$=.5,Y$=2,X$=50,Z$=6,Q$=300,$$=300;function e1(e){return Number.isFinite(e)?Math.min(q$,Math.max(K$,e)):K$}function t1(e,t,n,r){let i=(e,n)=>Math.max(0,(e*t-n)/2),a=i(r.width,n.width),o=i(r.height,n.height);return{x:Math.min(a,Math.max(-a,e.x)),y:Math.min(o,Math.max(-o,e.y))}}function n1(e,t){return Math.abs(e)<X$||Math.abs(e)<Math.abs(t)*1.5?0:e<0?1:-1}function r1(e){let t=String(e??``).split(/[?#]/)[0].split(`/`).filter(Boolean).pop()??``;try{return decodeURIComponent(t)}catch{return t}}function i1(e,t,n={}){let r=document.createElement(e);r.className=t;for(let[e,t]of Object.entries(n))r.setAttribute(e,t);return r}function a1(e,t,n){let r=i1(`button`,`u-action wui-lightbox-btn ${n}`,{type:`button`,"aria-label":t,title:t});return r.style.setProperty(`--wui-action-size`,`40px`),r.innerHTML=Rn(e,{size:20}),r}U$(`wui-lightbox`,class extends W${static get observedAttributes(){return[`open-index`]}constructor(){super(),this._ui=null,this._index=0,this._zoom=K$,this._pan={x:0,y:0},this._pointers=new Map,this._gesture=null,this._lastTap=-1/0,this._returnTo=null,this._lockedOverflow=null,this._onClick=e=>{if(e.defaultPrevented||e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;let t=e.target?.closest?.(G$);if(!t||!this.contains(t))return;let n=this._links().indexOf(t);n<0||(e.preventDefault(),this.open(n))}}get download(){return this.hasAttribute(`download`)}set download(e){this.toggleAttribute(`download`,e===!0||e===``||e===`true`)}get label(){return this.getAttribute(`label`)||`Image viewer`}set label(e){this.setAttribute(`label`,String(e??``))}get isOpen(){return this._ui!==null}connectedCallback(){this.addEventListener(`click`,this._onClick),this._syncOpenIndex()}disconnectedCallback(){this.removeEventListener(`click`,this._onClick),this._teardown()}attributeChangedCallback(){this.isConnected&&this._syncOpenIndex()}_syncOpenIndex(){let e=this.getAttribute(`open-index`);e===null?this.close():this.open(Number(e))}_links(){return[...this.querySelectorAll(G$)]}_items(){return this._links().map(e=>{let t=e.getAttribute(`href`)??``;return{link:e,src:t,alt:e.querySelector(`img`)?.getAttribute(`alt`)??``,caption:e.dataset.caption??``,name:e.dataset.name||r1(t)}})}open(e=0){let t=this._items();return t.length?(this._ui||(this._returnTo=document.activeElement,this._build(),this.dispatchEvent(new CustomEvent(`wui-lightbox:open`,{bubbles:!0,detail:{index:e}}))),this._show(e,t),this._ui.close.focus(),!0):!1}close(){if(!this._ui)return;let e=this._index,t=this._links()[e]??this._returnTo;this._teardown(),t?.isConnected&&t.focus(),this._returnTo=null,this.dispatchEvent(new CustomEvent(`wui-lightbox:close`,{bubbles:!0,detail:{index:e}}))}_teardown(){this._ui&&(this._ui.root.remove(),this._ui=null,this._pointers.clear(),this._gesture=null,this._lockedOverflow!==null&&(document.documentElement.style.overflow=this._lockedOverflow,this._lockedOverflow=null))}_build(){let e=i1(`div`,`wui-lightbox-overlay`,{role:`dialog`,"aria-modal":`true`,"aria-label":this.label,tabindex:`-1`}),t=i1(`div`,`wui-lightbox-bar`),n=i1(`span`,`wui-lightbox-count`,{"aria-live":`polite`}),r=i1(`div`,`wui-lightbox-tools`),i=a1(`zoom-out`,`Zoom out`,`wui-lightbox-zoom-out`),a=a1(`zoom-in`,`Zoom in`,`wui-lightbox-zoom-in`),o=i1(`a`,`u-action wui-lightbox-btn wui-lightbox-download`,{"aria-label":`Download`,title:`Download`});o.style.setProperty(`--wui-action-size`,`40px`),o.innerHTML=Rn(`download`,{size:20}),o.hidden=!this.download;let s=a1(`x`,`Close`,`wui-lightbox-close`);r.append(i,a,o,s),t.append(n,r);let c=i1(`div`,`wui-lightbox-stage`),l=a1(`chevron-left`,`Previous image`,`wui-lightbox-nav wui-lightbox-prev`),u=a1(`chevron-right`,`Next image`,`wui-lightbox-nav wui-lightbox-next`),d=i1(`img`,`wui-lightbox-image`,{decoding:`async`,draggable:`false`,alt:``}),f=i1(`p`,`wui-lightbox-status`,{role:`status`});c.append(d,f,l,u);let p=i1(`p`,`wui-lightbox-caption`);e.append(t,c,p);let m={root:e,count:n,zoomOut:i,zoomIn:a,download:o,close:s,stage:c,prev:l,next:u,image:d,status:f,caption:p};this._ui=m,s.addEventListener(`click`,()=>this.close()),l.addEventListener(`click`,()=>this.step(-1)),u.addEventListener(`click`,()=>this.step(1)),i.addEventListener(`click`,()=>this._setZoom(this._zoom-J$)),a.addEventListener(`click`,()=>this._setZoom(this._zoom+J$)),e.addEventListener(`keydown`,e=>this._onKeyDown(e)),c.addEventListener(`pointerdown`,e=>this._onPointerDown(e)),c.addEventListener(`pointermove`,e=>this._onPointerMove(e)),c.addEventListener(`pointerup`,e=>this._onPointerEnd(e,!0)),c.addEventListener(`pointercancel`,e=>this._onPointerEnd(e,!1)),c.addEventListener(`wheel`,e=>this._onWheel(e),{passive:!1}),d.addEventListener(`load`,()=>{this._ui===m&&(f.textContent=``,c.removeAttribute(`aria-busy`),d.hidden=!1,this._applyTransform())}),d.addEventListener(`error`,()=>{this._ui===m&&(c.removeAttribute(`aria-busy`),d.hidden=!0,f.textContent=`This image can't be shown.`)}),this.append(e),this._lockedOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow=`hidden`}step(e){if(!this._ui||!e)return;let t=this._items();t.length<2||this._show((this._index+e+t.length)%t.length,t)}_show(e,t){let n=this._ui,r=Math.min(t.length-1,Math.max(0,Math.trunc(Number(e))||0)),i=t[r],a=r!==this._index||!n.image.getAttribute(`src`);if(this._index=r,this._zoom=K$,this._pan={x:0,y:0},n.count.textContent=`${In(r+1,{decimals:0})} of ${In(t.length,{decimals:0})}`,n.caption.textContent=i.caption,n.caption.hidden=!i.caption,n.download.href=i.src,n.download.setAttribute(`download`,i.name),n.prev.hidden=n.next.hidden=t.length<2,n.stage.setAttribute(`aria-busy`,`true`),n.status.textContent=``,n.image.hidden=!1,n.image.alt=i.alt||i.caption,n.image.src=i.src,this._applyTransform(),this._syncZoomButtons(),t.length>1)for(let e of[t[(r+1)%t.length],t[(r-1+t.length)%t.length]])new Image().src=e.src;a&&this.dispatchEvent(new CustomEvent(`wui-lightbox:change`,{bubbles:!0,detail:{index:r}}))}_syncZoomButtons(){this._ui.zoomOut.disabled=this._zoom<=K$,this._ui.zoomIn.disabled=this._zoom>=q$;let e=document.activeElement;(e===this._ui.zoomOut||e===this._ui.zoomIn)&&e.disabled&&this._ui.close.focus()}_setZoom(e){this._ui&&(this._zoom=e1(e),this._pan=this._clampedPan(this._pan),this._applyTransform(),this._syncZoomButtons())}_clampedPan(e){let{stage:t,image:n}=this._ui;return t1(e,this._zoom,{width:t.clientWidth,height:t.clientHeight},{width:n.offsetWidth,height:n.offsetHeight})}_applyTransform(){let{image:e,stage:t}=this._ui;e.style.transform=`translate(${this._pan.x}px, ${this._pan.y}px) scale(${this._zoom})`,t.classList.toggle(`wui-lightbox-zoomed`,this._zoom>K$)}_onKeyDown(e){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),this.close();else if(e.key===`Tab`)this._trapTab(e);else if(e.key===`ArrowLeft`||e.key===`ArrowRight`)e.preventDefault(),this.step(e.key===`ArrowRight`?1:-1);else if(e.key===`Home`||e.key===`End`){e.preventDefault();let t=this._items();this._show(e.key===`Home`?0:t.length-1,t)}else e.key===`+`||e.key===`=`?(e.preventDefault(),this._setZoom(this._zoom+J$)):e.key===`-`?(e.preventDefault(),this._setZoom(this._zoom-J$)):e.key===`0`&&(e.preventDefault(),this._setZoom(K$))}_trapTab(e){let t=[...this._ui.root.querySelectorAll(`button, a[href]`)].filter(e=>!e.hidden&&!e.disabled);if(!t.length){e.preventDefault();return}let n=t[0],r=t[t.length-1],i=document.activeElement;e.shiftKey&&(i===n||!this._ui.root.contains(i))?(e.preventDefault(),r.focus()):e.shiftKey||i!==r&&this._ui.root.contains(i)||(e.preventDefault(),n.focus())}_onWheel(e){e.preventDefault(),this._setZoom(this._zoom*(e.deltaY<0?1.15:1/1.15))}_onPointerDown(e){if(!e.target.closest(`.wui-lightbox-nav`)){if(this._ui.stage.setPointerCapture?.(e.pointerId),this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),this._pointers.size===2){let[e,t]=[...this._pointers.values()];this._gesture={kind:`pinch`,distance:Math.hypot(e.x-t.x,e.y-t.y)||1,zoom:this._zoom}}else this._pointers.size===1&&(this._gesture={kind:`drag`,startX:e.clientX,startY:e.clientY,startTime:e.timeStamp,pan:{...this._pan},onImage:e.target===this._ui.image,moved:!1})}}_onPointerMove(e){let t=this._gesture;if(t&&this._pointers.has(e.pointerId)){if(this._pointers.set(e.pointerId,{x:e.clientX,y:e.clientY}),t.kind===`pinch`&&this._pointers.size===2){let[e,n]=[...this._pointers.values()];this._setZoom(t.zoom*Math.hypot(e.x-n.x,e.y-n.y)/t.distance)}else if(t.kind===`drag`){let n=e.clientX-t.startX,r=e.clientY-t.startY;Math.hypot(n,r)>Z$&&(t.moved=!0),this._zoom>K$&&(this._pan=this._clampedPan({x:t.pan.x+n,y:t.pan.y+r}),this._ui.stage.classList.add(`is-dragging`),this._applyTransform())}}}_onPointerEnd(e,t){let n=this._gesture;if(this._pointers.delete(e.pointerId),this._ui?.stage.classList.remove(`is-dragging`),!n)return;if(n.kind===`pinch`){this._pointers.size<2&&(this._gesture=null);return}if(this._gesture=null,!t)return;let r=e.clientX-n.startX,i=e.clientY-n.startY;n.moved?this._zoom===K$&&this.step(n1(r,i)):e.timeStamp-n.startTime>Q$||(n.onImage?e.timeStamp-this._lastTap<$$?(this._lastTap=-1/0,this._setZoom(this._zoom>K$?K$:Y$)):this._lastTap=e.timeStamp:this.close())}}),Vn(`wui-chat-part-image`,class extends Bn{#e=null;#t=0;#n=null;renderPart(e,t,n){if(e.attachmentId===this.#e)return;this.#e=e.attachmentId;let r=this.ownerDocument,i=N(r,`figure`,`wui-chat-image`);this.#n=N(r,`div`,`wui-chat-image-frame`),Number.isFinite(e.width)&&Number.isFinite(e.height)&&e.width>0&&e.height>0&&(this.#n.style.aspectRatio=`${e.width} / ${e.height}`),i.append(this.#n),this.replaceChildren(i),this.#r(e,n)}disposePart(){this.#t+=1,this.#e=null}#r(e,t){this.#t+=1;let n=this.#t,r=this.ownerDocument,i=N(r,`div`,`wui-chat-image-skeleton`);i.setAttribute(`aria-hidden`,`true`);let a=N(r,`span`,`visually-hidden`,t.labels.imageLoading);a.setAttribute(`role`,`status`),this.#n.replaceChildren(i,a),typeof t.loadAttachmentUrl==`function`?t.loadAttachmentUrl(e.attachmentId).then(r=>{n===this.#t&&this.isConnected&&this.#i(r,e,t)},()=>{n===this.#t&&this.isConnected&&this.#a(e,t)}):this.#a(e,t)}#i(e,t,n){let r=this.ownerDocument,i=ZQ(t.alt),a=r.createElement(`wui-lightbox`);a.setAttribute(`label`,n.labels.imageViewer);let o=N(r,`a`,`wui-lightbox-item`);o.setAttribute(`href`,e),o.dataset.caption=i,o.dataset.name=i;let s=r.createElement(`img`);s.src=e,s.alt=i,s.decoding=`async`,o.append(s),a.append(o),this.#n.replaceChildren(a)}#a(e,t){let n=this.ownerDocument,r=N(n,`p`,`wui-chat-image-error`,t.labels.imageFailed);r.setAttribute(`role`,`status`);let i=N(n,`button`,`btn btn-soft-primary btn-sm`,t.labels.retry);i.type=`button`,i.addEventListener(`click`,()=>this.#r(e,t)),this.#n.replaceChildren(r,i)}});var o1={ActionLimitReached:`warning`,ConversationTooLong:`warning`,AssistantUnavailable:`danger`},s1={info:`info`,warning:`alert-triangle`,danger:`alert-circle`};Vn(`wui-chat-part-notice`,class extends Bn{renderPart(e){let t=this.ownerDocument,n=o1[e.code]??`info`,r=N(t,`div`,`wui-chat-notice wui-chat-notice--${n}`);r.setAttribute(`role`,n===`danger`?`alert`:`status`);let i=N(t,`span`,`wui-chat-notice-icon`);i.setAttribute(`aria-hidden`,`true`);let a=Hn(t,s1[n],16);a&&i.append(a);let o=N(t,`div`,`wui-chat-notice-body`);if(o.append(N(t,`span`,`wui-chat-notice-text`,e.text)),e.action){let n=N(t,`button`,`wui-chat-notice-action`,e.action.label);n.type=`button`,n.addEventListener(`click`,()=>e.action.run()),o.append(n)}r.append(i,o),this.replaceChildren(r)}});var c1=new Set([`Email`,`Phone`,`Name`,`Company`,`Text`,`LongText`,`Choice`,`MultiChoice`,`TimeSlot`,`File`,`Consent`]),l1={Email:{type:`email`,autocomplete:`email`},Phone:{type:`tel`,autocomplete:`tel`},Name:{type:`text`,autocomplete:`name`},Company:{type:`text`,autocomplete:`organization`},Text:{type:`text`,autocomplete:null},LongText:{type:`text`,autocomplete:null}},u1=[`Open`,`Answered`,`Skipped`,`Expired`],d1=0;function f1(e){return d1+=1,`${e}-${d1}`}function p1(e,t,n){let r=document.createElement(e);return t&&(r.className=t),n!=null&&(r.textContent=n),r}function m1(){let e=p1(`p`,`wui-chat-field-error`);return e.id=f1(`wui-chat-field-error`),e.setAttribute(`role`,`alert`),e.hidden=!0,e}function h1(e,t){return e.required?[]:[p1(`span`,`wui-chat-field-hint`,t.inputOptional)]}function g1(e,t){let n=f1(`wui-chat-field`),r=l1[e.type],i=e.type===`LongText`&&!e.secret,a=p1(i?`textarea`:`input`,`form-control wui-chat-input-control`);i?a.rows=3:(a.type=e.secret?`password`:r.type,e.secret?a.autocomplete=`off`:r.autocomplete&&(a.autocomplete=r.autocomplete)),a.id=n,a.name=e.key,e.placeholder!=null&&(a.placeholder=e.placeholder),e.maxLength!=null&&(a.maxLength=e.maxLength),e.required&&a.setAttribute(`aria-required`,`true`);let o=p1(`label`,`form-label`,e.label);o.htmlFor=n;let s=m1();a.setAttribute(`aria-describedby`,s.id);let c=p1(`div`,`wui-chat-field`);return c.dataset.key=e.key,c.append(o,...h1(e,t),a,s),{field:e,element:c,controls:[a],focus:a,invalid:a,error:s,read:()=>e.secret?a.value:a.value.trim()}}function _1(e,t,n,r,i){let a=e.controls[0],o=p1(`button`,`btn btn-soft-primary`,n.inputSendCode);o.type=`button`,o.dataset.wui=`AppButton`;let s=p1(`p`,`wui-chat-field-hint`);s.setAttribute(`aria-live`,`polite`);let c=f1(`wui-chat-field`),l=p1(`label`,`form-label`,n.inputEnterCode);l.htmlFor=c,l.hidden=!0;let u=p1(`input`,`form-control wui-chat-input-control`);return u.type=`text`,u.id=c,u.inputMode=`numeric`,u.autocomplete=`one-time-code`,u.hidden=!0,o.addEventListener(`click`,async()=>{o.disabled=!0;try{await r.sendOtp(i,{fieldKey:t.key,value:a.value.trim()}),s.textContent=n.inputCodeSent,l.hidden=!1,u.hidden=!1}catch{s.textContent=n.inputCodeFailed}finally{o.disabled=!1}}),e.element.insertBefore(o,e.error),e.element.insertBefore(s,e.error),e.element.insertBefore(l,e.error),e.element.insertBefore(u,e.error),{...e,controls:[...e.controls,o,u],codeRead:()=>u.value.trim()}}function v1(e,t){let n=f1(`wui-chat-field-label`),r=p1(`span`,`form-label`,e.label);r.id=n;let i=p1(`div`);i.setAttribute(`role`,`radiogroup`),i.setAttribute(`aria-labelledby`,n);let a=m1();i.setAttribute(`aria-describedby`,a.id);let o=[];for(let t of e.options??[]){let n=p1(`div`,`form-check`),r=p1(`input`,`form-check-input`);r.type=`radio`,r.name=e.key,r.value=t.id,r.id=f1(`wui-chat-option`);let a=p1(`label`,`form-check-label`,t.label);a.htmlFor=r.id,n.append(r,a),i.append(n),o.push(r)}o.length===0&&(i.tabIndex=-1);let s=p1(`div`,`wui-chat-field`);return s.dataset.key=e.key,s.append(r,...h1(e,t),i,a),{field:e,element:s,controls:o,focus:o[0]??i,invalid:i,error:a,read:()=>o.find(e=>e.checked)?.value??``}}function y1(e,t){let n=f1(`wui-chat-field-label`),r=p1(`span`,`form-label`,e.label);r.id=n;let i=p1(`div`,`wui-chat-input-choices`);i.setAttribute(`role`,`group`),i.setAttribute(`aria-labelledby`,n);let a=m1();i.setAttribute(`aria-describedby`,a.id);let o=[];for(let t of e.options??[]){let n=p1(`div`,`form-check`),r=p1(`input`,`form-check-input`);r.type=`checkbox`,r.name=e.key,r.value=t.id,r.id=f1(`wui-chat-option`);let a=p1(`label`,`form-check-label`,t.label);a.htmlFor=r.id,n.append(r,a),i.append(n),o.push(r)}o.length===0&&(i.tabIndex=-1);let s=p1(`div`,`wui-chat-field`);return s.dataset.key=e.key,s.append(r,...h1(e,t),i,a),{field:e,element:s,controls:o,focus:o[0]??i,invalid:i,error:a,read:()=>JSON.stringify(o.filter(e=>e.checked).map(e=>e.value))}}function b1(e,t){let n=f1(`wui-chat-field-label`),r=p1(`span`,`form-label`,e.label);r.id=n;let i=p1(`div`,`wui-chat-input-slots`);i.setAttribute(`role`,`radiogroup`),i.setAttribute(`aria-labelledby`,n);let a=m1();i.setAttribute(`aria-describedby`,a.id);let o=new Intl.DateTimeFormat(void 0,{weekday:`short`,day:`numeric`,month:`short`,hour:`numeric`,minute:`2-digit`}),s=[];for(let t of e.slots??[]){let n=p1(`input`,`wui-chat-input-slot-radio`);n.type=`radio`,n.name=e.key,n.value=t.id,n.id=f1(`wui-chat-slot`);let r=p1(`label`,`btn btn-soft-primary wui-chat-input-slot`,o.format(new Date(t.startDateTimeUtc)));r.htmlFor=n.id,i.append(n,r),s.push(n)}s.length===0&&(i.tabIndex=-1);let c=p1(`div`,`wui-chat-field`);return c.dataset.key=e.key,c.append(r,...h1(e,t),i,a),{field:e,element:c,controls:s,focus:s[0]??i,invalid:i,error:a,read:()=>s.find(e=>e.checked)?.value??``}}function x1(e,t,n){let r=f1(`wui-chat-field-label`),i=p1(`span`,`form-label`,e.label);i.id=r;let a=m1(),o=p1(`input`);o.type=`file`,o.name=e.key,o.id=f1(`wui-chat-field`),o.hidden=!0,e.accept?.length&&(o.accept=e.accept.join(`,`));let s=p1(`button`,`btn btn-soft-primary`,t.inputChooseFile);s.type=`button`,s.dataset.wui=`AppButton`,s.setAttribute(`aria-describedby`,a.id),s.addEventListener(`click`,()=>o.click());let c=p1(`span`,`wui-chat-input-file-status`);c.setAttribute(`aria-live`,`polite`);let l=p1(`button`,`btn btn-link`);l.type=`button`,l.hidden=!0;let u=p1(`div`,`wui-chat-input-file`);u.setAttribute(`role`,`group`),u.setAttribute(`aria-labelledby`,r),u.append(s,c,l,o);let d=`empty`,f=``,p=``,m=0,h=()=>{c.textContent=d===`uploading`?`${t.attachmentUploading} ${f}`:f,l.hidden=f===``,l.textContent=f===``?``:t.inputRemoveFile(f);let e=d===`failed`;a.textContent=e?t.attachmentFailed:``,a.hidden=!e,e?u.setAttribute(`aria-invalid`,`true`):u.removeAttribute(`aria-invalid`)},g=async e=>{m+=1;let t=m;d=`uploading`,f=e.name,p=``,h();try{let r=await n.uploadInputFile(e);if(t!==m)return;p=r,d=`ready`}catch{if(t!==m)return;d=`failed`}h()};o.addEventListener(`change`,()=>{let e=o.files?.[0];e&&g(e)}),l.addEventListener(`click`,()=>{m+=1,d=`empty`,f=``,p=``,o.value=``,h()}),h();let _=p1(`div`,`wui-chat-field`);return _.dataset.key=e.key,_.append(i,...h1(e,t),u,a),{field:e,element:_,controls:[s,l,o],focus:s,invalid:u,error:a,read:()=>d===`ready`?p:``,uploadProblem:()=>d===`uploading`?t.attachmentUploading:d===`failed`?t.attachmentFailed:null}}function S1(e){let t=p1(`input`,`form-check-input`);t.type=`checkbox`,t.name=e.key,t.id=f1(`wui-chat-field`);let n=p1(`label`,`form-check-label`,e.consentText||e.label);n.htmlFor=t.id;let r=m1();t.setAttribute(`aria-describedby`,r.id);let i=p1(`div`,`form-check`);i.append(t,n);let a=p1(`div`,`wui-chat-field`);return a.dataset.key=e.key,a.append(i,r),{field:e,element:a,controls:[t],focus:t,invalid:t,error:r,read:()=>t.checked?`true`:`false`}}function C1(e,t,n,r){if(e.type===`Choice`)return v1(e,t);if(e.type===`MultiChoice`)return y1(e,t);if(e.type===`TimeSlot`)return b1(e,t);if(e.type===`File`)return x1(e,t,n);if(e.type===`Consent`)return S1(e);let i=g1(e,t);return e.verify===`Otp`?_1(i,e,t,n,r):i}function w1(e,t,n){let r=e.uploadProblem?.();if(r)return r;let{field:i}=e;return i.required?i.type===`Consent`?t===`true`?null:n.inputConsentRequired:i.type===`MultiChoice`?t===`[]`?n.inputRequired:null:t===``?n.inputRequired:null:null}function T1(e,t){return e.state===`Answered`?p1(`p`,`wui-chat-input-summary`,e.answeredSummary||t.inputAnswered):p1(`p`,`wui-chat-input-summary`,e.state===`Skipped`?t.inputSkipped:t.inputExpired)}function E1(e){return{kind:`Notice`,code:`NeedsNewerApp`,text:e.needsNewerApp}}Vn(`wui-chat-part-input-request`,class extends Bn{constructor(){super(),this._signature=null,this._turn=null,this._notice=null,this._generation=0}renderPart(e,t,n){this._turn=n;for(let t of u1)this.classList.toggle(`wui-chat-input-request--${t.toLowerCase()}`,e.state===t);let r=JSON.stringify([e.requestId,e.state,e.answeredSummary,e.fields]);r===this._signature?this._notice&&(this._notice.message=t,this._notice.turn=n,this._notice.part=E1(n.labels)):(this._signature=r,this._generation+=1,this._notice=null,this.replaceChildren(this._content(e,t,n)))}_content(e,t,n){if(e.state!==`Open`)return T1(e,n.labels);if(e.fields.some(e=>!c1.has(e.type))){let e=document.createElement(`wui-chat-part-notice`);return e.message=t,e.turn=n,e.part=E1(n.labels),this._notice=e,e}return this._form(e,this._generation)}_form(e,t){let n=this._turn.labels,r=this._turn.features,i=p1(`form`,`wui-chat-input-form`);i.noValidate=!0,i.setAttribute(`aria-label`,e.title||e.submitLabel),e.title&&i.append(p1(`h3`,`wui-chat-input-title`,e.title));let a=e.fields.map(t=>C1(t,n,this._turn,e.requestId));for(let e of a)i.append(e.element);let o=p1(`p`,`wui-chat-input-error`);o.setAttribute(`role`,`status`),o.hidden=!0,i.append(o);let s=p1(`button`,`btn btn-primary`,e.submitLabel);s.type=`submit`,s.dataset.wui=`AppButton`;let c=p1(`div`,`d-flex flex-wrap gap-2`);c.append(s);let l=[s];if(r.LeadShortcuts&&e.fields.length===1&&!e.fields[0].required){let t=p1(`button`,`btn btn-soft-primary`,n.skip);t.type=`button`,t.dataset.wui=`AppButton`,t.addEventListener(`click`,()=>this._turn.skipInput(e.requestId)),c.append(t),l.push(t)}if(r.LeadShortcuts&&e.cancellable){let e=p1(`button`,`btn btn-link`,n.cancel);e.type=`button`,e.addEventListener(`click`,()=>this._turn.cancelLead()),c.append(e),l.push(e)}i.append(c),e.allowTyped&&i.append(p1(`p`,`wui-chat-input-typed`,n.typeAnswer));let u=!1,d=t=>{for(let e of a)for(let n of e.controls)n.disabled=t;for(let e of l)e.disabled=t;s.textContent=t?n.inputSubmitting:e.submitLabel},f=()=>{for(let e of a)e.error.hidden=!0,e.error.textContent=``,e.invalid.removeAttribute(`aria-invalid`);o.hidden=!0,o.textContent=``},p=(e,t)=>{e.error.textContent=t,e.error.hidden=!1,e.invalid.setAttribute(`aria-invalid`,`true`)};return i.addEventListener(`submit`,async r=>{if(r.preventDefault(),u)return;f();let i={},c={},l=[];for(let e of a){let t=e.read();i[e.field.key]=t,e.codeRead&&(c[e.field.key]=e.codeRead());let r=w1(e,t,n);r&&l.push([e,r])}if(l.length>0){for(let[e,t]of l)p(e,t);l[0][0].focus.focus();return}u=!0,d(!0);let m;try{m=await this._turn.answerInput(e.requestId,i,Object.keys(c).length>0?c:null)}catch{m={ok:!1,errors:{},message:n.errorGeneric}}if(t!==this._generation||m.ok)return;u=!1;let h=null;for(let e of a){let t=m.errors?.[e.field.key];t&&(p(e,t),h??=e)}m.message!=null&&(o.textContent=m.message,o.hidden=!1),d(!1),h?h.focus.focus():a[0]?a[0].focus.focus():s.focus()}),i}});var D1={Primary:`wui-chat-quick-reply--primary`,Cta:`wui-chat-quick-reply--cta`};Vn(`wui-chat-part-quick-replies`,class extends Bn{#e=null;renderPart(e,t,n){let r=n.features.SuggestedReplies===!0&&n.isLast===!0&&n.busy===!1&&e.replies.length>0,i=typeof n.openTarget==`function`,a=typeof n.beginHandoff==`function`,o=n.handoffPause===!0,s=JSON.stringify([r,e.replies,e.placement,n.labels.quickReplies,n.labels.handoffMoment,i,a,o,n.handoffHosts??null,n.features.LinkHandoff===!0]);if(s===this.#e||(this.#e=s,this.replaceChildren(),!r))return;let c=this.ownerDocument,l=e.placement===`Composer`,u=N(c,`div`,l?`wui-chat-quick-replies wui-chat-quick-replies--composer`:`wui-chat-quick-replies`);u.setAttribute(`role`,`group`),u.setAttribute(`aria-label`,n.labels.quickReplies);let d=l?null:e.replies.find(e=>e.id===`handoff.request`&&e.action===`Send`),f=0;d&&(u.classList.add(`wui-chat-quick-replies--offer`),u.append(this.#t(c,d,n)),f+=1);for(let t of e.replies){if(t===d||t.action===`Open`&&(!t.target||!i))continue;let e=null;if(t.action===`Navigate`){if(n.features.LinkHandoff!==!0)continue;if(yt(t.target,n.handoffHosts))e=t.target;else{let r=n.resolveLink?.(t.target);e=typeof r==`string`&&r!==``?r:null}if(e===null){u.append(N(c,`span`,null,t.label));continue}if(!a)continue}u.append(this.#n(c,t,f,n,d?`wui-chat-quick-reply--quiet`:``,e)),f+=1}if(o){let e=N(c,`span`,`visually-hidden`,n.labels.handoffMoment);e.setAttribute(`role`,`status`),u.append(e)}u.childElementCount>0&&this.append(u)}#t(e,t,n){let r=N(e,`div`,`wui-chat-offer`);return r.style.setProperty(`--wui-chat-i`,`0`),r.append(N(e,`div`,`wui-chat-offer-title`,t.label)),r.append(this.#n(e,{...t,variant:`Primary`},0,n,`wui-chat-offer-action`)),r}#n(e,t,n,r,i=``,a=null){let o=e.createElement(`button`);o.type=`button`,o.className=[`wui-chat-quick-reply`,D1[t.variant]??``,i].filter(Boolean).join(` `),o.style.setProperty(`--wui-chat-i`,String(n));let s=t.action===`Navigate`,c=s&&r.handoffPause===!0;if(o.disabled=c,t.icon){let n=Hn(e,t.icon,16);if(n){let t=N(e,`span`,`wui-chat-quick-reply-icon`);t.setAttribute(`aria-hidden`,`true`),t.append(n),o.append(t)}}return o.append(N(e,`span`,`wui-chat-quick-reply-label`,c?r.labels.handoffMoment:t.label)),o.addEventListener(`click`,()=>{t.action===`Open`?this.turn.openTarget(t.target):s?this.turn.beginHandoff(t,()=>this.#r(a)):(this.turn.chooseQuickReply(t),this.closest(`.wui-chat`)?.querySelector(`.wui-chat-input`)?.focus())}),o}#r(e){typeof this.turn.openTarget==`function`?this.turn.openTarget(e):globalThis.location.assign(e)}});var O1=new Set([`Integer`,`Decimal`,`MoneyMinor`,`Percent`]);function k1(e){return O1.has(e)}function A1(e,t,n,r=!0){let i=e=>r?_e(e):[{kind:`text`,text:e}];if(t==null||t===``)return[{kind:`text`,text:`-`}];if(e===`Date`||e===`DateTimeUtc`)return[{kind:`text`,text:_t(t,e,n)}];if(k1(e)){let r=Number(t);return i(Number.isFinite(r)?_t(r,e,n):String(t))}return i(String(t))}var j1=0;function M1(e){return j1+=1,`${e}-${j1}`}Vn(`wui-chat-part-record-card`,class extends Bn{#e=null;renderPart(e,t,n){let r=!!e.target&&typeof n.openRecord==`function`,i=n.features?.FigureText===!0,a=JSON.stringify([e,r,i]);if(a===this.#e)return;this.#e=a;let o=this.ownerDocument,s=N(o,`article`,`wui-chat-record`),c=M1(`wui-chat-record-title`);s.setAttribute(`aria-labelledby`,c);let l=N(o,`div`,`wui-chat-record-head`),u=N(o,`strong`,`wui-chat-record-title`);if(u.id=c,u.setAttribute(`role`,`heading`),u.setAttribute(`aria-level`,`3`),i?XQ(u,e.title):u.textContent=String(e.title??``),l.append(u),e.subtitle){let t=N(o,`span`,`wui-chat-record-subtitle`);i?XQ(t,e.subtitle):t.textContent=String(e.subtitle??``),l.append(t)}if(s.append(l),e.fields?.length>0){let t=N(o,`dl`,`wui-chat-record-fields`);for(let n of e.fields){let e=N(o,`div`),r=N(o,`dt`);i?XQ(r,n.label):r.textContent=String(n.label??``);let a=N(o,`dd`);k1(n.type)&&(a.className=`wui-chat-num`),YQ(a,A1(n.type,n.value,null,i)),e.append(r,a),t.append(e)}s.append(t)}if(r){let t=N(o,`button`,`btn btn-soft-primary btn-sm wui-chat-record-open`,n.labels.recordOpen);t.type=`button`,t.setAttribute(`aria-label`,n.labels.recordOpenFor(ZQ(e.title))),t.addEventListener(`click`,()=>this.turn.openRecord(e)),s.append(t)}this.replaceChildren(s)}});var N1=/^https?:\/\//i;Vn(`wui-chat-part-sources`,class extends Bn{renderPart(e,t,n){if(this.replaceChildren(),!n.features.Sources||e.sources.length===0)return;let r=this.ownerDocument,i=N(r,`div`,`wui-chat-sources`);i.append(N(r,`p`,`wui-chat-sources-label`,n.labels.sources));let a=N(r,`ul`,`wui-chat-sources-list`);a.setAttribute(`aria-label`,n.labels.sources);for(let t of e.sources){let e=r.createElement(`li`);e.append(this.#e(r,t,n)),a.append(e)}i.append(a),this.append(i)}#e(e,t,n){let r;return typeof t.url==`string`&&N1.test(t.url)?(r=N(e,`a`,`wui-chat-source`),r.setAttribute(`href`,t.url),r.setAttribute(`target`,`_blank`),r.setAttribute(`rel`,`noopener noreferrer`),r.setAttribute(`aria-label`,n.labels.openSource(t.title))):(r=N(e,`span`,`wui-chat-source`),r.tabIndex=-1),r.dataset.marker=String(t.marker),r.append(N(e,`span`,`wui-chat-source-marker`,String(t.marker)),N(e,`span`,`wui-chat-source-title`,t.title)),r}});var P1=25,F1=0;function I1(e,t,n){let r=e.createElement(`tr`);for(let i of t.columns){let t=e.createElement(`th`);t.setAttribute(`scope`,`col`),k1(i.type)&&(t.className=`wui-chat-num`),n?XQ(t,i.label):t.textContent=String(i.label??``),r.append(t)}return r}function L1(e,t,n,r){let i=e.createElement(`tr`);return t.columns.forEach((a,o)=>{let s=o===0&&a.type===`Text`,c=e.createElement(s?`th`:`td`);s&&c.setAttribute(`scope`,`row`),k1(a.type)&&(c.className=`wui-chat-num`);let l=n[o];l==null||l===``?c.append(N(c.ownerDocument,`span`,`wui-chat-null`,`-`)):YQ(c,A1(a.type,l,t.currency,r)),i.append(c)}),i}function R1(e,t){let n=()=>{let n=t.scrollWidth-t.clientWidth;e.dataset.scroll=n<=1?`none`:t.scrollLeft>=n-1?`end`:t.scrollLeft>0?`middle`:`start`};t.addEventListener(`scroll`,n,{passive:!0}),typeof ResizeObserver<`u`&&new ResizeObserver(n).observe(t),n()}function z1(e,t,n,r,i){let a=e.ownerDocument;for(let o=n;o<r;o+=1)e.append(L1(a,t,t.rows[o],i))}Vn(`wui-chat-part-table`,class extends Bn{#e=null;renderPart(e,t,n){let r=n.features?.FigureText===!0,i=JSON.stringify([e,r]);if(i===this.#e)return;if(this.#e=i,!e.columns||e.columns.length===0){this.replaceChildren();return}let a=this.ownerDocument,o=N(a,`figure`,`wui-chat-table`),s=null;if(e.title){F1+=1,s=`wui-chat-table-${F1}`;let t=N(a,`figcaption`,`wui-chat-table-title`);t.id=s,r?XQ(t,e.title):t.textContent=String(e.title??``),o.append(t)}let c=N(a,`div`,`table-wrap wui-chat-table-wrap`);c.tabIndex=0,c.setAttribute(`role`,`region`),s?c.setAttribute(`aria-labelledby`,s):c.setAttribute(`aria-label`,n.labels.table);let l=N(a,`table`,`table table-sm wui-chat-table-grid`),u=a.createElement(`thead`);u.append(I1(a,e,r));let d=a.createElement(`tbody`);z1(d,e,0,Math.min(e.rows.length,P1),r),l.append(u,d),c.append(l);let f=N(a,`div`,`wui-chat-table-frame`),p=N(a,`span`,`wui-chat-table-cue`);if(p.setAttribute(`aria-hidden`,`true`),f.append(c,p),o.append(f),R1(f,c),e.rows.length>P1){let t=N(a,`button`,`btn btn-soft-primary btn-sm wui-chat-table-more`,n.labels.tableShowAll(e.rows.length));t.type=`button`,t.addEventListener(`click`,()=>{z1(d,e,P1,e.rows.length,r),t.remove()}),o.append(t)}this.replaceChildren(o)}});var B1=/\[([^[\]\n]+)\](?!\()/g,V1=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`),H1=/\[([^\]\n]+)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,U1=/!\[([^\]\n]*)\]\(((?:[^()\s]|\([^()\s]*\))+)\)/y,W1=new RegExp(B1.source,`y`),G1=e=>/[\p{L}\p{N}]/u.test(e);function K1(e,t){let n=0;for(let r=t-1;r>=0&&e.charAt(r)===`\\`;--r)n+=1;return n%2==1}function q1(e,t,n){let r=n.length===1;for(let i=e.indexOf(n,t);i!==-1;i=e.indexOf(n,i+1)){let a=i>t&&!/\s/.test(e.charAt(t))&&!/\s/.test(e.charAt(i-1)),o=r&&(e.charAt(i+1)===n||e.charAt(i-1)===n),s=n===`_`&&G1(e.charAt(i+n.length));if(a&&!o&&!s&&!K1(e,i))return i}return-1}function J1(e,t){let n=t?.isCitation,r=[],i=``,a=()=>{i&&=(r.push({type:`text`,text:i}),``)},o=0;for(;o<e.length;){let s=e.charAt(o),c=e.charAt(o+1);if(s===`\\`&&V1.has(c)){i+=c,o+=2;continue}if(s==="`"){let t=e.indexOf("`",o+1);if(t>o+1){a(),r.push({type:`code`,text:e.slice(o+1,t)}),o=t+1;continue}}let l=s+c;if(l===`**`||l===`__`||l===`~~`){let n=q1(e,o+2,l);if(n!==-1&&!(l===`__`&&G1(e.charAt(o-1)))){a();let i=J1(e.slice(o+2,n),t);l===`~~`?r.push({type:`strike`,children:i}):r.push({type:`strong`,children:i}),o=n+2;continue}i+=l,o+=2}else{if(s===`*`||s===`_`){let n=q1(e,o+1,s);if(n!==-1&&!(s===`_`&&G1(e.charAt(o-1)))){a(),r.push({type:`em`,children:J1(e.slice(o+1,n),t)}),o=n+1;continue}}if(s===`[`){H1.lastIndex=o;let t=H1.exec(e);if(t){a(),r.push({type:`link`,href:t[2],children:J1(t[1])}),o+=t[0].length;continue}if(n){W1.lastIndex=o;let t=W1.exec(e);if(t&&n(t[1])){a(),r.push({type:`citation`,text:t[1]}),o+=t[0].length;continue}}}if(s===`!`){U1.lastIndex=o;let t=U1.exec(e);if(t){a(),r.push({type:`image`,children:J1(t[1])}),o+=t[0].length;continue}}i+=s,o+=1}}return a(),r.map((e,t)=>({...e,key:t}))}var Y1=/^[a-z][a-z0-9+.-]*:[a-z0-9_-]+\/[a-z0-9_.~-]+$/i,X1=/^https?:/i,Z1=/^(mailto|tel):/i,Q1=/^(?:\/(?![/\\])|#|\?|\.{1,2}\/)/;function $1(e,t,n,r){if(n&&(t===`page`||Y1.test(e))){let t=n(e);if(t!=null)return{kind:`app`,target:t}}return t===`app`?null:Q1.test(e)?{kind:`page`,href:e}:t===`page`&&!(X1.test(e)&&r&&e0(e,r))?null:X1.test(e)?{kind:r&&e0(e,r)?`page`:`web`,href:e}:Z1.test(e)?{kind:`contact`,href:e}:null}function e0(e,t){if(e.slice(0,t.length).toLowerCase()!==t.toLowerCase())return!1;let n=e[t.length];return n===void 0||n===`/`||n===`?`||n===`#`}function t0(e){return typeof e!=`string`||!e.startsWith(`/`)||e[1]===`/`||e[1]===`\\`?null:e}var n0=/^\s*```/,r0=/^\s*```\s*(\S*)/,i0=/^\s{0,3}(#{1,6})\s+(.*?)(?:\s+#+)?\s*$/,a0=/^\s*([-*_])(\s*\1){2,}\s*$/,o0=/^(\s*)[-*+]\s+(.*)$/,s0=/^(\s*)(\d{1,9})[.)]\s+(.*)$/,c0=/^\s*>\s?(.*)$/,l0=/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/,u0=e=>e.includes(`|`);function d0(e){let t=e.trim();return t.startsWith(`|`)&&(t=t.slice(1)),t.endsWith(`|`)&&(t=t.slice(0,-1)),t.split(`|`).map(e=>e.trim())}function f0(e,t){return u0(e[t])&&t+1<e.length&&e[t+1].includes(`|`)&&l0.test(e[t+1])}function p0(e,t){let n=e[t];return n0.test(n)||c0.test(n)||o0.test(n)||s0.test(n)||i0.test(n)||a0.test(n)||f0(e,t)}function m0(e){let t=e.replace(/\t/g,` `).length;return Math.min(Math.floor(t/2),4)}function h0(e){let t=s0.exec(e);if(t)return{text:t[3],depth:m0(t[1]),ordered:!0,number:Number(t[2])};let n=o0.exec(e);return n?{text:n[2],depth:m0(n[1]),ordered:!1,number:0}:null}function g0(e){let t=(e??``).replace(/\r\n?/g,`
42
+ `).split(`
43
+ `),n=[],r=0;for(;r<t.length;){let e=t[r];if(!e.trim()){r+=1;continue}if(n0.test(e)){let i=r0.exec(e)?.[1]||null,a=[];for(r+=1;r<t.length&&!n0.test(t[r]);)a.push(t[r]),r+=1;r+=1,n.push({type:`code`,text:a.join(`
44
+ `),language:i});continue}if(f0(t,r)){let i=d0(e),a=[];for(r+=2;r<t.length&&t[r].trim()&&u0(t[r]);)a.push(d0(t[r])),r+=1;n.push({type:`table`,header:i,rows:a});continue}if(a0.test(e)){n.push({type:`rule`}),r+=1;continue}let i=i0.exec(e);if(i){n.push({type:`heading`,level:i[1].length,text:i[2]}),r+=1;continue}if(c0.test(e)){let e=[];for(;r<t.length;){let n=c0.exec(t[r]);if(!n)break;e.push(n[1]),r+=1}n.push({type:`quote`,lines:e});continue}let a=h0(e);if(a){let e=[];for(;r<t.length&&t[r].trim();){let n=h0(t[r]);if(n){if(n.depth===0&&n.ordered!==a.ordered)break;e.push(n)}else if(p0(t,r))break;else e[e.length-1].text+=` ${t[r].trim()}`;r+=1}n.push({type:`list`,ordered:a.ordered,start:a.ordered?a.number:1,items:e});continue}let o=[e];for(r+=1;r<t.length&&t[r].trim()&&!p0(t,r);)o.push(t[r]),r+=1;n.push({type:`paragraph`,lines:o})}return n.map((e,t)=>({...e,key:t}))}var _0=[`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`],v0=[`app`,`web`,`page`];function y0(e,t,n,r,i=null){let a=b0(e.ownerDocument,n,r).map((e,n)=>{let r=t[n]?.sig===e.sig?t[n].nodes:null;return{sig:e.sig,nodes:r??e.build()}}),o=new Set(a.flatMap(e=>e.nodes));for(let e of t)for(let t of e.nodes)o.has(t)||t.remove();let s=i;for(let t of a.flatMap(e=>e.nodes))(t.parentNode!==e||t.previousSibling!==s)&&e.insertBefore(t,s?s.nextSibling:e.firstChild),s=t;return a}function b0(e,t,n){let r={doc:e,links:v0.includes(n.links)?n.links:`web`,headings:n.headings===`text`?`text`:`outline`,resolveLink:n.resolveLink,isCitation:n.isCitation},i=n.resolverGeneration??0;return g0(t).map(e=>({sig:`${JSON.stringify(e)}|${r.links}|${r.headings}|${i}`,build:()=>C0(r,e)}))}var x0=class extends W${static get observedAttributes(){return[`links`,`headings`]}constructor(){super(),this._drawn=[],this._blocks=[],this._observer=null,this._connected=!1,this._resolveLink=void 0,this._isCitation=void 0,this._resolverGeneration=0}connectedCallback(){this._connected=!0,this._render(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(e=>{e.some(e=>!this._drawn.some(t=>t.contains(e.target)))&&this._render()}),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this._connected=!1,this._observer?.disconnect(),this._observer=null}get resolveLink(){return this._resolveLink}set resolveLink(e){this._resolveLink=typeof e==`function`?e:void 0,this._resolverGeneration+=1,this._connected&&this._render()}get isCitation(){return this._isCitation}set isCitation(e){this._isCitation=typeof e==`function`?e:void 0,this._resolverGeneration+=1,this._connected&&this._render()}attributeChangedCallback(e,t,n){t!==n&&this._connected&&this._render()}_source(){return Array.from(this.children).find(e=>e.tagName===`PRE`&&e.classList.contains(`wui-markdown-source`))}_render(){let e=this._source();e&&(this._blocks=y0(this,this._blocks,e.textContent??``,{links:this.getAttribute(`links`)??void 0,headings:this.getAttribute(`headings`)??void 0,resolveLink:this._resolveLink,isCitation:this._isCitation,resolverGeneration:this._resolverGeneration},e),this._drawn=this._blocks.flatMap(e=>e.nodes),e.hidden=!0,this._observer?.takeRecords())}};function S0(e,t,n=[]){let r=e.createElement(t);return r.append(...n),r}function C0(e,t){switch(t.type){case`paragraph`:return[S0(e.doc,`p`,w0(e,t.lines))];case`heading`:return[T0(e,t)];case`list`:return E0(e,t.items);case`table`:return[O0(e,t)];case`code`:return[k0(e.doc,t)];case`quote`:return[S0(e.doc,`blockquote`,w0(e,t.lines))];case`rule`:return[e.doc.createElement(`hr`)];default:return[]}}function w0(e,t){let n=[];return t.forEach((t,r)=>{r>0&&n.push(e.doc.createElement(`br`)),n.push(...A0(e,t))}),n}function T0(e,t){let n=A0(e,t.text);if(e.headings===`text`){let t=S0(e.doc,`p`,n);return t.className=`fw-semibold`,t}return S0(e.doc,`h2`,n)}function E0(e,t){let n=[];for(let r=0;r<t.length;){let i=D0(e,t,r);n.push(i.list),r=i.next}return n}function D0(e,t,n){let{depth:r,ordered:i,number:a}=t[n],o=e.doc.createElement(i?`ol`:`ul`);i&&a!==1&&o.setAttribute(`start`,String(a));let s=null,c=n;for(;c<t.length&&t[c].depth>=r;)if(t[c].depth===r)s=S0(e.doc,`li`,A0(e,t[c].text)),o.append(s),c+=1;else{let n=D0(e,t,c);s.append(n.list),c=n.next}return{list:o,next:c}}function O0(e,t){let n=t.header.map(t=>{let n=S0(e.doc,`th`,A0(e,t));return n.setAttribute(`scope`,`col`),n}),r=t.rows.map(n=>S0(e.doc,`tr`,t.header.map((t,r)=>S0(e.doc,`td`,A0(e,n[r]??``))))),i=S0(e.doc,`table`,[S0(e.doc,`thead`,[S0(e.doc,`tr`,n)]),S0(e.doc,`tbody`,r)]);i.className=`table`;let a=S0(e.doc,`div`,[i]);return a.className=`table-responsive`,a}function k0(e,t){let n=S0(e,`pre`,[S0(e,`code`,[e.createTextNode(t.text)])]);n.className=`wui-code-source`;let r=S0(e,`wui-code-block`,[n]);return r.className=`wui-code-block`,r.setAttribute(`language`,_0.includes(t.language)?t.language:`text`),r}function A0(e,t){return j0(e,J1(t,{isCitation:e.isCitation}))}function j0(e,t){return t.flatMap(t=>M0(e,t))}function M0(e,t){let{doc:n}=e;switch(t.type){case`code`:return[S0(n,`code`,[n.createTextNode(t.text)])];case`strong`:return[S0(n,`strong`,j0(e,t.children))];case`em`:return[S0(n,`em`,j0(e,t.children))];case`strike`:return[S0(n,`del`,j0(e,t.children))];case`image`:return[n.createTextNode(`[`),...j0(e,t.children),n.createTextNode(`]`)];case`link`:return N0(e,t);case`citation`:return[P0(n,t.text)];default:return[n.createTextNode(t.text)]}}function N0(e,t){let n=j0(e,t.children),r=$1(t.href,e.links,e.resolveLink,globalThis.location?.origin);if(!r)return n;if(r.kind===`app`){let t=t0(r.target);return t?[F0(e.doc,t,n,!1)]:n}return[F0(e.doc,r.href,n,r.kind===`web`)]}function P0(e,t){let n=e.createElement(`span`);n.className=`chip primary chip-outline chip-sm chip-clickable wui-markdown-citation`,n.setAttribute(`data-wui`,`AppChip`);let r=e.createElement(`button`);r.type=`button`,r.className=`chip-body`,r.setAttribute(`aria-label`,t),r.addEventListener(`click`,()=>{r.dispatchEvent(new CustomEvent(`wui-markdown-citation`,{bubbles:!0,detail:{citation:t}}))});let i=e.createElement(`span`);return i.className=`chip-label`,i.textContent=t,r.append(i),n.append(r),n}function F0(e,t,n,r){let i=S0(e,`span`,n);i.className=`wui-link__label`;let a=S0(e,`a`,[i]);return a.className=`wui-link wui-link--static`,a.setAttribute(`data-wui`,`AppLink`),a.setAttribute(`href`,t),r&&(a.setAttribute(`target`,`_blank`),a.setAttribute(`rel`,`noopener noreferrer`)),a}U$(`wui-markdown`,x0);var I0=`AppButton`,L0={primary:`btn-primary`,soft:`btn-soft-primary`,outline:`btn-outline-primary`,ghost:`btn-ghost-primary`,text:`btn-link-primary`,danger:`btn-danger`,success:`btn-success`,"outline-danger":`btn-outline-danger`,light:`btn-neutral`,warning:`btn-warning`,neutral:`btn-soft-neutral`,"outline-light":`btn-glass`,"outline-secondary":`btn-outline-neutral`};function R0(e=`primary`,t=`md`){let n=L0[e];if(!n)throw Error(`buttonClass: unknown variant "${e}"`);return t===`md`?`btn ${n}`:`btn ${n} btn-${t}`}var z0=Object.freeze([`text`,`json`,`js`,`cs`,`sql`,`bash`,`http`,`html`,`css`]),B0=Object.freeze({text:``,json:`JSON`,js:`JavaScript`,cs:`C#`,sql:`SQL`,bash:`Bash`,http:`HTTP`,html:`HTML`,css:`CSS`}),V0=e=>RegExp(`\\b(?:${e.join(`|`)})\\b`),H0=`(?![\\s\\S])`,U0=RegExp(`/\\*[\\s\\S]*?(?:\\*/|${H0})`).source,W0=[[`attr`,/"(?:[^"\\\n]|\\.)*"(?=\s*:)/],[`string`,/"(?:[^"\\\n]|\\.)*"?/],[`number`,/-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/],[`literal`,V0([`true`,`false`,`null`])],[`punct`,/[{}[\],:]/]],G0=[[`comment`,RegExp(`//[^\\n]*|${U0}`)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|`(?:[^`\\]|\\[\s\S])*`?/],[`number`,/\b(?:0[xX][\da-fA-F_]+|\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?n?)\b/],[`keyword`,V0(`async.await.break.case.catch.class.const.continue.default.delete.do.else.export.extends.finally.for.from.function.if.import.in.instanceof.let.new.of.return.static.super.switch.this.throw.try.typeof.var.void.while.yield`.split(`.`))],[`literal`,V0([`true`,`false`,`null`,`undefined`,`NaN`,`Infinity`])],[`function`,/(?<![\w$])[A-Za-z_$][\w$]*(?=\s*\()/],[`type`,/(?<![\w$])[A-Z][\w$]*/],[`punct`,/[{}()[\];,]/]],K0=[[`comment`,RegExp(`//[^\\n]*|${U0}`)],[`string`,/@"(?:[^"]|"")*"?|\$@?"(?:[^"\\\n]|\\.)*"?|"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`number`,/\b\d[\d_]*\.?\d*(?:[eE][+-]?\d+)?[fFdDmMlLuU]{0,2}\b/],[`keyword`,V0(`abstract.as.async.await.base.bool.break.byte.case.catch.char.checked.class.const.continue.decimal.default.delegate.do.double.else.enum.event.explicit.extern.finally.fixed.float.for.foreach.get.goto.if.implicit.in.init.int.interface.internal.is.lock.long.namespace.new.object.operator.out.override.params.private.protected.public.readonly.record.ref.required.return.sbyte.sealed.set.short.sizeof.static.string.struct.switch.this.throw.try.typeof.uint.ulong.unchecked.unsafe.ushort.using.var.virtual.void.volatile.when.while.with`.split(`.`))],[`literal`,V0([`true`,`false`,`null`])],[`function`,/(?<!\w)[A-Za-z_]\w*(?=\s*\()/],[`type`,/(?<!\w)[A-Z]\w*/],[`punct`,/[{}()[\];,]/]],q0=[[`comment`,RegExp(`--[^\\n]*|${U0}`)],[`string`,/'(?:[^']|'')*'?/],[`variable`,/@@?\w+/],[`number`,/\b\d+(?:\.\d+)?\b/],[`keyword`,V0(`add.all.alter.and.as.asc.begin.between.by.case.check.column.commit.constraint.create.cross.database.declare.default.delete.desc.distinct.drop.else.end.exec.execute.exists.foreign.from.full.function.group.having.if.in.index.inner.insert.into.is.join.key.left.like.limit.not.null.offset.on.or.order.outer.over.partition.primary.procedure.references.return.returns.right.rollback.select.set.table.then.top.transaction.union.unique.update.values.view.when.where.while.with`.split(`.`))],[`literal`,V0([`true`,`false`])],[`type`,V0([`bigint`,`bit`,`char`,`date`,`datetime`,`datetime2`,`decimal`,`float`,`int`,`money`,`nchar`,`numeric`,`nvarchar`,`real`,`smallint`,`text`,`time`,`tinyint`,`uniqueidentifier`,`varchar`])],[`function`,/\b[A-Za-z_]\w*(?=\s*\()/],[`punct`,/[(),;]/]],J0=[[`comment`,/(?<![^\s;|&(])#[^\n]*/],[`string`,/"(?:[^"\\]|\\[\s\S])*"?|'[^']*'?/],[`variable`,/\$(?:\{[^}\n]*\}?|[A-Za-z_]\w*|[0-9@#?$!*-])/],[`attr`,/(?<![\w-])--?[A-Za-z][\w-]*/],[`number`,/(?<![\w.-])\d+(?:\.\d+)?\b/],[`keyword`,V0([`case`,`do`,`done`,`elif`,`else`,`esac`,`exit`,`export`,`fi`,`for`,`function`,`if`,`in`,`local`,`return`,`select`,`then`,`until`,`while`])],[`function`,V0(`awk.az.cat.cd.chmod.chown.cp.curl.docker.dotnet.echo.gcloud.git.grep.kubectl.ls.mkdir.mv.npm.npx.pnpm.rm.sed.source.sudo.wget`.split(`.`))],[`punct`,/[|&;<>(){}[\]]+/]],Y0=[[`comment`,/^#[^\n]*/m],[`keyword`,/^(?:GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|TRACE|CONNECT)(?= )/m],[`literal`,/HTTP\/\d(?:\.\d)?/],[`number`,/(?<=^HTTP\/\d(?:\.\d)? )\d{3}\b/m],[`function`,/(?<=^[A-Z]+ )\S+/m],[`attr`,/^[A-Za-z][\w-]*(?=:)/m],[`string`,/(?<=^[A-Za-z][\w-]*:[ \t]*)[^\n]+/m]],X0=[[`comment`,RegExp(`<!--[\\s\\S]*?(?:-->|${H0})`)],[`keyword`,/<![A-Za-z][^>]*>?/],[`tag`,/<\/?[A-Za-z][^<>]*>?/],[`literal`,/&#?\w+;/]],Z0={json:W0,js:G0,cs:K0,sql:q0,bash:J0,http:Y0,css:[[`comment`,new RegExp(U0)],[`string`,/"(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?/],[`keyword`,/@[\w-]+|!important/],[`attr`,/[\w-]+(?=\s*:[^{};]*[;}])/],[`number`,/#[0-9a-fA-F]{3,8}\b|(?<![\w-])-?(?:\d+\.?\d*|\.\d+)(?:%|[A-Za-z]{1,4})?/],[`function`,/[\w-]+(?=\()/],[`type`,/[.#](?!\d)[A-Za-z_][\w-]*/],[`punct`,/[{}();:,]/]],html:X0,htmlTag:[[`tag`,/^<\/?[\w:.-]+/],[`string`,/"[^"]*"?|'[^']*'?/],[`attr`,/(?<=\s)[^\s=<>/"']+/],[`punct`,/\/?>|=/]]},Q0=new Map;function $0(e){let t=Q0.get(e);if(!t){let n=Z0[e],r=e===`sql`?`gi`:`g`,i=n.map(([,e])=>`(${e.source})`).join(`|`);t={re:new RegExp(i,`${r}m`),types:n.map(([e])=>e)},Q0.set(e,t)}return t}function e2(e,t,n){if(!n)return;let r=e[e.length-1];r&&r[0]===t?r[1]+=n:e.push([t,n])}function t2(e,t,n=[]){let{re:r,types:i}=$0(e),a=0;for(let o of t.matchAll(r)){if(!o[0])continue;e2(n,`plain`,t.slice(a,o.index));let r=i.findIndex((e,t)=>o[t+1]!==void 0);e===`html`&&i[r]===`tag`?t2(`htmlTag`,o[0],n):e2(n,i[r],o[0]),a=o.index+o[0].length}return e2(n,`plain`,t.slice(a)),n}function n2(e){let t=/\r?\n\r?\n/.exec(e);if(!t)return t2(`http`,e);let n=t2(`http`,e.slice(0,t.index+t[0].length)),r=e.slice(t.index+t[0].length),i=r.trimStart()[0];return i===`{`||i===`[`?t2(`json`,r,n):i===`<`?t2(`html`,r,n):(e2(n,`plain`,r),n)}function r2(e,t){let n=String(e??``);return!n||n.length>1e5?n?[[`plain`,n]]:[]:t===`http`?n2(n):!Object.hasOwn(Z0,t)||t===`htmlTag`?[[`plain`,n]]:t2(t,n)}function i2(e,t){let n=[[]];for(let[r,i]of r2(e,t))i.split(/\r\n|\r|\n/).forEach((e,t)=>{t>0&&n.push([]),e&&n[n.length-1].push([r,e])});return n.length>1&&n[n.length-1].length===0&&n.pop(),n}var a2=class extends W${static get observedAttributes(){return[`language`,`line-numbers`,`wrap`,`label`,`copy-label`,`copied-label`]}constructor(){super(),this._chrome=null,this._title=null,this._view=null,this._codeEl=null,this._copyIcon=null,this._copyText=null,this._copied=!1,this._observer=null,this._timer=0,this._cancelFrame=null}connectedCallback(){this._render(),typeof MutationObserver<`u`&&(this._observer=new MutationObserver(e=>{e.some(e=>!this._chrome?.contains(e.target))&&this._schedule()}),this._observer.observe(this,{childList:!0,subtree:!0,characterData:!0}))}disconnectedCallback(){this._observer?.disconnect(),this._observer=null,this._cancelPending()}attributeChangedCallback(){this.isConnected&&this._render()}_source(){return Array.from(this.children).find(e=>e.classList.contains(`wui-code-source`))}_code(){return(this._source()?.textContent??``).replace(/\r?\n$/,``)}_schedule(){if(this._cancelFrame)return;let e=()=>{this._cancelFrame=null,this._render()};if(typeof requestAnimationFrame==`function`){let t=requestAnimationFrame(e);this._cancelFrame=()=>cancelAnimationFrame(t)}else{let t=!0;queueMicrotask(()=>{t&&e()}),this._cancelFrame=()=>{t=!1}}}_cancelPending(){this._cancelFrame?.(),this._cancelFrame=null}_render(){if(!this._source())return;this._cancelPending();let e=this.ownerDocument;this._chrome||this._build(e);let t=this.getAttribute(`language`),n=z0.includes(t)?t:`text`,r=this.getAttribute(`label`)||``,i=i2(this._code(),n);this._title.textContent=r||B0[n],this._view.setAttribute(`aria-label`,r||`Code`),this._view.style.setProperty(`--wui-code-digits`,String(String(i.length).length)),this._codeEl.replaceChildren(...i.map(t=>o2(e,t))),this._copied||(this._copyText.textContent=this._copyLabel()),this.setAttribute(`data-wui-ready`,``),this._observer?.takeRecords()}_build(e){let t=e.createElement(`div`);t.className=`wui-code-chrome`,t.append(this._bar(e));let n=e.createElement(`div`);n.className=`wui-code-view`,n.setAttribute(`role`,`region`),n.tabIndex=0;let r=e.createElement(`pre`);r.className=`wui-code-pre`,this._codeEl=e.createElement(`code`),r.append(this._codeEl),n.append(r),t.append(n),this._chrome=t,this._view=n,this.append(t)}_bar(e){let t=e.createElement(`div`);t.className=`wui-code-bar`,this._title=e.createElement(`span`),this._title.className=`wui-code-title`;let n=e.createElement(`button`);return n.type=`button`,n.className=`${R0(`ghost`,`sm`)} wui-code-copy`,n.dataset.wui=I0,n.setAttribute(`aria-live`,`polite`),this._copyIcon=e.createElement(`span`),this._copyIcon.className=`wui-code-copy-icon`,this._copyText=e.createElement(`span`),this._setCopied(!1),n.append(this._copyIcon,this._copyText),n.addEventListener(`click`,async()=>{await kn(this._code())&&(this._setCopied(!0),clearTimeout(this._timer),this._timer=setTimeout(()=>this._setCopied(!1),2e3))}),t.append(this._title,n),t}_setCopied(e){this._copied=e,this._copyIcon.innerHTML=Rn(e?`check`:`files`,{size:14}),this._copyText.textContent=this._copyLabel()}_copyLabel(){return this._copied?this.getAttribute(`copied-label`)||`Copied`:this.getAttribute(`copy-label`)||`Copy`}};function o2(e,t){let n=e.createElement(`span`);n.className=`wui-code-line`;for(let[r,i]of t){if(r===`plain`){n.append(i);continue}let t=e.createElement(`span`);t.className=`wui-code-t-${r}`,t.textContent=i,n.append(t)}return n}U$(`wui-code-block`,a2);var s2=new Set([`Visitor`,`Customer`]),c2=/^\d+$/,l2=`pre, code, .wui-markdown-source`;function u2(e,t){return e?.features?.Sources===!0?typeof e?.isCitation==`function`?e.isCitation(t):c2.test(t):!1}function d2(e,t){if(yt(e,t?.handoffHosts))return e;let n=t?.resolveLink?.(e);return typeof n==`string`&&n!==``?n:null}function f2(e,t){let n=globalThis.location?.origin;for(let r of e.querySelectorAll(`a[href]`)){let e=r.dataset.linkSource??r.getAttribute(`href`);r.dataset.linkSource=e;let i=d2(e,t);i===null?r.replaceWith(r.ownerDocument.createTextNode(r.textContent)):(i!==r.getAttribute(`href`)&&r.setAttribute(`href`,i),Ne(i,`web`,void 0,n)?.kind===`web`?(r.setAttribute(`target`,`_blank`),r.setAttribute(`rel`,`noopener noreferrer`)):(r.removeAttribute(`target`),r.removeAttribute(`rel`)))}}function p2(e){let t=e.ownerDocument,n=t.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=[];for(let e=n.nextNode();e;e=n.nextNode())e.parentElement?.closest(l2)||r.push(e);for(let e of r){let n=_e(e.nodeValue);if(n.length===1&&n[0].kind===`text`)continue;let r=t.createDocumentFragment();YQ(r,n),e.replaceWith(r)}}function m2(e){let t=e.turn;f2(e,t),t?.features?.FigureText===!0&&p2(e)}Vn(`wui-chat-part-text`,class extends Bn{#e=null;#t=null;#n=null;#r=null;#i=!1;#a=null;constructor(){super(),this.addEventListener(`wui-markdown-citation`,e=>{let t=this.turn;typeof t?.openCitation==`function`&&t.openCitation(Number(e.detail.citation))}),this.addEventListener(`click`,e=>this.#s(e))}renderPart(e,t){let n=s2.has(t.author.kind)?`plain`:`markdown`;if(n!==this.#e&&(this.#e=n,this.#r=null,this.#t=n===`plain`?this.#c():this.#l(e.text),this.#n=n===`plain`?null:this.#t.firstElementChild,this.replaceChildren(this.#t)),n===`plain`){let t=this.turn?.features?.FigureText===!0,n=JSON.stringify([e.text,t]);n!==this.#r&&(this.#r=n,this.#t.replaceChildren(),t?YQ(this.#t,_e(e.text)):this.#t.append(this.ownerDocument.createTextNode(e.text)))}else this.#n.textContent!==e.text&&(this.#n.textContent=e.text);this.toggleAttribute(`data-streaming`,t.streaming===!0),this.#i||(this.#i=!0,this.closest(`[data-restored]`)||this.classList.add(`wui-chat-part-enter`)),this.#o()}disposePart(){this.#a?.disconnect(),this.#a=null}#o(){this.#a||(this.#a=new MutationObserver(()=>m2(this)),this.#a.observe(this,{childList:!0,subtree:!0,characterData:!0}),m2(this))}#s(e){let t=e.target instanceof Element?e.target.closest(`a[href]`):null,n=this.turn;if(!t||!this.contains(t))return;let r=t.getAttribute(`href`);r.startsWith(`#`)||(r.startsWith(`/`)&&typeof n?.onNavigate==`function`?(e.preventDefault(),n.onNavigate(r)):typeof n?.openTarget==`function`&&(e.preventDefault(),n.openTarget(r)))}#c(){return N(this.ownerDocument,`div`,`wui-chat-bubble`)}#l(e){let t=this.ownerDocument,n=N(t,`wui-markdown`,`wui-markdown wui-chat-text`);n.setAttribute(`links`,`web`),n.setAttribute(`headings`,`text`),n.isCitation=e=>u2(this.turn,e);let r=N(t,`pre`,`wui-markdown-source`,e);return n.append(r),n}}),Vn(`wui-chat-part-ticket`,class extends Bn{renderPart(e,t,n){let{labels:r}=n,i=$(`article`,`wui-chat-ticket`,{"aria-label":r.ticketAria(e.number)}),a=$(`div`,`wui-chat-ticket-head`),o=$(`span`,`wui-chat-ticket-number`);o.textContent=r.ticketAria(e.number),a.append(o);let s=j$(e.status);if(s!==null){let t=$(`span`,`wui-chat-ticket-badge wui-chat-ticket-badge--${s}`);t.textContent=M$(e.status,r),a.append(t)}let c=$(`strong`,`wui-chat-ticket-title`);if(c.textContent=e.subject,i.append(a,c),typeof n.openTicket==`function`){let t=$(`div`,`wui-chat-ticket-foot`),a=$(`button`,`wui-chat-ticket-link`,{type:`button`});a.textContent=r.ticketView,a.addEventListener(`click`,()=>n.openTicket({ticketId:e.ticketId,number:e.number})),t.append(a),i.append(t)}this.replaceChildren(i)}});var h2=`http://www.w3.org/2000/svg`,g2={mic:`M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V21h2v-2.08A7 7 0 0 0 19 12z`,stop:`M6 6h12v12H6z`,play:`M8 5v14l11-7z`,pause:`M6 5h4v14H6zm8 0h4v14h-4z`,speaker:`M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4v8a4.5 4.5 0 0 0 2.5-4zM14 3.2v2.1a7 7 0 0 1 0 13.4v2.1a9 9 0 0 0 0-17.6z`};function _2(e,t=18){if(!Object.hasOwn(g2,e))throw Error(`Unknown voice icon "${e}".`);let n=document.createElementNS(h2,`svg`);n.setAttribute(`viewBox`,`0 0 24 24`),n.setAttribute(`width`,String(t)),n.setAttribute(`height`,String(t)),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),n.setAttribute(`fill`,`currentColor`);let r=document.createElementNS(h2,`path`);return r.setAttribute(`d`,g2[e]),n.append(r),n}var v2=40,y2=null,b2=class extends Bn{#e=null;#t=null;#n=null;#r=null;#i=null;#a=null;#o=null;#s=null;#c=!1;#l=null;#u=0;#d=0;#f=!1;#p=null;#m=null;#h=null;#g=0;#_=!1;renderPart(e,t,n){this.#e=n,n.features.VoiceClips?(this.#t===null&&this.#y(),e.attachmentId!==this.#l&&(this.disposePart(),this.#l=e.attachmentId,this.#d=0,this.#n.replaceChildren(...En(e.attachmentId,v2).map(x2))),this.#u=e.durationMs,this.#b(e)):this.#v(e.transcript)}disposePart(){this.#g+=1,this.#p?.pause(),this.#h!==null&&URL.revokeObjectURL(this.#h),y2===this&&(y2=null),this.#p=null,this.#m=null,this.#h=null,this.#f=!1}#v(e){if(this.disposePart(),this.#t=null,this.#l=null,this.#o=null,this.#s=null,typeof e==`string`&&e!==``){let t=N(document,`p`,`wui-chat-clip-transcript`);t.textContent=e,this.replaceChildren(t)}else this.replaceChildren()}#y(){this.#t=N(document,`div`,`wui-chat-clip`),this.#t.setAttribute(`role`,`group`);let e=N(document,`div`,`wui-chat-clip-row`);this.#r=N(document,`button`,`wui-chat-clip-play`),this.#r.type=`button`,this.#r.addEventListener(`click`,()=>this.#A()),this.#n=N(document,`div`,`wui-chat-clip-wave`),this.#n.setAttribute(`aria-hidden`,`true`),this.#i=N(document,`span`,`wui-chat-clip-time`),e.append(this.#r,this.#n,this.#i),this.#a=N(document,`p`,`wui-chat-clip-error`),this.#a.setAttribute(`role`,`status`),this.#a.hidden=!0,this.#t.append(e,this.#a),this.replaceChildren(this.#t)}#b(e){let t=this.#e.labels;this.#t.setAttribute(`aria-label`,t.voiceClip),this.#r.disabled=this.#_||typeof this.#e.readAttachment!=`function`,this.#x(),this.#S(),this.#C(e.transcript)}#x(){let e=this.#e.labels,t=this.#f?e.voiceClipPause:e.voiceClipPlay;this.#r.setAttribute(`aria-label`,t),this.#r.title=t,this.#r.replaceChildren(_2(this.#f?`pause`:`play`,18))}#S(){let e=this.#u/1e3,t=e>0?Math.min(1,this.#d/e):0,n=Math.floor(t*v2);[...this.#n.children].forEach((e,t)=>{e.classList.toggle(`wui-chat-clip-bar--played`,t<n)});let r=Dn(Math.max(1,Math.round(e)));this.#i.textContent=this.#e.labels.voiceClipTime(Dn(this.#d),r)}#C(e){typeof e!=`string`||e===``?(this.#o?.remove(),this.#s?.remove(),this.#o=null,this.#s=null):(this.#o===null&&(this.#o=N(document,`button`,`wui-chat-clip-toggle`),this.#o.type=`button`,this.#o.addEventListener(`click`,()=>{this.#c=!this.#c,this.#s.hidden=!this.#c,this.#w()}),this.#s=N(document,`p`,`wui-chat-clip-transcript`),this.#s.hidden=!this.#c,this.#t.append(this.#o,this.#s)),this.#s.textContent=e,this.#w())}#w(){let e=this.#e.labels;this.#o.setAttribute(`aria-expanded`,String(this.#c)),this.#o.textContent=this.#c?e.voiceClipHideTranscript:e.voiceClipShowTranscript}#T(){return this.#m??=this.#E().catch(e=>{throw this.#m=null,e}),this.#m}async#E(){let e=this.#g,t=await this.#e.readAttachment(this.#l),n=URL.createObjectURL(new Blob([t],{type:r(t)}));if(e!==this.#g)return URL.revokeObjectURL(n),null;this.#h!==null&&URL.revokeObjectURL(this.#h),this.#h=n;let i=new Audio(this.#h);return i.addEventListener(`timeupdate`,()=>{this.#d=i.currentTime,this.#S()}),i.addEventListener(`ended`,()=>{this.#d=0,this.#D(),this.#S()}),i.addEventListener(`error`,()=>{this.#D(),this.#m=null,this.#k()}),this.#p=i,i}#D(){this.#p?.pause(),this.#O(!1)}#O(e){this.#f=e,e?(y2&&y2!==this&&y2.#D(),y2=this):y2===this&&(y2=null),this.#t!==null&&this.#x()}#k(){this.#a.textContent=this.#e.labels.voiceClipFailed,this.#a.hidden=!1}async#A(){if(this.#f)this.#D();else{this.#a.hidden=!0,this.#_=!0,this.#r.disabled=!0,this.#r.setAttribute(`aria-busy`,`true`);try{let e=await this.#T();if(e===null)return;this.#O(!0),await e.play()}catch{this.#D(),this.#m=null,this.#k()}finally{this.#_=!1,this.#r.removeAttribute(`aria-busy`),this.#r.disabled=typeof this.#e.readAttachment!=`function`}}}};function x2(e){let t=N(document,`span`,`wui-chat-clip-bar`);return t.style.setProperty(`--wui-chat-bar-height`,`${Math.round(e*100)}%`),t}Vn(`wui-chat-part-voice-clip`,b2);var S2={Text:`wui-chat-part-text`,Sources:`wui-chat-part-sources`,QuickReplies:`wui-chat-part-quick-replies`,InputRequest:`wui-chat-part-input-request`,Action:`wui-chat-part-action`,Notice:`wui-chat-part-notice`,Table:`wui-chat-part-table`,Chart:`wui-chat-part-chart`,Figures:`wui-chat-part-figures`,RecordCard:`wui-chat-part-record-card`,Image:`wui-chat-part-image`,File:`wui-chat-part-file`,Ticket:`wui-chat-part-ticket`,Handoff:`wui-chat-part-handoff`,VoiceClip:`wui-chat-part-voice-clip`},C2=n({SpeechConfig:()=>void 0}),w2=t((()=>{})),T2=1e4,E2=2e3,D2=3e5,O2=new Set([`NotAllowedError`,`SecurityError`,`PermissionDeniedError`]),k2=new Set([`NotFoundError`,`OverconstrainedError`,`NotReadableError`]);function A2(e){return O2.has(e?.name)?new A(`Blocked`,e.message):k2.has(e?.name)?new A(`NoMicrophone`,e.message):j2(e)}function j2(e){return e instanceof A?e:new A(`Failed`,e?.message??String(e))}var M2=null;function N2(){return globalThis.SpeechSDK?globalThis.SpeechSDK:(M2===null&&(M2=Promise.resolve().then(()=>(w2(),C2)).then(e=>e.SpeechConfig?e:e.default).catch(e=>{throw M2=null,e})),M2)}function P2(){return globalThis.document?.documentElement?.lang||globalThis.navigator?.language||`en-US`}function F2(e){let t=e.getToken,n=e.loadSdk??N2,r=e.getLanguage??P2,i=typeof navigator<`u`&&typeof navigator.mediaDevices?.getUserMedia==`function`,a=typeof window<`u`&&window.isSecureContext===!0,o=i&&a,s=typeof window<`u`,c=null,l=null,u=null;function d(){return c!==null&&Date.parse(c.expiresDateTimeUtc)-Date.now()>6e4?Promise.resolve(c):(l===null&&(l=Promise.resolve().then(()=>t()).then(e=>(c=e,l=null,e),e=>{throw l=null,j2(e)})),l)}function f(){return u===null&&(u=Promise.resolve().then(()=>n()).then(e=>{if(!e?.SpeechConfig)throw new A(`Unavailable`,`Speech is not available in this browser.`);return e}).catch(e=>{throw u=null,j2(e)})),u}function p(e={}){let{signal:t,onText:n,onEnd:i}=e;if(t?.aborted)return i?.(),Promise.resolve();let a,s,c=new Promise((e,t)=>{a=e,s=t}),l=!1,u=!1,p=null,m=!1,h=``,g=[],_=null,v=null,y=null,b=()=>{clearTimeout(_),clearTimeout(v),clearTimeout(y)},x=e=>{if(!l){l=!0,b(),t?.removeEventListener(`abort`,S);try{p?.close()}finally{try{i?.()}finally{e?s(e):a()}}}};async function S(){if(!(l||u)){if(u=!0,b(),p!==null)try{await new Promise(e=>p.stopContinuousRecognitionAsync(e,e))}catch{}x(null)}}let C=()=>[...g,h].filter(e=>e!==``).join(` `).trim(),w=(e,t)=>{m||(m=!0,clearTimeout(_)),clearTimeout(v),v=setTimeout(S,E2),n?.(C(),t)};async function T(){if(t?.addEventListener(`abort`,S),!o){x(new A(`Unavailable`,`Dictation is not available in this browser.`));return}let n;try{n=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(e){x(A2(e));return}for(let e of n.getTracks())e.stop();if(!l)try{let t=await f(),n=await d();if(l)return;let i=t.SpeechConfig.fromAuthorizationToken(n.token,n.region);if(i.speechRecognitionLanguage=e.language||r(),i.setProperty(t.PropertyId.SpeechServiceConnection_InitialSilenceTimeoutMs,String(T2)),p=new t.SpeechRecognizer(i,t.AudioConfig.fromDefaultMicrophoneInput()),p.recognizing=(e,t)=>{if(l)return;let n=t.result?.text;n&&(h=n,w(n,!1))},p.recognized=(e,n)=>{if(l)return;let{reason:r,text:i}=n.result;r===t.ResultReason.RecognizedSpeech&&i?(g.push(i),h=``,w(i,!0)):r===t.ResultReason.NoMatch&&t.NoMatchDetails.fromResult(n.result).reason===t.NoMatchReason.InitialSilenceTimeout&&x(new A(`NoSpeech`,`No speech was heard.`))},p.canceled=(e,n)=>{l||(n.reason===t.CancellationReason.Error?x(new A(`Failed`,n.errorDetails)):x(null))},p.sessionStopped=()=>x(null),await new Promise((e,t)=>p.startContinuousRecognitionAsync(e,t)),l)return;e.onStarted?.(),_=setTimeout(()=>{m||x(new A(`NoSpeech`,`No speech was heard.`))},T2),y=setTimeout(S,D2)}catch(e){x(j2(e))}}return T(),c}async function m(e,t={}){let{signal:n}=t;if(!n?.aborted)try{let i=await f(),a=await d();if(n?.aborted)return;let o=i.SpeechConfig.fromAuthorizationToken(a.token,a.region);o.speechSynthesisLanguage=t.language||r();let s=new i.SpeakerAudioDestination,c=new i.SpeechSynthesizer(o,i.AudioConfig.fromSpeakerOutput(s));await new Promise((t,r)=>{let a=!1,o=()=>{n?.removeEventListener(`abort`,d),c.close(),s.close()},l=()=>{a||(a=!0,o(),t())},u=e=>{a||(a=!0,o(),r(j2(e)))};function d(){s.pause(),l()}n?.addEventListener(`abort`,d),s.onAudioEnd=l;try{c.speakTextAsync(e,e=>{e.reason!==i.ResultReason.SynthesizingAudioCompleted&&u(new A(`Failed`,`The reply could not be synthesised.`))},e=>u(e))}catch(e){u(e)}})}catch(e){throw j2(e)}}return{dictation:o,readAloud:s,streamsText:!0,startDictation:p,speak:m}}var I2=8e3,L2=6e3,R2=new Set([`Blocked`,`NoMicrophone`]);function z2(e){let t=e instanceof A?e.code:`Failed`;return{code:t,source:`Dictation`,sticky:R2.has(t)}}function B2(e){let t=it(e.filter(e=>e.kind===`Text`)).replace(/ ?\[\d+\]/g,``).replace(/\s+/g,` `).trim();if(t.length<=6e3)return t;let n=t.slice(0,L2),r=n.lastIndexOf(`. `);return r===-1?n.trim():n.slice(0,r+1)}function V2(e,t){switch(e.code){case`Blocked`:return t.dictationBlocked;case`NoMicrophone`:return t.dictationNoMicrophone;case`NoSpeech`:return t.dictationNotHeard;case`Unavailable`:return t.dictationUnavailable;case`Failed`:return t.dictationFailed;case`SpeakFailed`:return t.readAloudFailed;default:throw Error(`Unknown voice note code "${e.code}".`)}}function H2(e){let t=e.getState,n=e.speech??F2({getToken:e.getToken}),r=`Idle`,i=null,a=null,o=null,s=null,c=0,l=null,u=new Set,d=()=>({mode:r,messageId:i,startedAtMs:a,note:o});function f(){let e=d();for(let t of[...u])t(e)}function p(e){r=e.mode,i=e.messageId??null,a=e.startedAtMs??null,f()}function m(){clearTimeout(l),l=null}function h(e){m(),o=e,e&&!e.sticky&&(l=setTimeout(()=>{l=null,o=null,f()},I2)),f()}function g(){o!==null&&(m(),o=null,f())}function _(){return c+=1,s={id:c,controller:new AbortController,stopped:!1},s}function v(e){s===e&&(s=null,p({mode:`Idle`}))}function y(){let e=s;s=null,e&&(e.stopped=!0,e.controller.abort()),r!==`Idle`&&p({mode:`Idle`})}function b(){let e=t();return!!(e.features.Dictation&&e.profile?.speechAvailable&&n.dictation)}function x(){let e=t();return!!(e.features.ReadAloud&&e.profile?.speechAvailable&&n.readAloud)}async function S(e){if(r===`Dictating`){y();return}if(y(),h(null),!b())return;let t=e.getText(),i=t!==``&&!/\s$/.test(t)?`${t} `:t,a=_();p({mode:`Dictating`});try{await n.startDictation({signal:a.controller.signal,onText:t=>{s===a&&e.setText(i+t)},onEnd:()=>v(a)})}catch(e){if(a.stopped)return;v(a),h(z2(e))}}async function C(e,t){if(r===`Speaking`&&i===e){y();return}y(),h(null);let a=B2(t);if(a===``)return;let o=_();p({mode:`Speaking`,messageId:e});try{await n.speak(a,{signal:o.controller.signal}),v(o)}catch{if(o.stopped)return;v(o),h({code:`SpeakFailed`,source:`ReadAloud`,sticky:!1,messageId:e})}}function w(e){return u.add(e),()=>{u.delete(e)}}function T(){y(),m(),o=null,u.clear()}return{canDictate:b,canSpeak:x,getStatus:d,subscribe:w,toggleDictation:S,toggleSpeak:C,stop:y,dismissNote:g,destroy:T}}var U2=new Set([`Shift`,`Control`,`Alt`,`Meta`,`Escape`]);function W2(e,t){e.isTrusted&&!U2.has(e.key)&&t.getStatus().mode===`Dictating`&&t.stop()}function G2({voice:e,getLabels:t,textarea:n,onTextChanged:r}){let i=null,a=$(`button`,`wui-chat-tool wui-chat-mic`,{type:`button`});a.append(_2(`mic`,20)),a.hidden=!0,a.addEventListener(`click`,()=>{e.toggleDictation({getText:()=>n.value,setText:e=>{n.value=n.maxLength>0?e.slice(0,n.maxLength):e,r(),n.setSelectionRange(n.value.length,n.value.length)}})});let o=$(`p`,`wui-chat-voice-note`,{role:`status`});o.hidden=!0;let s=$(`span`,`visually-hidden`,{"aria-live":`polite`});function c(e){let n=t(),r=e.note?.source===`ReadAloud`?null:e.note,i=e.mode===`Dictating`,c=i?n.dictateStop:n.dictate;a.setAttribute(`aria-pressed`,String(i)),a.setAttribute(`aria-label`,c),a.title=c;let l=r?.code===`Blocked`||r?.code===`NoMicrophone`;r===null?(o.hidden=!0,o.textContent=``):(o.hidden=!1,o.textContent=V2(r,n),o.setAttribute(`role`,r.sticky?`alert`:`status`)),o.classList.toggle(`wui-chat-voice-note--blocked`,l),s.textContent=i?n.dictateListening:``}function l(t){let{state:n}=t;a.hidden=!e.canDictate();let r=e.getStatus().mode===`Speaking`,i=n.messagesLeftToday===0;a.disabled=i||r||n.handoffPause===!0}function u(e){c(e),i!==null&&l(i)}let d=e.subscribe(u);function f(t){i=t,l(t),c(e.getStatus())}function p(){d()}return{buttons:[a],note:o,announcer:s,paint:f,destroy:p}}var K2=10,q2=.9,J2=0;function Y2(e){for(let t of e.toReversed())for(let e of t.parts.toReversed())if(e.kind===`InputRequest`&&e.state===`Open`)return e.fields[0]?.label??e.title??null;return null}function X2(e){J2+=1;let t=`wui-chat-composer-hint-${J2}`,n=$(`p`,`wui-chat-allowance`,{role:`status`});n.hidden=!0;let r=$(`span`),i=$(`button`,`btn btn-ghost-primary btn-sm wui-chat-action-btn`,{type:`button`});i.addEventListener(`click`,()=>e.onCancelEdit());let a=$(`div`,`wui-chat-editing`);a.hidden=!0,a.append(r,i);let o=$(`div`,`wui-chat-attachments`);o.hidden=!0;let s=$(`button`,`wui-chat-tool`,{type:`button`});s.append(l$(`paperclip`,20)),s.hidden=!0;let c=$(`input`,null,{type:`file`,multiple:``,tabindex:`-1`});c.hidden=!0,c.addEventListener(`change`,()=>{let t=[...c.files];c.value=``,t.length>0&&e.onAttach(t)}),s.addEventListener(`click`,()=>c.click());let l=$(`textarea`,`wui-chat-input`,{rows:`1`,"aria-describedby":t}),u=$(`span`,`visually-hidden`,{id:t}),d=$(`span`,`wui-chat-counter`);d.hidden=!0;let f=$(`button`,`wui-chat-send`,{type:`submit`});f.append(l$(`arrow-up`,18));let p=$(`button`,`wui-chat-send wui-chat-send--stop`,{type:`button`});p.append(l$(`stop`,16)),p.hidden=!0,p.addEventListener(`click`,()=>e.onStop());let m=$(`form`,`wui-chat-composer`);m.append(s,c,l,d,u,p,f);let h=null,g=null,_=null,v=0,y=null;function b(){l.style.height=`auto`,l.style.height=`${l.scrollHeight}px`;let e=getComputedStyle(l),t=l.scrollHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom);m.classList.toggle(`wui-chat-composer--multiline`,t>(parseFloat(e.lineHeight)||22)*1.5)}function x(){return y?.attachments.some(e=>e.status===`Uploading`)??!1}function S(){return y?.attachments.some(e=>e.status===`Ready`)??!1}function C(){let e=l.value.length,t=v>0&&e>v*q2;d.hidden=!t,t&&_&&(d.textContent=_.counter(e,v))}function w(){let e=y?.messagesLeftToday??null,t=l.value.trim()===``&&!S();f.disabled=!!y?.streaming||e===0||x()||t||y?.handoffPause===!0,m.classList.toggle(`wui-chat-composer--has-text`,!t)}function T(){if(f.disabled)return;let t=l.value.trim();l.value=``,b(),C(),w(),e.voice?.stop(),e.voice?.dismissNote(),e.onSubmit(t)}l.addEventListener(`input`,()=>{b(),C(),w(),l.value!==``&&e.onTyping?.()}),l.addEventListener(`keydown`,e=>{e.key===`Enter`&&!e.shiftKey&&!e.isComposing&&(e.preventDefault(),T())}),m.addEventListener(`submit`,e=>{e.preventDefault(),T()});let E=e.voice?G2({voice:e.voice,getLabels:()=>_,textarea:l,onTextChanged:()=>{b(),C(),w()}}):null;E&&(m.insertBefore(E.buttons[0],f),l.addEventListener(`keydown`,t=>W2(t,e.voice)));function D(t){let n=t.map(t=>{let n=$(`span`,`wui-chat-chip`),r=$(`span`,null,t.status===`Failed`?{title:t.error??``}:null);r.textContent=t.fileName;let i=$(`button`,`wui-chat-chip-remove`,{type:`button`,"aria-label":_.removeAttachment(t.fileName)});i.append(l$(`x`,14)),i.addEventListener(`click`,()=>e.onRemove(t.key));let a=[];if(t.status===`Uploading`){let e=$(`progress`,`wui-chat-chip-progress`,{max:`1`});typeof t.progress==`number`&&(e.value=t.progress);let n=$(`span`,`wui-chat-chip-status`);n.textContent=_.attachmentUploading,a.push(e,n)}if(t.status===`Failed`){let e=$(`span`,`wui-chat-chip-error`,{"aria-live":`polite`});e.textContent=t.error||_.attachmentFailed,a.push(e)}return n.append(r,...a,i),n});o.replaceChildren(...n),o.hidden=n.length===0}function O(t){y=t.state,_=t.labels,v=t.maxLength;let o=y.messagesLeftToday;m.setAttribute(`aria-label`,_.composer),u.textContent=_.composerHint,l.setAttribute(`aria-label`,_.composer),l.maxLength=v,l.placeholder=y.handoffPause?_.handoffMoment:Y2(y.messages)??_.placeholder,l.disabled=o===0||y.handoffPause===!0,n.hidden=!(o!==null&&o<=K2),n.hidden||(n.textContent=_.allowance(o));let d=y.editing?.messageId??null;if(d!==h){let t=h!==null;h=d,y.editing?(e.voice?.stop(),l.value=y.editing.text,b()):t&&(l.value=``,b())}a.hidden=!y.editing,r.textContent=_.editing,i.textContent=_.cancel;let x=t.draft??null;typeof x==`string`&&x!==``&&x!==g&&(g=x,l.value=x,l.dispatchEvent(new Event(`input`)),l.focus(),e.onDraftApplied?.()),D(y.attachments);let S=y.features.Attachments&&(y.profile?.limits.maxAttachments??0)>0&&y.handoffPause!==!0;s.hidden=!S,s.setAttribute(`aria-label`,_.attach),s.title=_.attachHint,c.accept=t.accept??``;let T=y.streaming&&y.features.Stop;p.hidden=!T,p.setAttribute(`aria-label`,_.stop),f.hidden=T,f.setAttribute(`aria-label`,_.send),C(),w(),E?.paint({state:y})}function k(){l.focus()}function A(){E?.destroy();for(let e of j)e.remove()}let j=[n,a,o,...E?[E.note,E.announcer]:[],m];return{nodes:j,paint:O,focus:k,destroy:A,getDraft:()=>l.value}}var Z2=`https://policies.google.com/privacy`,Q2=`https://policies.google.com/terms`;function $2(e,t){let n=$(`a`,`wui-chat-footer-link`,{href:t,target:`_blank`,rel:`noopener noreferrer`});return n.textContent=e,n}function e4(){let e=$(`span`,`wui-chat-footer-sep`,{"aria-hidden":`true`});return e.textContent=`·`,e}function t4(){let e=$(`p`,`wui-chat-footer`);e.hidden=!0;function t(t){let{labels:n,profile:r}=t,i=[];if(r){let e=$(`span`,`wui-chat-footer-text`);e.textContent=r.footer.disclaimer||n.disclaimer,i.push(e);let t=$(`span`,`wui-chat-footer-privacy`);if(r.footer.privacyText&&t.append(document.createTextNode(r.footer.privacyText)),r.footer.privacyUrl){t.hasChildNodes()&&t.append(document.createTextNode(` `));let e=$(`a`,`wui-chat-footer-link`,{href:r.footer.privacyUrl});e.textContent=n.footerPrivacy,t.append(e)}if(t.hasChildNodes()&&i.push(t),r.footer.assuranceText){let e=$(`span`);e.textContent=r.footer.assuranceText,i.push(e)}if(kt(r)){let e=$(`span`,`wui-chat-footer-captcha`);e.append(document.createTextNode(`${n.captchaNote} `),$2(n.captchaPrivacy,Z2),document.createTextNode(` `),$2(n.captchaTerms,Q2)),i.push(e)}}e.replaceChildren(...i.flatMap((e,t)=>t?[e4(),e]:[e])),e.hidden=i.length===0}return{el:e,paint:t}}function n4(e,t,n){e.setAttribute(`aria-label`,t),e.title=t,e.dataset.icon!==n&&(e.dataset.icon=n,e.replaceChildren(l$(n,20)))}function r4(e){let t=$(`span`,`wui-chat-orb`,{"aria-hidden":`true`}),n=$(`strong`,`wui-chat-title`);e.titleId&&(n.id=e.titleId);let r=$(`span`,`wui-chat-tagline`),i=$(`span`,`wui-chat-status`),a=$(`div`,`wui-chat-header-text`);a.append(n,r,i);let o=f$(``,`history`,()=>e.onHistory()),s=f$(``,`chat`,()=>e.onMute()),c=f$(``,`plus`,()=>e.onNew()),l=f$(``,`maximize-4`,()=>e.onSwitch());l.classList.add(`wui-chat-switch-btn`,`wui-chat-switch-btn--full`);let u=f$(``,`panel-left-open`,()=>e.onSwitch());u.classList.add(`wui-chat-switch-btn`,`wui-chat-switch-btn--side`);let d=f$(``,`x`,()=>e.onClose()),f=$(`div`,`wui-chat-header-actions`);f.append(o,s,c,l,u,d);let p=$(`header`,`wui-chat-header`);p.append(t,a,f);function m(e){let{labels:t}=e;p.hidden=!1,n.textContent=e.title??``,r.textContent=e.tagline??``,r.hidden=!e.tagline,i.textContent=e.status??``,o.hidden=!e.showHistory,e.viewingHistory?n4(o,t.backToChat,`arrow-left`):n4(o,t.history,`history`),s.hidden=!e.showMute,n4(s,e.muted?t.unmuteSounds:t.muteSounds,`chat`),c.hidden=!!e.viewingHistory||e.showNew===!1,c.disabled=!e.canNew,n4(c,t.newChat,`plus`),l.hidden=e.switchTo!==`full-page`,l.disabled=!e.canSwitch,n4(l,t.openFullScreen,`maximize-4`),u.hidden=e.switchTo!==`docked`,u.disabled=!e.canSwitch,n4(u,t.openSidePanel,`panel-left-open`),d.hidden=!e.showClose,n4(d,t.close,`x`)}return{el:p,paint:m}}var i4=120;function a4(e,t,n=`outline`){let r=$(`button`,`${u$(n,`sm`)} wui-chat-action-btn`,{type:`button`});return r.textContent=e,r.addEventListener(`click`,t),r}function o4(e){let t=$(`div`,`wui-chat-history`);t.hidden=!0;let n=null,r=null,i=null,a=null,o=null,s=!1;function c(){return n||(n=k({client:e.getClient()}),r=n.subscribe(()=>_()),n)}function l(e){i={id:e.publicId,kind:`rename`,draft:e.title??``,saving:!1},a=null,o=null,s=!0,_()}function u(e){i={id:e.publicId,kind:`delete`,saving:!1},a=null,o=null,_()}function d(){i=null,a=null,o=null,_()}async function f(){let t=i,n=t?.draft.trim()??``;if(t?.kind===`rename`&&!t.saving&&n){t.saving=!0,_();try{await c().rename(t.id,n),i===t&&(i=null),a=null,o=null}catch{if(i!==t)return;t.saving=!1,o=e.getLabels().renameFailed}_()}}async function p(){let t=i;if(!(t?.kind!==`delete`||t.saving)){t.saving=!0,_();try{await c().remove(t.id),i===t&&(i=null),a=null,e.onDeleted(t.id)}catch{if(i!==t)return;t.saving=!1,a=e.getLabels().deleteFailed}_()}}function m(e){let t=$(`li`,`wui-chat-history-row wui-chat-history-row--editing`),n=$(`input`,`wui-chat-history-input`,{type:`text`,"aria-label":e.conversationTitle,maxlength:String(i4)});n.value=i.draft,n.addEventListener(`input`,()=>{i.draft=n.value,r.disabled=i.saving||!i.draft.trim()}),n.addEventListener(`keydown`,e=>{e.key===`Enter`?(e.preventDefault(),f()):e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),d())});let r=a4(e.renameSave,()=>f(),`primary`);if(r.disabled=i.saving||!i.draft.trim(),t.append(n,r,a4(e.cancel,()=>d(),`ghost`)),o!==null){let e=$(`p`,`wui-chat-history-error`,{role:`alert`});e.textContent=o,t.append(e)}return s&&(s=!1,queueMicrotask(()=>n.focus())),t}function h(e){let t=$(`li`,`wui-chat-history-row wui-chat-history-row--confirm`),n=$(`p`);n.textContent=e.deleteConfirmTitle;let r=$(`p`);r.textContent=e.deleteConfirmMessage;let a=a4(e.deleteConfirm,()=>p(),`danger`);return a.disabled=i.saving,t.append(n,r,a,a4(e.cancel,()=>d(),`ghost`)),t}function g(t,n,r){if(i?.id===t.publicId&&i.kind===`rename`)return m(n);if(i?.id===t.publicId&&i.kind===`delete`)return h(n);let a=$(`li`,`wui-chat-history-row`),o=$(`button`,`wui-chat-history-open`,{type:`button`}),s=$(`span`,`wui-chat-history-title`);s.textContent=t.title||n.untitled;let c=$(`span`,`wui-chat-history-time`);return c.textContent=rt(t.lastActivityDateTimeUtc),o.append(s,c),o.addEventListener(`click`,()=>e.onOpen(t.publicId)),a.append(o),r.Rename&&a.append(f$(n.rename,`pencil`,()=>l(t))),r.Delete&&a.append(f$(n.deleteChat,`trash`,()=>u(t))),a}function _(){let r=e.getLabels(),i=e.getFeatures(),o=n?n.getState():{items:[],loading:!1,error:null,hasMore:!1},s=[];if(o.error||a){let e=$(`p`,`wui-chat-history-error`,{role:`alert`});o.error?(e.append(document.createTextNode(r.loadFailed),document.createTextNode(` `)),e.append(a4(r.retry,()=>c().load(),`outline`))):e.textContent=a,s.push(e)}if(o.loading&&o.items.length===0){let e=$(`p`,`wui-chat-history-empty`,{role:`status`});e.textContent=r.loadingConversation,s.push(e)}if(o.items.length===0&&!o.loading&&!o.error){let e=$(`p`,`wui-chat-history-empty`),t=$(`span`);t.textContent=r.historyEmptyTitle;let n=$(`span`);n.textContent=r.historyEmptyText,e.append(t,n),s.push(e)}if(o.items.length>0){let e=$(`ul`,`wui-chat-history-list`,{"aria-label":r.history});e.append(...o.items.map(e=>g(e,r,i))),s.push(e)}o.hasMore&&!o.loading&&s.push(a4(r.loadMore,()=>c().loadMore(),`outline`)),t.replaceChildren(...s)}function v(){t.hidden=!1,c().load().catch(()=>{}),_()}function y(){t.hidden=!0}function b(){r?.(),r=null,n?.dispose(),n=null}return{el:t,show:v,hide:y,paint:_,dispose:b}}var s4=new Set([`GET`,`HEAD`]);function c4(){let e=document.querySelector(`meta[name="wui-csrf"]`),t=e?.getAttribute(`content`);return t?{token:t,header:e.getAttribute(`data-header`)||`RequestVerificationToken`}:null}async function l4(e){let t=await e.text();if(t){if((e.headers.get(`content-type`)||``).includes(`json`))try{return JSON.parse(t)}catch{return t}return t}}async function u4(e,t){let n=new TextDecoder,r=e.body.getReader(),i=``;for(;;){let{done:a,value:o}=await r.read();if(a)break;i+=n.decode(o,{stream:!0}),t({event:{target:{responseText:i,status:e.status}}})}return i+=n.decode(),i}function d4({fetch:e=(...e)=>globalThis.fetch(...e)}={}){async function t(t,n,r,i={}){let a={...i.headers},o;if(typeof FormData<`u`&&r instanceof FormData){for(let e of Object.keys(a))e.toLowerCase()===`content-type`&&delete a[e];o=r}else r!==void 0&&(a[`Content-Type`]=`application/json`,o=JSON.stringify(r));if(!s4.has(t)){let e=c4();e&&(a[e.header]=e.token)}let s=i.signal,c=s,l,u,d=()=>l.abort(s.reason);i.timeout>0&&(l=new AbortController,c=l.signal,s?.aborted?l.abort(s.reason):s?.addEventListener(`abort`,d,{once:!0}),u=setTimeout(()=>l.abort(new DOMException(`The request timed out.`,`TimeoutError`)),i.timeout));try{let r=await e(n,{method:t,headers:a,body:o,signal:c,credentials:`same-origin`});if(!r.ok){let e=Error(`Request failed with status ${r.status}`);throw e.response={status:r.status,data:await l4(r)},e}let s=i.responseType===`arraybuffer`,l=!s&&typeof i.onDownloadProgress==`function`&&r.body,u;return u=s?await r.arrayBuffer():l?await u4(r,i.onDownloadProgress):await l4(r),{data:u,status:r.status}}finally{clearTimeout(u),s?.removeEventListener(`abort`,d)}}return{get:(e,n)=>t(`GET`,e,void 0,n),post:(e,n,r)=>t(`POST`,e,n,r),put:(e,n,r)=>t(`PUT`,e,n,r),delete:(e,n)=>t(`DELETE`,e,void 0,n)}}function f4(e){let t=null,n=!1,r=!1,i=$(`div`,`wui-chat-nudge`,{role:`status`});i.hidden=!0;let a=$(`button`,`wui-chat-nudge-text`,{type:`button`}),o=$(`button`,`wui-chat-nudge-close`,{type:`button`});o.append(l$(`x`,14)),i.append(a,o);function s(){clearTimeout(t),t=null}function c(){s(),r=!0,i.hidden=!0}a.addEventListener(`click`,()=>{i.hidden=!0,e.onActivate()}),o.addEventListener(`click`,()=>{c(),e.onDismiss()});function l(e){s(),r||n||(t=setTimeout(()=>{t=null,a.textContent=e.text,o.setAttribute(`aria-label`,e.label),i.hidden=!1,n=!0},e.delaySeconds*1e3))}function u(){s(),i.remove()}return{el:i,schedule:l,cancel:s,dismiss:c,isShown:()=>n,destroy:u}}var p4=6e4,m4=60*p4,h4=48*m4;function g4(e){if(typeof e!=`string`||e===``)return null;let t=Date.parse(e);return Number.isNaN(t)?null:t}function _4(e,t=Date.now(),n=void 0){let r=g4(e);if(r===null)return``;let i=t-r,a=Math.abs(i),o=i>=0,s=new Intl.RelativeTimeFormat(n,{numeric:`auto`});if(a<p4)return s.format(0,`second`);if(a<m4){let e=Math.floor(a/p4);return s.format(o?-e:e,`minute`)}if(a<h4){let e=Math.floor(a/m4);return s.format(o?-e:e,`hour`)}return new Intl.DateTimeFormat(n,{day:`numeric`,month:`short`,year:`numeric`}).format(new Date(r))}function v4(e,t=void 0){let n=g4(e);return n===null?``:new Intl.DateTimeFormat(t,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(n))}function y4(e){let{list:t,getLabels:n,getFeatures:r,onOpen:i}=e,a=e.now??(()=>Date.now()),o=$(`div`,`wui-chat-empty-rows wui-chat-empty-rows--past`);o.hidden=!0;let s=!1;function c(e,t){let n=$(`button`,`wui-chat-empty-row`,{type:`button`}),r=$(`span`,`wui-chat-empty-row-title`);r.textContent=e.title||t.earlierChat;let o=$(`span`,`wui-chat-empty-row-time`,{title:v4(e.lastActivityDateTimeUtc)});return o.textContent=_4(e.lastActivityDateTimeUtc,a()),n.append(r,o),n.addEventListener(`click`,()=>i(e.publicId)),n}function l(){if(s)return;let e=t.getState().items;if(r().History!==!0||e.length===0){o.replaceChildren(),o.hidden=!0;return}let i=n();o.replaceChildren(...e.slice(0,20).map(e=>c(e,i))),o.hidden=!1}let u=t.subscribe(l);return{el:o,refresh(){r().History===!0&&t.load().catch(()=>{})},paint:l,dispose(){s=!0,u()}}}var b4=`https://www.google.com/recaptcha/api.js?render=`,x4=new Map;function S4(e){let t=x4.get(e);if(t)return t;let n=new Promise((t,n)=>{if(globalThis.grecaptcha?.execute){t(globalThis.grecaptcha);return}let r=document.createElement(`script`);r.src=b4+encodeURIComponent(e),r.async=!0,r.addEventListener(`load`,()=>t(globalThis.grecaptcha)),r.addEventListener(`error`,()=>{x4.delete(e),n(Error(`The reCAPTCHA script did not load.`))}),document.head.append(r)});return x4.set(e,n),n}async function C4(e,t){let n=await S4(e);await new Promise(e=>n.ready(e));let r=await n.execute(e,{action:t});if(!r)throw Object.assign(Error(`reCAPTCHA returned no token.`),{code:`captcha_unavailable`});return r}var w4=`data-wui-chat-docked`,T4=`--wui-chat-docked-width`,E4=420,D4=new Set;function O4(e,t){let n=document.documentElement;n.setAttribute(w4,e),n.style.setProperty(T4,t)}function k4(){let e=document.documentElement;e.removeAttribute(w4),e.style.removeProperty(T4)}function A4(e){let t=y$({...e,layout:`docked`,role:`dialog`,launcher:!0}),n={},r=e.position,i=!1,a=null,o=()=>`${Math.round(t.panel.getBoundingClientRect().width)||E4}px`;function s(){D4.add(n),O4(r,o()),typeof ResizeObserver==`function`&&(a=new ResizeObserver(()=>document.documentElement.style.setProperty(T4,o())),a.observe(t.panel))}function c(){a?.disconnect(),a=null,D4.delete(n),D4.size===0&&k4()}function l(e){t.setOpen(e),e&&!i?(i=!0,s()):!e&&i&&(i=!1,c())}function u(e){t.setAppearance(e),e.position!==void 0&&(r=e.position,i&&document.documentElement.setAttribute(w4,r))}function d(){l(!1)}return{...t,setOpen:l,setAppearance:u,destroy:d}}function j4(e){return y$({...e,layout:`embedded`,role:`region`,launcher:!1})}var M4=`wchat:peeked`,N4=576,P4=200;function F4(e){let t=y$({...e,layout:`launcher`,role:`dialog`,launcher:!0}),{root:n,panel:r,nudgeHost:i,launcherButton:a}=t,o={peek:!1,peekSeconds:3,hideWhileOpen:!1};a.dataset.state=`closed`;let s=!1,c=!1,l=null,u=null;function d(){!o.peek||s||c||i.dataset.launcher!==`idle`||globalThis.innerWidth<N4||globalThis.sessionStorage.getItem(M4)!==null||(globalThis.sessionStorage.setItem(M4,`1`),i.dataset.launcher=`peeking`,l=setTimeout(()=>{l=null,i.dataset.launcher===`peeking`&&(i.dataset.launcher=`idle`)},o.peekSeconds*1e3))}i.addEventListener(`animationend`,e=>{e.target===i&&i.dataset.launcher===`idle`&&d()});function f(e){if(e!==c){if(c=e,clearTimeout(l),l=null,e)clearTimeout(u),u=null,o.hideWhileOpen?(i.dataset.launcher=`hidden`,i.toggleAttribute(`inert`,!0)):i.dataset.launcher===`peeking`&&(i.dataset.launcher=`idle`);else if(o.hideWhileOpen){let e=r.contains(document.activeElement);u=setTimeout(()=>{u=null,i.toggleAttribute(`inert`,!1),i.dataset.launcher=`idle`,e&&a.focus()},P4)}}a.dataset.state=e?`open`:`closed`,t.setOpen(e)}function p(e){e.reduced!==void 0&&(s=!!e.reduced),e.peek!==void 0&&(o.peek=e.peek),e.peekSeconds!==void 0&&(o.peekSeconds=e.peekSeconds),e.hideWhileOpen!==void 0&&(o.hideWhileOpen=e.hideWhileOpen),e.phoneMode!==void 0&&n.classList.toggle(`wui-chat--sheet`,e.phoneMode===`Sheet`),e.sheetHeightDvh!==void 0&&n.style.setProperty(`--wui-chat-sheet-height`,`${e.sheetHeightDvh}dvh`),e.sheetMaxHeightPx!==void 0&&n.style.setProperty(`--wui-chat-sheet-max-height`,`${e.sheetMaxHeightPx}px`),t.setAppearance(e),!o.hideWhileOpen&&i.dataset.launcher===`hidden`&&!c&&(i.dataset.launcher=`idle`),i.dataset.launcher===`idle`&&d()}return{...t,setOpen:f,setAppearance:p}}function I4(e){return y$({...e,layout:`full-page`,role:`region`,launcher:!1})}var L4=3;function R4(e){let t=$(`h2`,`wui-chat-greeting`),n=$(`div`,`wui-chat-empty-hero`);n.append($(`span`,`wui-chat-orb`,{"aria-hidden":`true`}),t);let r=$(`div`,`wui-chat-empty-extra`);r.hidden=!0;let i=$(`div`,`wui-chat-starters`,{role:`group`}),a=$(`div`,`wui-chat-empty-rows`),o=$(`div`,`wui-chat-empty-past`),s=$(`div`,`wui-chat-empty`,{role:`group`});s.append(n,r,i,a,o);function c(t,n){let r=$(`button`,`wui-chat-starter`,{type:`button`});return r.style.setProperty(`--wui-chat-i`,String(n)),t.icon&&r.append(l$(t.icon,16)),r.append(document.createTextNode(t.label)),r.addEventListener(`click`,()=>e.onStarter(t)),r}function l(t,n){let r=$(`button`,`wui-chat-empty-row`,{type:`button`}),i=$(`span`,`wui-chat-empty-row-label`);i.textContent=n.resumeLast;let a=$(`span`,`wui-chat-empty-row-title`,{title:t.title||n.untitled});a.textContent=t.title||n.untitled;let o=$(`span`,`wui-chat-empty-row-time`);return o.textContent=rt(t.lastActivityDateTimeUtc),r.append(i,a,o),r.addEventListener(`click`,()=>e.onResume()),r}function u(t,n,r){let i=r?$(`button`,`wui-chat-empty-row`,{type:`button`}):$(`span`,`wui-chat-empty-row`),a=$(`span`,`wui-chat-empty-row-label`);a.textContent=n.ticketAria(t.number);let o=$(`span`,`wui-chat-empty-row-title`);o.textContent=t.subject;let s=$(`span`,`wui-chat-empty-row-status`);return s.textContent=M$(t.status,n),i.append(a,o,s),r&&i.addEventListener(`click`,()=>e.onTicket(t)),i}function d(e,t){if(e.features?.OpenTickets!==!0||!e.openTickets?.length)return null;let n=$(`div`,`wui-chat-open-tickets`,{role:`group`,"aria-label":t.openTickets});return n.append(...e.openTickets.slice(0,L4).map(n=>u(n,t,e.ticketsClickable===!0))),n}function f(e){let{labels:n}=e;t.textContent=e.greeting??``,s.setAttribute(`aria-label`,n.emptyTitle);let r=e.starters??[];i.setAttribute(`aria-label`,n.starters),i.hidden=!e.showStarters||r.length===0,i.replaceChildren(...r.map(c));let o=e.resume??null,u=d(e,n);a.hidden=o===null&&u===null,a.replaceChildren(...[o===null?null:l(o,n),u].filter(Boolean))}return{el:s,paint:f,extraHost:r,pastHost:o}}function z4(){let e=document.createElement(`div`);e.className=`wui-chat-loader-orb`;let t=document.createElement(`span`);t.className=`wui-chat-loader-orb-mark`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`span`);n.className=`wui-chat-loader-orb-glow`,n.setAttribute(`aria-hidden`,`true`);let r=document.createElement(`span`);r.className=`wui-chat-loader-orb-disc`,r.setAttribute(`aria-hidden`,`true`),t.append(n,r);let i=document.createElement(`span`);return i.className=`wui-chat-loader-orb-label`,e.append(t,i),{el:e,render(e){i.textContent!==e.label&&(i.textContent=e.label)}}}var B4=150,V4=1800;function H4(){let e=document.createElement(`div`);e.className=`wui-chat-loader-phrases`;let t=document.createElement(`span`);t.className=`wui-chat-loader-phrases-orb`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`span`);n.className=`wui-chat-loader-phrases-stage`,e.append(t,n);let r=null,i=null;function a(){return e.closest(`.wui-chat-loader`)?.classList.contains(`wui-chat-loader--reduced`)===!0}function o(e){if(e.label===r)return;r=e.label;let t=i,o=document.createElement(`span`);o.className=`wui-chat-loader-phrases-text wui-chat-loader-phrases-text--in`,o.textContent=e.label,o.style.animationDelay=`-${Math.round(performance.now()%V4)}ms, 0s`,n.append(o),i=o,t&&(t.classList.remove(`wui-chat-loader-phrases-text--in`),t.classList.add(`wui-chat-loader-phrases-text--out`),t.style.animationDelay=`-${Math.round(performance.now()%V4)}ms, 0s`,a()?t.remove():setTimeout(()=>t.remove(),B4))}return{el:e,render:o}}var U4=[`95%`,`80%`,`60%`];function W4(){let e=document.createElement(`div`);e.className=`wui-chat-loader-skeleton`;let t=document.createElement(`div`);t.className=`wui-chat-loader-skeleton-label`;let n=document.createElement(`div`);n.className=`wui-chat-loader-skeleton-body`;let r=document.createElement(`span`);r.className=`wui-chat-loader-skeleton-avatar`,r.setAttribute(`aria-hidden`,`true`),n.append(r);for(let e of U4){let t=document.createElement(`span`);t.className=`wui-chat-loader-skeleton-line`,t.setAttribute(`aria-hidden`,`true`),t.style.width=e,n.append(t)}return e.append(t,n),{el:e,render(e){t.textContent!==e.label&&(t.textContent=e.label)}}}var G4=`http://www.w3.org/2000/svg`;function K4(e){if(e===`done`){let e=document.createElementNS(G4,`svg`);e.setAttribute(`viewBox`,`0 0 16 16`),e.setAttribute(`class`,`wui-chat-loader-steps-check`);let t=document.createElementNS(G4,`path`);return t.setAttribute(`d`,`M3 8.5 6.5 12 13 4.5`),t.setAttribute(`pathLength`,`1`),e.append(t),e}let t=document.createElement(`span`);return t.className=e===`active`?`wui-chat-loader-steps-ring`:`wui-chat-loader-steps-dot`,t}function q4(){let e=document.createElement(`div`);e.className=`wui-chat-loader-steps`;let t=document.createElement(`span`);t.className=`wui-chat-loader-steps-pill`;let n=document.createElement(`ol`);n.className=`wui-chat-loader-steps-list`,e.append(t,n);let r=[];function i(){let e=document.createElement(`li`);e.className=`wui-chat-loader-steps-item`;let t=document.createElement(`span`);t.className=`wui-chat-loader-steps-icon`,t.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`span`);i.className=`wui-chat-loader-steps-text`,e.append(t,i);let a={li:e,icon:t,text:i,state:null};return r.push(a),n.append(e),a}function a(e){let a=e.steps.length===0;for(t.hidden=!a,n.hidden=a,a&&t.textContent!==e.label&&(t.textContent=e.label),e.steps.forEach((t,n)=>{let a=r[n]??i();a.text.textContent!==t&&(a.text.textContent=t);let o=n<e.activeIndex?`done`:n===e.activeIndex?`active`:`pending`;a.state!==o&&(a.state=o,a.li.dataset.state=o,a.icon.replaceChildren(K4(o)))});r.length>e.steps.length;)r.pop().li.remove()}return{el:e,render:a}}var J4={Steps:q4,Phrases:H4,Orb:z4,Skeleton:W4},Y4=500;function X4(){let e=document.createElement(`div`);e.className=`wui-chat-loader`,e.setAttribute(`role`,`status`),e.hidden=!0;let t=document.createElement(`span`);t.className=`wui-chat-loader-avatar`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`div`);n.className=`wui-chat-loader-body`;let r=document.createElement(`span`);r.className=`visually-hidden`,e.append(t,n,r);let i=null,a=null,o=0,s=null,c=0,l=null,u=!1;function d(){s!==null&&clearInterval(s),s=null}function f(){e.isConnected?(o+=1,p()):d()}function p(){if(!a||!i)return;let t=At(i.style,i.steps,i.phrases,o);a.render(t),e.setAttribute(`aria-label`,t.label)}function m(){l!==null&&clearTimeout(l),l=null,u=!1,r.textContent=``}function h(e){!u&&l===null&&e&&(l=setTimeout(()=>{l=null,u=!0,r.textContent=e},Y4))}function g(t){if(!t.active)i=null,e.hidden=!0,e.removeAttribute(`data-loading`),d(),m();else{if(!Object.hasOwn(J4,t.style))throw Error(`Unknown loader style. Use Steps, Phrases, Orb or Skeleton.`);if(!(t.intervalMs>0))throw Error(`Loader intervalMs must be a positive number.`);if(i={...t,steps:t.steps??[],phrases:t.phrases??[]},e.hidden=!1,e.setAttribute(`data-loading`,`true`),e.classList.toggle(`wui-chat-loader--reduced`,t.reduced===!0),!a||a.style!==t.style){let r=J4[t.style]();n.replaceChildren(r.el),a={style:t.style,render:r.render},e.dataset.style=t.style,o=0}h(t.announce),t.reduced===!0?(d(),o=0):(s===null||c!==t.intervalMs)&&(d(),c=t.intervalMs,s=setInterval(f,c)),p()}}function _(){d(),m(),a=null,i=null,e.remove()}return{el:e,update:g,destroy:_}}var Z4=`data-wui-printing`,Q4=`data-wui-print-hide`,$4=`data-wui-print-path`,e3=`data-wui-print-target`,t3=new Set([`script`,`style`,`link`,`template`]),n3=null;function r3(){if(n3!==null){for(let e of n3.marked)e.removeAttribute(Q4),e.removeAttribute($4),e.removeAttribute(e3);n3.heading.remove(),document.documentElement.removeAttribute(Z4),window.removeEventListener(`afterprint`,n3.onAfterPrint),n3=null}}function i3(e,t,n,r,i){r3();let a=e.querySelector(`.wui-chat-panel`);if(a===null)throw Error(`print needs the wui-chat root`);let o=[];for(let e=a;e!==document.documentElement;e=e.parentElement){e.setAttribute($4,``),o.push(e);for(let t of e.parentElement.children)t===e||t3.has(t.localName)||(t.setAttribute(Q4,``),o.push(t))}for(let e of n)e.setAttribute(Q4,``),o.push(e);r!==null&&(r.setAttribute(e3,``),o.push(r));let s=document.createElement(`div`);s.className=`wui-chat-print-heading`;let c=document.createElement(`h1`);c.textContent=i.title;let l=document.createElement(`p`);l.textContent=i.printedOn,s.append(c,l),a.prepend(s),document.documentElement.setAttribute(Z4,t);let u=()=>r3();window.addEventListener(`afterprint`,u,{once:!0}),n3={marked:o,heading:s,onAfterPrint:u};try{window.print()}catch(e){throw r3(),e}}function a3(e,t){i3(e,`conversation`,[],null,t)}function o3(e,t,n){if(!e.contains(t))throw Error(`printReply needs a message inside the wui-chat root`);i3(e,`reply`,Array.from(e.querySelectorAll(`li.wui-chat-message`)).filter(e=>e!==t),t,n)}function s3(){return typeof navigator<`u`&&typeof navigator.share==`function`}async function c3({title:e,text:t}){if(!s3())return`failed`;try{return await navigator.share({title:e,text:t}),`shared`}catch(e){return e?.name===`AbortError`?`cancelled`:`failed`}}var l3=new Set([`Assistant`,`Agent`,`Script`]),u3=new WeakMap;function d3(e,t,n){let{labels:r,features:i,title:a,busy:o}=n;if(it(t.parts)!==``){if(i.Share&&s3()){let n=d$(`ghost`,r.share,`share`,async()=>{let e=h3([t],i,r,a,!1);e!==``&&await c3({title:a,text:e})===`failed`&&y3(n.parentElement,r.shareFailed)});n.disabled=o===!0,e.append(n)}if(i.Print){let t=d$(`ghost`,r.print,`printer`,()=>{try{o3(t.closest(`.wui-chat`),t.closest(`li.wui-chat-message`),{title:a,printedOn:_3(r)})}catch{v3(t,r.printFailed)}});e.append(t)}}}function f3(e,t,n){if(t.streaming||t.thinking||t.loading||t.conversationId===null||t.messages.filter(e=>e.stored&&l3.has(e.author.kind)&&it(e.parts)!==``).length===0){e.hidden=!0;return}let{labels:r,features:i}=n,a=!!i.Share&&s3(),o=!!i.Print;if(!a&&!o){e.hidden=!0;return}let s=[a,o,t.messages.length,r.shareConversation,r.printConversation].join(`|`);e.dataset.sig!==s&&(e.dataset.sig=s,e.replaceChildren(),a&&e.append(p3(e,r,i,n)),o&&e.append(m3(e,r,n))),e.hidden=!1}function p3(e,t,n,r){return d$(`ghost`,t.shareConversation,`share`,async()=>{let i=r.getState(),a=g3(i,r);await c3({title:a,text:h3(i.messages.filter(e=>e.stored),n,t,a,!0)})===`failed`&&y3(e,t.shareFailed)})}function m3(e,t,n){let r=d$(`ghost`,t.printConversation,`printer`,()=>{try{a3(e.closest(`.wui-chat`),{title:g3(n.getState(),n),printedOn:_3(t)})}catch{v3(r,t.printFailed)}});return r}function h3(e,t,n,r,i){return Cn(xn(e,{labels:n,title:r,figureText:t.FigureText}),{heading:i,speakers:i})}function g3(e,t){return typeof e.title==`string`&&e.title!==``?e.title:t.title}function _3(e){return e.printedOn(rt(new Date().toISOString()))}function v3(e,t){let n=e.lastChild,r=u3.get(n);r?clearTimeout(r.timer):r={original:n.data},n.data=t,r.timer=setTimeout(()=>{n.data=r.original,u3.delete(n)},On),u3.set(n,r)}function y3(e,t){if(!e)return;let n=document.createElement(`span`);n.className=`wui-chat-action-notice`,n.setAttribute(`role`,`status`),n.textContent=t,e.append(n),setTimeout(()=>n.remove(),On)}function b3({voice:e,getLabels:t,message:n}){if(n.streaming||!e.canSpeak()||B2(n.parts)===``)return null;let r=e.getStatus(),i=r.mode===`Speaking`&&r.messageId===n.id,a=t(),o=i?a.readAloudStop:a.readAloud,s=$(`button`,`wui-chat-action-btn wui-chat-speak`,{type:`button`,"aria-pressed":String(i),"aria-label":o,title:o});return s.append(_2(i?`stop`:`speaker`,16)),s.addEventListener(`click`,()=>{e.toggleSpeak(n.id,n.parts)}),s}function x3({voice:e,getLabels:t,message:n}){let r=e.getStatus().note;if(r?.code!==`SpeakFailed`||r.messageId!==n.id)return null;let i=$(`span`,`wui-chat-action-notice`,{role:`status`});return i.textContent=V2(r,t()),i}var S3=new Set([`Assistant`,`Agent`]),C3=new Set([`Assistant`,`Agent`,`Script`]),w3=new Set([`Visitor`,`Customer`]),T3=48,E3=120,D3={author:{kind:`Assistant`}},O3={warning:`alert-triangle`,danger:`alert-circle`};function k3(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=T3}function A3(e){let{kind:t,displayName:n}=e.author;return t===`Agent`?`Agent:${n??``}`:t===`Script`?`Assistant`:t}function j3(e){for(let t=e?.parentElement;t&&t!==document.body;t=t.parentElement){let{overflowY:e}=getComputedStyle(t);if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return t}return null}function M3(e){let t=e.textContent.trim();t&&!e.hasAttribute(`aria-label`)&&(e.setAttribute(`aria-label`,t),e.title=t)}function N3(e){return e.reduced===!0}function P3(e,t,n){let r=$(`button`,`${u$(`ghost`,`sm`)} wui-chat-action-btn`,{type:`button`,"aria-label":e,title:e}),i=$(`span`);return i.textContent=e,r.append(l$(t,14),i),r.addEventListener(`click`,n),{node:r,text:i}}function F3(e,t){return e.profile?.assistant.name??t.panelTitle}function I3(e,t){return e.author.displayName==null?e.author.kind===`Visitor`||e.author.kind===`Customer`?t.you:e.author.kind===`Agent`?t.agent:t.assistant:e.author.displayName}function L3(e){let t=$(`ol`,`wui-chat-thread`),n=$(`div`,`wui-chat-log`,{role:`log`,"aria-live":`polite`});n.append(t);let r=X4(),i=$(`li`,`wui-chat-message wui-chat-message--assistant wui-chat-message--loading`),a=$(`div`,`wui-chat-loader-slot`);a.append(r.el),i.append(a);let o=!1,s=null,c=$(`li`,`wui-chat-message wui-chat-message--assistant wui-chat-message--greeting`,{"data-run-start":``,"data-restored":``}),l=$(`div`,`wui-chat-message-body`),u=$(`p`,`wui-chat-text`);l.append(u),c.append(l);let d=$(`li`,`wui-chat-conversation-actions`);d.hidden=!0;let f=$(`button`,`wui-chat-jump`,{type:`button`}),p=$(`div`,`wui-chat-jump-slot`);p.hidden=!0,p.append(f);let m=null,h=!0,g=null,_=null,v=new Map,y=``,b=null;function x(e,t,n){return n[e.kind]?{kind:e.kind,part:e,tag:n[e.kind]}:{kind:`Notice`,part:{kind:`Notice`,code:`NeedsNewerApp`,text:t.needsNewerApp},tag:n.Notice}}function S(t,n,r){let i=document.createElement(t);return i.message=r,i.turn=e.makeTurnApi(r.id),i.part=n,i}function C(e){return $(`div`,`wui-chat-part wui-chat-part--${e.toLowerCase()}`)}function w(e,t,n,r,i){e.parts=[];let a=[],o=e=>{let i=x(e,n,r),a=C(i.kind);return a.append(S(i.tag,i.part,t)),a};for(let e of i(t))if(Array.isArray(e)){let t=$(`div`,`wui-chat-part-group`);t.append(...e.map(o)),a.push(t)}else a.push(o(e));e.body.replaceChildren(...a)}function T(t,n,r,i){let a=[];n.parts.forEach((o,s)=>{let c=x(o,r,i),l=t.parts[s];if(l&&l.kind===c.kind&&l.tag===c.tag){l.part!==c.part&&(l.element.message=n,l.element.turn=e.makeTurnApi(n.id),l.element.part=c.part,l.part=c.part),a.push(l);return}let u=C(c.kind),d=S(c.tag,c.part,n);u.append(d),a.push({kind:c.kind,tag:c.tag,part:c.part,element:d,wrapper:u})}),t.parts=a,t.body.replaceChildren(...a.map(e=>e.wrapper))}function E(e,t,n){let r=$(`div`,`wui-chat-rating`,{role:`group`,"aria-label":`${n.rateUp}/${n.rateDown}`});for(let[i,a,o]of[[`Up`,n.rateUp,`thumbs-up`],[`Down`,n.rateDown,`thumbs-down`]]){let s=t.rating===i,c=$(`button`,`${u$(s?`neutral`:`ghost`,`sm`)} wui-chat-action-btn`,{type:`button`,"aria-pressed":String(s),"data-rating":i,"aria-label":a,title:a}),l=$(`span`);l.textContent=a,c.append(l$(o,14),l),c.addEventListener(`click`,()=>D(e,t,i,n)),r.append(c)}if(e.ratingNote){let t=$(`span`,null,{role:`status`});t.textContent=e.ratingNote,r.append(t)}return r}async function D(t,n,r,i){try{await e.onRate(n.id,r),t.ratingNote=i.rated}catch{t.ratingNote=i.ratingFailed}b&&le(b.state,b.context)}function O(t,n,r,i,a){let{labels:o}=i,s=r.features,c=n.author.kind,l=it(n.parts),u=[];if(s.Copy&&C3.has(c)&&l){let e=P3(o.copy,`copy`,async()=>{await kn(l)&&(e.text.textContent=o.copied,e.node.dataset.done=``,e.node.setAttribute(`aria-label`,o.copied),e.node.title=o.copied,clearTimeout(t.copyTimer),t.copyTimer=setTimeout(()=>{e.text.textContent=o.copy,delete e.node.dataset.done,e.node.setAttribute(`aria-label`,o.copy),e.node.title=o.copy},On))});u.push(e.node)}let d=e.getVoice?.();if(d&&C3.has(c)){let e=b3({voice:d,getLabels:()=>o,message:n});e&&u.push(e);let t=x3({voice:d,getLabels:()=>o,message:n});t&&u.push(t)}if(C3.has(c)){let e=$(`div`);d3(e,n,{labels:o,features:s,title:F3(r,o),busy:r.streaming||r.thinking});for(let t of e.childNodes)M3(t);u.push(...e.childNodes)}let f=r.messages.some(e=>e.author.kind===`Visitor`&&e.stored);a&&c===`Assistant`&&!r.streaming&&!r.thinking&&s.Regenerate&&f&&u.push(P3(o.regenerate,`refresh`,()=>e.onRegenerate()).node);let p=r.messages.findLast(e=>e.author.kind===`Visitor`&&e.stored);s.Edit&&p?.id===n.id&&!r.streaming&&!r.thinking&&u.push(P3(o.edit,`pencil`,()=>e.getSession().startEdit(n.id)).node),s.Rating&&n.stored&&S3.has(c)&&u.push(E(t,n,o)),t.actions.hidden=u.length===0,t.actions.replaceChildren(...u)}function k(e){let t=v.get(e.id);if(t)return t;let n=$(`li`,`wui-chat-message`),r=$(`span`,`wui-chat-author visually-hidden`),i=$(`div`,`wui-chat-message-body`),a=$(`div`,`wui-chat-message-actions`);n.append(r,i,a);let o={li:n,author:r,body:i,actions:a,head:null,parts:[],copyTimer:null,ratingNote:null};return v.set(e.id,o),o}function A(e,t,n,r){let i=n?.author.kind===`Agent`&&t.author.kind===`Agent`&&(n.author.displayName??``)===(t.author.displayName??``);e.head?.remove(),e.head=t.author.kind===`Agent`&&!i?k$(t.author,r):null,e.head&&e.li.insertBefore(e.head,e.body)}function j(t,n,r,i,a,o){let{labels:s}=i;t.li.className=`wui-chat-message wui-chat-message--${n.author.kind.toLowerCase()}`,t.li.toggleAttribute(`data-restored`,n.restored===!0),t.li.toggleAttribute(`data-run-start`,!o||A3(o)!==A3(n)),n.streaming?t.li.setAttribute(`aria-busy`,`true`):t.li.removeAttribute(`aria-busy`),t.author.textContent=`${I3(n,s)}: `,A(t,n,o,s);let c=e.getRenderers(),l=e.getLayoutParts();typeof l==`function`?w(t,n,s,c,l):T(t,n,s,c),n.streaming?(t.actions.hidden=!0,t.actions.replaceChildren()):O(t,n,r,i,a)}function ee(e,t){let n=$(`li`,`wui-chat-message wui-chat-message--system wui-chat-message--notice`),r=$(`div`,`wui-chat-notice wui-chat-notice--${e}`,{role:e===`danger`?`alert`:`status`}),i=$(`span`,`wui-chat-notice-icon`,{"aria-hidden":`true`});i.append(l$(O3[e],16));let a=$(`div`,`wui-chat-notice-body`),o=$(`span`,`wui-chat-notice-text`);return o.textContent=t,a.append(o),r.append(i,a),n.append(r),n}function te(e,t){let n=e.resetsDateTimeUtc?` ${t.dailyLimitRefresh(v4(e.resetsDateTimeUtc))}`:``;return ee(`warning`,`${e.message}${n}`)}function ne(t,n){let{labels:r}=n,i=t.turnError?.code??``;if(i===`daily_limit`)return te(t.turnError,r);if(i.endsWith(`feature_off`))return ee(`danger`,t.turnError.message||r.stopped);let a=$(`li`,`wui-chat-message wui-chat-message--system wui-chat-message--error`),o=$(`p`,`wui-chat-error`,{role:`alert`});o.textContent=t.turnError?.message||r.stopped;let s=l$(`alert-circle`,16);if(s.setAttribute(`aria-hidden`,`true`),a.append(s,o),t.features.Retry){let t=$(`div`,`wui-chat-message-actions`);t.append(P3(r.retry,`rotate-ccw`,()=>e.onRetry()).node),a.append(t)}return a}function re(){return t.closest(`.wui-chat`)}function ie(){return t.closest(`.wui-chat-body`)??j3(t)}function ae(e){re()?.classList.toggle(`wui-chat--scrolled`,e.scrollTop>0),k3(e)&&(p.hidden=!0)}function oe(){h=k3(m),ae(m)}function se(e){n.nextElementSibling!==p&&n.parentNode&&n.after(p),e!==m&&(m?.removeEventListener(`scroll`,oe),m=e,e.addEventListener(`scroll`,oe,{passive:!0}),!g&&typeof ResizeObserver==`function`&&(g=new ResizeObserver(()=>{h&&m&&(m.scrollTop=m.scrollHeight)}),g.observe(t)))}f.addEventListener(`click`,()=>{let e=ie(),t=b?.context.reduced===!0;e?.scrollTo({top:e.scrollHeight,behavior:t?`auto`:`smooth`}),p.hidden=!0,f.blur()});function ce(e,t){let n=e.messages.at(-1),r=n?`${n.id}|${it(n.parts).length}`:``;if(r===y)return;let i=y===``||e.conversationId!==_;y=r,_=e.conversationId;let a=ie();a&&(se(a),i||t||w3.has(n?.author.kind)?(a.scrollTop=a.scrollHeight,p.hidden=!0,h=!0):(p.hidden=!1,h=!1),ae(a))}function le(a,l){b={state:a,context:l};let{labels:p}=l;n.setAttribute(`aria-label`,p.thread),f.textContent=p.newMessages??`New messages`;let m=ie();m&&se(m);let h=m===null||m.clientHeight===0||k3(m),g=[],_=new Set,y=a.messages.filter(e=>!(e.streaming&&e.parts.length===0)),x=y.length>0&&w3.has(y[0].author.kind)&&a.greeting?a.greeting:null;x&&(u.textContent=x,g.push(c)),y.forEach((e,t)=>{let n=k(e);_.add(e.id);let r=y[t-1]??(x?D3:null);j(n,e,a,l,t===y.length-1,r),g.push(n.li)});for(let e of[...v.keys()])_.has(e)||v.delete(e);for(a.agentTyping&&g.push(A$(a.agentTyping,p)),a.thinking?(clearTimeout(s),s=null,i.classList.remove(`wui-chat-message--leaving`),o=!0,r.update({active:!0,style:l.loaderStyle,steps:a.steps,phrases:l.phrases,intervalMs:l.intervalMs,reduced:l.reduced,announce:l.assistantName?.trim()?p.preparingAnswer(l.assistantName):void 0}),g.push(i)):o&&s===null&&!N3(l)?(i.classList.add(`wui-chat-message--leaving`),s=setTimeout(()=>{s=null,o=!1,i.classList.remove(`wui-chat-message--leaving`),r.update({active:!1}),b&&le(b.state,b.context)},E3),g.push(i)):s===null?(o=!1,r.update({active:!1})):g.push(i),!a.streaming&&(a.turnError||a.stopped)&&g.push(ne(a,l)),f3(d,a,{labels:p,features:a.features,title:F3(a,p),getState:()=>e.getSession().getState()}),g.push(d),g.forEach((e,n)=>{t.children[n]!==e&&t.insertBefore(e,t.children[n]??null)});t.children.length>g.length;)t.children[g.length].remove();ce(a,h)}function ue(e){return v.get(e)?.li??null}function de(){clearTimeout(s),r.destroy(),m?.removeEventListener(`scroll`,oe),g?.disconnect(),v.clear(),b=null,n.remove()}return{el:n,paint:le,find:ue,destroy:de}}var R3=`wchat:auto-opened`,z3=`wchat:dismissed`,B3=`button, a[href], input, select, textarea`,V3=`input, textarea`;function H3(e){return!e.closest(`.wui-chat`)}function U3(e){return e instanceof Element&&e.matches(V3)&&H3(e)}function W3(){return[...document.querySelectorAll(V3)].some(e=>H3(e)&&e.value!==e.defaultValue)}function G3(e){return e.length!==0&&[...document.querySelectorAll(e.join(`,`))].some(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0})}function K3(e){return e?[...document.querySelectorAll(B3)].some(t=>{if(!H3(t))return!1;let n=t.getBoundingClientRect();return n.width===0||n.height===0?!1:n.left<e.right&&n.right>e.left&&n.top<e.bottom&&n.bottom>e.top}):!1}function q3(e,t,n){if(e.oncePerSession&&sessionStorage.getItem(R3)||e.rememberDismissal&&sessionStorage.getItem(z3)||window.innerWidth<e.skipBelowWidthPx)return!0;let r=window.location.pathname;if(e.skipPathPrefixes.some(e=>r.startsWith(e)))return!0;let i=t.avoid.autoOpenOptOutSelector;return i&&document.querySelector(i)||e.skipWhenFormTouched&&W3()||n.isOpen()?!0:e.skipWhenCoversControl&&K3(n.panelRect())}function J3(e){return U3(document.activeElement)||G3(e.avoid.menuSelectors)||G3(e.avoid.autoOpenBusySelectors)}function Y3(e,t,n){let r=0;function i(){r=0,q3(e,t,n)||(J3(t)?r=setTimeout(i,e.busyRetrySeconds*1e3):(sessionStorage.setItem(R3,`1`),n.open()))}return r=setTimeout(i,e.delaySeconds*1e3),{cancel(){clearTimeout(r),r=0}}}var X3=.4,Z3=20;function Q3(e){let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}function $3(e){let t=e.match(/[\d.]+/g);if(!t||t.length<3)return null;let[n,r,i]=t.slice(0,3).map(Number);return{r:n,g:r,b:i,alpha:t.length>3?Number(t[3])/(e.includes(`%`)?100:1):1}}function e6({r:e,g:t,b:n}){return .2126*Q3(e)+.7152*Q3(t)+.0722*Q3(n)}function t6(e,t){let n=e.getBoundingClientRect(),r=document.elementsFromPoint?.(n.left+n.width/2,n.top+n.height/2)??[],i=t.length?t.join(`,`):null;for(let t of r){if(e.contains(t))continue;if(i&&t.closest(i))return!0;let n=$3(getComputedStyle(t).backgroundColor);if(n&&n.alpha>0)return e6(n)<X3}return!1}function n6(e){return e.length===0?[]:[...document.querySelectorAll(e.join(`,`))]}function r6(e){let t=0;for(let n of e){let e=n.getBoundingClientRect();e.height!==0&&(t=Math.max(t,window.innerHeight-e.top))}return t>0?t+Z3:0}function i6(e){if(e.length===0)return!1;for(let t of document.querySelectorAll(e.join(`,`))){let e=t.getBoundingClientRect();if(e.width>0&&e.height>0)return!0}return!1}function a6(e,t,n){let r=n.ownerDocument.documentElement,i=0,a=!1,o=null;function s(){i=0;let s=t.liftAboveFooter?n6(e.liftSelectors):[];if(o)for(let e of s)o.observe(e);n.style.setProperty(`--wui-chat-lift`,`${r6(s)}px`);let c=n.getBoundingClientRect(),l=c.height===0?0:Math.round(window.innerHeight-c.top);r.style.setProperty(`--wui-chat-launcher-block`,`${l}px`);let u=t.stepAsideForMenus&&i6(e.menuSelectors);u&&!a?(n.dataset.launcher=`hidden`,n.inert=!0,a=!0):!u&&a&&(n.dataset.launcher=`idle`,n.inert=!1,a=!1);let d=t.switchOnDark&&t6(n,e.darkSelectors);d&&n.dataset.onDark===void 0&&(n.dataset.onDark=``),!d&&n.dataset.onDark!==void 0&&delete n.dataset.onDark}function c(){i||=requestAnimationFrame(s)}typeof ResizeObserver==`function`&&(o=new ResizeObserver(c));let l=new MutationObserver(c);return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`,`open`,`data-menu-open`]}),document.addEventListener(`scroll`,c,{capture:!0,passive:!0}),window.addEventListener(`resize`,c),window.addEventListener(`load`,c),n.addEventListener(`animationend`,c),c(),{destroy(){i&&cancelAnimationFrame(i),i=0,o?.disconnect(),l.disconnect(),document.removeEventListener(`scroll`,c,{capture:!0}),window.removeEventListener(`resize`,c),window.removeEventListener(`load`,c),n.removeEventListener(`animationend`,c),a&&=(n.inert=!1,!1),delete n.dataset.onDark,n.style.removeProperty(`--wui-chat-lift`),r.style.removeProperty(`--wui-chat-launcher-block`)}}}var o6=`wchat:session-start`,s6=`wchat:pages`,c6=`wchat:services`;function l6(e){let t=sessionStorage.getItem(e);return t?JSON.parse(t):[]}function u6(e,t){sessionStorage.setItem(e,JSON.stringify(t))}function d6(e,t){let n=t.find(t=>e.startsWith(t));return n===void 0?null:e.slice(n.length).replace(/^\/+|\/+$/g,``)||null}function f6(e){sessionStorage.getItem(o6)||sessionStorage.setItem(o6,String(Date.now()));let t=0;function n(){let e=document.documentElement.scrollHeight;if(e<=0)return;let n=(window.scrollY+window.innerHeight)/e*100;n>t&&(t=n)}return window.addEventListener(`scroll`,n,{passive:!0}),function(){n();let r=window.location.pathname,i=l6(s6);i.includes(r)||(i.push(r),u6(s6,i));let a=d6(r,e),o=l6(c6);return a!==null&&(o=o.filter(e=>e!==a),o.push(a),o=o.slice(-10),u6(c6,o)),{timeOnSiteSeconds:Math.floor((Date.now()-Number(sessionStorage.getItem(o6)))/1e3),scrollPercent:Math.min(100,Math.floor(t)),pagesViewed:i.length,viewedServices:o}}}var p6=`a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]`;function m6(e,t){if(t.key!==`Tab`)return;let n=[...e.querySelectorAll(p6)].filter(e=>e.tabIndex>=0&&!e.hidden);if(n.length===0){t.preventDefault();return}let r=n[0],i=n[n.length-1],a=e.ownerDocument.activeElement,o=e.contains(a);t.shiftKey?o&&a!==r||(t.preventDefault(),i.focus()):o&&a!==i||(t.preventDefault(),r.focus())}function h6(e){e?.isConnected&&e.focus()}function g6(e,t){t||typeof navigator>`u`||typeof navigator.vibrate!=`function`||navigator.vibrate(e)}var _6=`(prefers-reduced-motion: reduce)`;function v6(e,t){let n=typeof window.matchMedia==`function`?window.matchMedia(_6):null,r=new Set,i=()=>e.motion===`Reduced`||t?.motion===!1||n?.matches===!0,a=i();function o(){let e=i();if(e!==a){a=e;for(let e of r)e(a)}}return n?.addEventListener(`change`,o),{get reduced(){return a},subscribe(e){return r.add(e),()=>{r.delete(e)}},destroy(){n?.removeEventListener(`change`,o),r.clear()}}}var y6=`wui-chat-lock`,b6=`wui-chat-scroll-lock`;function x6(e){let t=e.ownerDocument,n=[t.documentElement,t.body],r=e.style.overscrollBehavior;for(let e of n)e.classList.add(y6);e.setAttribute(`data-lenis-prevent`,``),e.style.overscrollBehavior=`contain`,window.dispatchEvent(new CustomEvent(b6,{detail:{locked:!0}}));let i=!0;return function(){if(i){i=!1;for(let e of n)e.classList.remove(y6);e.removeAttribute(`data-lenis-prevent`),e.style.overscrollBehavior=r,window.dispatchEvent(new CustomEvent(b6,{detail:{locked:!1}}))}}}var S6={open:{from:420,to:920,seconds:.16,peak:.16},reply:{from:680,to:540,seconds:.11,peak:.06},sent:{from:540,to:760,seconds:.09,peak:.05}},C6=[`pointerdown`,`keydown`,`touchstart`],w6=`wchat:muted`,T6=1e-4;function E6(e,t){let n=t.get(w6)===`1`,r=null;function i(){for(let e of C6)document.removeEventListener(e,a)}function a(){let e=globalThis.AudioContext||globalThis.webkitAudioContext;!r&&e&&(r=new e),r?.state===`suspended`&&r.resume(),i()}for(let e of C6)document.addEventListener(e,a);return{play(t){let i=S6[t];if(!i||n||!r||!e[t]||!(e.volume>0))return;let a=r.currentTime,o=r.createOscillator(),s=r.createGain();o.type=`sine`,o.frequency.setValueAtTime(i.from,a),o.frequency.linearRampToValueAtTime(i.to,a+i.seconds),s.gain.setValueAtTime(i.peak*e.volume,a),s.gain.exponentialRampToValueAtTime(T6,a+i.seconds),o.connect(s),s.connect(r.destination),o.start(a),o.stop(a+i.seconds)},setMuted(e){n=!!e,t.set(w6,n?`1`:`0`)},isMuted(){return n},destroy(){i(),r?.close(),r=null}}}var D6=2e3,O6=500,k6=32,A6=16,j6=`data-wui-chat-switching`;function M6(e){return new Promise(t=>setTimeout(t,e))}function N6(e,t){return typeof e!=`function`||e()?Promise.resolve():new Promise(n=>{let r=0,i=()=>{e()||r>=t?n():(r+=A6,setTimeout(i,A6))};setTimeout(i,A6)})}async function P6(e,t={}){let n=t.reduced??globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches===!0;if(typeof document.startViewTransition!=`function`||n){await e();return}let r=document.documentElement;r.setAttribute(j6,``);try{let n=()=>!t.target||document.querySelector(`.wui-chat--${t.target}`)!==null,r=()=>(typeof t.pageReady!=`function`||t.pageReady())&&n(),i=document.startViewTransition(async()=>{await e(),await N6(t.routeReady,D6),await N6(r,O6),await M6(k6)});i.ready.catch(()=>{});try{await i.updateCallbackDone}finally{await i.finished.catch(()=>{})}}finally{r.removeAttribute(j6)}}var F6=100,I6=12,L6=220,R6=640;function z6(e,t){let n=t.phone.mode===`Sheet`,r=window.visualViewport,i=0;function a(){e.style.removeProperty(`bottom`),e.style.removeProperty(`max-height`)}function o(){if(i=0,window.innerWidth>t.phone.maxWidthPx){a();return}if(!r)return;let o=Math.max(0,window.innerHeight-r.height-r.offsetTop),s=r.height-I6;n&&(s=Math.min(R6,Math.max(L6,s))),e.style.bottom=`${o}px`,e.style.maxHeight=`${s}px`}function s(){clearTimeout(i),i=setTimeout(o,F6)}return r?.addEventListener(`resize`,s),r?.addEventListener(`scroll`,s),window.addEventListener(`resize`,s),window.addEventListener(`orientationchange`,s),o(),{destroy(){clearTimeout(i),r?.removeEventListener(`resize`,s),r?.removeEventListener(`scroll`,s),window.removeEventListener(`resize`,s),window.removeEventListener(`orientationchange`,s),a()}}}var B6=typeof HTMLElement>`u`?class{}:HTMLElement;function V6(e,t){if(e.conversationState===`WaitingForAgent`)return t.statusWaitingForAgent;if(e.conversationState===`WithAgent`){let n=e.agent?.displayName;return t.statusWithAgent(typeof n==`string`&&n.trim()!==``?n:t.handoffAgentFallback)}return t.headerStatus}function H6(e){return e.features.HumanHandoff===!0&&e.conversationState===`Open`&&e.messages.some(e=>e.author.kind===`Visitor`||e.author.kind===`Customer`)&&!e.streaming&&!e.thinking}function U6(e,t,n){return t.PanelSwitch!==!0||typeof n!=`function`?null:e===`docked`?`full-page`:e===`full-page`?`docked`:null}var W6=[`launcher`,`docked`,`full-page`,`embedded`],G6=[`end`,`start`],K6={steps:`Steps`,phrases:`Phrases`,orb:`Orb`,skeleton:`Skeleton`},q6={on:`On`,reduced:`Reduced`},J6=[`auto`,`light`,`dark`],Y6=`wchat:muted`,X6=6e4,Z6=400,Q6=[`labels`,`pageContext`,`compact`,`open`,`layoutParts`,`getCaptchaToken`,`openAttachment`,`openCitation`,`openTarget`,`openTicket`,`onNavigate`,`resolveLink`,`emptyContent`,`onPanelSwitch`,`preloadPanelSwitch`],$6={...S2};function e8(e,t){if(!g$.includes(e))throw Error(`Unknown part kind "${e}". Use one of ${g$.join(`, `)}.`);if(typeof t!=`string`||!t.includes(`-`))throw Error(`Renderer tag "${t}" must be a custom element name containing a hyphen.`)}function t8(e,t){e8(e,t),$6[e]=t}function n8(e,t){return n=>{let r=n.toLowerCase();if(!Object.hasOwn(t,r))throw Error(`<wui-chat ${e}> must be one of ${Object.keys(t).join(`, `)}, got "${n}".`);return t[r]}}function r8(e){return t=>{let n=Number(t);if(!Number.isInteger(n)||n<0)throw Error(`<wui-chat ${e}> must be a whole number of pixels, got "${t}".`);return n}}function i8(e){return t=>{if(t===``||t===`true`)return!0;if(t===`false`)return!1;throw Error(`<wui-chat ${e}> must be true or false, got "${t}".`)}}var a8=e=>e.split(`,`).map(e=>e.trim()).filter(Boolean),o8=[[`launcher-style`,`launcher`,`style`,n8(`launcher-style`,{round:`Round`,pill:`Pill`})],[`entrance`,`launcher`,`entrance`,n8(`entrance`,{"slide-up":`SlideUp`,"bounce-in":`BounceIn`,"fade-in-pulse":`FadeInPulse`,"spin-scale":`SpinScale`,"wiggle-in":`WiggleIn`,"elastic-in":`ElasticIn`,rise:`Rise`,none:`None`})],[`idle`,`launcher`,`idle`,n8(`idle`,{"float-and-pulse":`FloatAndPulse`,ring:`Ring`,none:`None`})],[`label-reveal`,`launcher`,`labelReveal`,n8(`label-reveal`,{bubble:`Bubble`,expand:`Expand`})],[`compact`,`launcher`,`compact`,i8(`compact`)],[`panel-motion`,`panel`,`motion`,n8(`panel-motion`,{spring:`Spring`,none:`None`})],[`panel-width`,`panel`,`widthPx`,r8(`panel-width`)],[`panel-max-height`,`panel`,`maxHeightPx`,r8(`panel-max-height`)],[`panel-bottom-gap`,`panel`,`bottomGapPx`,r8(`panel-bottom-gap`)],[`phone-max-width`,`phone`,`maxWidthPx`,r8(`phone-max-width`)],[`phone-mode`,`phone`,`mode`,n8(`phone-mode`,{"full-screen":`FullScreen`,sheet:`Sheet`})],[`sheet-height-dvh`,`phone`,`sheetHeightDvh`,r8(`sheet-height-dvh`)],[`sheet-max-height`,`phone`,`sheetMaxHeightPx`,r8(`sheet-max-height`)],[`input-ring`,`input`,`ring`,i8(`input-ring`)],[`send-reveal`,`input`,`sendReveal`,n8(`send-reveal`,{"on-text":`OnText`,always:`Always`})],[`lift-selectors`,`avoid`,`liftSelectors`,a8],[`menu-selectors`,`avoid`,`menuSelectors`,a8],[`dark-selectors`,`avoid`,`darkSelectors`,a8],[`autoopen-busy-selectors`,`avoid`,`autoOpenBusySelectors`,a8],[`autoopen-optout-selector`,`avoid`,`autoOpenOptOutSelector`,e=>e]],s8={layout:`launcher`,position:`end`,"offset-x":`24`,"offset-y":`24`,loader:`steps`,motion:`on`,icon:`chat`},c8=[`base`,`layout`,`position`,`offset-x`,`offset-y`,`loader`,`screen`,`motion`,`theme`,`icon`,`narrow`,...o8.map(([e])=>e).filter(e=>e!==`compact`)],l8=e=>e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());function u8(e){let t={launcher:{},panel:{},phone:{},input:{},avoid:{}};for(let[n,r,i,a]of o8){let o=e.getAttribute(n);o!=null&&(t[r][i]=a(o))}let n=e.getAttribute(`motion`);return xt({...t,motion:n==null?void 0:n8(`motion`,q6)(n)})}function d8(e){let t=e.getAttribute(`loader`)??`steps`;if(!Object.hasOwn(K6,t))throw Error(`<wui-chat loader> must be one of ${Object.keys(K6).join(`, `)}, got "${t}".`);return K6[t]}function f8(e){let t=e.getAttribute(`narrow`);if(t!=null&&t!==``)return Object.fromEntries(a8(t).map(e=>[e,!1]))}function p8(e){return e===Y6?globalThis.localStorage:globalThis.sessionStorage}var m8={get:e=>p8(e).getItem(e),set:(e,t)=>p8(e).setItem(e,t)};function h8(e){return globalThis.innerWidth<=e.phone.maxWidthPx}function g8(e){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}var _8=0,v8=class extends B6{static get observedAttributes(){return[...c8,`compact`,`open`,`labels`,`page-context`,`narrow`].filter((e,t,n)=>n.indexOf(e)===t)}constructor(){super(),_8+=1,this._uid=`wui-chat-${_8}`,this._built=!1,this._session=null,this._unsubscribe=null,this._voice=null,this._voiceConversationId=void 0,this._shell=null,this._labelsProp=void 0,this._pageContextProp=void 0,this._layoutParts=null,this._renderers={...$6},this._rendererApi={define:(e,t)=>{e8(e,t),this._renderers[e]=t,this._render()},map:this._renderers},this._captchaToken=null,this._openAttachmentProp=null,this._openCitationProp=null,this._openTargetProp=null,this._resolveLinkProp=null,this._openTicketProp=void 0,this._emptyContentProp=null,this._onPanelSwitchProp=null,this._preloadPanelSwitchProp=null,this._preloaded=!1,this._pastList=null,this._past=null,this._pastRefreshed=!1,this._historyShown=!1,this._openedConversation=null,this._lastOpen=!1,this._openTrigger=`manual`,this._focusTimer=null,this._nudgeArmed=!1,this._seeded=!1,this._wasLoading=!1,this._seen=new Set,this._sound=null,this._behaviour=null,this._autoOpen=null,this._avoid=null,this._motion=null,this._phone=null,this._requesting=!1,this._onKeyDown=e=>{e.key===`Escape`&&this._session?.getState().open&&(e.stopPropagation(),this._session.close(`escape`))}}get session(){return this._session??null}get conversationId(){return this._session?.getState().conversationId??null}get labels(){return s({...p$(this,`labels`),...this._labelsProp})}set labels(e){this._labelsProp=e??void 0,this._render()}get pageContext(){return this._pageContextProp===void 0?p$(this,`page-context`):this._pageContextProp}set pageContext(e){this._pageContextProp=e===null?void 0:e}get compact(){return this.hasAttribute(`compact`)}set compact(e){this.toggleAttribute(`compact`,e===!0||e===``||e===`true`)}get open(){return this.hasAttribute(`open`)}set open(e){this.toggleAttribute(`open`,e===!0||e===``||e===`true`)}get renderers(){return this._rendererApi}get layoutParts(){return this._layoutParts}set layoutParts(e){this._layoutParts=typeof e==`function`?e:null,this._render()}get getCaptchaToken(){return this._captchaToken}set getCaptchaToken(e){this._captchaToken=typeof e==`function`?e:null}get openAttachment(){return this._openAttachmentProp??(e=>this._defaultOpenAttachment(e))}set openAttachment(e){this._openAttachmentProp=typeof e==`function`?e:null}get openCitation(){return this._openCitationProp??((e,t)=>this._defaultOpenCitation(e,t))}set openCitation(e){this._openCitationProp=typeof e==`function`?e:null}get openTarget(){return this._openTargetProp??(e=>this._defaultOpenTarget(e))}set openTarget(e){this._openTargetProp=typeof e==`function`?e:null}get openTicket(){return this._openTicketProp}set openTicket(e){this._openTicketProp=typeof e==`function`?e:void 0}get onNavigate(){return this._onNavigateProp}set onNavigate(e){this._onNavigateProp=typeof e==`function`?e:void 0}get resolveLink(){return this._resolveLinkProp}set resolveLink(e){this._resolveLinkProp=typeof e==`function`?e:null}get emptyContent(){return this._emptyContentProp}set emptyContent(e){if(e!==null&&!(e instanceof Node))throw TypeError(`emptyContent must be a Node or null`);this._emptyContentProp=e,this._applyEmptyContent()}get onPanelSwitch(){return this._onPanelSwitchProp}set onPanelSwitch(e){this._onPanelSwitchProp=typeof e==`function`?e:null}get preloadPanelSwitch(){return this._preloadPanelSwitchProp}set preloadPanelSwitch(e){this._preloadPanelSwitchProp=typeof e==`function`?e:null}connectedCallback(){if(this._adoptEarlyProperties(),this._assertLayout(),this._assertPosition(),this.base.trim()===``)throw TypeError(`<wui-chat> needs a base path, e.g. base="/api/assistant".`);this._built||this._build(),this._shell||this._buildShell(),this._session||this._createSession(),this._past||this._createPast(),this._unsubscribe||=this._session.subscribe(()=>this._render()),this._render()}_adoptEarlyProperties(){for(let e of Q6){if(!Object.hasOwn(this,e))continue;let t=this[e];delete this[e],this[e]=t}}disconnectedCallback(){this._voice?.stop(),this._session?.stop(),this._unsubscribe?.(),this._unsubscribe=null,this._disposePast(),this._shell?.destroy?.(),document.removeEventListener(`keydown`,this._onKeyDown),this._avoid?.destroy(),this._avoid=null,this._autoOpen?.cancel(),this._autoOpen=null,this._motion?.destroy(),this._motion=null}attributeChangedCallback(e,t,n){if(this._built&&t!==n){if(e===`layout`)this._assertLayout(),this._buildShell();else if(e===`position`)this._assertPosition();else if(e===`base`||e===`screen`||e===`narrow`)this._resetSession();else if(e===`motion`)this._motion?.destroy(),this._motion=null;else if(e===`open`&&this._session){let e=this._session.getState().open;this.open!==e&&this._setOpen(this.open,`manual`)}this._render()}}toggle(){this._session&&(this._session.getState().open?this._session.close(`button`):this._setOpen(!0,`manual`))}close(){this._voice?.stop(),this._session?.close(`button`)}newConversation(){this._voice?.stop(),this._session?.newConversation(),this._past?.refresh()}reset(){this._voice?.stop(),this._session?.reset()}_setOpen(e,t){this._session&&(e?(this._openTrigger=t,this._session.open({trigger:t})):this._session.close(`button`))}_assertLayout(){let e=this.layout;if(!W6.includes(e))throw Error(`<wui-chat layout> must be one of ${W6.join(`, `)}, got "${e}".`)}_assertPosition(){let e=this.position;if(!G6.includes(e))throw Error(`<wui-chat position> must be one of ${G6.join(`, `)}, got "${e}".`)}_isLauncherLike(){return this.layout===`launcher`||this.layout===`docked`}_build(){this._built=!0,this._header=r4({onNew:()=>this.newConversation(),onHistory:()=>this._toggleHistory(),onClose:()=>this.close(),onMute:()=>this._session?.setMuted(!this._session.getState().muted),onSwitch:()=>this._switchPanel(),titleId:`${this._uid}-title`}),this._starters=R4({onStarter:e=>this._session.submit(e.message),onResume:()=>this._session.resumeLast(),onTicket:e=>{typeof this.openTicket==`function`&&this.openTicket({ticketId:e.ticketId,number:e.number})}}),this._applyEmptyContent(),this._voice=H2({getState:()=>this._session.getState(),getLabels:()=>this.labels,getToken:()=>this._session.client.getSpeechToken()}),this._voice.subscribe(()=>this._render()),this._thread=L3({getRenderers:()=>this._renderers,getLayoutParts:()=>this._layoutParts,makeTurnApi:e=>this._makeTurnApi(e),onRetry:()=>this._session.retry(),onRegenerate:()=>this._session.regenerate(),onRate:(e,t)=>this._session.rate(e,t),getSession:()=>this._session,getVoice:()=>this._voice}),this._composer=X2({voice:this._voice,onSubmit:e=>this._session.submit(e),onStop:()=>this._session.stop(),onAttach:e=>this._session.attach(e),onRemove:e=>this._session.removeAttachment(e),onCancelEdit:()=>this._session.cancelEdit(),onTyping:()=>this._session.notifyTyping(),onDraftApplied:()=>this._session.consumeDraft()}),this._footer=t4(),this._history=o4({getClient:()=>this._session.client,getLabels:()=>this.labels,getFeatures:()=>this._session.getState().features,onOpen:e=>{this._session.openConversation(e).catch(()=>{}),this._toggleHistory(!1)},onDeleted:e=>{e===this.conversationId&&this._session.newConversation()}}),this._nudge=f4({onActivate:()=>this._setOpen(!0,`manual`),onDismiss:()=>{}}),this._status=$(`p`,null,{role:`status`}),this._status.hidden=!0,this._errorEl=$(`p`,`wui-chat-profile-error`,{role:`alert`}),this._errorEl.hidden=!0,this._liveStatus=$(`p`,`wui-chat-live-status`,{role:`status`}),this._liveStatus.hidden=!0,this._talk=$(`button`,`${u$(`outline`,`sm`)} wui-chat-handoff-request`,{type:`button`}),this._talk.addEventListener(`click`,()=>this._requestHandoff()),this._liveRetry=$(`button`,u$(`ghost`,`sm`),{type:`button`}),this._liveRetry.addEventListener(`click`,()=>this._session.resumeLive()),this._liveError=$(`p`,`wui-chat-live-error`,{role:`alert`}),this._liveError.hidden=!0,this._live=$(`div`,`wui-chat-live`),this._live.append(this._liveStatus,this._talk,this._liveRetry,this._liveError),this._live.hidden=!0,this._body=$(`div`,`wui-chat-body`),this._body.append(this._starters.el,this._thread.el,this._live,this._history.el,this._status,this._errorEl),this._foot=$(`div`,`wui-chat-foot`),this._foot.append(...this._composer.nodes,this._footer.el)}_buildShell(){let e={launcher:F4,docked:A4,"full-page":I4,embedded:j4};this._shell?.destroy?.(),this._avoid?.destroy(),this._avoid=null,this._autoOpen?.cancel(),this._autoOpen=null,this._lastOpen=!1,this._launcherPlayed=!1;let t=e[this.layout]({id:`${this._uid}-panel`,position:this.position,onToggle:()=>this.toggle()});t.panel.append(this._header.el,this._body,this._foot),t.panel.setAttribute(`aria-labelledby`,`${this._uid}-title`),t.panel.addEventListener(`keydown`,e=>{e.key===`Tab`&&m6(t.panel,e)}),t.nudgeHost&&t.nudgeHost.prepend(this._nudge.el),this._shell=t,this.replaceChildren(t.root)}_createSession(){let e=E(d4(),{base:this.base}),t=f8(this);this._session=on(e,{screen:this.screen||void 0,narrow:t,pageContext:()=>this.pageContext,behaviour:()=>this._session?.getState().features.BehaviourStarters?this._behaviour?.()??null:null,prefs:m8,reducedMotion:()=>this._motion?.reduced??!1,schedule:g8,getCaptchaToken:e=>{if(this._captchaToken)return this._captchaToken(e);let t=this._session?.getState().profile?.captcha?.siteKey;return t?C4(t,e):Promise.resolve(null)},onEvent:(e,t)=>{this.dispatchEvent(new CustomEvent(`wui-chat-event`,{bubbles:!0,detail:{name:e,data:t}}))},onError:()=>{},labels:this.labels}),this._unsubscribe=null,this._lastOpen=!1,this._openApplied=!1,this._seeded=!1,this._wasLoading=!1,this._seen=new Set,this._pastRefreshed=!1}_createPast(){this._pastList=k({client:this._session.client,pageSize:20}),this._past=y4({list:this._pastList,getLabels:()=>this.labels,getFeatures:()=>this._session.getState().features,onOpen:e=>{this._session.openConversation(e).catch(()=>{})}}),this._starters.pastHost.append(this._past.el)}_disposePast(){this._past&&(this._past.el.remove(),this._past.dispose(),this._pastList.dispose(),this._past=null,this._pastList=null)}_applyEmptyContent(){if(!this._starters)return;let e=this._starters.extraHost;e.replaceChildren(...this._emptyContentProp?[this._emptyContentProp]:[]),e.hidden=!this._emptyContentProp}_switchPanel(){let e=this._session.getState(),t=U6(this.layout,e.features,this._onPanelSwitchProp);if(t===null)return;t===`full-page`&&this.close();let n={from:this.layout,to:t,conversationId:e.conversationId,draft:this._composer.getDraft()};P6(()=>this._onPanelSwitchProp(n),{target:t,reduced:this._motion?.reduced===!0}).then(()=>document.querySelector(`.wui-chat--${t} .wui-chat-input`)?.focus()).catch(e=>globalThis.reportError?.(e))}async _requestHandoff(){this._requesting=!0,this._liveError.hidden=!0,this._render();try{await this._session.requestHandoff()}catch(e){this._liveError.textContent=e?.message||this.labels.errorGeneric,this._liveError.hidden=!1}finally{this._requesting=!1,this._render()}}_paintLive(e,t,n){let r=e.live===`Lost`,i=H6(e);this._liveStatus.hidden=!r,this._liveStatus.textContent=r?t.liveLost:``,this._liveRetry.hidden=!r,this._liveRetry.textContent=t.retry,this._talk.hidden=!i,this._talk.textContent=t.talkToPerson,this._talk.disabled=this._requesting,this._live.hidden=n||!r&&!i}_resetSession(){this._voice?.stop(),this._unsubscribe?.(),this._unsubscribe=null,this._session?.dispose(),this._session=null,this._disposePast(),this._history.dispose(),this.isConnected&&(this._createSession(),this._createPast(),this._unsubscribe=this._session.subscribe(()=>this._render()))}_toggleHistory(e=!this._historyShown){this._historyShown=e,e?this._history.show():this._history.hide(),this._render()}_makeTurnApi(e){let t=cn(this._session,{messageId:e,labels:this.labels,openAttachment:e=>this.openAttachment(e),openCitation:t=>this.openCitation(e,t),openTarget:e=>this.openTarget(e),openTicket:this.openTicket,onNavigate:this.onNavigate});return t.resolveLink=this.resolveLink,t}_defaultOpenAttachment(e){this._session.client.getAttachment(e.attachmentId).then(t=>{let n=URL.createObjectURL(new Blob([t],{type:e.contentType}));window.open(n,`_blank`,`noopener`),setTimeout(()=>URL.revokeObjectURL(n),X6)}).catch(e=>globalThis.reportError?.(e))}_defaultOpenCitation(e,t){let n=this._thread.find(e);if(n){for(let e of n.querySelectorAll(`[data-marker]`))if(e.dataset.marker===String(t)){e.focus();return}}}_defaultOpenTarget(e){/^https?:\/\//i.test(e)?window.open(e,`_blank`,`noopener`):window.location.assign(e)}_render(){this._built&&this._session&&this._paint(this._session.getState())}_paint(e){e.conversationId!==this._voiceConversationId&&(this._voiceConversationId=e.conversationId,this._voice.stop());let t=this.labels,n=e.profile,r=this._isLauncherLike();if(!n){this.hidden=r,this._header.el.hidden=!0,this._starters.el.hidden=!0,this._thread.el.hidden=!0,this._history.el.hidden=!0,this._foot.hidden=!0,this._errorEl.hidden=e.profileError==null,e.profileError&&(this._errorEl.textContent=e.profileError.message),this._status.hidden=e.profileError!=null,this._status.textContent=t.loadingConversation,this._shell.panel.setAttribute(`aria-busy`,String(e.profileError==null));return}if(this._shell.panel.removeAttribute(`aria-busy`),!e.features.VisitorChat){this.hidden=!0,this._status.hidden=!0;return}this.hidden=!1;let i=e.features,a=u8(this);this._ensureRuntime(e,n,a,t);let o=e.loading,s=e.loadError,c=e.messages.length===0&&!o,l=this._historyShown&&i.History===!0,u=e.messages.some(e=>e.author.kind===`Visitor`),d=U6(this.layout,i,this._onPanelSwitchProp),f=e.streaming||e.thinking;this._header.paint({labels:t,title:n.assistant.name,tagline:n.assistant.tagline,status:V6(e,t),canNew:!f,showNew:this.layout===`full-page`||u,showHistory:i.History,showClose:r||this.layout===`full-page`&&d!==null,switchTo:d,canSwitch:!f,viewingHistory:l,showMute:i.Sounds&&n.experience.sound.muteControl,muted:e.muted}),this._starters.el.hidden=!c||l,c&&this._starters.paint({labels:t,greeting:e.greeting,starters:e.starters,showStarters:i.Starters&&!e.streaming,resume:!i.History&&i.ResumeLast?e.lastConversation:null,openTickets:e.openTickets,features:e.features,ticketsClickable:typeof this.openTicket==`function`}),i.History&&!this._pastRefreshed&&(this._pastRefreshed=!0,this._past?.refresh()),this._past?.paint();let p=!c&&!o&&!s&&!l;this._thread.el.hidden=!p,p&&this._thread.paint(e,{labels:t,loaderStyle:d8(this),reduced:this._motion?.reduced??!1,phrases:n.experience.pacing.thinkingPhrases,intervalMs:n.experience.pacing.phraseIntervalMs,assistantName:n.assistant.name}),this._paintLive(e,t,l),this._status.hidden=!o||l,this._status.textContent=t.loadingConversation,this._errorEl.hidden=!s||l,s&&(this._errorEl.textContent=s.message),this._foot.hidden=l,this._composer.paint({state:e,labels:t,maxLength:n.limits.maxMessageLength,accept:n.limits.contentTypes.join(`,`),draft:e.draft??null}),this._footer.paint({labels:t,profile:n}),this._history.el.hidden=!l,this._syncOpen(e,n,i,t,r),this._syncConversation(e),this._playSounds(e)}_ensureRuntime(e,t,n,r){let i=e.features;this._motion||(this._motion=v6(n,t.experience),this._motion.subscribe(()=>this._render())),i.Sounds&&!this._sound&&(this._sound=E6(t.experience.sound,m8)),!i.Sounds&&this._sound&&(this._sound=null),i.BehaviourStarters&&!this._behaviour&&(this._behaviour=f6(t.start.behaviour?.servicePathPrefixes??[]));let a=this._isLauncherLike();a&&!this._avoid&&this.layout===`launcher`&&(this._avoid=a6(n.avoid,t.experience.launcher,this._shell.nudgeHost)),this.layout===`launcher`&&i.AutoOpen&&!this._autoOpen&&(this._autoOpen=Y3(t.experience.autoOpen,n,{open:()=>this._setOpen(!0,`auto`),isOpen:()=>this._session.getState().open,panelRect:()=>this._shell.panel.getBoundingClientRect()}));let o=h8(n);this._shell.setLabels(r),this._shell.setAppearance({position:this.position,offsetX:this.hasAttribute(`offset-x`)?r8(`offset-x`)(this.getAttribute(`offset-x`)):void 0,offsetY:this.hasAttribute(`offset-y`)?r8(`offset-y`)(this.getAttribute(`offset-y`)):void 0,width:`${n.panel.widthPx}px`,maxHeight:n.panel.maxHeightPx,bottomGap:n.panel.bottomGapPx,reduced:this._motion.reduced,theme:J6.includes(this.getAttribute(`theme`))?this.getAttribute(`theme`):`auto`,icon:this.icon,launcherStyle:n.launcher.style,compact:n.launcher.compact,labelReveal:n.launcher.labelReveal,entrance:n.launcher.entrance,idle:n.launcher.idle,phone:o,hoverLabel:t.experience.launcher.hoverLabel,peek:t.experience.launcher.peek,peekSeconds:t.experience.launcher.peekSeconds,hideWhileOpen:t.experience.launcher.hideWhileOpen,phoneMode:n.phone.mode,sheetHeightDvh:n.phone.sheetHeightDvh,sheetMaxHeightPx:n.phone.sheetMaxHeightPx,launcherState:this._launcherPlayed?void 0:`entering`}),this._launcherPlayed=!0,this._shell.root.classList.toggle(`wui-chat--phone`,a&&h8(n))}_syncOpen(e,t,n,r,i){if(i){if(!this._openApplied&&(this._openApplied=!0,this.hasAttribute(`open`)&&!e.open))this._setOpen(!0,`manual`);else if(this._shell.setOpen(e.open),this.toggleAttribute(`open`,e.open),e.open!==this._lastOpen&&(this._lastOpen=e.open,this._onOpenChange(e.open)),e.open)this._nudge.cancel(),this._nudgeArmed=!1,this._autoOpen?.cancel();else if(n.Nudges&&this.layout===`launcher`&&!this._nudgeArmed){let e=Ot(t,n);e&&(this._nudge.schedule({text:e.text,delaySeconds:e.delaySeconds,label:r.nudgeDismiss}),this._nudgeArmed=!0)}}}_onOpenChange(e){let t=h8(u8(this));if(e){if(document.addEventListener(`keydown`,this._onKeyDown),this._sound?.play(`open`),this._past?.refresh(),this.layout===`docked`&&!this._preloaded&&typeof this._preloadPanelSwitchProp==`function`){this._preloaded=!0;try{this._preloadPanelSwitchProp()?.catch?.(()=>{})}catch{}}if(t){let e=u8(this);this._phone={fit:z6(this._shell.panel,e),unlock:x6(this._thread.el)}}else this._openTrigger===`manual`&&(this._focusTimer=setTimeout(()=>{this._focusTimer=null,this._composer.focus()},Z6))}else document.removeEventListener(`keydown`,this._onKeyDown),clearTimeout(this._focusTimer),this._focusTimer=null,this._phone?.fit.destroy(),this._phone?.unlock(),this._phone=null,this._historyShown&&(this._historyShown=!1,this._history.hide(),this._render()),h6(this._shell.launcherButton)}_syncConversation(e){let t=this.getAttribute(`conversation-id`);t&&t!==this._openedConversation&&!e.loading&&(this._openedConversation=t,e.conversationId!==t&&this._session.openConversation(t).catch(()=>{}))}_playSounds(e){if(e.loading){this._wasLoading=!0;for(let t of e.messages)this._seen.add(t.id)}else if(this._wasLoading||!this._seeded){this._wasLoading=!1,this._seeded=!0;for(let t of e.messages)this._seen.add(t.id)}else for(let t of e.messages)this._seen.has(t.id)||(this._seen.add(t.id),this._announce(t))}_announce(e){if(!this._sound||e.restored||e.parts.some(e=>e.kind===`Notice`))return;let t=e.author.kind;if(t===`Visitor`)e.stored||this._sound.play(`sent`);else if(t===`Assistant`||t===`Script`||t===`Agent`){this._sound.play(`reply`);let e=this._session.getState().profile;e?.experience.sound.vibrate&&g6(e.experience.sound.vibrateMs,this._sound.isMuted())}}};Object.defineProperty(v8.prototype,"layout",{get(){return this.getAttribute(`layout`)??s8.layout},set(e){this.setAttribute(`layout`,String(e))}});for(let e of c8)e!==`layout`&&Object.defineProperty(v8.prototype,l8(e),{configurable:!0,get(){return this.getAttribute(e)??s8[e]??``},set(t){t==null?this.removeAttribute(e):this.setAttribute(e,String(t))}});function y8(){typeof customElements<`u`&&!customElements.get(`wui-chat`)&&customElements.define(`wui-chat`,v8)}y8(),y8(),globalThis.WeborityChat=Object.assign(globalThis.WeborityChat||{},{session:e=>e.session,renderers:{define:t8}})})();