diff --git a/public/assets/403-D_RpddD3.js b/public/assets/403-D_RpddD3.js deleted file mode 100644 index 420b341..0000000 --- a/public/assets/403-D_RpddD3.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,B as r}from"./index-B-sDl1ER.js";import{C as s}from"./index-CO5DzGxy.js";import{R as a}from"./index-CwBuiwuD.js";const p=()=>t.jsx(s,{variant:"borderless",children:t.jsx(a,{status:"403",title:"403",subTitle:"Sorry, you are not authorized to access this page.",extra:t.jsx(r,{type:"primary",children:"Back Home"})})});export{p as default}; diff --git a/public/assets/404-nJtFVjOX.js b/public/assets/404-nJtFVjOX.js deleted file mode 100644 index 8c5d881..0000000 --- a/public/assets/404-nJtFVjOX.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,B as s}from"./index-B-sDl1ER.js";import{C as r}from"./index-CO5DzGxy.js";import{R as e}from"./index-CwBuiwuD.js";const p=()=>t.jsx(r,{variant:"borderless",children:t.jsx(e,{status:"404",title:"404",subTitle:"Sorry, the page you visited does not exist.",extra:t.jsx(s,{type:"primary",children:"Back Home"})})});export{p as default}; diff --git a/public/assets/500-bhOU7TY_.js b/public/assets/500-bhOU7TY_.js deleted file mode 100644 index 007b506..0000000 --- a/public/assets/500-bhOU7TY_.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,B as r}from"./index-B-sDl1ER.js";import{C as s}from"./index-CO5DzGxy.js";import{R as e}from"./index-CwBuiwuD.js";const m=()=>t.jsx(s,{variant:"borderless",children:t.jsx(e,{status:"500",title:"500",subTitle:"Sorry, something went wrong.",extra:t.jsx(r,{type:"primary",children:"Back Home"})})});export{m as default}; diff --git a/public/assets/AuthButton-B-7Fg-gg.js b/public/assets/AuthButton-B-7Fg-gg.js new file mode 100644 index 0000000..2ffe3f9 --- /dev/null +++ b/public/assets/AuthButton-B-7Fg-gg.js @@ -0,0 +1 @@ +import{Ca as e,Ea as t,l as n,s as r}from"./index-DThTpSPU.js";var i=t(e(),1),a=r(),o=({auth:e,children:t})=>{let r=n(e=>e.access);return(0,i.useMemo)(()=>e?r.includes(e):!0,[r,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t}; \ No newline at end of file diff --git a/public/assets/Table-B11dzOaz.js b/public/assets/Table-B11dzOaz.js deleted file mode 100644 index 2c977aa..0000000 --- a/public/assets/Table-B11dzOaz.js +++ /dev/null @@ -1,43 +0,0 @@ -import{r as l,bQ as Lr,a8 as zo,aw as Ct,aZ as Wo,bR as st,bx as _o,O as lt,ay as et,av as Et,bS as Ar,bT as to,bU as jo,bV as Hn,L as V,bC as Fn,bW as Hr,bX as no,bY as Fr,bZ as zn,b_ as oo,b$ as ro,M as Qt,c0 as Vo,c1 as Uo,R as ne,aA as zr,ba as Re,bn as Jt,c2 as Wn,V as qo,c3 as Wr,a9 as _r,bN as jr,z as Xo,c4 as Vr,c5 as Ur,G as Go,bi as qr,a3 as W,bF as Xr,H as _n,b9 as Gr,P as so,c6 as Yo,c7 as Yr,c8 as Zr,c9 as Qr,J as Zo,bg as rn,bK as Jr,K as Qo,ca as Jo,cb as es,cc as ts,aM as ns,cd as os,ce as rs,cf as ss,ax as er,B as lo,cg as tr,E as ao,bk as ls,ch as as,ci as is,cj as cs,ck as ds,ar as io,a_ as pn,cl as us,bH as fs,aE as Ot,a$ as ps,bq as co,b0 as ms,bp as hs,cm as gs,cn as ys,aL as bs}from"./index-B-sDl1ER.js";import{R as nr}from"./index-CeRfFUxJ.js";import{S as xs,P as Cs}from"./index-DmtjhyJb.js";const Ss=t=>{const[e,n]=l.useState(null);return[l.useCallback((r,s,a)=>{const i=e??r,d=Math.min(i||0,r),c=Math.max(i||0,r),u=s.slice(d,c+1).map(t),p=u.some(m=>!a.has(m)),f=[];return u.forEach(m=>{p?(a.has(m)||f.push(m),a.add(m)):(a.delete(m),f.push(m))}),n(p?c:null),f},[e]),n]},ws=(t,e)=>(t._antProxy=t._antProxy||{},Object.keys(e).forEach(n=>{if(!(n in t._antProxy)){const o=t[n];t._antProxy[n]=o,t[n]=e[n]}}),t),Es=(t,e)=>l.useImperativeHandle(t,()=>{const n=e(),{nativeElement:o}=n;return typeof Proxy<"u"?new Proxy(o,{get(r,s){return n[s]?n[s]:Reflect.get(r,s)}}):ws(o,n)}),vs=t=>{const e=l.useRef(t),[,n]=Lr();return[()=>e.current,o=>{e.current=o,n()}]};function Cn(t){return zo(t)&&t===t.window}const $s=t=>{if(typeof window>"u")return 0;let e=0;return Cn(t)?e=t.pageYOffset:t instanceof Document?e=t.documentElement.scrollTop:(t instanceof HTMLElement||t)&&(e=t.scrollTop),t&&!Cn(t)&&typeof e!="number"&&(e=(t.ownerDocument??t).documentElement?.scrollTop),e};function Ns(t,e,n,o){const r=n-e;return t/=o/2,t<1?r/2*t*t*t+e:r/2*((t-=2)*t*t+2)+e}function ks(t,e={}){const{getContainer:n=()=>window,callback:o,duration:r=450}=e,s=n(),a=$s(s),i=Date.now();let d;const c=()=>{const p=Date.now()-i,f=Ns(p>r?r:p,a,t,r);Cn(s)?s.scrollTo(window.pageXOffset,f):s instanceof Document||s.constructor.name==="HTMLDocument"?s.documentElement.scrollTop=f:s.scrollTop=f,p{Ct.cancel(d)}}function Le(t,e){return t[e]}function or(t,e){return`${t}-${e}`}function Is(t){return t&&t.type&&t.type.isTreeNode}function zt(t,e){return t??e}function vt(t){const{title:e,_title:n,key:o,children:r}=t||{},s=e||"title";return{title:s,_title:n||[s],key:o||"key",children:r||"children"}}function rr(t){function e(n){return Wo(n).map(r=>{if(!Is(r))return st(!r,"Tree/TreeNode can only accept TreeNode as children."),null;const{key:s}=r,{children:a,...i}=r.props,d={key:s,...i},c=e(a);return c.length&&(d.children=c),d}).filter(r=>r)}return e(t)}function mn(t,e,n){const{_title:o,key:r,children:s}=vt(n),a=new Set(e===!0?[]:e),i=[];function d(c,u=null){return c.map((p,f)=>{const m=or(u?u.pos:"0",f),h=zt(p[r],m);let b;for(let y=0;yf[s]:typeof s=="function"&&(u=f=>s(f)):u=(f,m)=>zt(f[i],m);function p(f,m,h,b){const x=f?f[c]:t,y=f?or(h.pos,m):"0",C=f?[...b,f]:[];if(f){const E=u(f,y),$={node:f,index:m,pos:y,key:E,parentPos:h.node?h.pos:null,level:h.level+1,nodes:C};e($)}x&&x.forEach((E,$)=>{p(E,$,{node:f,pos:y,level:h?h.level+1:-1},C)})}p(null)}function jn(t,{initWrapper:e,processEntity:n,onProcessFinished:o,externalGetKey:r,childrenPropName:s,fieldNames:a}={},i){const d=r||i,c={},u={};let p={posEntities:c,keyEntities:u};return e&&(p=e(p)||p),Rs(t,f=>{const{node:m,index:h,pos:b,key:x,parentPos:y,level:C,nodes:E}=f,$={node:m,nodes:E,index:h,key:x,pos:b,level:C},w=zt(x,b);c[b]=$,u[w]=$,$.parent=c[y],$.parent&&($.parent.children=$.parent.children||[],$.parent.children.push($)),n&&n($,p)},{externalGetKey:d,childrenPropName:s,fieldNames:a}),o&&o(p),p}function sr(t,e,n,o){return t===!1?!1:t||!e&&!n||e&&o&&!n}function Bt(t,{expandedKeys:e,selectedKeys:n,loadedKeys:o,loadingKeys:r,checkedKeys:s,halfCheckedKeys:a,dragOverNodeKey:i,dropPosition:d,keyEntities:c}){const u=Le(c,t);return{eventKey:t,expanded:e.indexOf(t)!==-1,selected:n.indexOf(t)!==-1,loaded:o.indexOf(t)!==-1,loading:r.indexOf(t)!==-1,checked:s.indexOf(t)!==-1,halfChecked:a.indexOf(t)!==-1,pos:String(u?u.pos:""),dragOver:i===t&&d===0,dragOverGapTop:i===t&&d===-1,dragOverGapBottom:i===t&&d===1}}function ve(t){const{data:e,expanded:n,selected:o,checked:r,loaded:s,loading:a,halfChecked:i,dragOver:d,dragOverGapTop:c,dragOverGapBottom:u,pos:p,active:f,eventKey:m}=t,h={...e,expanded:n,selected:o,checked:r,loaded:s,loading:a,halfChecked:i,dragOver:d,dragOverGapTop:c,dragOverGapBottom:u,pos:p,active:f,key:m};return"props"in h||Object.defineProperty(h,"props",{get(){return st(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),h}function lr(t,e){const n=new Set;return t.forEach(o=>{e.has(o)||n.add(o)}),n}function Ks(t){const{disabled:e,disableCheckbox:n,checkable:o}=t||{};return!!(e||n)||o===!1}function Ps(t,e,n,o){const r=new Set(t),s=new Set;for(let i=0;i<=n;i+=1)(e.get(i)||new Set).forEach(c=>{const{key:u,node:p,children:f=[]}=c;r.has(u)&&!o(p)&&f.filter(m=>!o(m.node)).forEach(m=>{r.add(m.key)})});const a=new Set;for(let i=n;i>=0;i-=1)(e.get(i)||new Set).forEach(c=>{const{parent:u,node:p}=c;if(o(p)||!c.parent||a.has(c.parent.key))return;if(o(c.parent.node)){a.add(u.key);return}let f=!0,m=!1;(u.children||[]).filter(h=>!o(h.node)).forEach(({key:h})=>{const b=r.has(h);f&&!b&&(f=!1),!m&&(b||s.has(h))&&(m=!0)}),f&&r.add(u.key),m&&s.add(u.key),a.add(u.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(lr(s,r))}}function Ts(t,e,n,o,r){const s=new Set(t);let a=new Set(e);for(let d=0;d<=o;d+=1)(n.get(d)||new Set).forEach(u=>{const{key:p,node:f,children:m=[]}=u;!s.has(p)&&!a.has(p)&&!r(f)&&m.filter(h=>!r(h.node)).forEach(h=>{s.delete(h.key)})});a=new Set;const i=new Set;for(let d=o;d>=0;d-=1)(n.get(d)||new Set).forEach(u=>{const{parent:p,node:f}=u;if(r(f)||!u.parent||i.has(u.parent.key))return;if(r(u.parent.node)){i.add(p.key);return}let m=!0,h=!1;(p.children||[]).filter(b=>!r(b.node)).forEach(({key:b})=>{const x=s.has(b);m&&!x&&(m=!1),!h&&(x||a.has(b))&&(h=!0)}),m||s.delete(p.key),h&&a.add(p.key),i.add(p.key)});return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(lr(a,s))}}function St(t,e,n,o){const r=[];let s;o?s=o:s=Ks;const a=new Set(t.filter(u=>{const p=!!Le(n,u);return p||r.push(u),p})),i=new Map;let d=0;Object.keys(n).forEach(u=>{const p=n[u],{level:f}=p;let m=i.get(f);m||(m=new Set,i.set(f,m)),m.add(p),d=Math.max(d,f)}),st(!r.length,`Tree missing follow keys: ${r.slice(0,100).map(u=>`'${u}'`).join(", ")}`);let c;return e===!0?c=Ps(a,i,d,s):c=Ts(a,e.halfCheckedKeys,i,d,s),c}const ot={},Wt="rc-table-internal-hook";function Vn(t){const e=l.createContext(void 0);return{Context:e,Provider:({value:o,children:r})=>{const s=l.useRef(o);s.current=o;const[a]=l.useState(()=>({getValue:()=>s.current,listeners:new Set}));return et(()=>{Ar.unstable_batchedUpdates(()=>{a.listeners.forEach(i=>{i(o)})})},[o]),l.createElement(e.Provider,{value:a},r)},defaultValue:t}}function Ne(t,e){const n=lt(typeof e=="function"?e:d=>{if(e===void 0)return d;if(!Array.isArray(e))return d[e];const c={};return e.forEach(u=>{c[u]=d[u]}),c}),o=l.useContext(t?.Context),{listeners:r,getValue:s}=o||{},a=l.useRef();a.current=n(o?s():t?.defaultValue);const[,i]=l.useState({});return et(()=>{if(!o)return;function d(c){const u=n(c);Et(a.current,u,!0)||i({})}return r.add(d),()=>{r.delete(d)}},[o]),a.current}function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const u=a?{ref:c}:{},p=l.useRef(0),f=l.useRef(d);return e()!==null?l.createElement(r,Lt({},d,u)):((!s||s(f.current,d))&&(p.current+=1),f.current=d,l.createElement(t.Provider,{value:p.current},l.createElement(r,Lt({},d,u))))};return a?l.forwardRef(i):i}function o(r,s){const a=to(r),i=(d,c)=>{const u=a?{ref:c}:{};return e(),l.createElement(r,Lt({},d,u))};return l.memo(a?l.forwardRef(i):i,s)}return{makeImmutable:n,responseImmutable:o,useImmutableMark:e}}const{makeImmutable:ar,responseImmutable:$t,useImmutableMark:Ms}=Ds(),De=Vn(),ir=l.createContext({renderWithProps:!1}),Os="RC_TABLE_KEY";function Bs(t){return t==null?[]:Array.isArray(t)?t:[t]}function sn(t){const e=[],n={};return t.forEach(o=>{const{key:r,dataIndex:s}=o||{};let a=r||Bs(s).join("-")||Os;for(;n[a];)a=`${a}_next`;n[a]=!0,e.push(a)}),e}function Sn(t){return t!=null}function Ls(t){return typeof t=="number"&&!Number.isNaN(t)}function As(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!l.isValidElement(t)}function Hs(t,e,n,o,r,s){const a=l.useContext(ir),i=Ms();return jo(()=>{if(Sn(o))return[o];const c=e==null||e===""?[]:Array.isArray(e)?e:[e],u=Hn(t,c);let p=u,f;if(r){const m=r(u,t,n);As(m)?(p=m.children,f=m.props,a.renderWithProps=!0):p=m}return[p,f]},[i,t,o,e,r,n],(c,u)=>{if(s){const[,p]=c,[,f]=u;return s(f,p)}return a.renderWithProps?!0:!Et(c,u,!0)})}function Fs(t,e,n,o){const r=t+e-1;return t<=o&&r>=n}function zs(t,e){return Ne(De,n=>[Fs(t,e||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function wn(){return wn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let o;const r=t===!0?{showTitle:!0}:t;return r&&(r.showTitle||e==="header")&&(typeof n=="string"||typeof n=="number"?o=n.toString():l.isValidElement(n)&&typeof n.props?.children=="string"&&(o=n.props?.children)),o},_s=t=>{const{component:e,children:n,ellipsis:o,scope:r,prefixCls:s,className:a,style:i,align:d,record:c,render:u,dataIndex:p,renderIndex:f,shouldCellUpdate:m,index:h,rowType:b,colSpan:x,rowSpan:y,fixStart:C,fixEnd:E,fixedStartShadow:$,fixedEndShadow:w,offsetFixedStartShadow:P,offsetFixedEndShadow:g,zIndex:v,zIndexReverse:k,appendNode:I,additionalProps:S={},isSticky:K}=t,N=`${s}-cell`,{allColumnsFixedLeft:R,rowHoverable:O}=Ne(De,["allColumnsFixedLeft","rowHoverable"]),[z,U]=Hs(c,p,f,n,u,m),q={},D=typeof C=="number"&&!R,G=typeof E=="number"&&!R,[ee,L]=Ne(De,({scrollInfo:A})=>{if(!D&&!G)return[!1,!1];const[B,j]=A,T=(D&&$&&B)-P>=1,M=(G&&w&&j-B)-g>1;return[T,M]});D&&(q.insetInlineStart=C,q["--z-offset"]=v,q["--z-offset-reverse"]=k),G&&(q.insetInlineEnd=E,q["--z-offset"]=v,q["--z-offset-reverse"]=k);const Q=U?.colSpan??S.colSpan??x??1,Y=U?.rowSpan??S.rowSpan??y??1,[fe,_]=zs(h,Y),$e=lt(A=>{c&&_(h,h+Y-1),S?.onMouseEnter?.(A)}),ce=lt(A=>{c&&_(-1,-1),S?.onMouseLeave?.(A)});if(Q===0||Y===0)return null;const me=S.title??Ws({rowType:b,ellipsis:o,children:z}),ae=V(N,a,{[`${N}-fix`]:D||G,[`${N}-fix-start`]:D,[`${N}-fix-end`]:G,[`${N}-fix-start-shadow`]:$,[`${N}-fix-start-shadow-show`]:$&&ee,[`${N}-fix-end-shadow`]:w,[`${N}-fix-end-shadow-show`]:w&&L,[`${N}-ellipsis`]:o,[`${N}-with-append`]:I,[`${N}-fix-sticky`]:(D||G)&&K,[`${N}-row-hover`]:!U&&fe},S.className,U?.className),re={};d&&(re.textAlign=d);const X={...U?.style,...q,...re,...S.style,...i};let H=z;return typeof H=="object"&&!Array.isArray(H)&&!l.isValidElement(H)&&(H=null),o&&($||w)&&(H=l.createElement("span",{className:`${N}-content`},H)),l.createElement(e,wn({},U,S,{className:ae,style:X,title:me,scope:r,onMouseEnter:O?$e:void 0,onMouseLeave:O?ce:void 0,colSpan:Q!==1?Q:null,rowSpan:Y!==1?Y:null}),I,H)},Nt=l.memo(_s);function Xt(t){return t.fixed==="start"}function Gt(t){return t.fixed==="end"}function Un(t,e,n,o){const r=n[t]||{},s=n[e]||{};let a=null,i=null;Xt(r)&&Xt(s)?a=o.start[t]:Gt(s)&&Gt(r)&&(i=o.end[e]);let d=!1,c=!1,u=0,p=0;a!==null&&(d=!n[e+1]||!Xt(n[e+1]),u=n.length*2-t,p=n.length+t),i!==null&&(c=!n[t-1]||!Gt(n[t-1]),u=e,p=n.length-e);let f=0,m=0;if(d)for(let h=0;he;h-=1)Gt(n[h])||(m+=o.widths[h]||0);return{fixStart:a,fixEnd:i,fixedStartShadow:d,fixedEndShadow:c,offsetFixedStartShadow:f,offsetFixedEndShadow:m,isSticky:o.isSticky,zIndex:u,zIndexReverse:p}}const cr=l.createContext({});function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{className:e,index:n,children:o,colSpan:r=1,rowSpan:s,align:a}=t,{prefixCls:i}=Ne(De,["prefixCls"]),{scrollColumnIndex:d,stickyOffsets:c,flattenColumns:u}=l.useContext(cr),f=n+r-1+1===d?r+1:r,m=l.useMemo(()=>Un(n,n+f-1,u,c),[n,f,u,c]);return l.createElement(Nt,En({className:e,index:n,component:"td",prefixCls:i,record:null,dataIndex:null,align:a,colSpan:f,rowSpan:s,render:()=>o},m))},Vs=t=>{const{children:e,...n}=t;return l.createElement("tr",n,e)},ln=t=>{const{children:e}=t;return e};ln.Row=Vs;ln.Cell=js;const Us=t=>{const{children:e,stickyOffsets:n,flattenColumns:o}=t,r=Ne(De,"prefixCls"),s=o.length-1,a=o[s],i=l.useMemo(()=>({stickyOffsets:n,flattenColumns:o,scrollColumnIndex:a?.scrollbar?s:null}),[a,o,s,n]);return l.createElement(cr.Provider,{value:i},l.createElement("tfoot",{className:`${r}-summary`},e))},Yt=$t(Us),dr=ln;function qs(t){return null}function Xs(t){return null}function ur(t,e,n,o,r,s,a){const i=s(e,a);t.push({record:e,indent:n,index:a,rowKey:i});const d=r?.has(i);if(e&&Array.isArray(e[o])&&d)for(let c=0;c{if(n?.size){const s=[];for(let a=0;a({record:s,indent:0,index:a,rowKey:o(s,a)}))},[t,e,n,o])}function pr(t,e,n,o){const r=Ne(De,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),{flattenColumns:s,expandableType:a,expandedKeys:i,childrenColumnName:d,onTriggerExpand:c,rowExpandable:u,onRow:p,expandRowByClick:f,rowClassName:m}=r,h=a==="nest",b=a==="row"&&(!u||u(t)),x=b||h,y=i&&i.has(e),C=d&&t&&t[d],E=lt(c),$=p?.(t,n),w=$?.onClick,P=(k,...I)=>{f&&x&&c(t,k),w?.(k,...I)};let g;typeof m=="string"?g=m:typeof m=="function"&&(g=m(t,n,o));const v=sn(s);return{...r,columnsKey:v,nestExpandable:h,expanded:y,hasNestChildren:C,record:t,onTriggerExpand:E,rowSupportExpand:b,expandable:x,rowProps:{...$,className:V(g,$?.className),onClick:P}}}const mr=t=>{const{prefixCls:e,children:n,component:o,cellComponent:r,className:s,expanded:a,colSpan:i,isEmpty:d,stickyOffset:c=0}=t,{scrollbarSize:u,fixHeader:p,fixColumn:f,componentWidth:m,horizonScroll:h}=Ne(De,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]);let b=n;return(d?h&&m:f)&&(b=l.createElement("div",{style:{width:m-c-(p&&!d?u:0),position:"sticky",left:c,overflow:"hidden"},className:`${e}-expanded-row-fixed`},b)),l.createElement(o,{className:s,style:{display:a?null:"none"}},l.createElement(Nt,{component:r,prefixCls:e,colSpan:i},b))};function Gs({prefixCls:t,record:e,onExpand:n,expanded:o,expandable:r}){const s=`${t}-row-expand-icon`;if(!r)return l.createElement("span",{className:V(s,`${t}-row-spaced`)});const a=i=>{n(e,i),i.stopPropagation()};return l.createElement("span",{className:V(s,{[`${t}-row-expanded`]:o,[`${t}-row-collapsed`]:!o}),onClick:a})}function Ys(t,e,n){const o=[];function r(s){(s||[]).forEach((a,i)=>{o.push(e(a,i)),r(a[n])})}return r(t),o}function hr(t,e,n,o){return typeof t=="string"?t:typeof t=="function"?t(e,n,o):""}function en(){return en=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{className:e,style:n,classNames:o,styles:r,record:s,index:a,renderIndex:i,rowKey:d,rowKeys:c,indent:u=0,rowComponent:p,cellComponent:f,scopeCellComponent:m,expandedRowInfo:h}=t,b=pr(s,d,a,u),{prefixCls:x,flattenColumns:y,expandedRowClassName:C,expandedRowRender:E,rowProps:$,expanded:w,rowSupportExpand:P}=b,g=l.useRef(!1);g.current||=w;const v=hr(C,s,a,u),k=l.createElement(p,en({},$,{"data-row-key":d,className:V(e,`${x}-row`,`${x}-row-level-${u}`,$?.className,o.row,{[v]:u>=1}),style:{...n,...$?.style,...r.row}}),y.map((S,K)=>{const{render:N,dataIndex:R,className:O}=S,{key:z,fixedInfo:U,appendCellNode:q,additionalCellProps:D}=gr(b,S,K,u,a,c,h?.offset);return l.createElement(Nt,en({className:V(O,o.cell),style:r.cell,ellipsis:S.ellipsis,align:S.align,scope:S.rowScope,component:S.rowScope?m:f,prefixCls:x,key:z,record:s,index:a,renderIndex:i,dataIndex:R,render:N,shouldCellUpdate:S.shouldCellUpdate},U,{appendNode:q,additionalProps:D}))}));let I;if(P&&(g.current||w)){const S=E(s,a,u+1,w);I=l.createElement(mr,{expanded:w,className:V(`${x}-expanded-row`,`${x}-expanded-row-level-${u+1}`,v),prefixCls:x,component:p,cellComponent:f,colSpan:h?h.colSpan:y.length,isEmpty:!1,stickyOffset:h?.sticky},S)}return l.createElement(l.Fragment,null,k,I)},Qs=$t(Zs),Js=t=>{const{columnKey:e,onColumnResize:n,title:o}=t,r=l.useRef(null);return et(()=>{r.current&&n(e,r.current.offsetWidth)},[]),l.createElement(Fn,{data:e},l.createElement("td",{ref:r,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden",fontWeight:"bold"}},o||" ")))},el=({prefixCls:t,columnsKey:e,onColumnResize:n,columns:o})=>{const r=l.useRef(null),{measureRowRender:s}=Ne(De,["measureRowRender"]),a=l.createElement("tr",{"aria-hidden":"true",className:`${t}-measure-row`,style:{height:0},ref:r},l.createElement(Fn.Collection,{onBatchResize:i=>{Hr(r.current)&&i.forEach(({data:d,size:c})=>{n(d,c.offsetWidth)})}},e.map(i=>{const c=o.find(p=>p.key===i)?.title,u=l.isValidElement(c)?l.cloneElement(c,{ref:null}):c;return l.createElement(Js,{key:i,columnKey:i,onColumnResize:n,title:u})})));return typeof s=="function"?s(a):a},tl=t=>{const{data:e,measureColumnWidth:n}=t,{prefixCls:o,getComponent:r,onColumnResize:s,flattenColumns:a,getRowKey:i,expandedKeys:d,childrenColumnName:c,emptyNode:u,classNames:p,styles:f,expandedRowOffset:m=0,colWidths:h}=Ne(De,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","classNames","styles","expandedRowOffset","fixedInfoList","colWidths"]),{body:b={}}=p||{},{body:x={}}=f||{},y=fr(e,c,d,i),C=l.useMemo(()=>y.map(S=>S.rowKey),[y]),E=l.useRef({renderWithProps:!1}),$=l.useMemo(()=>{const S=a.length-m;let K=0;for(let N=0;N{const{record:N,indent:R,index:O,rowKey:z}=S;return l.createElement(Qs,{classNames:b,styles:x,key:z,rowKey:z,rowKeys:C,record:N,index:K,renderIndex:O,rowComponent:P,cellComponent:g,scopeCellComponent:v,indent:R,expandedRowInfo:$})}):k=l.createElement(mr,{expanded:!0,className:`${o}-placeholder`,prefixCls:o,component:P,cellComponent:g,colSpan:a.length,isEmpty:!0},u);const I=sn(a);return l.createElement(ir.Provider,{value:E.current},l.createElement(w,{style:x.wrapper,className:V(`${o}-tbody`,b.wrapper)},n&&l.createElement(el,{prefixCls:o,columnsKey:I,onColumnResize:s,columns:a}),k))},nl=$t(tl),At="RC_TABLE_INTERNAL_COL_DEFINE";function ol(t){const{expandable:e,...n}=t;let o;return"expandable"in t?o={...n,...e}:o=n,o.showExpandColumn===!1&&(o.expandIconColumnIndex=-1),o}function vn(){return vn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{colWidths:e,columns:n,columCount:o}=t,{tableLayout:r}=Ne(De,["tableLayout"]),s=[],a=o||n.length;let i=!1;for(let d=a-1;d>=0;d-=1){const c=e[d],u=n&&n[d];let p,f;if(u&&(p=u[At],r==="auto"&&(f=u.minWidth)),c||f||p||i){const{columnType:m,...h}=p||{};s.unshift(l.createElement("col",vn({key:d,style:{width:c,minWidth:f}},h))),i=!0}}return s.length>0?l.createElement("colgroup",null,s):null};function rl(t,e){return l.useMemo(()=>{const n=[];for(let o=0;o{const{className:n,style:o,noData:r,columns:s,flattenColumns:a,colWidths:i,colGroup:d,columCount:c,stickyOffsets:u,direction:p,fixHeader:f,stickyTopOffset:m,stickyBottomOffset:h,stickyClassName:b,scrollX:x,tableLayout:y="fixed",onScroll:C,maxContentScroll:E,children:$,...w}=t,{prefixCls:P,scrollbarSize:g,isSticky:v,getComponent:k}=Ne(De,["prefixCls","scrollbarSize","isSticky","getComponent"]),I=k(["header","table"],"table"),S=v&&!f?0:g,K=l.useRef(null),N=l.useCallback(ee=>{no(e,ee),no(K,ee)},[]);l.useEffect(()=>{function ee(Q){const{currentTarget:Y,deltaX:fe}=Q;if(fe){const{scrollLeft:_,scrollWidth:$e,clientWidth:ce}=Y,me=$e-ce;let ae=_+fe;p==="rtl"?(ae=Math.max(-me,ae),ae=Math.min(0,ae)):(ae=Math.min(me,ae),ae=Math.max(0,ae)),C({currentTarget:Y,scrollLeft:ae}),Q.preventDefault()}}const L=K.current;return L?.addEventListener("wheel",ee,{passive:!1}),()=>{L?.removeEventListener("wheel",ee)}},[]);const R=a[a.length-1],O={fixed:R?R.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${P}-cell-scrollbar`})},z=l.useMemo(()=>S?[...s,O]:s,[S,s]),U=l.useMemo(()=>S?[...a,O]:a,[S,a]),q=l.useMemo(()=>{const{start:ee,end:L}=u;return{...u,start:ee,end:[...L.map(Q=>Q+S),0],isSticky:v}},[S,u,v]),D=rl(i,c),G=l.useMemo(()=>{const ee=!D||!D.length||D.every(L=>!L);return r||ee},[r,D]);return l.createElement("div",{style:{overflow:"hidden",...v?{top:m,bottom:h}:{},...o},ref:N,className:V(n,{[b]:!!b})},l.createElement(I,{style:{tableLayout:y,minWidth:"100%",width:x}},G?d:l.createElement(yr,{colWidths:[...D,S],columCount:c+1,columns:U}),$({...w,stickyOffsets:q,columns:z,flattenColumns:U})))}),uo=l.memo(sl);function tn(){return tn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{cells:e,stickyOffsets:n,flattenColumns:o,rowComponent:r,cellComponent:s,onHeaderRow:a,index:i,classNames:d,styles:c}=t,{prefixCls:u}=Ne(De,["prefixCls"]);let p;a&&(p=a(e.map(m=>m.column),i));const f=sn(e.map(m=>m.column));return l.createElement(r,tn({},p,{className:d.row,style:c.row}),e.map((m,h)=>{const{column:b,colStart:x,colEnd:y,colSpan:C}=m,E=Un(x,y,o,n),$=b?.onHeaderCell?.(b)||{};return l.createElement(Nt,tn({},m,{scope:b.title?C>1?"colgroup":"col":null,ellipsis:b.ellipsis,align:b.align,component:s,prefixCls:u,key:f[h]},E,{additionalProps:$,rowType:"header"}))}))};function al(t,e,n){const o=[];function r(a,i,d=0){o[d]=o[d]||[];let c=i;return a.filter(Boolean).map(p=>{const f={key:p.key,className:V(p.className,e.cell)||"",style:n.cell,children:p.title,column:p,colStart:c};let m=1;const h=p.children;return h&&h.length>0&&(m=r(h,c,d+1).reduce((b,x)=>b+x,0),f.hasSubColumns=!0),"colSpan"in p&&({colSpan:m}=p),"rowSpan"in p&&(f.rowSpan=p.rowSpan),f.colSpan=m,f.colEnd=f.colStart+m-1,o[d].push(f),c+=m,m})}r(t,0);const s=o.length;for(let a=0;a{!("rowSpan"in i)&&!i.hasSubColumns&&(i.rowSpan=s-a)});return o}const il=t=>{const{stickyOffsets:e,columns:n,flattenColumns:o,onHeaderRow:r}=t,{prefixCls:s,getComponent:a,classNames:i,styles:d}=Ne(De,["prefixCls","getComponent","classNames","styles"]),{header:c={}}=i||{},{header:u={}}=d||{},p=l.useMemo(()=>al(n,c,u),[n,c,u]),f=a(["header","wrapper"],"thead"),m=a(["header","row"],"tr"),h=a(["header","cell"],"th");return l.createElement(f,{className:V(`${s}-thead`,c.wrapper),style:u.wrapper},p.map((b,x)=>l.createElement(ll,{classNames:c,styles:u,key:x,flattenColumns:o,cells:b,stickyOffsets:e,rowComponent:m,cellComponent:h,onHeaderRow:r,index:x})))},fo=$t(il);function po(t,e=""){return typeof e=="number"?e:e.endsWith("%")?t*parseFloat(e)/100:null}function cl(t,e,n){return l.useMemo(()=>{if(e&&e>0){let o=0,r=0;t.forEach(p=>{const f=po(e,p.width);f?o+=f:r+=1});const s=Math.max(e,n);let a=Math.max(s-o,r),i=r;const d=a/r;let c=0;const u=t.map(p=>{const f={...p},m=po(e,f.width);if(m)f.width=m;else{const h=Math.floor(d);f.width=i===1?a:h,a-=h,i-=1}return c+=f.width,f});if(c{const h=Math.floor(f.width*p);f.width=m===u.length-1?a:h,a-=h})}return[u,Math.max(c,s)]}return[t,e]},[t,e,n])}function qn(t){return Wo(t).filter(e=>l.isValidElement(e)).map(e=>{const{key:n,props:o}=e,{children:r,...s}=o,a={key:n,...s};return r&&(a.children=qn(r)),a})}function br(t){return t.filter(e=>e&&typeof e=="object"&&!e.hidden).map(e=>{const n=e.children;return n&&n.length>0?{...e,children:br(n)}:e})}function xr(t,e="key"){return t.filter(n=>n&&typeof n=="object").reduce((n,o,r)=>{const{fixed:s}=o,a=s===!0||s==="left"?"start":s==="right"?"end":s,i=`${e}-${r}`,d=o.children;return d&&d.length>0?[...n,...xr(d,i).map(c=>({...c,fixed:c.fixed??a}))]:[...n,{key:i,...o,fixed:a}]},[])}function dl({prefixCls:t,columns:e,children:n,expandable:o,expandedKeys:r,columnTitle:s,getRowKey:a,onTriggerExpand:i,expandIcon:d,rowExpandable:c,expandIconColumnIndex:u,expandedRowOffset:p=0,direction:f,expandRowByClick:m,columnWidth:h,fixed:b,scrollWidth:x,clientWidth:y},C){const E=l.useMemo(()=>{const k=e||qn(n)||[];return br(k.slice())},[e,n]),$=l.useMemo(()=>{if(o){let k=E.slice();if(!k.includes(ot)){const R=u||0,O=R===0&&(b==="right"||b==="end")?E.length:R;O>=0&&k.splice(O,0,ot)}const I=k.indexOf(ot);k=k.filter((R,O)=>R!==ot||O===I);const S=E[I];let K;b?K=b:K=S?S.fixed:null;const N={[At]:{className:`${t}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:s,fixed:K,className:`${t}-row-expand-icon-cell`,width:h,render:(R,O,z)=>{const U=a(O,z),q=r.has(U),D=c?c(O):!0,G=d({prefixCls:t,expanded:q,expandable:D,record:O,onExpand:i});return m?l.createElement("span",{onClick:ee=>ee.stopPropagation()},G):G}};return k.map((R,O)=>{const z=R===ot?N:R;return Ok!==ot)},[o,E,a,r,d,f,p]),w=l.useMemo(()=>{let k=$;return C&&(k=C(k)),k.length||(k=[{render:()=>null}]),k},[C,$,f]),P=l.useMemo(()=>xr(w),[w,f,x]),[g,v]=cl(P,x,y);return[w,g,v]}function ul(t,e,n){const o=ol(t),{expandIcon:r,expandedRowKeys:s,defaultExpandedRowKeys:a,defaultExpandAllRows:i,expandedRowRender:d,onExpand:c,onExpandedRowsChange:u,childrenColumnName:p}=o,f=r||Gs,m=p||"children",h=l.useMemo(()=>d?"row":t.expandable&&t.internalHooks===Wt&&t.expandable.__PARENT_RENDER_ICON__||e.some(E=>E&&typeof E=="object"&&E[m])?"nest":!1,[!!d,e]),[b,x]=l.useState(()=>a||(i?Ys(e,n,m):[])),y=l.useMemo(()=>new Set(s||b||[]),[s,b]),C=l.useCallback(E=>{const $=n(E,e.indexOf(E));let w;const P=y.has($);P?(y.delete($),w=[...y]):w=[...y,$],x(w),c&&c(!P,E),u&&u(w)},[n,y,e,c,u]);return[o,h,y,f,m,C]}function fl(t,e){const n=l.useMemo(()=>t.map((o,r)=>Un(r,r,t,e)),[t,e]);return jo(()=>n,[n],(o,r)=>!Et(o,r))}function pl(t){const e=l.useRef(t),[,n]=l.useState({}),o=l.useRef(null),r=l.useRef([]);function s(a){r.current.push(a);const i=Promise.resolve();o.current=i,i.then(()=>{if(o.current===i){const d=r.current,c=e.current;r.current=[],d.forEach(u=>{e.current=u(e.current)}),o.current=null,c!==e.current&&n({})}})}return l.useEffect(()=>()=>{o.current=null},[]),[e.current,s]}function ml(t){const e=l.useRef(null),n=l.useRef(null);function o(){clearTimeout(n.current)}function r(a){e.current=a,o(),n.current=setTimeout(()=>{e.current=null,n.current=void 0},100)}function s(){return e.current}return l.useEffect(()=>o,[]),[r,s]}function hl(){const[t,e]=l.useState(-1),[n,o]=l.useState(-1),r=l.useCallback((s,a)=>{e(s),o(a)},[]);return[t,n,r]}const mo=Fr()?window:null;function gl(t,e){const{offsetHeader:n=0,offsetSummary:o=0,offsetScroll:r=0,getContainer:s=()=>mo}=typeof t=="object"?t:{},a=s()||mo,i=!!t;return l.useMemo(()=>({isSticky:i,stickyClassName:i?`${e}-sticky-holder`:"",offsetHeader:n,offsetSummary:o,offsetScroll:r,container:a}),[i,r,n,o,e,a])}function yl(t,e){return l.useMemo(()=>{const o=e.length,r=(i,d,c)=>{const u=[];let p=0;for(let f=i;f!==d;f+=c)u.push(p),e[f].fixed&&(p+=t[f]||0);return u},s=r(0,o,1),a=r(o-1,-1,-1).reverse();return{start:s,end:a,widths:t}},[t,e])}const ho=t=>{const{children:e,className:n,style:o}=t;return l.createElement("div",{className:n,style:o},e)};function go(t){const n=zn(t).getBoundingClientRect(),o=document.documentElement;return{left:n.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}const yo="mouseup",bo="mousemove",xt="scroll",xo="resize",bl=(t,e)=>{const{scrollBodyRef:n,onScroll:o,offsetScroll:r,container:s,direction:a}=t,i=Ne(De,"prefixCls"),d=n.current?.scrollWidth||0,c=n.current?.clientWidth||0,u=d&&c*(c/d),p=l.useRef(null),[f,m]=pl({scrollLeft:0,isHiddenScrollBar:!0}),h=l.useRef({delta:0,x:0}),[b,x]=l.useState(!1),y=l.useRef(null);l.useEffect(()=>()=>{Ct.cancel(y.current)},[]);const C=()=>{x(!1)},E=g=>{g.persist(),h.current.delta=g.pageX-f.scrollLeft,h.current.x=0,x(!0),g.preventDefault()},$=g=>{const{buttons:v}=g||window?.event;if(!b||v===0){b&&x(!1);return}let k=h.current.x+g.pageX-h.current.x-h.current.delta;const I=a==="rtl";k=Math.max(I?u-c:0,Math.min(I?0:c-u,k)),(!I||Math.abs(k)+Math.abs(u){Ct.cancel(y.current),y.current=Ct(()=>{if(!n.current)return;const g=go(n.current).top,v=g+n.current.offsetHeight,k=s===window?document.documentElement.scrollTop+window.innerHeight:go(s).top+s.clientHeight;v-oo()<=k||g>=k-r?m(I=>({...I,isHiddenScrollBar:!0})):m(I=>({...I,isHiddenScrollBar:!1}))})},P=g=>{m(v=>({...v,scrollLeft:g/d*c||0}))};return l.useImperativeHandle(e,()=>({setScrollLeft:P,checkScrollBarVisible:w})),l.useEffect(()=>(document.body.addEventListener(yo,C,!1),document.body.addEventListener(bo,$,!1),w(),()=>{document.body.removeEventListener(yo,C),document.body.removeEventListener(bo,$)}),[u,b]),l.useEffect(()=>{if(n.current){const g=[];let v=zn(n.current);for(;v;)g.push(v),v=v.parentElement;return g.forEach(k=>{k.addEventListener(xt,w,!1)}),window.addEventListener(xo,w,!1),window.addEventListener(xt,w,!1),s.addEventListener(xt,w,!1),()=>{g.forEach(k=>{k.removeEventListener(xt,w)}),window.removeEventListener(xo,w),window.removeEventListener(xt,w),s.removeEventListener(xt,w)}}},[s]),l.useEffect(()=>{f.isHiddenScrollBar||m(g=>{const v=n.current;return v?{...g,scrollLeft:v.scrollLeft/v.scrollWidth*v.clientWidth}:g})},[f.isHiddenScrollBar]),d<=c||!u||f.isHiddenScrollBar?null:l.createElement("div",{style:{height:oo(),width:c,bottom:r},className:`${i}-sticky-scroll`},l.createElement("div",{onMouseDown:E,ref:p,className:V(`${i}-sticky-scroll-bar`,{[`${i}-sticky-scroll-bar-active`]:b}),style:{width:`${u}px`,transform:`translate3d(${f.scrollLeft}px, 0, 0)`}}))},xl=l.forwardRef(bl);function rt(){return rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const n={rowKey:"key",prefixCls:Cr,emptyText:wl,...t},{prefixCls:o,className:r,rowClassName:s,style:a,classNames:i,styles:d,data:c,rowKey:u,scroll:p,tableLayout:f,direction:m,title:h,footer:b,summary:x,caption:y,id:C,showHeader:E,components:$,emptyText:w,onRow:P,onHeaderRow:g,measureRowRender:v,onScroll:k,internalHooks:I,transformColumns:S,internalRefs:K,tailor:N,getContainerWidth:R,sticky:O,rowHoverable:z=!0}=n,U=c||Cl,q=!!U.length,D=I===Wt,G=l.useCallback((Z,pe)=>Hn($,Z)||pe,[$]),ee=l.useMemo(()=>typeof u=="function"?u:Z=>Z&&Z[u],[u]),L=G(["body"]),[Q,Y,fe]=hl(),[_,$e,ce,me,ae,re]=ul(n,U,ee),X=p?.x,[H,A]=l.useState(0),[B,j,T]=dl({...n,..._,expandable:!!_.expandedRowRender,columnTitle:_.columnTitle,expandedKeys:ce,getRowKey:ee,onTriggerExpand:re,expandIcon:me,expandIconColumnIndex:_.expandIconColumnIndex,direction:m,scrollWidth:D&&N&&typeof X=="number"?X:null,clientWidth:H},D?S:null),M=T??X,he=l.useMemo(()=>({columns:B,flattenColumns:j}),[B,j]),Se=l.useRef(null),xe=l.useRef(null),de=l.useRef(null),ke=l.useRef(null);l.useImperativeHandle(e,()=>({nativeElement:Se.current,scrollTo:Z=>{if(de.current instanceof HTMLElement){const{index:pe,top:Be,key:Qe,offset:Ge}=Z;if(Ls(Be))de.current?.scrollTo({top:Be});else{const Dt=Qe??ee(U[pe]),ht=de.current.querySelector(`[data-row-key="${Dt}"]`);if(ht)if(!Ge)ht.scrollIntoView();else{const Mt=ht.offsetTop;de.current.scrollTo({top:Mt+Ge})}}}else de.current?.scrollTo&&de.current.scrollTo(Z)}}));const ge=l.useRef(null),[Ke,Oe]=l.useState(!1),[F,Ie]=l.useState(!1),[Ve,te]=l.useState(new Map),ye=sn(j).map(Z=>Ve.get(Z)),le=l.useMemo(()=>ye,[ye.join("_")]),Ce=yl(le,j),ie=p&&Sn(p.y),se=p&&Sn(M)||!!_.fixed,He=se&&j.some(({fixed:Z})=>Z),be=l.useRef(null),{isSticky:we,offsetHeader:_e,offsetSummary:Ue,offsetScroll:ct,stickyClassName:Fe,container:je}=gl(O,o),Pe=l.useMemo(()=>x?.(U),[x,U]),ze=(ie||we)&&l.isValidElement(Pe)&&Pe.type===ln&&Pe.props.fixed;let Me,Ze,Rt;ie&&(Ze={overflowY:q?"scroll":"auto",maxHeight:p.y}),se&&(Me={overflowX:"auto"},ie||(Ze={overflowY:"hidden"}),Rt={width:M===!0?"auto":M,minWidth:"100%"});const _t=l.useCallback((Z,pe)=>{te(Be=>{if(Be.get(Z)!==pe){const Qe=new Map(Be);return Qe.set(Z,pe),Qe}return Be})},[]),[Ae,jt]=ml();function dt(Z,pe){pe&&(typeof pe=="function"?pe(Z):pe.scrollLeft!==Z&&(pe.scrollLeft=Z,pe.scrollLeft!==Z&&setTimeout(()=>{pe.scrollLeft=Z},0)))}const[Kt,cn]=l.useState([0,0]),tt=lt(({currentTarget:Z,scrollLeft:pe})=>{const Be=typeof pe=="number"?pe:Z.scrollLeft,Qe=Z||Sl;(!jt()||jt()===Qe)&&(Ae(Qe),dt(Be,xe.current),dt(Be,de.current),dt(Be,ge.current),dt(Be,be.current?.setScrollLeft));const Ge=Z||xe.current;if(Ge){const Dt=D&&N&&typeof M=="number"?M:Ge.scrollWidth,ht=Ge.clientWidth,Mt=Math.abs(Be);if(cn(Jn=>{const eo=[Mt,Dt-ht];return Et(Jn,eo)?Jn:eo}),Dt===ht){Oe(!1),Ie(!1);return}Oe(Mt>0),Ie(Mt{tt(Z),k?.(Z)}),Pt=()=>{se&&de.current?tt({currentTarget:zn(de.current),scrollLeft:de.current?.scrollLeft}):(Oe(!1),Ie(!1))},ut=Z=>{be.current?.checkScrollBarVisible();let pe=Z??Se.current?.offsetWidth??0;D&&R&&Se.current&&(pe=R(Se.current,pe)||pe),pe!==H&&(Pt(),A(pe))};et(()=>{se&&ut()},[se]);const yt=l.useRef(!1);l.useEffect(()=>{yt.current&&Pt()},[se,c,B.length]),l.useEffect(()=>{yt.current=!0},[]);const[bt,Vt]=l.useState(0);et(()=>{(!N||!D)&&(de.current instanceof Element?Vt(ro(de.current).width):Vt(ro(ke.current).width))},[]),l.useEffect(()=>{D&&K&&(K.body.current=de.current)});const un=l.useCallback(Z=>l.createElement(l.Fragment,null,l.createElement(fo,Z),ze==="top"&&l.createElement(Yt,Z,Pe)),[ze,Pe]),fn=l.useCallback(Z=>l.createElement(Yt,Z,Pe),[Pe]),Tt=G(["table"],"table"),ft=l.useMemo(()=>f||(He?M==="max-content"?"auto":"fixed":ie||we||j.some(({ellipsis:Z})=>Z)?"fixed":"auto"),[ie,He,j,f,we]);let J;const oe={colWidths:le,columCount:j.length,stickyOffsets:Ce,onHeaderRow:g,fixHeader:ie,scroll:p},Ee=l.useMemo(()=>q?null:typeof w=="function"?w():w,[q,w]),Te=l.createElement(nl,{data:U,measureColumnWidth:ie||se||we}),qe=l.createElement(yr,{colWidths:j.map(({width:Z})=>Z),columns:j}),pt=y!=null?l.createElement("caption",{className:`${o}-caption`},y):void 0,We=Qt(n,{data:!0}),Xe=Qt(n,{aria:!0});if(ie||we){let Z;typeof L=="function"?(Z=L(U,{scrollbarSize:bt,ref:de,onScroll:tt}),oe.colWidths=j.map(({width:Be},Qe)=>{const Ge=Qe===j.length-1?Be-bt:Be;return typeof Ge=="number"&&!Number.isNaN(Ge)?Ge:0})):Z=l.createElement("div",{style:{...Me,...Ze},onScroll:dn,ref:de,className:`${o}-body`},l.createElement(Tt,rt({style:{...Rt,tableLayout:ft}},Xe),pt,qe,Te,!ze&&Pe&&l.createElement(Yt,{stickyOffsets:Ce,flattenColumns:j},Pe)));const pe={noData:!U.length,maxContentScroll:se&&M==="max-content",...oe,...he,direction:m,stickyClassName:Fe,scrollX:M,tableLayout:ft,onScroll:tt};J=l.createElement(l.Fragment,null,E!==!1&&l.createElement(uo,rt({},pe,{stickyTopOffset:_e,className:`${o}-header`,ref:xe,colGroup:qe}),un),Z,ze&&ze!=="top"&&l.createElement(uo,rt({},pe,{stickyBottomOffset:Ue,className:`${o}-summary`,ref:ge,colGroup:qe}),fn),we&&de.current&&de.current instanceof Element&&l.createElement(xl,{ref:be,offsetScroll:ct,scrollBodyRef:de,onScroll:tt,container:je,direction:m}))}else J=l.createElement("div",{style:{...Me,...Ze,...d?.content},className:V(`${o}-content`,i?.content),onScroll:tt,ref:de},l.createElement(Tt,rt({style:{...Rt,tableLayout:ft}},Xe),pt,qe,E!==!1&&l.createElement(fo,rt({},oe,he)),Te,Pe&&l.createElement(Yt,{stickyOffsets:Ce,flattenColumns:j},Pe)));const Ut={...a};we&&(Ut["--columns-count"]=j.length);let mt=l.createElement("div",rt({className:V(o,r,{[`${o}-rtl`]:m==="rtl",[`${o}-fix-start-shadow`]:se,[`${o}-fix-end-shadow`]:se,[`${o}-fix-start-shadow-show`]:se&&Ke,[`${o}-fix-end-shadow-show`]:se&&F,[`${o}-layout-fixed`]:f==="fixed",[`${o}-fixed-header`]:ie,[`${o}-fixed-column`]:He,[`${o}-scroll-horizontal`]:se,[`${o}-has-fix-start`]:j[0]?.fixed,[`${o}-has-fix-end`]:j[j.length-1]?.fixed==="end"}),style:Ut,id:C,ref:Se},We),h&&l.createElement(ho,{className:V(`${o}-title`,i?.title),style:d?.title},h(U)),l.createElement("div",{ref:ke,className:V(`${o}-container`,i?.section),style:d?.section},J),b&&l.createElement(ho,{className:V(`${o}-footer`,i?.footer),style:d?.footer},b(U)));se&&(mt=l.createElement(Fn,{onResize:({offsetWidth:Z})=>ut(Z)},mt));const qt=fl(j,Ce),Br=l.useMemo(()=>({scrollX:M,scrollInfo:Kt,classNames:i,styles:d,prefixCls:o,getComponent:G,scrollbarSize:bt,direction:m,fixedInfoList:qt,isSticky:we,componentWidth:H,fixHeader:ie,fixColumn:He,horizonScroll:se,tableLayout:ft,rowClassName:s,expandedRowClassName:_.expandedRowClassName,expandIcon:me,expandableType:$e,expandRowByClick:_.expandRowByClick,expandedRowRender:_.expandedRowRender,expandedRowOffset:_.expandedRowOffset,onTriggerExpand:re,expandIconColumnIndex:_.expandIconColumnIndex,indentSize:_.indentSize,allColumnsFixedLeft:j.every(Z=>Z.fixed==="start"),emptyNode:Ee,columns:B,flattenColumns:j,onColumnResize:_t,colWidths:le,hoverStartRow:Q,hoverEndRow:Y,onHover:fe,rowExpandable:_.rowExpandable,onRow:P,getRowKey:ee,expandedKeys:ce,childrenColumnName:ae,rowHoverable:z,measureRowRender:v}),[M,Kt,i,d,o,G,bt,m,qt,we,H,ie,He,se,ft,s,_.expandedRowClassName,me,$e,_.expandRowByClick,_.expandedRowRender,_.expandedRowOffset,re,_.expandIconColumnIndex,_.indentSize,Ee,B,j,_t,le,Q,Y,fe,_.rowExpandable,P,ee,ce,ae,z,v]);return l.createElement(De.Provider,{value:Br},mt)},vl=l.forwardRef(El),Sr=t=>ar(vl,t),kt=Sr();kt.EXPAND_COLUMN=ot;kt.INTERNAL_HOOKS=Wt;kt.Column=qs;kt.ColumnGroup=Xs;kt.Summary=dr;const Xn=Vn(null),wr=Vn(null);function $n(){return $n=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{rowInfo:e,column:n,colIndex:o,indent:r,index:s,component:a,renderIndex:i,record:d,style:c,className:u,inverse:p,getHeight:f}=t,{render:m,dataIndex:h,className:b,width:x}=n,{columnsOffset:y}=Ne(wr,["columnsOffset"]),{key:C,fixedInfo:E,appendCellNode:$,additionalCellProps:w}=gr(e,n,o,r,s),{style:P,colSpan:g=1,rowSpan:v=1}=w,k=o-1,I=$l(k,g,y),S=g>1?x-I:0,K={...P,...c,flex:`0 0 ${I}px`,width:`${I}px`,marginRight:S,pointerEvents:"auto"},N=l.useMemo(()=>p?v<=1:g===0||v===0||v>1,[v,g,p]);N?K.visibility="hidden":p&&(K.height=f?.(v));const R=N?()=>null:m,O={};return(v===0||g===0)&&(O.rowSpan=1,O.colSpan=1),l.createElement(Nt,$n({className:V(b,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:a,prefixCls:e.prefixCls,key:C,record:d,index:s,renderIndex:i,dataIndex:h,render:R,shouldCellUpdate:n.shouldCellUpdate},E,{appendNode:$,additionalProps:{...w,style:K,...O}}))};function Nn(){return Nn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{data:n,index:o,className:r,rowKey:s,style:a,extra:i,getHeight:d,...c}=t,{record:u,indent:p,index:f}=n,{scrollX:m,flattenColumns:h,prefixCls:b,fixColumn:x,componentWidth:y}=Ne(De,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),{getComponent:C}=Ne(Xn,["getComponent"]),E=pr(u,s,o,p),$=C(["body","row"],"div"),w=C(["body","cell"],"div"),{rowSupportExpand:P,expanded:g,rowProps:v,expandedRowRender:k,expandedRowClassName:I}=E;let S;if(P&&g){const R=k(u,o,p+1,g),O=hr(I,u,o,p);let z={};x&&(z={style:{"--virtual-width":`${y}px`}});const U=`${b}-expanded-row-cell`;S=l.createElement($,{className:V(`${b}-expanded-row`,`${b}-expanded-row-level-${p+1}`,O)},l.createElement(Nt,{component:w,prefixCls:b,className:V(U,{[`${U}-fixed`]:x}),additionalProps:z},R))}const K={...a,width:m};i&&(K.position="absolute",K.pointerEvents="none");const N=l.createElement($,Nn({},v,c,{"data-row-key":s,ref:P?null:e,className:V(r,`${b}-row`,v?.className,{[`${b}-row-extra`]:i}),style:{...K,...v?.style}}),h.map((R,O)=>l.createElement(Nl,{key:O,component:w,rowInfo:E,column:R,colIndex:O,indent:p,index:o,renderIndex:f,record:u,inverse:i,getHeight:d})));return P?l.createElement("div",{ref:e},N,S):N}),Co=$t(kl),Il=l.forwardRef((t,e)=>{const{data:n,onScroll:o}=t,{flattenColumns:r,onColumnResize:s,getRowKey:a,expandedKeys:i,prefixCls:d,childrenColumnName:c,scrollX:u,direction:p}=Ne(De,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),{sticky:f,scrollY:m,listItemHeight:h,getComponent:b,onScroll:x}=Ne(Xn),y=l.useRef(null),C=fr(n,c,i,a),E=l.useMemo(()=>{let S=0;return r.map(({width:K,minWidth:N,key:R})=>{const O=Math.max(K||0,N||0);return S+=O,[R,O,S]})},[r]),$=l.useMemo(()=>E.map(S=>S[2]),[E]);l.useEffect(()=>{E.forEach(([S,K])=>{s(S,K)})},[E]),l.useImperativeHandle(e,()=>{const S={scrollTo:K=>{const{offset:N,...R}=K;N?y.current?.scrollTo({...R,offset:N,align:"top"}):y.current?.scrollTo(K)},nativeElement:y.current?.nativeElement};return Object.defineProperty(S,"scrollLeft",{get:()=>y.current?.getScrollInfo().x||0,set:K=>{y.current?.scrollTo({left:K})}}),Object.defineProperty(S,"scrollTop",{get:()=>y.current?.getScrollInfo().y||0,set:K=>{y.current?.scrollTo({top:K})}}),S});const w=(S,K)=>{const N=C[K]?.record,{onCell:R}=S;return R?R(N,K)?.rowSpan??1:1},P=S=>{const{start:K,end:N,getSize:R,offsetY:O}=S;if(N<0)return null;let z=r.filter(L=>w(L,K)===0),U=K;for(let L=K;L>=0;L-=1)if(z=z.filter(Q=>w(Q,L)===0),!z.length){U=L;break}let q=r.filter(L=>w(L,N)!==1),D=N;for(let L=N;Lw(Q,L)!==1),!q.length){D=Math.max(L-1,N);break}const G=[];for(let L=U;L<=D;L+=1)C[L]&&r.some(Y=>w(Y,L)>1)&&G.push(L);return G.map(L=>{const Q=C[L],Y=a(Q.record,L),fe=$e=>{const ce=L+$e-1,me=C[ce];if(!me||!me.record){const X=Math.min(ce,C.length-1),H=C[X],A=a(H.record,X),B=R(Y,A);return B.bottom-B.top}const ae=a(me.record,ce),re=R(Y,ae);return re.bottom-re.top},_=R(Y);return l.createElement(Co,{key:L,data:Q,rowKey:Y,index:L,style:{top:-O+_.top},extra:!0,getHeight:fe})})},g=l.useMemo(()=>({columnsOffset:$}),[$]),v=`${d}-tbody`,k=b(["body","wrapper"]),I={};return f&&(I.position="sticky",I.bottom=0,typeof f=="object"&&f.offsetScroll&&(I.bottom=f.offsetScroll)),l.createElement(wr.Provider,{value:g},l.createElement(Vo,{fullHeight:!1,ref:y,prefixCls:`${v}-virtual`,styles:{horizontalScrollBar:I},className:v,height:m,itemHeight:h||24,data:C,itemKey:S=>a(S.record),component:k,scrollWidth:u,direction:p,onVirtualScroll:({x:S})=>{o({currentTarget:y.current?.nativeElement,scrollLeft:S})},onScroll:x,extraRender:P},(S,K,N)=>{const R=a(S.record,K);return l.createElement(Co,{data:S,rowKey:R,index:K,style:N.style})}))}),Rl=$t(Il);function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{ref:n,onScroll:o}=e;return l.createElement(Rl,{ref:n,data:t,onScroll:o})},Pl=(t,e)=>{const{data:n,columns:o,scroll:r,sticky:s,prefixCls:a=Cr,className:i,listItemHeight:d,components:c,onScroll:u}=t;let{x:p,y:f}=r||{};typeof p!="number"&&(p=1),typeof f!="number"&&(f=500);const m=lt((x,y)=>Hn(c,x)||y),h=lt(u),b=l.useMemo(()=>({sticky:s,scrollY:f,listItemHeight:d,getComponent:m,onScroll:h}),[s,f,d,m,h]);return l.createElement(Xn.Provider,{value:b},l.createElement(kt,kn({},t,{className:V(i,`${a}-virtual`),scroll:{...r,x:p},components:{...c,body:n?.length?Kl:void 0},columns:o,internalHooks:Wt,tailor:!0,ref:e})))},Tl=l.forwardRef(Pl),Er=t=>ar(Tl,t);Er();const Dl=t=>null,Ml=t=>null,Gn=l.createContext(null),Ol=l.createContext({}),Bl=({prefixCls:t,level:e,isStart:n,isEnd:o})=>{const r=`${t}-indent-unit`,s=[];for(let a=0;a{const{eventKey:e,className:n,style:o,dragOver:r,dragOverGapTop:s,dragOverGapBottom:a,isLeaf:i,isStart:d,isEnd:c,expanded:u,selected:p,checked:f,halfChecked:m,loading:h,domRef:b,active:x,data:y,onMouseMove:C,selectable:E,treeId:$,...w}=t,P=Uo($,e),g=ne.useContext(Gn),{classNames:v,styles:k}=g||{},I=ne.useContext(Ol),S=ne.useRef(null),[K,N]=ne.useState(!1),R=!!(g.disabled||t.disabled||I.nodeDisabled?.(y)),O=ne.useMemo(()=>!g.checkable||t.checkable===!1?!1:g.checkable,[g.checkable,t.checkable]),z=F=>{R||g.onNodeSelect(F,ve(t))},U=F=>{R||!O||t.disableCheckbox||g.onNodeCheck(F,ve(t),!f)},q=ne.useMemo(()=>typeof E=="boolean"?E:g.selectable,[E,g.selectable]),D=F=>{g.onNodeClick(F,ve(t)),q?z(F):U(F)},G=F=>{g.onNodeDoubleClick(F,ve(t))},ee=F=>{g.onNodeMouseEnter(F,ve(t))},L=F=>{g.onNodeMouseLeave(F,ve(t))},Q=F=>{g.onNodeContextMenu(F,ve(t))},Y=ne.useMemo(()=>!!(g.draggable&&(!g.draggable.nodeDraggable||g.draggable.nodeDraggable(y))),[g.draggable,y]),fe=F=>{F.stopPropagation(),N(!0),g.onNodeDragStart(F,t);try{F.dataTransfer.setData("text/plain","")}catch{}},_=F=>{F.preventDefault(),F.stopPropagation(),g.onNodeDragEnter(F,t)},$e=F=>{F.preventDefault(),F.stopPropagation(),g.onNodeDragOver(F,t)},ce=F=>{F.stopPropagation(),g.onNodeDragLeave(F,t)},me=F=>{F.stopPropagation(),N(!1),g.onNodeDragEnd(F,t)},ae=F=>{F.preventDefault(),F.stopPropagation(),N(!1),g.onNodeDrop(F,t)},re=F=>{h||g.onNodeExpand(F,ve(t))},X=ne.useMemo(()=>{const{children:F}=Le(g.keyEntities,e)||{};return!!(F||[]).length},[g.keyEntities,e]),H=ne.useMemo(()=>sr(i,g.loadData,X,t.loaded),[i,g.loadData,X,t.loaded]);ne.useEffect(()=>{h||typeof g.loadData=="function"&&u&&!H&&!t.loaded&&g.onNodeLoad(ve(t))},[h,g.loadData,g.onNodeLoad,u,H,t]);const A=ne.useMemo(()=>g.draggable?.icon?ne.createElement("span",{className:`${g.prefixCls}-draggable-icon`},g.draggable.icon):null,[g.draggable]),B=F=>{const Ie=t.switcherIcon||g.switcherIcon;return typeof Ie=="function"?Ie({...t,isLeaf:F}):Ie},j=()=>{if(H){const Ie=B(!0);return Ie!==!1?ne.createElement("span",{className:V(`${g.prefixCls}-switcher`,`${g.prefixCls}-switcher-noop`)},Ie):null}const F=B(!1);return F!==!1?ne.createElement("span",{onClick:re,className:V(`${g.prefixCls}-switcher`,`${g.prefixCls}-switcher_${u?So:wo}`)},F):null},T=ne.useMemo(()=>{if(!O)return null;const F=typeof O!="boolean"?O:null;return ne.createElement("span",{className:V(`${g.prefixCls}-checkbox`,{[`${g.prefixCls}-checkbox-checked`]:f,[`${g.prefixCls}-checkbox-indeterminate`]:!f&&m,[`${g.prefixCls}-checkbox-disabled`]:R||t.disableCheckbox}),onClick:U,role:"checkbox","aria-checked":m?"mixed":f,"aria-disabled":R||t.disableCheckbox,"aria-labelledby":P},F)},[O,f,m,R,t.disableCheckbox,P]),M=ne.useMemo(()=>H?null:u?So:wo,[H,u]),he=ne.useMemo(()=>ne.createElement("span",{className:V(v?.itemIcon,`${g.prefixCls}-iconEle`,`${g.prefixCls}-icon__${M||"docu"}`,{[`${g.prefixCls}-icon_loading`]:h}),style:k?.itemIcon}),[g.prefixCls,M,h]),Se=ne.useMemo(()=>{const F=!!g.draggable;return!t.disabled&&F&&g.dragOverNodeKey===e?g.dropIndicatorRender({dropPosition:g.dropPosition,dropLevelOffset:g.dropLevelOffset,indent:g.indent,prefixCls:g.prefixCls,direction:g.direction}):null},[g.dropPosition,g.dropLevelOffset,g.indent,g.prefixCls,g.direction,g.draggable,g.dragOverNodeKey,g.dropIndicatorRender]),xe=ne.useMemo(()=>{const{title:F=Al}=t,Ie=`${g.prefixCls}-node-content-wrapper`;let Ve;if(g.showIcon){const ue=t.icon||g.icon;Ve=ue?ne.createElement("span",{className:V(v?.itemIcon,`${g.prefixCls}-iconEle`,`${g.prefixCls}-icon__customize`),style:k?.itemIcon},typeof ue=="function"?ue(t):ue):he}else g.loadData&&h&&(Ve=he);let te;return typeof F=="function"?te=F(y):g.titleRender?te=g.titleRender(y):te=F,ne.createElement("span",{ref:S,title:typeof F=="string"?F:"",className:V(Ie,`${Ie}-${M||"normal"}`,{[`${g.prefixCls}-node-selected`]:!R&&(p||K)}),onMouseEnter:ee,onMouseLeave:L,onContextMenu:Q,onClick:D,onDoubleClick:G},Ve,ne.createElement("span",{className:V(`${g.prefixCls}-title`,v?.itemTitle),style:k?.itemTitle},te),Se)},[g.prefixCls,g.showIcon,t,g.icon,he,g.titleRender,y,M,ee,L,Q,D,G]),de=Qt(w,{aria:!0,data:!0}),{level:ke}=Le(g.keyEntities,e)||{},ge=c[c.length-1],Ke=!R&&Y,Oe=g.draggingNodeKey===e;return ne.createElement("div",In({ref:b,role:"treeitem",id:P,"aria-expanded":H?void 0:u,"aria-selected":q&&!R?p:void 0,"aria-checked":O&&!R?m?"mixed":f:void 0,"aria-disabled":R,className:V(n,`${g.prefixCls}-treenode`,v?.item,{[`${g.prefixCls}-treenode-disabled`]:R,[`${g.prefixCls}-treenode-switcher-${u?"open":"close"}`]:!i,[`${g.prefixCls}-treenode-checkbox-checked`]:f,[`${g.prefixCls}-treenode-checkbox-indeterminate`]:m,[`${g.prefixCls}-treenode-selected`]:p,[`${g.prefixCls}-treenode-loading`]:h,[`${g.prefixCls}-treenode-active`]:x,[`${g.prefixCls}-treenode-leaf-last`]:ge,[`${g.prefixCls}-treenode-draggable`]:Y,dragging:Oe,"drop-target":g.dropTargetKey===e,"drop-container":g.dropContainerKey===e,"drag-over":!R&&r,"drag-over-gap-top":!R&&s,"drag-over-gap-bottom":!R&&a,"filter-node":g.filterTreeNode?.(ve(t)),[`${g.prefixCls}-treenode-leaf`]:H}),style:{...o,...k?.item},draggable:Ke,onDragStart:Ke?fe:void 0,onDragEnter:Y?_:void 0,onDragOver:Y?$e:void 0,onDragLeave:Y?ce:void 0,onDrop:Y?ae:void 0,onDragEnd:Y?me:void 0,onMouseMove:C},de),ne.createElement(Ll,{prefixCls:g.prefixCls,level:ke,isStart:d,isEnd:c}),A,j(),T,xe)};Ft.isTreeNode=1;function Ye(t,e){if(!t)return[];const n=t.slice(),o=n.indexOf(e);return o>=0&&n.splice(o,1),n}function Je(t,e){const n=(t||[]).slice();return n.indexOf(e)===-1&&n.push(e),n}function Yn(t){return t.split("-")}function Hl(t,e){const n=[],o=Le(e,t);function r(s=[]){s.forEach(({key:a,children:i})=>{n.push(a),r(i)})}return r(o.children),n}function Fl(t){if(t.parent){const e=Yn(t.pos);return Number(e[e.length-1])===t.parent.children.length-1}return!1}function zl(t){const e=Yn(t.pos);return Number(e[e.length-1])===0}function Eo(t,e,n,o,r,s,a,i,d,c){const{clientX:u,clientY:p}=t,{top:f,height:m}=t.target.getBoundingClientRect(),b=((c==="rtl"?-1:1)*((r?.x||0)-u)-12)/o,x=d.filter(I=>i[I]?.children?.length);let y=Le(i,n.eventKey);if(pN.key===y.key),S=I<=0?0:I-1,K=a[S].key;y=Le(i,K)}const C=y.key,E=y,$=y.key;let w=0,P=0;if(!x.includes(C))for(let I=0;I-1.5?s({dragNode:g,dropNode:v,dropPosition:1})?w=1:k=!1:s({dragNode:g,dropNode:v,dropPosition:0})?w=0:s({dragNode:g,dropNode:v,dropPosition:1})?w=1:k=!1:s({dragNode:g,dropNode:v,dropPosition:1})?w=1:k=!1,{dropPosition:w,dropLevelOffset:P,dropTargetKey:y.key,dropTargetPos:y.pos,dragOverNodeKey:$,dropContainerKey:w===0?null:y.parent?.key||null,dropAllowed:k}}function vo(t,e){if(!t)return;const{multiple:n}=e;return n?t.slice():t.length?[t[0]]:t}function hn(t){if(!t)return null;let e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else if(typeof t=="object")e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return st(!1,"`checkedKeys` is not an array or an object"),null;return e}function Rn(t,e){const n=new Set;function o(r){if(n.has(r))return;const s=Le(e,r);if(!s)return;n.add(r);const{parent:a,node:i}=s;i.disabled||a&&o(a.key)}return(t||[]).forEach(r=>{o(r)}),[...n]}const nt={},Kn="SELECT_ALL",Pn="SELECT_INVERT",Tn="SELECT_NONE",$o=[],vr=(t,e,n=[])=>((e||[]).forEach(o=>{n.push(o),o&&typeof o=="object"&&t in o&&vr(t,o[t],n)}),n),Wl=(t,e)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:o,defaultSelectedRowKeys:r,getCheckboxProps:s,getTitleCheckboxProps:a,onChange:i,onSelect:d,onSelectAll:c,onSelectInvert:u,onSelectNone:p,onSelectMultiple:f,columnWidth:m,type:h,selections:b,fixed:x,renderCell:y,hideSelectAll:C,checkStrictly:E=!0}=e||{},{prefixCls:$,data:w,pageData:P,getRecordByKey:g,getRowKey:v,expandType:k,childrenColumnName:I,locale:S,getPopupContainer:K}=t,N=Wn(),[R,O]=Ss(X=>X),[z,U]=zr(r||$o,o),q=l.useRef(new Map),D=l.useCallback(X=>{if(n){const H=new Map;X.forEach(A=>{let B=g(A);!B&&q.current.has(A)&&(B=q.current.get(A)),H.set(A,B)}),q.current=H}},[g,n]);l.useEffect(()=>{D(z)},[z]);const G=l.useMemo(()=>vr(I,P),[I,P]),{keyEntities:ee}=l.useMemo(()=>{if(E)return{keyEntities:null};let X=w;if(n){const H=new Set(G.map(v)),A=Array.from(q.current).reduce((B,[j,T])=>H.has(j)?B:B.concat(T),[]);X=[].concat(Re(X),Re(A))}return jn(X,{externalGetKey:v,childrenPropName:I})},[w,v,E,I,n,G]),L=l.useMemo(()=>{const X=new Map;return G.forEach((H,A)=>{const B=v(H,A),j=(s?s(H):null)||{};X.set(B,j)}),X},[G,v,s]),Q=l.useCallback(X=>{const H=v(X);let A;return L.has(H)?A=L.get(v(X)):A=s?s(X):void 0,!!A?.disabled},[L,v]),[Y,fe]=l.useMemo(()=>{if(E)return[z||[],[]];const{checkedKeys:X,halfCheckedKeys:H}=St(z,!0,ee,Q);return[X||[],H]},[z,E,ee,Q]),_=l.useMemo(()=>{const X=h==="radio"?Y.slice(0,1):Y;return new Set(X)},[Y,h]),$e=l.useMemo(()=>h==="radio"?new Set:new Set(fe),[fe,h]);l.useEffect(()=>{e||U($o)},[!!e]);const ce=l.useCallback((X,H)=>{let A,B;D(X),n?(A=X,B=X.map(j=>q.current.get(j))):(A=[],B=[],X.forEach(j=>{const T=g(j);T!==void 0&&(A.push(j),B.push(T))})),U(A),i?.(A,B,{type:H})},[U,g,i,n]),me=l.useCallback((X,H,A,B)=>{if(d){const j=A.map(g);d(g(X),H,j,B)}ce(A,"single")},[d,g,ce]),ae=l.useMemo(()=>!b||C?null:(b===!0?[Kn,Pn,Tn]:b).map(H=>H===Kn?{key:"all",text:S.selectionAll,onSelect(){ce(w.map((A,B)=>v(A,B)).filter(A=>!L.get(A)?.disabled||_.has(A)),"all")}}:H===Pn?{key:"invert",text:S.selectInvert,onSelect(){const A=new Set(_);P.forEach((j,T)=>{const M=v(j,T);L.get(M)?.disabled||(A.has(M)?A.delete(M):A.add(M))});const B=Array.from(A);u&&(N.deprecated(!1,"onSelectInvert","onChange"),u(B)),ce(B,"invert")}}:H===Tn?{key:"none",text:S.selectNone,onSelect(){p?.(),ce(Array.from(_).filter(A=>L.get(A)?.disabled),"none")}}:H).map(H=>({...H,onSelect:(...A)=>{H.onSelect?.(...A),O(null)}})),[b,C,S.selectionAll,S.selectInvert,S.selectNone,L,_,w,P,v,u,ce]);return[l.useCallback(X=>{if(!e)return X.filter(te=>te!==nt);let H=Re(X);const A=new Set(_),B=G.map(v).filter(te=>!L.get(te).disabled),j=B.every(te=>A.has(te)),T=B.some(te=>A.has(te)),M=()=>{const te=[];j?B.forEach(ye=>{A.delete(ye),te.push(ye)}):B.forEach(ye=>{A.has(ye)||(A.add(ye),te.push(ye))});const ue=Array.from(A);c?.(!j,ue.map(g),te.map(g)),ce(ue,"all"),O(null)};let he,Se;if(h!=="radio"){let te;if(ae){const be={getPopupContainer:K,items:ae.map((we,_e)=>{const{key:Ue,text:ct,onSelect:Fe}=we;return{key:Ue??_e,onClick:()=>{Fe?.(B)},label:ct}})};te=l.createElement("div",{className:`${$}-selection-extra`},l.createElement(qo,{menu:be,getPopupContainer:K},l.createElement("span",null,l.createElement(Wr,null))))}const ue=G.map((be,we)=>{const _e=v(be,we),Ue=L.get(_e)||{};return{checked:A.has(_e),...Ue}}).filter(({disabled:be})=>be),ye=!!ue.length&&ue.length===G.length,le=ye&&ue.every(({checked:be})=>be),Ce=ye&&ue.some(({checked:be})=>be),ie=a?.()||{},{onChange:se,disabled:He}=ie;Se=l.createElement(Jt,{"aria-label":te?"Custom selection":"Select all",...ie,checked:ye?le:!!G.length&&j,indeterminate:ye?!le&&Ce:!j&&T,onChange:be=>{M(),se?.(be)},disabled:He??(G.length===0||ye),skipGroup:!0}),he=!C&&l.createElement("div",{className:`${$}-selection`},Se,te)}let xe;h==="radio"?xe=(te,ue,ye)=>{const le=v(ue,ye),Ce=A.has(le),ie=L.get(le);return{node:l.createElement(nr,{...ie,checked:Ce,onClick:se=>{se.stopPropagation(),ie?.onClick?.(se)},onChange:se=>{A.has(le)||me(le,!0,[le],se.nativeEvent),ie?.onChange?.(se)}}),checked:Ce}}:xe=(te,ue,ye)=>{const le=v(ue,ye),Ce=A.has(le),ie=$e.has(le),se=L.get(le);let He;return k==="nest"?He=ie:He=se?.indeterminate??ie,{node:l.createElement(Jt,{...se,indeterminate:He,checked:Ce,skipGroup:!0,onClick:be=>{be.stopPropagation(),se?.onClick?.(be)},onChange:be=>{const{nativeEvent:we}=be,{shiftKey:_e}=we,Ue=B.indexOf(le),ct=Y.some(Fe=>B.includes(Fe));if(_e&&E&&ct){const Fe=R(Ue,B,A),je=Array.from(A);f?.(!Ce,je.map(g),Fe.map(g)),ce(je,"multiple")}else{const Fe=Y;if(E){const je=Ce?Ye(Fe,le):Je(Fe,le);me(le,!Ce,je,we)}else{const je=St([].concat(Re(Fe),[le]),!0,ee,Q),{checkedKeys:Pe,halfCheckedKeys:ze}=je;let Me=Pe;if(Ce){const Ze=new Set(Pe);Ze.delete(le),Me=St(Array.from(Ze),{halfCheckedKeys:ze},ee,Q).checkedKeys}me(le,!Ce,Me,we)}}O(Ce?null:Ue),se?.onChange?.(be)}}),checked:Ce}};const de=(te,ue,ye)=>{const{node:le,checked:Ce}=xe(te,ue,ye);return y?y(Ce,ue,ye,le):le};if(!H.includes(nt))if(H.findIndex(te=>te[At]?.columnType==="EXPAND_COLUMN")===0){const[te,...ue]=H;H=[te,nt].concat(Re(ue))}else H=[nt].concat(Re(H));const ke=H.indexOf(nt);H=H.filter((te,ue)=>te!==nt||ue===ke);const ge=H[ke-1],Ke=H[ke+1];let Oe=x;Oe===void 0&&(Ke?.fixed!==void 0?Oe=Ke.fixed:ge?.fixed!==void 0&&(Oe=ge.fixed)),Oe&&ge&&ge[At]?.columnType==="EXPAND_COLUMN"&&ge.fixed===void 0&&(ge.fixed=Oe);const F=V(`${$}-selection-col`,{[`${$}-selection-col-with-dropdown`]:b&&h==="checkbox"}),Ie=()=>e?.columnTitle?typeof e.columnTitle=="function"?e.columnTitle(Se):e.columnTitle:he,Ve={fixed:Oe,width:m,className:`${$}-selection-column`,title:Ie(),render:de,onCell:e.onCell,align:e.align,[At]:{className:F}};return H.map(te=>te===nt?Ve:te)},[v,G,e,Y,_,$e,m,ae,k,L,f,me,Q]),_]};function _l(t){return e=>{const{prefixCls:n,onExpand:o,record:r,expanded:s,expandable:a}=e,i=`${n}-row-expand-icon`;return l.createElement("button",{type:"button",onClick:d=>{o(r,d),d.stopPropagation()},className:V(i,{[`${i}-spaced`]:!a,[`${i}-expanded`]:a&&s,[`${i}-collapsed`]:a&&!s}),"aria-label":s?t.collapse:t.expand,"aria-expanded":s})}}function jl(t){return(n,o)=>{const r=n.querySelector(`.${t}-container`);let s=o;if(r){const a=getComputedStyle(r),i=Number.parseInt(a.borderLeftWidth,10),d=Number.parseInt(a.borderRightWidth,10);s=o-i-d}return s}}const at=(t,e)=>"key"in t&&zo(t.key)?t.key:t.dataIndex?Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex:e;function It(t,e){return e?`${e}-${t}`:`${t}`}const an=(t,e)=>typeof t=="function"?t(e):t,Vl=(t,e)=>{const n=an(t,e);return Object.prototype.toString.call(n)==="[object Object]"?"":n},Ul=t=>{const{dropPosition:e,dropLevelOffset:n,indent:o}=t,r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(e){case-1:r.top=0,r.left=-n*o;break;case 1:r.bottom=0,r.left=-n*o;break;case 0:r.bottom=0,r.left=o;break}return ne.createElement("div",{style:r})};function ql(t,e){const[n,o]=l.useState(!1);et(()=>{if(n)return t(),()=>{e()}},[n]),et(()=>(o(!0),()=>{o(!1)}),[])}function Ht(){return Ht=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{className:n,style:o,motion:r,motionNodes:s,motionType:a,onMotionStart:i,onMotionEnd:d,active:c,treeNodeRequiredProps:u,...p}=t,[f,m]=l.useState(!0),{prefixCls:h}=l.useContext(Gn),b=s&&a!=="hide";et(()=>{s&&b!==f&&m(b)},[s]);const x=()=>{s&&i()},y=l.useRef(!1),C=()=>{s&&!y.current&&(y.current=!0,d())};ql(x,C);const E=$=>{b===$&&C()};return s?l.createElement(_r,Ht({ref:e,visible:f},r,{motionAppear:a==="show",onVisibleChanged:E}),({className:$,style:w},P)=>l.createElement("div",{ref:P,className:V(`${h}-treenode-motion`,$),style:w},s.map(g=>{const{data:{...v},title:k,key:I,isStart:S,isEnd:K}=g;delete v.children;const N=Bt(I,u);return l.createElement(Ft,Ht({},v,N,{title:k,active:c,data:g.data,key:I,isStart:S,isEnd:K}))}))):l.createElement(Ft,Ht({domRef:e,className:n,style:o},p,{active:c}))});function Gl(t=[],e=[]){const n=t.length,o=e.length;if(Math.abs(n-o)!==1)return{add:!1,key:null};function r(s,a){const i=new Map;s.forEach(c=>{i.set(c,!0)});const d=a.filter(c=>!i.has(c));return d.length===1?d[0]:null}return na.key===n),r=t[o+1],s=e.findIndex(a=>a.key===n);if(r){const a=e.findIndex(i=>i.key===r.key);return e.slice(s+1,a)}return e.slice(s+1)}function nn(){return nn=Object.assign?Object.assign.bind():function(t){for(var e=1;e{const{prefixCls:n,data:o,selectable:r,checkable:s,expandedKeys:a,selectedKeys:i,checkedKeys:d,loadedKeys:c,loadingKeys:u,halfCheckedKeys:p,keyEntities:f,disabled:m,dragging:h,dragOverNodeKey:b,dropPosition:x,motion:y,height:C,itemHeight:E,virtual:$,scrollWidth:w,focusable:P,activeItem:g,tabIndex:v,onKeyDown:k,onFocus:I,onBlur:S,onMouseDown:K,onMouseUp:N,onActiveChange:R,onListChangeStart:O,onListChangeEnd:z,...U}=t,q=jr(),D=l.useRef(null),G=l.useRef(null);l.useImperativeHandle(e,()=>({scrollTo:B=>{D.current.scrollTo(B)},getIndentWidth:()=>G.current.offsetWidth}));const[ee,L]=l.useState(a),[Q,Y]=l.useState(o),[fe,_]=l.useState(o),[$e,ce]=l.useState([]),[me,ae]=l.useState(null),re=l.useRef(o);re.current=o;function X(){const B=re.current;Y(B),_(B),ce([]),ae(null),z()}et(()=>{L(a);const B=Gl(ee,a);if(B.key!==null)if(B.add){const j=Q.findIndex(({key:he})=>he===B.key),T=Io(No(Q,o,B.key),$,C,E),M=Q.slice();M.splice(j+1,0,ko),_(M),ce(T),ae("show")}else{const j=o.findIndex(({key:he})=>he===B.key),T=Io(No(o,Q,B.key),$,C,E),M=o.slice();M.splice(j+1,0,ko),_(M),ce(T),ae("hide")}else Q!==o&&(Y(o),_(o))},[a,o]),l.useEffect(()=>{h||X()},[h]);const H=y?fe:o,A={expandedKeys:a,selectedKeys:i,loadedKeys:c,loadingKeys:u,checkedKeys:d,halfCheckedKeys:p,dragOverNodeKey:b,dropPosition:x,keyEntities:f};return l.createElement(l.Fragment,null,l.createElement("div",{className:`${n}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},l.createElement("div",{className:`${n}-indent`},l.createElement("div",{ref:G,className:`${n}-indent-unit`}))),l.createElement(Vo,nn({},U,{data:H,itemKey:Ro,height:C,fullHeight:!1,virtual:$,itemHeight:E,scrollWidth:w,prefixCls:`${n}-list`,ref:D,role:"tree",tabIndex:P!==!1&&!m?v:void 0,"aria-activedescendant":g?Uo(q,g.key):void 0,onKeyDown:k,onFocus:I,onBlur:S,onMouseDown:K,onMouseUp:N,onVisibleChange:B=>{B.every(j=>Ro(j)!==gt)&&X()}}),B=>{const{pos:j,data:{...T},title:M,key:he,isStart:Se,isEnd:xe}=B,de=zt(he,j);delete T.key,delete T.children;const ke=Bt(de,A);return l.createElement(Xl,nn({},T,ke,{title:M,active:!!g&&he===g.key,pos:j,data:B.data,isStart:Se,isEnd:xe,motion:y,motionNodes:he===gt?$e:null,motionType:me,onMotionStart:O,onMotionEnd:X,treeNodeRequiredProps:A,treeId:q,onMouseMove:()=>{R(null)}}))}))});function Mn(){return Mn=Object.assign?Object.assign.bind():function(t){for(var e=1;e!0,expandAction:!1};static TreeNode=Ft;destroyed=!1;delayedDragEnterLogic;loadingRetryTimes={};state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],activeKey:null,listChanging:!1,prevProps:null,fieldNames:vt()};dragStartMousePosition=null;dragNodeProps=null;currentMouseOverDroppableNodeKey=null;focusedByMouse=!1;listRef=l.createRef();componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){const{activeKey:e,itemScrollOffset:n=0}=this.props;e!==void 0&&e!==this.state.activeKey&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:n}))}componentWillUnmount(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(e,n){const{prevProps:o}=n,r={prevProps:e};function s(c){return!o&&e.hasOwnProperty(c)||o&&o[c]!==e[c]}let a,{fieldNames:i}=n;if(s("fieldNames")&&(i=vt(e.fieldNames),r.fieldNames=i),s("treeData")?{treeData:a}=e:s("children")&&(st(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=rr(e.children)),a){r.treeData=a;const c=jn(a,{fieldNames:i});r.keyEntities={[gt]:$r,...c.keyEntities}}const d=r.keyEntities||n.keyEntities;if(s("expandedKeys")||o&&s("autoExpandParent"))r.expandedKeys=e.autoExpandParent||!o&&e.defaultExpandParent?Rn(e.expandedKeys,d):e.expandedKeys;else if(!o&&e.defaultExpandAll){const c={...d};delete c[gt];const u=[];Object.keys(c).forEach(p=>{const f=c[p];f.children&&f.children.length&&u.push(f.key)}),r.expandedKeys=u}else!o&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?Rn(e.defaultExpandedKeys,d):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,a||r.expandedKeys){const c=mn(a||n.treeData,r.expandedKeys||n.expandedKeys,i);r.flattenNodes=c}if(e.selectable&&(s("selectedKeys")?r.selectedKeys=vo(e.selectedKeys,e):!o&&e.defaultSelectedKeys&&(r.selectedKeys=vo(e.defaultSelectedKeys,e))),e.checkable){let c;if(s("checkedKeys")?c=hn(e.checkedKeys)||{}:!o&&e.defaultCheckedKeys?c=hn(e.defaultCheckedKeys)||{}:a&&(c=hn(e.checkedKeys)||{checkedKeys:n.checkedKeys,halfCheckedKeys:n.halfCheckedKeys}),c){let{checkedKeys:u=[],halfCheckedKeys:p=[]}=c;e.checkStrictly||({checkedKeys:u,halfCheckedKeys:p}=St(u,!0,d)),r.checkedKeys=u,r.halfCheckedKeys=p}}return s("loadedKeys")&&(r.loadedKeys=e.loadedKeys),r}onNodeDragStart=(e,n)=>{const{expandedKeys:o,keyEntities:r}=this.state,{onDragStart:s}=this.props,{eventKey:a}=n;this.dragNodeProps=n,this.dragStartMousePosition={x:e.clientX,y:e.clientY};const i=Ye(o,a);this.setState({draggingNodeKey:a,dragChildrenKeys:Hl(a,r),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(i),window.addEventListener("dragend",this.onWindowDragEnd),s?.({event:e,node:ve(n)})};onNodeDragEnter=(e,n)=>{const{expandedKeys:o,keyEntities:r,dragChildrenKeys:s,flattenNodes:a,indent:i}=this.state,{onDragEnter:d,onExpand:c,allowDrop:u,direction:p}=this.props,{pos:f,eventKey:m}=n;if(this.currentMouseOverDroppableNodeKey!==m&&(this.currentMouseOverDroppableNodeKey=m),!this.dragNodeProps){this.resetDragState();return}const{dropPosition:h,dropLevelOffset:b,dropTargetKey:x,dropContainerKey:y,dropTargetPos:C,dropAllowed:E,dragOverNodeKey:$}=Eo(e,this.dragNodeProps,n,i,this.dragStartMousePosition,u,a,r,o,p);if(s.includes(x)||!E){this.resetDragState();return}if(this.delayedDragEnterLogic||(this.delayedDragEnterLogic={}),Object.keys(this.delayedDragEnterLogic).forEach(w=>{clearTimeout(this.delayedDragEnterLogic[w])}),this.dragNodeProps.eventKey!==n.eventKey&&(e.persist(),this.delayedDragEnterLogic[f]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let w=[...o];const P=Le(r,n.eventKey);P&&(P.children||[]).length&&(w=Je(o,n.eventKey)),this.props.hasOwnProperty("expandedKeys")||this.setExpandedKeys(w),c?.(w,{node:ve(n),expanded:!0,nativeEvent:e.nativeEvent})},800)),this.dragNodeProps.eventKey===x&&b===0){this.resetDragState();return}this.setState({dragOverNodeKey:$,dropPosition:h,dropLevelOffset:b,dropTargetKey:x,dropContainerKey:y,dropTargetPos:C,dropAllowed:E}),d?.({event:e,node:ve(n),expandedKeys:o})};onNodeDragOver=(e,n)=>{const{dragChildrenKeys:o,flattenNodes:r,keyEntities:s,expandedKeys:a,indent:i}=this.state,{onDragOver:d,allowDrop:c,direction:u}=this.props;if(!this.dragNodeProps)return;const{dropPosition:p,dropLevelOffset:f,dropTargetKey:m,dropContainerKey:h,dropTargetPos:b,dropAllowed:x,dragOverNodeKey:y}=Eo(e,this.dragNodeProps,n,i,this.dragStartMousePosition,c,r,s,a,u);o.includes(m)||!x||(this.dragNodeProps.eventKey===m&&f===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():p===this.state.dropPosition&&f===this.state.dropLevelOffset&&m===this.state.dropTargetKey&&h===this.state.dropContainerKey&&b===this.state.dropTargetPos&&x===this.state.dropAllowed&&y===this.state.dragOverNodeKey||this.setState({dropPosition:p,dropLevelOffset:f,dropTargetKey:m,dropContainerKey:h,dropTargetPos:b,dropAllowed:x,dragOverNodeKey:y}),d?.({event:e,node:ve(n)}))};onNodeDragLeave=(e,n)=>{this.currentMouseOverDroppableNodeKey===n.eventKey&&!e.currentTarget.contains(e.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);const{onDragLeave:o}=this.props;o?.({event:e,node:ve(n)})};onWindowDragEnd=e=>{this.onNodeDragEnd(e,null,!0),window.removeEventListener("dragend",this.onWindowDragEnd)};onNodeDragEnd=(e,n)=>{const{onDragEnd:o}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),o?.({event:e,node:ve(n)}),this.dragNodeProps=null,window.removeEventListener("dragend",this.onWindowDragEnd)};onNodeDrop=(e,n,o=!1)=>{const{dragChildrenKeys:r,dropPosition:s,dropTargetKey:a,dropTargetPos:i,dropAllowed:d}=this.state;if(!d)return;const{onDrop:c}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;const u={...Bt(a,this.getTreeNodeRequiredProps()),active:this.getActiveItem()?.key===a,data:Le(this.state.keyEntities,a).node},p=r.includes(a);st(!p,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");const f=Yn(i),m={event:e,node:ve(u),dragNode:this.dragNodeProps?ve(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(r),dropToGap:s!==0,dropPosition:s+Number(f[f.length-1])};o||c?.(m),this.dragNodeProps=null};resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}cleanDragState=()=>{const{draggingNodeKey:e}=this.state;e!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null};triggerExpandActionExpand=(e,n)=>{const{expandedKeys:o,flattenNodes:r}=this.state,{expanded:s,key:a,isLeaf:i}=n;if(i||e.shiftKey||e.metaKey||e.ctrlKey)return;const d=r.filter(u=>u.key===a)[0],c=ve({...Bt(a,this.getTreeNodeRequiredProps()),data:d.data});this.setExpandedKeys(s?Ye(o,a):Je(o,a)),this.onNodeExpand(e,c)};onNodeClick=(e,n)=>{const{onClick:o,expandAction:r}=this.props;r==="click"&&this.triggerExpandActionExpand(e,n),o?.(e,n)};onNodeDoubleClick=(e,n)=>{const{onDoubleClick:o,expandAction:r}=this.props;r==="doubleClick"&&this.triggerExpandActionExpand(e,n),o?.(e,n)};onNodeSelect=(e,n)=>{let{selectedKeys:o}=this.state;const{keyEntities:r,fieldNames:s}=this.state,{onSelect:a,multiple:i}=this.props,{selected:d}=n,c=n[s.key],u=!d;u?i?o=Je(o,c):o=[c]:o=Ye(o,c);const p=o.map(f=>{const m=Le(r,f);return m?m.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:o}),a?.(o,{event:"select",selected:u,node:n,selectedNodes:p,nativeEvent:e.nativeEvent})};onNodeCheck=(e,n,o)=>{const{keyEntities:r,checkedKeys:s,halfCheckedKeys:a}=this.state,{checkStrictly:i,onCheck:d}=this.props,{key:c}=n;let u;const p={event:"check",node:n,checked:o,nativeEvent:e.nativeEvent};if(i){const f=o?Je(s,c):Ye(s,c),m=Ye(a,c);u={checked:f,halfChecked:m},p.checkedNodes=f.map(h=>Le(r,h)).filter(Boolean).map(h=>h.node),this.setUncontrolledState({checkedKeys:f})}else{let{checkedKeys:f,halfCheckedKeys:m}=St([...s,c],!0,r);if(!o){const h=new Set(f);h.delete(c),{checkedKeys:f,halfCheckedKeys:m}=St(Array.from(h),{halfCheckedKeys:m},r)}u=f,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=m,f.forEach(h=>{const b=Le(r,h);if(!b)return;const{node:x,pos:y}=b;p.checkedNodes.push(x),p.checkedNodesPositions.push({node:x,pos:y})}),this.setUncontrolledState({checkedKeys:f},!1,{halfCheckedKeys:m})}d?.(u,p)};onNodeLoad=e=>{const{key:n}=e,{keyEntities:o}=this.state;if(Le(o,n)?.children?.length)return;const s=new Promise((a,i)=>{this.setState(({loadedKeys:d=[],loadingKeys:c=[]})=>{const{loadData:u,onLoad:p}=this.props;return!u||d.includes(n)||c.includes(n)?null:(u(e).then(()=>{const{loadedKeys:m}=this.state,h=Je(m,n);p?.(h,{event:"load",node:e}),this.setUncontrolledState({loadedKeys:h}),this.setState(b=>({loadingKeys:Ye(b.loadingKeys,n)})),a()}).catch(m=>{if(this.setState(h=>({loadingKeys:Ye(h.loadingKeys,n)})),this.loadingRetryTimes[n]=(this.loadingRetryTimes[n]||0)+1,this.loadingRetryTimes[n]>=Zl){const{loadedKeys:h}=this.state;st(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:Je(h,n)}),a()}i(m)}),{loadingKeys:Je(c,n)})})});return s.catch(()=>{}),s};onNodeMouseEnter=(e,n)=>{const{onMouseEnter:o}=this.props;o?.({event:e,node:n})};onNodeMouseLeave=(e,n)=>{const{onMouseLeave:o}=this.props;o?.({event:e,node:n})};onNodeContextMenu=(e,n)=>{const{onRightClick:o}=this.props;o&&(e.preventDefault(),o({event:e,node:n}))};onMouseDown=e=>{this.focusedByMouse=!0;const{onMouseDown:n}=this.props;n?.(e)};onMouseUp=e=>{this.focusedByMouse=!1;const{onMouseUp:n}=this.props;n?.(e)};onFocus=(...e)=>{const{onFocus:n,disabled:o}=this.props,{activeKey:r,selectedKeys:s,flattenNodes:a}=this.state;if(!this.focusedByMouse&&!o&&r===null){const i=s.find(d=>a.some(c=>c.key===d));i!==void 0?this.onActiveChange(i):this.onActiveChange(a?.[0]?.key||null)}n?.(...e)};onBlur=(...e)=>{this.focusedByMouse=!1;const{onBlur:n}=this.props;this.onActiveChange(null),n?.(...e)};getTreeNodeRequiredProps=()=>{const{expandedKeys:e,selectedKeys:n,loadedKeys:o,loadingKeys:r,checkedKeys:s,halfCheckedKeys:a,dragOverNodeKey:i,dropPosition:d,keyEntities:c}=this.state;return{expandedKeys:e||[],selectedKeys:n||[],loadedKeys:o||[],loadingKeys:r||[],checkedKeys:s||[],halfCheckedKeys:a||[],dragOverNodeKey:i,dropPosition:d,keyEntities:c}};setExpandedKeys=e=>{const{treeData:n,fieldNames:o}=this.state,r=mn(n,e,o);this.setUncontrolledState({expandedKeys:e,flattenNodes:r},!0)};onNodeExpand=(e,n)=>{let{expandedKeys:o}=this.state;const{listChanging:r,fieldNames:s}=this.state,{onExpand:a,loadData:i}=this.props,{expanded:d}=n,c=n[s.key];if(r)return;const u=o.includes(c),p=!d;if(st(d&&u||!d&&!u,"Expand state not sync with index check"),o=p?Je(o,c):Ye(o,c),this.setExpandedKeys(o),a?.(o,{node:n,expanded:p,nativeEvent:e.nativeEvent}),p&&i){const f=this.onNodeLoad(n);f&&f.then(()=>{const m=mn(this.state.treeData,o,s);this.setUncontrolledState({flattenNodes:m})}).catch(()=>{const{expandedKeys:m}=this.state,h=Ye(m,c);this.setExpandedKeys(h)})}};onListChangeStart=()=>{this.setUncontrolledState({listChanging:!0})};onListChangeEnd=()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})};onActiveChange=e=>{const{activeKey:n}=this.state,{onActiveChange:o,itemScrollOffset:r=0}=this.props;n!==e&&(this.setState({activeKey:e}),e!==null&&this.scrollTo({key:e,offset:r}),o?.(e))};getActiveItem=()=>{const{activeKey:e,flattenNodes:n}=this.state;return e===null?null:n.find(({key:o})=>o===e)||null};offsetActiveKey=e=>{const{flattenNodes:n,activeKey:o}=this.state;let r=n.findIndex(({key:a})=>a===o);r===-1&&e<0&&(r=n.length),r=(r+e+n.length)%n.length;const s=n[r];if(s){const{key:a}=s;this.onActiveChange(a)}else this.onActiveChange(null)};onKeyDown=e=>{const{activeKey:n,expandedKeys:o,checkedKeys:r,flattenNodes:s,keyEntities:a}=this.state,{onKeyDown:i,checkable:d,selectable:c,disabled:u,loadData:p}=this.props;if(u)return;switch(e.key){case"ArrowUp":{this.offsetActiveKey(-1),e.preventDefault();break}case"ArrowDown":{this.offsetActiveKey(1),e.preventDefault();break}case"Home":{this.onActiveChange(s?.[0]?.key),e.preventDefault();break}case"End":{this.onActiveChange(s?.[s.length-1]?.key),e.preventDefault();break}}const f=this.getActiveItem();if(f&&f.data){const m=this.getTreeNodeRequiredProps(),h=ve({...Bt(n,m),data:f.data,active:!0}),x=!!Le(a,n)?.children?.length,y=!sr(f.data.isLeaf,p,x,h.loaded),C=d&&!h.disabled&&h.checkable!==!1&&!h.disableCheckbox,E=!d&&c&&!h.disabled&&h.selectable!==!1;switch(e.key){case"ArrowLeft":{y&&o.includes(n)?this.onNodeExpand({},h):f.parent&&this.onActiveChange(f.parent.key),e.preventDefault();break}case"ArrowRight":{y&&!o.includes(n)?this.onNodeExpand({},h):f.children&&f.children.length&&this.onActiveChange(f.children[0].key),e.preventDefault();break}case"Enter":{y?(e.preventDefault(),this.onNodeExpand({},h)):C?r.includes(n)||(e.preventDefault(),this.onNodeCheck({},h,!0)):E&&!h.selected&&(e.preventDefault(),this.onNodeSelect({},h));break}case" ":{C?(e.preventDefault(),this.onNodeCheck({},h,!r.includes(n))):E&&(e.preventDefault(),this.onNodeSelect({},h));break}}}i?.(e)};setUncontrolledState=(e,n=!1,o=null)=>{if(!this.destroyed){let r=!1,s=!0;const a={};Object.keys(e).forEach(i=>{if(this.props.hasOwnProperty(i)){s=!1;return}r=!0,a[i]=e[i]}),r&&(!n||s)&&this.setState({...a,...o})}};scrollTo=e=>{this.listRef.current.scrollTo(e)};render(){const{flattenNodes:e,keyEntities:n,draggingNodeKey:o,dropLevelOffset:r,dropContainerKey:s,dropTargetKey:a,dropPosition:i,dragOverNodeKey:d,indent:c}=this.state,{prefixCls:u,className:p,style:f,styles:m,classNames:h,showLine:b,focusable:x,tabIndex:y=0,selectable:C,showIcon:E,icon:$,switcherIcon:w,draggable:P,checkable:g,checkStrictly:v,disabled:k,motion:I,loadData:S,filterTreeNode:K,height:N,itemHeight:R,scrollWidth:O,virtual:z,titleRender:U,dropIndicatorRender:q,onContextMenu:D,onScroll:G,direction:ee,rootClassName:L,rootStyle:Q}=this.props,Y=Qt(this.props,{aria:!0,data:!0});let fe;P&&(typeof P=="object"?fe=P:typeof P=="function"?fe={nodeDraggable:P}:fe={});const _={styles:m,classNames:h,prefixCls:u,selectable:C,showIcon:E,icon:$,switcherIcon:w,draggable:fe,draggingNodeKey:o,checkable:g,checkStrictly:v,disabled:k,keyEntities:n,dropLevelOffset:r,dropContainerKey:s,dropTargetKey:a,dropPosition:i,dragOverNodeKey:d,indent:c,direction:ee,dropIndicatorRender:q,loadData:S,filterTreeNode:K,titleRender:U,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return l.createElement(Gn.Provider,{value:_},l.createElement("div",{className:V(u,p,L,{[`${u}-show-line`]:b}),style:Q},l.createElement(Yl,Mn({ref:this.listRef,prefixCls:u,style:f,data:e,disabled:k,selectable:C,checkable:!!g,motion:I,dragging:o!==null,height:N,itemHeight:R,virtual:z,focusable:x,tabIndex:y,activeItem:this.getActiveItem(),onFocus:this.onFocus,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:D,onScroll:G,scrollWidth:O},this.getTreeNodeRequiredProps(),Y))))}};const Jl=({treeCls:t,treeNodeCls:e,directoryNodeSelectedBg:n,directoryNodeSelectedColor:o,motionDurationMid:r,borderRadius:s,controlItemBgHover:a})=>({[`${t}${t}-directory ${e}`]:{[`${t}-node-content-wrapper`]:{position:"static",[`&:has(${t}-drop-indicator)`]:{position:"relative"},[`> *:not(${t}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${r}`,content:'""',borderRadius:s},"&:hover:before":{background:a}},[`${t}-switcher, ${t}-checkbox, ${t}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:s,[`${t}-switcher, ${t}-draggable-icon`]:{color:o},[`${t}-node-content-wrapper`]:{color:o,background:"transparent","&, &:hover":{color:o},"&:before, &:hover:before":{background:n}}}}}),ea=new qr("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ta=(t,e)=>({[`.${t}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${e.motionDurationSlow}`}}}),na=(t,e)=>({[`.${t}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${W(e.lineWidthBold)} solid ${e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),oa=(t,e)=>{const{treeCls:n,treeNodeCls:o,treeNodePadding:r,titleHeight:s,indentSize:a,switcherSize:i,motionDurationMid:d,nodeSelectedBg:c,nodeHoverBg:u,colorTextQuaternary:p,controlItemBgActiveDisabled:f}=e;return{[n]:{..._n(e),"--rc-virtual-list-scrollbar-bg":e.colorSplit,background:e.colorBgContainer,borderRadius:e.borderRadius,transition:`background-color ${e.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`${n}-list`]:{"&:focus-visible":{outline:"none",[`${o}-active ${n}-node-content-wrapper`]:{...Xr(e)}}},[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${o}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${e.colorPrimary}`,opacity:0,animationName:ea,animationDuration:e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:e.borderRadius}}},[o]:{display:"flex",alignItems:"flex-start",marginBottom:r,lineHeight:W(s),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:r},[`&-disabled ${n}-node-content-wrapper`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${o}-disabled${o}-selected ${n}-node-content-wrapper`]:{backgroundColor:f},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${o}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:e.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:e.controlItemBgHover},[`&:not(${o}-disabled).filter-node ${n}-title`]:{color:e.colorPrimary,fontWeight:e.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:i,textAlign:"center",visibility:"visible",color:p},[`&${o}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:a}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:e.calc(e.calc(i).sub(e.controlInteractiveSize)).div(2).equal()},[`${n}-checkbox`]:{flexShrink:0},[`${n}-switcher`]:{...ta(t,e),position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${e.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:s,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:e.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(i).div(2).equal(),bottom:e.calc(r).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:e.calc(e.calc(i).div(2).equal()).mul(.8).equal(),height:e.calc(s).div(2).equal(),borderBottom:`1px solid ${e.colorBorder}`,content:'""'}}},[`${n}-node-content-wrapper`]:{position:"relative",minHeight:s,paddingBlock:0,paddingInline:e.paddingXS,background:"transparent",borderRadius:e.borderRadius,cursor:"pointer",transition:[`all ${d}`,"border 0s","line-height 0s","box-shadow 0s"].join(", "),...na(t,e),"&:hover":{backgroundColor:u},[`&${n}-node-selected`]:{color:e.nodeSelectedColor,backgroundColor:c},[`${n}-iconEle`]:{display:"inline-block",width:i,height:s,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${o}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${e.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(i).div(2).equal(),bottom:e.calc(r).mul(-1).equal(),borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${o}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${W(e.calc(s).div(2).equal())} !important`}}}},ra=(t,e,n=!0)=>{const o=`.${t}`,r=`${o}-treenode`,s=e.calc(e.paddingXS).div(2).equal(),a=Go(e,{treeCls:o,treeNodeCls:r,treeNodePadding:s});return[oa(t,a),n&&Jl(a)].filter(Boolean)},sa=t=>{const{controlHeightSM:e,controlItemBgHover:n,controlItemBgActive:o}=t,r=e;return{titleHeight:r,switcherSize:r,indentSize:r,nodeHoverBg:n,nodeHoverColor:t.colorText,nodeSelectedBg:o,nodeSelectedColor:t.colorText}},la=t=>{const{colorTextLightSolid:e,colorPrimary:n}=t;return{...sa(t),directoryNodeSelectedColor:e,directoryNodeSelectedBg:n}},aa=Xo("Tree",(t,{prefixCls:e})=>[{[t.componentCls]:Vr(`${e}-checkbox`,t)},ra(e,t),Ur(t)],la),Ko=4,ia=t=>{const{dropPosition:e,dropLevelOffset:n,prefixCls:o,indent:r,direction:s="ltr"}=t,a=s==="ltr"?"left":"right",i=s==="ltr"?"right":"left",d={[a]:-n*r+Ko,[i]:0};switch(e){case-1:d.top=-3;break;case 1:d.bottom=-3;break;default:d.bottom=-3,d[a]=r+Ko;break}return ne.createElement("div",{style:d,className:`${o}-drop-indicator`})},ca=t=>{const{prefixCls:e,switcherIcon:n,treeNodeProps:o,showLine:r,switcherLoadingIcon:s}=t,{isLeaf:a,expanded:i,loading:d}=o;if(d)return l.isValidElement(s)?s:l.createElement(Gr,{className:`${e}-switcher-loading-icon`});let c;if(r&&typeof r=="object"&&(c=r.showLeafIcon),a){if(!r)return null;if(typeof c!="boolean"&&c){const f=typeof c=="function"?c(o):c,m=`${e}-switcher-line-custom-icon`;return l.isValidElement(f)?so(f,{className:V(f.props?.className,m)}):f}return c?l.createElement(Yo,{className:`${e}-switcher-line-icon`}):l.createElement("span",{className:`${e}-switcher-leaf-line`})}const u=`${e}-switcher-icon`,p=typeof n=="function"?n(o):n;return l.isValidElement(p)?so(p,{className:V(p.props?.className,u)}):p!==void 0?p:r?i?l.createElement(Yr,{className:`${e}-switcher-line-icon`}):l.createElement(Zr,{className:`${e}-switcher-line-icon`}):l.createElement(Qr,{className:u})},Nr=ne.forwardRef((t,e)=>{const{getPrefixCls:n,direction:o,className:r,style:s,classNames:a,styles:i}=Zo("tree"),{virtual:d}=ne.useContext(rn),{prefixCls:c,className:u,showIcon:p=!1,showLine:f,switcherIcon:m,switcherLoadingIcon:h,blockNode:b=!1,children:x,checkable:y=!1,selectable:C=!0,draggable:E,disabled:$,motion:w,style:P,rootClassName:g,classNames:v,styles:k,icon:I}=t,S=ne.useContext(Jr),K=$??S,N=n("tree",c),R=n(),O=w??{...ts(R),motionAppear:!1},z={...t,showIcon:p,blockNode:b,checkable:y,selectable:C,disabled:K,motion:O},[U,q]=Qo([a,v],[i,k],{props:z}),D={...z,showLine:!!f,icon:I,dropIndicatorRender:ia},[G,ee]=aa(N),[,L]=Jo(),Q=L.paddingXS/2+(L.Tree?.titleHeight||L.controlHeightSM),Y=ne.useMemo(()=>{if(!E)return!1;let _={};switch(typeof E){case"function":_.nodeDraggable=E;break;case"object":_={...E};break}return _.icon!==!1&&(_.icon=_.icon||ne.createElement(es,null)),_},[E]),fe=_=>ne.createElement(ca,{prefixCls:N,switcherIcon:m,switcherLoadingIcon:h,treeNodeProps:_,showLine:f});return ne.createElement(Ql,{itemHeight:Q,ref:e,virtual:d,...D,prefixCls:N,className:V({[`${N}-icon-hide`]:!p,[`${N}-block-node`]:b,[`${N}-unselectable`]:!C,[`${N}-rtl`]:o==="rtl",[`${N}-disabled`]:K},r,u,G,ee),style:{...s,...P},rootClassName:V(U.root,g),rootStyle:q.root,classNames:U,styles:q,direction:o,checkable:y&&ne.createElement("span",{className:`${N}-checkbox-inner`}),selectable:C,switcherIcon:fe,draggable:Y},x)}),Po=0,gn=1,To=2;function Zn(t,e,n){const{key:o,children:r}=n;function s(a){const i=a[o],d=a[r];e(i,a)!==!1&&Zn(d||[],e,n)}t.forEach(s)}function da({treeData:t,expandedKeys:e,startKey:n,endKey:o,fieldNames:r}){const s=[];let a=Po;if(n&&n===o)return[n];if(!n||!o)return[];function i(d){return d===n||d===o}return Zn(t,d=>{if(a===To)return!1;if(i(d)){if(s.push(d),a===Po)a=gn;else if(a===gn)return a=To,!1}else a===gn&&s.push(d);return e.includes(d)},vt(r)),s}function yn(t,e,n){const o=Re(e),r=[];return Zn(t,(s,a)=>{const i=o.indexOf(s);return i!==-1&&(r.push(a),o.splice(i,1)),!!o.length},vt(n)),r}function ua(t){const{isLeaf:e,expanded:n}=t;return e?l.createElement(Yo,null):n?l.createElement(ns,null):l.createElement(os,null)}function Do({treeData:t,children:e}){return t||rr(e)}const fa=l.forwardRef((t,e)=>{const{defaultExpandAll:n,defaultExpandParent:o,defaultExpandedKeys:r,...s}=t,a=l.useRef(null),i=l.useRef(null),d=()=>{const{keyEntities:v}=jn(Do(s),{fieldNames:s.fieldNames});let k;const I=s.expandedKeys||r||[];return n?k=Object.keys(v):o?k=Rn(I,v):k=I,k},[c,u]=l.useState(s.selectedKeys||s.defaultSelectedKeys||[]),[p,f]=l.useState(()=>d());l.useEffect(()=>{"selectedKeys"in s&&u(s.selectedKeys)},[s.selectedKeys]),l.useEffect(()=>{"expandedKeys"in s&&f(s.expandedKeys)},[s.expandedKeys]);const m=(v,k)=>("expandedKeys"in s||f(v),s.onExpand?.(v,k)),h=(v,k)=>{const{multiple:I,fieldNames:S}=s,{node:K,nativeEvent:N}=k,{key:R=""}=K,O=Do(s),z={...k,selected:!0},U=N?.ctrlKey||N?.metaKey,q=N?.shiftKey;let D;I&&U?(D=v,a.current=R,i.current=D,z.selectedNodes=yn(O,D,S)):I&&q?(D=Array.from(new Set([].concat(Re(i.current||[]),Re(da({treeData:O,expandedKeys:p,startKey:R,endKey:a.current,fieldNames:S}))))),z.selectedNodes=yn(O,D,S)):(D=[R],a.current=R,i.current=D,z.selectedNodes=yn(O,D,S)),s.onSelect?.(D,z),"selectedKeys"in s||u(D)},{getPrefixCls:b,direction:x}=l.useContext(rn),{prefixCls:y,className:C,showIcon:E=!0,expandAction:$="click",...w}=s,P=b("tree",y),g=V(`${P}-directory`,{[`${P}-directory-rtl`]:x==="rtl"},C);return l.createElement(Nr,{icon:ua,ref:e,blockNode:!0,...w,showIcon:E,expandAction:$,prefixCls:P,className:g,expandedKeys:p,selectedKeys:c,onSelect:h,onExpand:m})}),Qn=Nr;Qn.DirectoryTree=fa;Qn.TreeNode=Ft;const kr=ne.createContext(!1),Mo=t=>{const{value:e,filterSearch:n,tablePrefixCls:o,locale:r,onChange:s}=t;return n?l.createElement("div",{className:`${o}-filter-dropdown-search`},l.createElement(rs,{prefix:l.createElement(ss,null),placeholder:r.filterSearchPlaceholder,onChange:s,value:e,htmlSize:1,className:`${o}-filter-dropdown-search-input`})):null},pa=t=>{const{keyCode:e}=t;e===er.ENTER&&t.stopPropagation()},ma=l.forwardRef((t,e)=>l.createElement("div",{className:t.className,onClick:n=>n.stopPropagation(),onKeyDown:pa,ref:e},t.children));function wt(t){let e=[];return(t||[]).forEach(({value:n,children:o})=>{e.push(n),o&&(e=[].concat(Re(e),Re(wt(o))))}),e}function ha(t){return t.some(({children:e})=>e)}function Ir(t,e){return typeof e=="string"||typeof e=="number"?e?.toString().toLowerCase().includes(t.trim().toLowerCase()):!1}function Rr({filters:t,prefixCls:e,filteredKeys:n,filterMultiple:o,searchValue:r,filterSearch:s}){return t.map((a,i)=>{const d=String(a.value);if(a.children)return{key:d||i,label:a.text,popupClassName:`${e}-dropdown-submenu`,children:Rr({filters:a.children,prefixCls:e,filteredKeys:n,filterMultiple:o,searchValue:r,filterSearch:s})};const c=o?Jt:nr,u={key:a.value!==void 0?d:i,label:l.createElement(l.Fragment,null,l.createElement(c,{checked:n.includes(d)}),l.createElement("span",null,a.text))};return r.trim()?typeof s=="function"?s(r,a)?u:null:Ir(r,a.text)?u:null:u})}function bn(t){return t||[]}const ga=t=>{const{tablePrefixCls:e,prefixCls:n,column:o,dropdownPrefixCls:r,columnKey:s,filterOnClose:a,filterMultiple:i,filterMode:d="menu",filterSearch:c=!1,filterState:u,triggerFilter:p,locale:f,children:m,getPopupContainer:h,rootClassName:b}=t,{filterResetToDefaultFilteredValue:x,defaultFilteredValue:y,filterDropdownProps:C={},filterDropdownOpen:E,onFilterDropdownOpenChange:$}=o,[w,P]=l.useState(!1),g=l.useContext(kr),v=!!(u&&(u.filteredKeys?.length||u.forceFiltered)),k=T=>{P(T),C.onOpenChange?.(T),$?.(T)},I=C.open??E??w,S=u?.filteredKeys,[K,N]=vs(bn(S)),R=({selectedKeys:T})=>{N(T)},O=(T,{node:M,checked:he})=>{R(i?{selectedKeys:T}:{selectedKeys:he&&M.key?[M.key]:[]})};l.useEffect(()=>{w&&R({selectedKeys:bn(S)})},[S]);const[z,U]=l.useState([]),q=T=>{U(T)},[D,G]=l.useState(""),ee=T=>{const{value:M}=T.target;G(M)};l.useEffect(()=>{w||G("")},[w]);const L=T=>{const M=T?.length?T:null;if(M===null&&(!u||!u.filteredKeys)||Et(M,u?.filteredKeys,!0))return null;p({column:o,key:s,filteredKeys:M})},Q=()=>{k(!1),L(K())},Y=({confirm:T,closeDropdown:M}={confirm:!1,closeDropdown:!1})=>{T&&L([]),M&&k(!1),G(""),N(x?(y||[]).map(String):[])},fe=({closeDropdown:T}={closeDropdown:!0})=>{T&&k(!1),L(K())},_=(T,M)=>{M.source==="trigger"&&(T&&S!==void 0&&N(bn(S)),k(T),!T&&!o.filterDropdown&&a&&Q())},$e=V({[`${r}-menu-without-submenu`]:!ha(o.filters||[])}),ce=T=>{if(T.target.checked){const M=wt(o?.filters).map(String);N(M)}else N([])},me=({filters:T})=>(T||[]).map((M,he)=>{const Se=String(M.value),xe={title:M.text,key:M.value!==void 0?Se:String(he)};return M.children&&(xe.children=me({filters:M.children})),xe}),ae=T=>({...T,text:T.title,value:T.key,children:T.children?.map(ae)||[]});let re;const{direction:X,renderEmpty:H}=l.useContext(rn);if(typeof o.filterDropdown=="function")re=o.filterDropdown({prefixCls:`${r}-custom`,setSelectedKeys:T=>R({selectedKeys:T}),selectedKeys:K(),confirm:fe,clearFilters:Y,filters:o.filters,visible:I,close:()=>{k(!1)}});else if(o.filterDropdown)re=o.filterDropdown;else{const T=K()||[],M=()=>{const Se=H?.("Table.filter")??l.createElement(ao,{image:ao.PRESENTED_IMAGE_SIMPLE,description:f.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((o.filters||[]).length===0)return Se;if(d==="tree")return l.createElement(l.Fragment,null,l.createElement(Mo,{filterSearch:c,value:D,onChange:ee,tablePrefixCls:e,locale:f}),l.createElement("div",{className:`${e}-filter-dropdown-tree`},i?l.createElement(Jt,{checked:T.length===wt(o.filters).length,indeterminate:T.length>0&&T.lengthtypeof c=="function"?c(D,ae(ke)):Ir(D,ke.title):void 0})));const xe=Rr({filters:o.filters||[],filterSearch:c,prefixCls:n,filteredKeys:K(),filterMultiple:i,searchValue:D}),de=xe.every(ke=>ke===null);return l.createElement(l.Fragment,null,l.createElement(Mo,{filterSearch:c,value:D,onChange:ee,tablePrefixCls:e,locale:f}),de?Se:l.createElement(ls,{selectable:!0,multiple:i,prefixCls:`${r}-menu`,className:$e,onSelect:R,onDeselect:R,selectedKeys:T,getPopupContainer:h,openKeys:z,onOpenChange:q,items:xe}))},he=()=>x?Et((y||[]).map(String),T,!0):T.length===0;re=l.createElement(l.Fragment,null,M(),l.createElement("div",{className:`${n}-dropdown-btns`},l.createElement(lo,{type:"link",size:"small",disabled:he(),onClick:()=>Y()},f.filterReset),l.createElement(lo,{type:"primary",size:"small",onClick:Q},f.filterConfirm)))}o.filterDropdown&&(re=l.createElement(as,{selectable:void 0},re)),re=l.createElement(ma,{className:`${n}-dropdown`},re);const B=(()=>{let T;return typeof o.filterIcon=="function"?T=o.filterIcon(v):o.filterIcon?T=o.filterIcon:T=l.createElement(is,null),l.createElement("span",{role:"button",tabIndex:-1,className:V(`${n}-trigger`,{active:v}),onClick:M=>{M.stopPropagation()}},T)})();if(g)return l.createElement("div",{className:`${n}-column`},l.createElement("span",{className:`${e}-column-title`},m),B);const j=tr({trigger:["click"],placement:X==="rtl"?"bottomLeft":"bottomRight",children:B,getPopupContainer:h},{...C,rootClassName:V(b,C.rootClassName),open:I,onOpenChange:_,popupRender:()=>typeof C?.dropdownRender=="function"?C.dropdownRender(re):re});return l.createElement("div",{className:`${n}-column`},l.createElement("span",{className:`${e}-column-title`},m),l.createElement(qo,{...j}))},On=(t,e,n)=>{let o=[];return(t||[]).forEach((r,s)=>{const a=It(s,n),i=r.filterDropdown!==void 0;if(r.filters||i||"onFilter"in r)if("filteredValue"in r){let d=r.filteredValue;i||(d=d?.map(String)??d),o.push({column:r,key:at(r,a),filteredKeys:d,forceFiltered:r.filtered})}else o.push({column:r,key:at(r,a),filteredKeys:e&&r.defaultFilteredValue?r.defaultFilteredValue:void 0,forceFiltered:r.filtered});"children"in r&&(o=[].concat(Re(o),Re(On(r.children,e,a))))}),o};function Kr(t,e,n,o,r,s,a,i,d){return n.map((c,u)=>{const p=It(u,i),{filterOnClose:f=!0,filterMultiple:m=!0,filterMode:h,filterSearch:b}=c;let x=c;if(x.filters||x.filterDropdown){const y=at(x,p),C=o.find(({key:E})=>y===E);x={...x,title:E=>l.createElement(ga,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:e,column:x,columnKey:y,filterState:C,filterOnClose:f,filterMultiple:m,filterMode:h,filterSearch:b,triggerFilter:s,locale:r,getPopupContainer:a,rootClassName:d},an(c.title,E))}}return"children"in x&&(x={...x,children:Kr(t,e,x.children,o,r,s,a,p,d)}),x})}const Oo=t=>{const e={};return t.forEach(({key:n,filteredKeys:o,column:r})=>{const s=n,{filters:a,filterDropdown:i}=r;if(i)e[s]=o||null;else if(Array.isArray(o)){const d=wt(a);e[s]=d.filter(c=>o.includes(String(c)))}else e[s]=null}),e},Bn=(t,e,n)=>e.reduce((r,s)=>{const{column:{onFilter:a,filters:i},filteredKeys:d}=s;return a&&d&&d.length?r.map(c=>({...c})).filter(c=>d.some(u=>{const p=wt(i),f=p.findIndex(h=>String(h)===String(u)),m=f!==-1?p[f]:u;return c[n]&&(c[n]=Bn(c[n],e,n)),a(m,c)})):r},t),Pr=t=>t.flatMap(e=>"children"in e?[e].concat(Re(Pr(e.children||[]))):[e]),ya=t=>{const{prefixCls:e,dropdownPrefixCls:n,mergedColumns:o,onFilterChange:r,getPopupContainer:s,locale:a,rootClassName:i}=t;Wn();const d=l.useMemo(()=>Pr(o||[]),[o]),[c,u]=l.useState(()=>On(d,!0)),p=l.useMemo(()=>{const b=On(d,!1);if(b.length===0)return b;let x=!0;if(b.forEach(({filteredKeys:y})=>{y!==void 0&&(x=!1)}),x){const y=(d||[]).map((C,E)=>at(C,It(E)));return c.filter(({key:C})=>y.includes(C)).map(C=>{const E=d[y.indexOf(C.key)];return{...C,column:{...C.column,...E},forceFiltered:E.filtered}})}return b},[d,c]),f=l.useMemo(()=>Oo(p),[p]),m=b=>{const x=p.filter(({key:y})=>y!==b.key);x.push(b),u(x),r(Oo(x),x)};return[b=>Kr(e,n,b,p,a,m,s,void 0,i),p,f]},ba=(t,e,n)=>{const o=l.useRef({});function r(s){if(!o.current||o.current.data!==t||o.current.childrenColumnName!==e||o.current.getRowKey!==n){let i=function(d){d.forEach((c,u)=>{const p=n(c,u);a.set(p,c),c&&typeof c=="object"&&e in c&&i(c[e]||[])})};const a=new Map;i(t),o.current={data:t,childrenColumnName:e,kvMap:a,getRowKey:n}}return o.current.kvMap?.get(s)}return[r]},Tr=10;function xa(t,e){const n={current:t.current,pageSize:t.pageSize};return Object.keys(e&&typeof e=="object"?e:{}).forEach(r=>{const s=t[r];typeof s!="function"&&(n[r]=s)}),n}function Ca(t,e,n){const{total:o=0,...r}=n&&typeof n=="object"?n:{},[s,a]=l.useState(()=>({current:"defaultCurrent"in r?r.defaultCurrent:1,pageSize:"defaultPageSize"in r?r.defaultPageSize:Tr})),i=tr(s,r,{total:o>0?o:t}),d=Math.ceil((o||t)/i.pageSize);i.current>d&&(i.current=d||1);const c=(p,f)=>{a({current:p??1,pageSize:f||i.pageSize})},u=(p,f)=>{n&&n.onChange?.(p,f),c(p,f),e(p,f||i?.pageSize)};return n===!1?[{},()=>{}]:[{...i,onChange:u},c]}const Zt="ascend",xn="descend",on=t=>typeof t.sorter=="object"&&typeof t.sorter.multiple=="number"?t.sorter.multiple:!1,Bo=t=>typeof t=="function"?t:t&&typeof t=="object"&&t.compare?t.compare:!1,Sa=(t,e)=>e?t[t.indexOf(e)+1]:t[0],Ln=(t,e,n)=>{let o=[];const r=(s,a)=>{o.push({column:s,key:at(s,a),multiplePriority:on(s),sortOrder:s.sortOrder})};return(t||[]).forEach((s,a)=>{const i=It(a,n);s.children?("sortOrder"in s&&r(s,i),o=[].concat(Re(o),Re(Ln(s.children,e,i)))):s.sorter&&("sortOrder"in s?r(s,i):e&&s.defaultSortOrder&&o.push({column:s,key:at(s,i),multiplePriority:on(s),sortOrder:s.defaultSortOrder}))}),o},Dr=(t,e,n,o,r,s,a,i,d)=>(e||[]).map((u,p)=>{const f=It(p,i);let m=u;if(m.sorter){const h=m.sortDirections||r,b=m.showSorterTooltip===void 0?a:m.showSorterTooltip,x=at(m,f),y=n.find(({key:I})=>I===x),C=y?y.sortOrder:null,E=Sa(h,C);let $;if(u.sortIcon)$=u.sortIcon({sortOrder:C});else{const I=h.includes(Zt)&&l.createElement(cs,{className:V(`${t}-column-sorter-up`,{active:C===Zt})}),S=h.includes(xn)&&l.createElement(ds,{className:V(`${t}-column-sorter-down`,{active:C===xn})});$=l.createElement("span",{className:V(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!!(I&&S)})},l.createElement("span",{className:`${t}-column-sorter-inner`,"aria-hidden":"true"},I,S))}const{cancelSort:w,triggerAsc:P,triggerDesc:g}=s||{};let v=w;E===xn?v=g:E===Zt&&(v=P);const k=typeof b=="object"?{title:v,...b}:{title:v};m={...m,className:V(m.className,{[`${t}-column-sort`]:C}),title:I=>{const S=`${t}-column-sorters`,K=l.createElement("span",{className:`${t}-column-title`},an(u.title,I)),N=l.createElement("div",{className:S},K,$);return b?typeof b!="boolean"&&b?.target==="sorter-icon"?l.createElement("div",{className:V(S,`${S}-tooltip-target-sorter`)},K,l.createElement(io,{...k},$)):l.createElement(io,{...k},N):N},onHeaderCell:I=>{const S=u.onHeaderCell?.(I)||{},K=S.onClick,N=S.onKeyDown;S.onClick=z=>{o({column:u,key:x,sortOrder:E,multiplePriority:on(u)}),K?.(z)},S.onKeyDown=z=>{z.keyCode===er.ENTER&&(o({column:u,key:x,sortOrder:E,multiplePriority:on(u)}),N?.(z))};const R=Vl(u.title,{}),O=R?.toString();return C&&(S["aria-sort"]=C==="ascend"?"ascending":"descending"),S["aria-description"]=d?.sortable,S["aria-label"]=O||"",S.className=V(S.className,`${t}-column-has-sorters`),S.tabIndex=0,u.ellipsis&&(S.title=(R??"").toString()),S}}}return"children"in m&&(m={...m,children:Dr(t,m.children,n,o,r,s,a,f,d)}),m}),Lo=t=>{const{column:e,sortOrder:n}=t;return{column:e,order:n,field:e.dataIndex,columnKey:e.key}},Ao=t=>{const e=t.filter(({sortOrder:n})=>n).map(Lo);if(e.length===0&&t.length){const n=t.length-1;return{...Lo(t[n]),column:void 0,order:void 0,field:void 0,columnKey:void 0}}return e.length<=1?e[0]||{}:e},An=(t,e,n)=>{const o=e.slice().sort((a,i)=>i.multiplePriority-a.multiplePriority),r=t.slice(),s=o.filter(({column:{sorter:a},sortOrder:i})=>Bo(a)&&i);return s.length?r.sort((a,i)=>{for(let d=0;d{const i=a[n];return i?{...a,[n]:An(i,e,n)}:a}):r},wa=t=>{const{prefixCls:e,mergedColumns:n,sortDirections:o,tableLocale:r,showSorterTooltip:s,onSorterChange:a,globalLocale:i}=t,[d,c]=l.useState(()=>Ln(n,!0)),u=(x,y)=>{const C=[];return x.forEach((E,$)=>{const w=It($,y);if(C.push(at(E,w)),Array.isArray(E.children)){const P=u(E.children,w);C.push.apply(C,Re(P))}}),C},p=l.useMemo(()=>{let x=!0;const y=Ln(n,!1);if(!y.length){const w=u(n);return d.filter(({key:P})=>w.includes(P))}const C=[];function E(w){x?C.push(w):C.push({...w,sortOrder:null})}let $=null;return y.forEach(w=>{$===null?(E(w),w.sortOrder&&(w.multiplePriority===!1?x=!1:$=!0)):($&&w.multiplePriority!==!1||(x=!1),E(w))}),C},[n,d]),f=l.useMemo(()=>{const x=p.map(({column:y,sortOrder:C})=>({column:y,order:C}));return{sortColumns:x,sortColumn:x[0]?.column,sortOrder:x[0]?.order}},[p]),m=x=>{let y;x.multiplePriority===!1||!p.length||p[0].multiplePriority===!1?y=[x]:y=[].concat(Re(p.filter(({key:C})=>C!==x.key)),[x]),c(y),a(Ao(y),y)};return[x=>Dr(e,x,p,m,o,r,s,void 0,i),p,f,()=>Ao(p)]},Mr=(t,e)=>t.map(o=>{const r={...o};return r.title=an(o.title,e),"children"in r&&(r.children=Mr(r.children,e)),r}),Ea=t=>[l.useCallback(n=>Mr(n,t),[t])],va=Sr((t,e)=>{const{_renderTimes:n}=t,{_renderTimes:o}=e;return n!==o}),$a=Er((t,e)=>{const{_renderTimes:n}=t,{_renderTimes:o}=e;return n!==o}),Na=t=>{const{componentCls:e,lineWidth:n,lineType:o,tableBorderColor:r,tableHeaderBg:s,tablePaddingVertical:a,tablePaddingHorizontal:i,calc:d}=t,c=`${W(n)} ${o} ${r}`,u=(p,f,m)=>({[`&${e}-${p}`]:{[`> ${e}-container`]:{[`> ${e}-content, > ${e}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${e}-expanded-row-fixed`]:{margin:`${W(d(f).mul(-1).equal())} - ${W(d(d(m).add(n)).mul(-1).equal())}`}}}}}});return{[`${e}-wrapper`]:{[`${e}${e}-bordered`]:{[`> ${e}-title`]:{border:c,borderBottom:0},[`> ${e}-container`]:{borderInlineStart:c,borderTop:c,[` - > ${e}-content, - > ${e}-header, - > ${e}-body, - > ${e}-summary - `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${e}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${e}-expanded-row-fixed`]:{margin:`${W(d(a).mul(-1).equal())} ${W(d(d(i).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${e}-scroll-horizontal`]:{[`> ${e}-container > ${e}-body`]:{"> table > tbody":{[` - > tr${e}-expanded-row, - > tr${e}-placeholder - `]:{"> th, > td":{borderInlineEnd:0}}}}},...u("medium",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle),...u("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall),[`> ${e}-footer`]:{border:c,borderTop:0}},[`${e}-cell`]:{[`${e}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${W(n)} 0 ${W(n)} ${s}`}},[`${e}-bordered ${e}-cell-scrollbar`]:{borderInlineEnd:c}}}},ka=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-cell-ellipsis`]:{...pn,wordBreak:"keep-all",[` - &${e}-cell-fix-start-shadow, - &${e}-cell-fix-end-shadow - `]:{overflow:"visible",[`${e}-cell-content`]:{...pn,display:"block"}},[`${e}-column-title`]:{...pn,wordBreak:"keep-all"}}}}},Ia=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-tbody > tr${e}-placeholder`]:{textAlign:"center",color:t.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:t.colorBgContainer}}}}},Ra=t=>{const{componentCls:e,antCls:n,motionDurationSlow:o,lineWidth:r,paddingXS:s,lineType:a,tableBorderColor:i,tableExpandIconBg:d,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:p,tablePaddingHorizontal:f,tableExpandedRowBg:m,paddingXXS:h,expandIconMarginTop:b,expandIconSize:x,expandIconHalfInner:y,expandIconScale:C,calc:E}=t,$=`${W(r)} ${a} ${i}`,w=E(h).sub(r).equal();return{[`${e}-wrapper`]:{[`${e}-expand-icon-col`]:{width:c},[`${e}-row-expand-icon-cell`]:{textAlign:"center",[`${e}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${e}-row-indent`]:{height:1,float:"left"},[`${e}-row-expand-icon`]:{...us(t),position:"relative",float:"left",width:x,height:x,color:"inherit",lineHeight:W(x),background:d,border:$,borderRadius:u,transform:`scale(${C})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${o} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:w,insetInlineStart:w,height:r},"&::after":{top:w,bottom:w,insetInlineStart:y,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}},[`${e}-row-indent + ${e}-row-expand-icon`]:{marginTop:b,marginInlineEnd:s},[`tr${e}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:m}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${e}-expanded-row-fixed`]:{position:"relative",margin:`${W(E(p).mul(-1).equal())} ${W(E(f).mul(-1).equal())}`,padding:`${W(p)} ${W(f)}`}}}},Ka=t=>{const{componentCls:e,antCls:n,iconCls:o,tableFilterDropdownWidth:r,tableFilterDropdownSearchWidth:s,paddingXXS:a,paddingXS:i,colorText:d,lineWidth:c,lineType:u,tableBorderColor:p,headerIconColor:f,fontSizeSM:m,tablePaddingHorizontal:h,borderRadius:b,motionDurationSlow:x,colorIcon:y,colorPrimary:C,tableHeaderFilterActiveBg:E,colorTextDisabled:$,tableFilterDropdownBg:w,tableFilterDropdownHeight:P,controlItemBgHover:g,controlItemBgActive:v,boxShadowSecondary:k,filterDropdownMenuBg:I,calc:S}=t,K=`${n}-dropdown`,N=`${e}-filter-dropdown`,R=`${n}-tree`,O=`${W(c)} ${u} ${p}`;return[{[`${e}-wrapper`]:{[`${e}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${e}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:S(a).mul(-1).equal(),marginInline:`${W(a)} ${W(S(h).div(2).mul(-1).equal())}`,padding:`0 ${W(a)}`,color:f,fontSize:m,borderRadius:b,cursor:"pointer",transition:`all ${x}`,"&:hover":{color:y,background:E},"&.active":{color:C}}}},{[`${n}-dropdown`]:{[N]:{..._n(t),minWidth:r,backgroundColor:w,borderRadius:b,boxShadow:k,overflow:"hidden",[`${K}-menu`]:{maxHeight:P,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:I,"&:empty::after":{display:"block",padding:`${W(i)} 0`,color:$,fontSize:m,textAlign:"center",content:'"Not Found"'}},[`${N}-tree`]:{paddingBlock:`${W(i)} 0`,paddingInline:i,[R]:{padding:0},[`${R}-treenode ${R}-node-content-wrapper:hover`]:{backgroundColor:g},[`${R}-treenode-checkbox-checked ${R}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:v}}},[`${N}-search`]:{padding:i,borderBottom:O,"&-input":{input:{minWidth:s},[o]:{color:$}}},[`${N}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${N}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${W(S(i).sub(c).equal())} ${W(i)}`,overflow:"hidden",borderTop:O}}}},{[`${n}-dropdown ${N}, ${N}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:i,color:d},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]};function Or({colorSplit:t}){const e={boxShadow:`inset 10px 0 8px -8px ${t}`},n={boxShadow:`inset -10px 0 8px -8px ${t}`};return[e,n]}const Pa=t=>{const{componentCls:e,lineWidth:n,motionDurationSlow:o,zIndexTableFixed:r,tableBg:s,calc:a}=t,i=`${e}-cell`,d=`${i}-fix`,c={position:"absolute",top:0,bottom:a(n).mul(-1).equal(),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[u,p]=Or(t);return{[`${e}-wrapper`]:{[`${i}${d}`]:{position:"sticky"},[d]:{zIndex:`calc(var(--z-offset-reverse) + ${r})`,background:s,"&:after":c,"&-start:after":{insetInlineStart:"100%"},"&-end:after":{insetInlineEnd:"100%"},"&-start-shadow-show:after":u,"&-end-shadow-show:after":p},[`${e}-container`]:{position:"relative","&:before, &:after":{...c,zIndex:`calc(var(--columns-count) * 2 + ${r} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${e}-has-fix-start ${e}-container:before`]:{display:"none"},[`${e}-has-fix-end ${e}-container:after`]:{display:"none"},[`${e}-fix-start-shadow-show ${e}-container:before`]:u,[`${e}-fix-end-shadow-show ${e}-container:after`]:p}}},Ta=t=>{const{componentCls:e,antCls:n,margin:o}=t;return{[`${e}-wrapper`]:{[`${e}-pagination${n}-pagination`]:{margin:`${W(o)} 0`},[`${e}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:t.paddingXS,"> *":{flex:"none"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"}}}}},Da=t=>{const{componentCls:e,tableRadius:n}=t;return{[`${e}-wrapper`]:{[e]:{[`${e}-title, ${e}-header`]:{borderRadius:`${W(n)} ${W(n)} 0 0`},[`${e}-title + ${e}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${e}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${e}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${W(n)} ${W(n)}`}}}}},Ma=t=>{const{componentCls:e}=t,[n,o]=Or(t);return{[`${e}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${e}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${e}-cell-fix`]:{"&-start-shadow-show:after":o,"&-end-shadow-show:after":n},[`${e}-container`]:{[`${e}-row-indent`]:{float:"right"}},[`${e}-fix-start-shadow-show ${e}-container:before`]:o,[`${e}-fix-end-shadow-show ${e}-container:after`]:n}}},Oa=t=>{const{componentCls:e,antCls:n,iconCls:o,fontSizeIcon:r,padding:s,paddingXS:a,headerIconColor:i,headerIconHoverColor:d,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:p,tableRowHoverBg:f,tablePaddingHorizontal:m,calc:h}=t;return{[`${e}-wrapper`]:{[`${e}-selection-col`]:{width:c,[`&${e}-selection-col-with-dropdown`]:{width:h(c).add(r).add(h(s).div(4)).equal()}},[`${e}-bordered ${e}-selection-col`]:{width:h(c).add(h(a).mul(2)).equal(),[`&${e}-selection-col-with-dropdown`]:{width:h(c).add(r).add(h(s).div(4)).add(h(a).mul(2)).equal()}},[` - table tr th${e}-selection-column, - table tr td${e}-selection-column, - ${e}-selection-column - `]:{paddingInlineEnd:t.paddingXS,paddingInlineStart:t.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${e}-selection-column${e}-cell-fix-left`]:{zIndex:h(t.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${e}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${e}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${e}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:W(h(m).div(4).equal()),[o]:{color:i,fontSize:r,verticalAlign:"baseline","&:hover":{color:d}}},[`${e}-tbody`]:{[`${e}-row`]:{[`&${e}-row-selected`]:{[`> ${e}-cell`]:{background:u,"&-row-hover":{background:p}}},[`> ${e}-cell-row-hover`]:{background:f}}}}}},Ba=t=>{const{componentCls:e,tableExpandColumnWidth:n,calc:o}=t,r=(s,a,i,d)=>({[`${e}${e}-${s}`]:{fontSize:d,[` - ${e}-title, - ${e}-footer, - ${e}-cell, - ${e}-thead > tr > th, - ${e}-tbody > tr > th, - ${e}-tbody > tr > td, - tfoot > tr > th, - tfoot > tr > td - `]:{padding:`${W(a)} ${W(i)}`},[`${e}-filter-trigger`]:{marginInlineEnd:W(o(i).div(2).mul(-1).equal())},[`${e}-expanded-row-fixed`]:{margin:`${W(o(a).mul(-1).equal())} ${W(o(i).mul(-1).equal())}`},[`${e}-tbody`]:{[`${e}-wrapper:only-child ${e}`]:{marginBlock:W(o(a).mul(-1).equal()),marginInline:`${W(o(n).sub(i).equal())} ${W(o(i).mul(-1).equal())}`}},[`${e}-selection-extra`]:{paddingInlineStart:W(o(i).div(4).equal())}}});return{[`${e}-wrapper`]:{...r("medium",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle,t.tableFontSizeMiddle),...r("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall,t.tableFontSizeSmall)}}},La=t=>{const{componentCls:e,marginXXS:n,fontSizeIcon:o,headerIconColor:r,headerIconHoverColor:s}=t;return{[`${e}-wrapper`]:{[`${e}-thead th${e}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}, left 0s`,"&:hover":{background:t.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:t.colorPrimary},[` - &${e}-cell-fix-left:hover, - &${e}-cell-fix-right:hover - `]:{background:t.tableFixedHeaderSortActiveBg}},[`${e}-thead th${e}-column-sort`]:{background:t.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${e}-column-sort`]:{background:t.tableBodySortBg},[`${e}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${e}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${e}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${e}-column-sorter`]:{marginInlineStart:n,color:r,fontSize:0,transition:`color ${t.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:o,"&.active":{color:t.colorPrimary}},[`${e}-column-sorter-up + ${e}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${e}-column-sorters:hover ${e}-column-sorter`]:{color:s}}}},Aa=t=>{const{componentCls:e,opacityLoading:n,tableScrollThumbBg:o,tableScrollThumbBgHover:r,tableScrollThumbSize:s,tableScrollBg:a,stickyScrollBarBorderRadius:i,lineWidth:d,lineType:c,tableBorderColor:u,zIndexTableFixed:p}=t,f=`${W(d)} ${c} ${u}`;return{[`${e}-wrapper`]:{[`${e}-sticky`]:{"&-holder":{position:"sticky",zIndex:`calc(var(--columns-count) * 2 + ${p} + 1)`,background:t.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${W(s)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${p} + 1)`,display:"flex",alignItems:"center",background:a,borderTop:f,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:s,backgroundColor:o,borderRadius:i,transition:`all ${t.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:r}}}}}}},Ho=t=>{const{componentCls:e,lineWidth:n,tableBorderColor:o,calc:r}=t,s=`${W(n)} ${t.lineType} ${o}`;return{[`${e}-wrapper`]:{[`${e}-summary`]:{position:"relative",zIndex:t.zIndexTableFixed,background:t.tableBg,"> tr":{"> th, > td":{borderBottom:s}}},[`div${e}-summary`]:{boxShadow:`0 ${W(r(n).mul(-1).equal())} 0 ${o}`}}}},Ha=t=>{const{componentCls:e,motionDurationMid:n,lineWidth:o,lineType:r,tableBorderColor:s,calc:a}=t,i=`${W(o)} ${r} ${s}`,d=`${e}-expanded-row-cell`;return{[`${e}-wrapper`]:{[`${e}-tbody-virtual`]:{[`${e}-tbody-virtual-holder-inner`]:{[` - & > ${e}-row, - & > div:not(${e}-row) > ${e}-row - `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${e}-cell`]:{borderBottom:i,transition:`background-color ${n}`},[`${e}-expanded-row`]:{[`${d}${d}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${W(o)})`,borderInlineEnd:"none"}}},[`${e}-bordered`]:{[`${e}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:i,position:"absolute"},[`${e}-cell`]:{borderInlineEnd:i,[`&${e}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(o).mul(-1).equal(),borderInlineStart:i}}},[`&${e}-virtual`]:{[`${e}-placeholder ${e}-cell`]:{borderInlineEnd:i,borderBottom:i}}}}}},Fa=t=>{const{componentCls:e,fontWeightStrong:n,tablePaddingVertical:o,tablePaddingHorizontal:r,tableExpandColumnWidth:s,lineWidth:a,lineType:i,tableBorderColor:d,tableFontSize:c,tableBg:u,tableRadius:p,tableHeaderTextColor:f,motionDurationMid:m,tableHeaderBg:h,tableHeaderCellSplitColor:b,tableFooterTextColor:x,tableFooterBg:y,calc:C}=t,E=`${W(a)} ${i} ${d}`;return{[`${e}-wrapper`]:{clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":t.tableScrollBg,...fs(),[e]:{..._n(t),fontSize:c,background:u,borderRadius:`${W(p)} ${W(p)} 0 0`,scrollbarColor:`${t.tableScrollThumbBg} ${t.tableScrollBg}`},table:{width:"100%",textAlign:"start",borderRadius:`${W(p)} ${W(p)} 0 0`,borderCollapse:"separate",borderSpacing:0},[` - ${e}-cell, - ${e}-thead > tr > th, - ${e}-tbody > tr > th, - ${e}-tbody > tr > td, - tfoot > tr > th, - tfoot > tr > td - `]:{position:"relative",padding:`${W(o)} ${W(r)}`,overflowWrap:"break-word"},[`${e}-title`]:{padding:`${W(o)} ${W(r)}`},[`${e}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:E,transition:`background-color ${m} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${e}-selection-column):not(${e}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:b,transform:"translateY(-50%)",transition:`background-color ${m}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${e}-tbody`]:{"> tr":{"> th, > td":{borderBottom:E,transition:["background-color","border-color"].map($=>`${$} ${m}`).join(", "),[` - > ${e}-wrapper:only-child, - > ${e}-expanded-row-fixed > ${e}-wrapper:only-child - `]:{[e]:{marginBlock:W(C(o).mul(-1).equal()),marginInline:`${W(C(s).sub(r).equal())} - ${W(C(r).mul(-1).equal())}`,[`${e}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:f,fontWeight:n,textAlign:"start",background:h,borderBottom:E,transition:`background-color ${m} ease`},[`& > ${e}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${e}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${e}-footer`]:{padding:`${W(o)} ${W(r)}`,color:x,background:y}}}},za=t=>{const{colorFillAlter:e,colorBgContainer:n,colorTextHeading:o,colorFillSecondary:r,colorFillContent:s,controlItemBgActive:a,controlItemBgActiveHover:i,padding:d,paddingSM:c,paddingXS:u,colorBorderSecondary:p,borderRadiusLG:f,controlHeight:m,colorTextPlaceholder:h,fontSize:b,fontSizeSM:x,lineHeight:y,lineWidth:C,colorIcon:E,colorIconHover:$,opacityLoading:w,controlInteractiveSize:P}=t,g=new Ot(r).onBackground(n).toHexString(),v=new Ot(s).onBackground(n).toHexString(),k=new Ot(e).onBackground(n).toHexString(),I=new Ot(E),S=new Ot($),K=P/2-C,N=K*2+C*3;return{headerBg:k,headerColor:o,headerSortActiveBg:g,headerSortHoverBg:v,bodySortBg:k,rowHoverBg:k,rowSelectedBg:a,rowSelectedHoverBg:i,rowExpandedBg:e,cellPaddingBlock:d,cellPaddingInline:d,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:p,headerBorderRadius:f,footerBg:k,footerColor:o,cellFontSize:b,cellFontSizeMD:b,cellFontSizeSM:b,headerSplitColor:p,fixedHeaderSortActiveBg:g,headerFilterHoverBg:s,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:m,stickyScrollBarBg:h,stickyScrollBarBorderRadius:100,expandIconMarginTop:(b*y-C*3)/2-Math.ceil((x*1.4-C*3)/2),headerIconColor:I.clone().setA(I.a*w).toRgbString(),headerIconHoverColor:S.clone().setA(S.a*w).toRgbString(),expandIconHalfInner:K,expandIconSize:N,expandIconScale:P/N}},Wa=2,_a=Xo("Table",t=>{const{colorTextHeading:e,colorSplit:n,colorBgContainer:o,controlInteractiveSize:r,headerBg:s,headerColor:a,headerSortActiveBg:i,headerSortHoverBg:d,bodySortBg:c,rowHoverBg:u,rowSelectedBg:p,rowSelectedHoverBg:f,rowExpandedBg:m,cellPaddingBlock:h,cellPaddingInline:b,cellPaddingBlockMD:x,cellPaddingInlineMD:y,cellPaddingBlockSM:C,cellPaddingInlineSM:E,borderColor:$,footerBg:w,footerColor:P,headerBorderRadius:g,cellFontSize:v,cellFontSizeMD:k,cellFontSizeSM:I,headerSplitColor:S,fixedHeaderSortActiveBg:K,headerFilterHoverBg:N,filterDropdownBg:R,expandIconBg:O,selectionColumnWidth:z,stickyScrollBarBg:U,calc:q}=t,D=Go(t,{tableFontSize:v,tableBg:o,tableRadius:g,tablePaddingVertical:h,tablePaddingHorizontal:b,tablePaddingVerticalMiddle:x,tablePaddingHorizontalMiddle:y,tablePaddingVerticalSmall:C,tablePaddingHorizontalSmall:E,tableBorderColor:$,tableHeaderTextColor:a,tableHeaderBg:s,tableFooterTextColor:P,tableFooterBg:w,tableHeaderCellSplitColor:S,tableHeaderSortBg:i,tableHeaderSortHoverBg:d,tableBodySortBg:c,tableFixedHeaderSortActiveBg:K,tableHeaderFilterActiveBg:N,tableFilterDropdownBg:R,tableRowHoverBg:u,tableSelectedRowBg:p,tableSelectedRowHoverBg:f,zIndexTableFixed:Wa,tableFontSizeMiddle:k,tableFontSizeSmall:I,tableSelectionColumnWidth:z,tableExpandIconBg:O,tableExpandColumnWidth:q(r).add(q(t.padding).mul(2)).equal(),tableExpandedRowBg:m,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:U,tableScrollThumbBgHover:e,tableScrollBg:n});return[Fa(D),Ta(D),Ho(D),La(D),Ka(D),Na(D),Da(D),Ra(D),Ho(D),Ia(D),Oa(D),Pa(D),Aa(D),ka(D),Ba(D),Ma(D),Ha(D)]},za,{resetFont:!1,unitless:{expandIconScale:!0}}),Fo=[],ja=(t,e)=>{const{prefixCls:n,className:o,rootClassName:r,style:s,classNames:a,styles:i,size:d,bordered:c,dropdownPrefixCls:u,dataSource:p,pagination:f,rowSelection:m,rowKey:h,rowClassName:b,columns:x,children:y,childrenColumnName:C,onChange:E,getPopupContainer:$,loading:w,expandIcon:P,expandable:g,expandedRowRender:v,expandIconColumnIndex:k,indentSize:I,scroll:S,sortDirections:K,locale:N,showSorterTooltip:R={target:"full-header"},virtual:O}=t;Wn();const z=l.useMemo(()=>x||qn(y),[x,y]),U=l.useMemo(()=>z.some(J=>J.responsive),[z]),q=ps(U),D=l.useMemo(()=>{const J=new Set(Object.keys(q).filter(oe=>q[oe]));return z.filter(oe=>!oe.responsive||oe.responsive.some(Ee=>J.has(Ee)))},[z,q]),G=_o(t,["className","style","columns"]),{locale:ee=co,table:L}=l.useContext(rn),{getPrefixCls:Q,direction:Y,renderEmpty:fe,getPopupContainer:_,className:$e,style:ce,classNames:me,styles:ae}=Zo("table"),re=ms(J=>d==="middle"?"medium":d??J),X={...t,size:re,bordered:c},[H,A]=Qo([me,a],[ae,i],{props:X},{pagination:{_default:"root"},header:{_default:"wrapper"},body:{_default:"wrapper"}}),B={...ee.Table,...N},[j]=hs("global",co.global),T=p||Fo,M=Q("table",n),he=Q("dropdown",u),[,Se]=Jo(),xe=bs(M),[de,ke]=_a(M,xe),ge={childrenColumnName:C,expandIconColumnIndex:k,...g,expandIcon:g?.expandIcon??L?.expandable?.expandIcon},{childrenColumnName:Ke="children"}=ge,Oe=l.useMemo(()=>T.some(J=>J?.[Ke])?"nest":v||g?.expandedRowRender?"row":null,[Ke,T]),F={body:l.useRef(null)},Ie=jl(M),Ve=l.useRef(null),te=l.useRef(null);Es(e,()=>({...te.current,nativeElement:Ve.current}));const ue=h||L?.rowKey||"key",ye=S??L?.scroll,le=l.useMemo(()=>typeof ue=="function"?ue:J=>J?.[ue],[ue]),[Ce]=ba(T,Ke,le),ie={},se=(J,oe,Ee=!1)=>{const Te={...ie,...J};Ee&&(ie.resetPagination?.(),Te.pagination?.current&&(Te.pagination.current=1),f&&f.onChange?.(1,Te.pagination?.pageSize)),S&&S.scrollToFirstRowOnChange!==!1&&F.body.current&&ks(0,{getContainer:()=>F.body.current}),E?.(Te.pagination,Te.filters,Te.sorter,{currentDataSource:Bn(An(T,Te.sorterStates,Ke),Te.filterStates,Ke),action:oe})},He=(J,oe)=>{se({sorter:J,sorterStates:oe},"sort",!1)},[be,we,_e,Ue]=wa({prefixCls:M,mergedColumns:D,onSorterChange:He,sortDirections:K||["ascend","descend"],tableLocale:B,showSorterTooltip:R,globalLocale:j}),ct=l.useMemo(()=>An(T,we,Ke),[Ke,T,we]);ie.sorter=Ue(),ie.sorterStates=we;const Fe=(J,oe)=>{se({filters:J,filterStates:oe},"filter",!0)},[je,Pe,ze]=ya({prefixCls:M,locale:B,dropdownPrefixCls:he,mergedColumns:D,onFilterChange:Fe,getPopupContainer:$||_,rootClassName:V(r,xe)}),Me=Bn(ct,Pe,Ke);ie.filters=ze,ie.filterStates=Pe;const Ze=l.useMemo(()=>{const J={};return Object.keys(ze).forEach(oe=>{ze[oe]!==null&&(J[oe]=ze[oe])}),{..._e,filters:J}},[_e,ze]),[Rt]=Ea(Ze),_t=(J,oe)=>{se({pagination:{...ie.pagination,current:J,pageSize:oe}},"paginate")},[Ae,jt]=Ca(Me.length,_t,f);ie.pagination=f===!1?{}:xa(Ae,f),ie.resetPagination=jt;const dt=l.useMemo(()=>{if(f===!1||!Ae.pageSize)return Me;const{current:J=1,total:oe,pageSize:Ee=Tr}=Ae;return Me.lengthEe?Me.slice((J-1)*Ee,J*Ee):Me:Me.slice((J-1)*Ee,J*Ee)},[!!f,Me,Ae?.current,Ae?.pageSize,Ae?.total]),[Kt,cn]=Wl({prefixCls:M,data:Me,pageData:dt,getRowKey:le,getRecordByKey:Ce,expandType:Oe,childrenColumnName:Ke,locale:B,getPopupContainer:$||_},m),tt=(J,oe,Ee)=>{const Te=typeof b=="function"?b(J,oe,Ee):b;return V({[`${M}-row-selected`]:cn.has(le(J,oe))},Te)};ge.__PARENT_RENDER_ICON__=ge.expandIcon,ge.expandIcon=ge.expandIcon||P||_l(B),Oe==="nest"&&ge.expandIconColumnIndex===void 0?ge.expandIconColumnIndex=m?1:0:ge.expandIconColumnIndex>0&&m&&(ge.expandIconColumnIndex-=1),typeof ge.indentSize!="number"&&(ge.indentSize=typeof I=="number"?I:15);const dn=l.useCallback(J=>Rt(Kt(je(be(J)))),[be,je,Kt]);let Pt,ut;if(f!==!1&&Ae?.total){let J;Ae.size?J=Ae.size:J=re==="small"||re==="medium"?"small":void 0;const oe=(We="end")=>l.createElement(Cs,{...Ae,classNames:H.pagination,styles:A.pagination,className:V(`${M}-pagination ${M}-pagination-${We}`,Ae.className),size:J}),{placement:Ee,position:Te}=Ae,qe=Ee??Te,pt=We=>{const Xe=We.toLowerCase();return Xe.includes("center")?"center":Xe.includes("left")||Xe.includes("start")?"start":"end"};if(Array.isArray(qe)){const[We,Xe]=["top","bottom"].map(mt=>qe.find(qt=>qt.includes(mt))),Ut=qe.every(mt=>`${mt}`=="none");!We&&!Xe&&!Ut&&(ut=oe()),We&&(Pt=oe(pt(We))),Xe&&(ut=oe(pt(Xe)))}else ut=oe()}const yt=l.useMemo(()=>typeof w=="boolean"?{spinning:w}:typeof w=="object"&&w!==null?{spinning:!0,...w}:void 0,[w]),bt=V(ke,xe,`${M}-wrapper`,$e,{[`${M}-wrapper-rtl`]:Y==="rtl"},o,r,H.root,de),Vt={...A.root,...ce,...s},un=l.useMemo(()=>yt?.spinning&&T===Fo?null:typeof N?.emptyText<"u"?N.emptyText:fe?.("Table")||l.createElement(gs,{componentName:"Table"}),[yt?.spinning,T,N?.emptyText,fe]),fn=O?$a:va,Tt={},ft=l.useMemo(()=>{const{fontSize:J,lineHeight:oe,lineWidth:Ee,padding:Te,paddingXS:qe,paddingSM:pt}=Se,We=Math.floor(J*oe);switch(re){case"medium":return pt*2+We+Ee;case"small":return qe*2+We+Ee;default:return Te*2+We+Ee}},[Se,re]);return O&&(Tt.listItemHeight=ft),l.createElement("div",{ref:Ve,className:bt,style:Vt},l.createElement(xs,{spinning:!1,...yt},Pt,l.createElement(fn,{...Tt,...G,scroll:ye,classNames:H,styles:A,ref:te,columns:D,direction:Y,expandable:ge,prefixCls:M,className:V({[`${M}-medium`]:re==="medium",[`${M}-small`]:re==="small",[`${M}-bordered`]:c,[`${M}-empty`]:T.length===0},ke,xe,de),data:dt,rowKey:le,rowClassName:tt,emptyText:un,internalHooks:Wt,internalRefs:F,transformColumns:dn,getContainerWidth:Ie,measureRowRender:J=>l.createElement(kr.Provider,{value:!0},l.createElement(ys,{getPopupContainer:oe=>oe},J))}),ut))},Va=l.forwardRef(ja),Ua=(t,e)=>{const n=l.useRef(0);return n.current+=1,l.createElement(Va,{...t,ref:e,_renderTimes:n.current})},it=l.forwardRef(Ua);it.SELECTION_COLUMN=nt;it.EXPAND_COLUMN=ot;it.SELECTION_ALL=Kn;it.SELECTION_INVERT=Pn;it.SELECTION_NONE=Tn;it.Column=Dl;it.ColumnGroup=Ml;it.Summary=dr;export{it as F,ca as S,Qn as T,Ol as U,St as a,Ql as b,jn as c,ra as g,sa as i}; diff --git a/public/assets/Timeline-BM8lZv8J.js b/public/assets/Timeline-BM8lZv8J.js deleted file mode 100644 index 0cfb6d1..0000000 --- a/public/assets/Timeline-BM8lZv8J.js +++ /dev/null @@ -1 +0,0 @@ -import{r as p,L as T,M as _e,ax as ve,R as Y,b5 as z,a3 as X,z as ze,G as ye,a_ as Le,H as we,J as Ie,b0 as Oe,a$ as je,K as Ne,b6 as Fe,ar as Ve,b7 as Ge,ac as Ye,b8 as Ue,aZ as Ke,b9 as Se,ba as Je,a8 as Qe}from"./index-B-sDl1ER.js";function Ze(e){const{prefixCls:t,className:n,style:r,status:c}=e,s=`${t}-rail`;return p.createElement("div",{className:T(s,`${s}-${c}`,n),style:r})}const Ee=p.createContext({}),me=p.createContext(null);function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,style:r,children:c,...s}=e,{prefixCls:l,classNames:$,styles:m}=p.useContext(me),{className:i,style:a}=p.useContext(Re),u=`${l}-item`;return p.createElement("div",ae({},_e(s,!1),{ref:t,className:T(`${u}-icon`,$.itemIcon,i,n),style:{...m.itemIcon,...a,...r}}),c)});function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t{v?.(F),g(m)},R.onKeyDown=F=>{const{which:W}=F;(W===ve.ENTER||W===ve.SPACE)&&g(m)});const E=S||"wait",q=le(b),_=le(C),O=T(d,`${d}-${E}`,{[`${d}-custom`]:A,[`${d}-active`]:$,[`${d}-disabled`]:f===!0,[`${d}-empty-header`]:!q&&!_},M,n.item,I.root);let L=p.createElement(xe,null);a&&(L=a(L,{...N,components:{Icon:xe}}));const U=p.createElement("div",{className:T(`${d}-wrapper`,n.itemWrapper,I.wrapper),style:{...r.itemWrapper,...y.wrapper}},p.createElement(Re.Provider,{value:{className:I.icon,style:y.icon}},L),p.createElement("div",{className:T(`${d}-section`,n.itemSection,I.section),style:{...r.itemSection,...y.section}},p.createElement("div",{className:T(`${d}-header`,n.itemHeader,I.header),style:{...r.itemHeader,...y.header}},q&&p.createElement("div",{className:T(`${d}-title`,n.itemTitle,I.title),style:{...r.itemTitle,...y.title}},b),_&&p.createElement("div",{title:typeof C=="string"?C:void 0,className:T(`${d}-subtitle`,n.itemSubtitle,I.subtitle),style:{...r.itemSubtitle,...y.subtitle}},C),!s&&p.createElement(Ze,{prefixCls:d,className:T(n.itemRail,I.rail),style:{...r.itemRail,...y.rail},status:x?S:l})),le(P)&&p.createElement("div",{className:T(`${d}-content`,n.itemContent,I.content),style:{...r.itemContent,...y.content}},P)));let K=p.createElement(w,ce({},H,R,{className:O,style:{...r.item,...y.root,...D}}),u?u(U):U);return i&&(K=i(K,N)||null),K}function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t(x||[]).filter(Boolean),[x]),M=Y.useMemo(()=>S.map(({status:N},B)=>{const R=g+B;return N||(R===u?a:R{d&&u!==N&&d(N)},{root:I="div",item:y="div"}=i||{},H=Y.useMemo(()=>({prefixCls:t,classNames:c,styles:s,ItemComponent:y}),[t,c,s,y]),P=(N,B)=>{const R=g+B,E=M[B],q=M[B+1],_={...N,status:E};return Y.createElement(ke,{key:R,prefixCls:t,classNames:c,styles:s,data:_,nextStatus:q,active:R===u,index:R,last:S.length-1===B,iconRender:w,itemRender:v,itemWrapperRender:b,onClick:d&&D})};return Y.createElement(I,se({className:A,style:{...n,...s?.root}},C),Y.createElement(me.Provider,{value:H},S.map(P)))}const Te=p.createContext(null),tt=e=>{const{prefixCls:t}=e;return p.createElement("svg",{className:`${t}-panel-arrow`,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none"},p.createElement("title",null,"Arrow"),p.createElement("path",{d:"M 0 0 L 100 50 L 0 100"}))},ot=e=>{const{prefixCls:t,rootPrefixCls:n,children:r,percent:c}=e,s=`${t}-item-progress-icon`,l=`${s}-circle`,[,$]=z(n,"cmp-steps"),m=`calc(${$("progress-radius")} * 2 * ${Math.PI*c/100}) 9999`;return p.createElement(p.Fragment,null,p.createElement("svg",{className:`${s}-svg`,viewBox:"0 0 100 100",width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c},p.createElement("title",null,"Progress"),p.createElement("circle",{className:T(l,`${l}-rail`)}),p.createElement("circle",{className:T(l,`${l}-ptg`),strokeDasharray:m,transform:"rotate(-90 50 50)"})),r)},it=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-item`,[c,s]=z(n,"cmp-steps");return{[`${t}-horizontal`]:{[`> ${r}`]:{flex:"1 1 auto",minWidth:e.iconSize,[`${r}-rail`]:{[c("horizontal-rail-margin")]:`calc(${s("icon-size-max")} / 2 + ${s("item-wrapper-padding-top")})`,position:"static",marginTop:s("horizontal-rail-margin"),width:"auto",borderBlockStartWidth:s("rail-size"),flex:1,minWidth:0,alignSelf:"flex-start",transform:"translateY(-50%)"}}}}},nt=e=>{const{componentCls:t,customIconFontSize:n,motionDurationSlow:r,iconSize:c,lineWidth:s,lineType:l,antCls:$}=e,m=`${t}-item`,[i,a]=z($,"cmp-steps");return{[t]:{[i("icon-size")]:c,[i("icon-border-width")]:s,[`${m}-icon`]:{width:a("icon-size"),height:a("icon-size"),margin:0,flex:"none",display:"flex",alignItems:"center",justifyContent:"center",fontSize:e.iconFontSize,fontFamily:e.fontFamily,lineHeight:a("icon-size"),textAlign:"center",borderRadius:a("icon-size"),border:`${a("icon-border-width")} ${l} transparent`,transition:["background-color","border","color","inset","transform"].map(u=>`${u} ${r}`).join(", "),zIndex:1},[`${m}-custom ${m}-icon`]:{background:"none",border:0,fontSize:n}}}},rt=e=>{const{componentCls:t,inlineDotSize:n,paddingXS:r,lineWidth:c,antCls:s,calc:l}=e,$=l(r).add(c).equal(),m=`${t}-item`,[i,a]=z(s,"cmp-steps");return{[`${t}-inline`]:{[i("items-offset")]:"0",[i("item-wrapper-padding-top")]:$,display:"inline-flex","&:before":{content:'""',flex:a("items-offset")},[m]:{[i("title-vertical-row-gap")]:r,[i("icon-size")]:n,[i("icon-size-active")]:n,[i("title-font-size")]:e.fontSizeSM,[i("title-line-height")]:e.lineHeightSM,[i("item-title-color")]:e.colorTextSecondary,[i("subtitle-font-size")]:e.fontSizeSM,[i("subtitle-line-height")]:e.lineHeightSM,[i("item-subtitle-color")]:e.colorTextQuaternary,[i("rail-size")]:e.lineWidth,[i("title-horizontal-rail-gap")]:"0px",flex:1,"&-wrapper":{paddingInline:e.paddingXXS,marginInline:e.calc(e.marginXXS).div(2).equal(),borderRadius:e.borderRadiusSM,cursor:"pointer",transition:`background-color ${e.motionDurationMid}`,"&:hover":{background:e.controlItemBgHover}},"&-icon":{[`${m}-icon-dot`]:{"&:after":{display:"none"}}},"&-title":{fontWeight:"normal",whiteSpace:"nowrap"},"&-content":{display:"none"}}}}};function lt(e){return(e||"--ant-not-exist").replace(/var\((.*)\)/,"$1")}const de=(e,t,n)=>{const{calc:r,componentCls:c,descriptionMaxWidth:s,antCls:l}=e,$=`${c}-item`,[,m]=z(l,"cmp-steps");return{[`@container style(${lt(s)})`]:[{[`${$}-icon`]:{marginInlineStart:r(s).sub(m("icon-size")).div(2).equal()},[`${$}-rail`]:{width:"auto",insetInlineStart:r(s).add(m("icon-size")).div(2).add(t).equal(),insetInlineEnd:r(s).sub(m("icon-size")).div(2).sub(t).mul(-1).equal()}},n]}},at=e=>{const{componentCls:t,descriptionMaxWidth:n,marginXS:r,fontHeightLG:c,margin:s,paddingSM:l,marginXXS:$,antCls:m,calc:i}=e,a=`${t}-item`,[u,g]=z(m,"cmp-steps");return{[t]:{[u("icon-size-max")]:`max(${g("icon-size")}, ${g("icon-size-active",g("icon-size"))})`,[`${a}-icon`]:{marginBlockStart:`calc((${g("heading-height")} - ${g("icon-size")}) / 2)`}},[`${t}-title-horizontal`]:{[u("title-horizontal-item-margin")]:s,[u("title-horizontal-rail-margin")]:s,[u("title-horizontal-title-height")]:c,[u("heading-height")]:`max(${g("icon-size")}, ${g("title-horizontal-title-height")})`,[`&${t}-horizontal, &${t}-horizontal-alternate`]:{[`${a}:not(:first-child)`]:{marginInlineStart:g("title-horizontal-item-margin")},[`${a}:last-child`]:{flex:"0 1 auto"},[`${a}-wrapper`]:{columnGap:e.marginXS}},[`&${t}-vertical`]:{[`${a}-wrapper`]:{columnGap:e.margin},[`${a}-empty-header`]:{[`${a}-header`]:{minHeight:"auto"},[`${a}-content`]:{marginTop:i(g("heading-height")).sub(e.fontHeight).div(2).equal()}}},[`${a}-section`]:{flex:1,minWidth:0},[`${a}-header`]:{minHeight:g("heading-height")},[`${a}-title`]:{flex:"0 1 auto"},[`${a}-content`]:{maxWidth:n},[`${a}-subtitle`]:{flex:"0 9999 auto"},[`&${t}-horizontal ${a}-rail`]:{[u("item-wrapper-padding-top")]:"0px",flex:"1 1 0%",marginInlineStart:g("title-horizontal-rail-margin")}},[`${t}-title-vertical`]:{[u("title-vertical-row-gap")]:l,[u("title-horizontal-rail-gap")]:$,[u("heading-height")]:g("icon-size-max"),[`> ${a}`]:{flex:"1 1 0%",[`${a}-wrapper`]:{flexDirection:"column",rowGap:g("title-vertical-row-gap"),alignItems:"center"},[`${a}-section`]:{alignSelf:"stretch"},[`${a}-header`]:{flexDirection:"column",alignItems:"center"},[`${a}-title, ${a}-subtitle, ${a}-content`]:{textAlign:"center",maxWidth:"100%"},[`${a}-subtitle`]:{margin:0},[`${a}-rail`]:{position:"absolute",top:0,width:`calc(100% - ${g("icon-size")} - ${g("title-horizontal-rail-gap")} * 2)`,insetInlineStart:`calc(50% + ${g("icon-size")} / 2 + ${g("title-horizontal-rail-gap")})`}},...de(e,r,{[`${a}:last-child`]:{flex:"none"},[`${a}-icon`]:{alignSelf:"flex-start"},[`${a}-section`]:{width:n}})}}},ct=e=>{const{componentCls:t,fontSizeIcon:n,navContentMaxWidth:r,navArrowColor:c,colorPrimary:s,motionDurationSlow:l,antCls:$,calc:m}=e,i=`${t}-item`,a=s,[u,g]=z($,"cmp-steps");return{[`${t}${t}-navigation`]:{[i.repeat(4)]:{display:"flex",justifyContent:"center",position:"relative",flex:1,marginInlineStart:0,[`${i}-wrapper`]:{paddingBlock:e.paddingSM},[`${i}-section`]:{maxWidth:r},[`${i}-rail`]:{display:"none"},"&:before":{position:"absolute",display:"block",backgroundColor:a,transition:`all ${l}`,transitionTimingFunction:"ease-out",content:'""'},"&:not(:last-child):after":{position:"absolute",display:"block",borderTop:`${X(e.lineWidth)} ${e.lineType} ${c}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${X(e.lineWidth)} ${e.lineType} ${c}`,content:'""'},[`&${i}-active`]:{[u("item-content-active-color")]:g("item-content-color"),[u("item-icon-active-bg-color")]:g("item-icon-bg-color"),[u("item-icon-active-border-color")]:g("item-icon-border-color"),[u("item-icon-active-text-color")]:g("item-icon-text-color")}},[`&${t}-horizontal`]:{[i]:{"&:before":{bottom:0,insetInlineStart:"50%",width:0,height:e.lineWidthBold},[`&${i}-active:before`]:{insetInlineStart:0,width:"100%"},"&:not(:last-child):after":{top:"50%",insetInlineStart:m(n).div(2).mul(-1).add("100%").equal(),width:n,height:n,transform:"translateY(-50%) rotate(45deg)"}}},[`&${t}-vertical`]:{[i.repeat(4)]:{[`${i}-content`]:{padding:0},"&:before":{insetInlineEnd:0,top:"50%",width:e.lineWidthBold,height:0},[`&${i}-active::before`]:{top:0,height:"100%"},"&:not(:last-child):after":{left:{_skip_check_:!0,value:"50%"},top:"100%",width:m(n).div(3).mul(2).equal(),height:m(n).div(3).mul(2).equal(),transform:"translateY(-50%) translateX(-50%) rotate(135deg)"}}}}}},st=e=>{const{componentCls:t,lineWidthBold:n,borderRadius:r,borderRadiusSM:c,motionDurationMid:s,paddingXS:l,lineType:$,paddingSM:m,antCls:i,calc:a}=e,u=`${t}-item`,[g,d]=z(i,"cmp-steps"),x=`${X(n)} ${$} ${d("panel-border-color")}`;return{[`${t}${t}-panel`]:[{[`${u}-rail`]:{display:"none"},[`&${t}-horizontal`]:{alignItems:"stretch",[u]:{flex:1,margin:0}}},{"&":{[g("panel-padding")]:m,[g("item-border-radius")]:r,[u]:{[g("panel-bg-color")]:d("item-icon-bg-color"),[g("panel-border-color")]:d("item-icon-border-color"),[g("panel-active-bg-color")]:d("item-icon-active-bg-color"),[g("panel-active-border-color")]:d("item-icon-active-border-color"),[g("panel-title-height")]:`calc(${d("title-font-size")} * ${d("title-line-height")})`,[g("item-base-height")]:a(d("panel-padding")).mul(2).add(d("icon-size")).add(d("panel-title-height")).equal(),[g("item-base-width")]:`calc(${d("item-base-height")} * 0.7071)`,transition:`background-color ${s}`}},[`${u}-icon`]:{display:"none"},[`${u}-header`]:{minHeight:"auto"},[`${t}-panel-arrow`]:{position:"absolute",top:a(n).mul(-1).equal(),insetInlineStart:"100%",zIndex:1,height:a(n).mul(2).add("100%").equal(),width:d("item-base-width"),overflow:"visible",strokeLinecap:"round",path:{fill:d("panel-bg-color"),stroke:d("panel-border-color"),strokeWidth:n,vectorEffect:"non-scaling-stroke",transition:`fill ${s}`}},[`${u}:last-child ${t}-panel-arrow`]:{display:"none"},[u]:{padding:d("panel-padding"),background:d("panel-bg-color"),position:"relative",borderBlock:x,"&:not(:first-child)":{paddingInlineStart:`calc(${d("panel-padding")} + ${d("item-base-width")})`},"&:first-child":{borderInlineStart:x,borderStartStartRadius:d("item-border-radius"),borderEndStartRadius:d("item-border-radius")},"&:last-child":{borderInlineEnd:x,borderStartEndRadius:d("item-border-radius"),borderEndEndRadius:d("item-border-radius")},"&-active":{background:d("panel-active-bg-color"),borderColor:d("panel-active-border-color"),[`${t}-panel-arrow`]:{path:{fill:d("panel-active-bg-color"),stroke:d("panel-active-border-color")}},[`${u}-title, ${u}-subtitle, ${u}-content`]:{color:d("item-icon-active-text-color")}}}},{[`&${t}-small`]:{[g("panel-padding")]:l,[g("item-border-radius")]:c}},{[`&${t}-filled`]:{[u]:{"&:not(:first-child)":{clipPath:`polygon(${[`${X(n)} 0`,`calc(100% + ${d("item-base-width")}) 0`,`calc(100% + ${d("item-base-width")}) 100%`,`${X(n)} 100%`,`calc(${d("item-base-width")} + ${X(n)}) 50%`].join(",")})`}}}},{[`&${t}-outlined`]:{[`${t}-panel-arrow`]:{top:a(n).div(2).mul(-1).equal(),height:a(n).add("100%").equal()}}}]}},mt=e=>{const{calc:t,antCls:n,componentCls:r,lineWidthBold:c,motionDurationSlow:s}=e,l=`${r}-item`,[$,m]=z(n,"cmp-steps"),i=t(c).add(c).equal();return{[`${r}${r}-with-progress`]:{[$("item-wrapper-padding-top")]:i,[`${l}${l}-process`]:{[`${l}-icon`]:{position:"relative"}},[`${l}-progress-icon`]:{"&-svg":{[$("svg-size")]:t(i).mul(2).add(m("icon-size")).equal(),[$("icon-size-ptg-unitless")]:`calc(100 / tan(atan2(${m("svg-size")}, 1px)))`,fontSize:m("svg-size"),lineHeight:m("icon-size-ptg-unitless"),position:"absolute",inset:t(i).mul(-1).equal(),width:"auto",height:"auto"},"&-circle":{lineHeight:m("icon-size-ptg-unitless"),strokeWidth:t(m("icon-size-ptg-unitless")).mul(c).equal(),[$("progress-radius")]:t(m("svg-size")).sub(c).mul(m("icon-size-ptg-unitless")).div(2).equal(),r:m("progress-radius"),fill:"none",cx:50,cy:50,transition:`all ${s} ease-in-out`,"&-rail":{stroke:e.colorSplit},"&-ptg":{stroke:e.colorPrimary}}}}}},dt=e=>{const{componentCls:t,iconSize:n,dotSize:r,dotCurrentSize:c,marginXXS:s,lineWidthBold:l,fontSizeSM:$,antCls:m}=e,i=`${t}-item`,[a,u]=z(m,"cmp-steps");return{[`${t}${t}-dot`]:{[a("icon-size-active")]:c,[a("icon-size")]:r,[a("dot-icon-size")]:r,[a("dot-icon-border-width")]:l,[a("rail-size")]:l,[a("icon-border-width")]:l,[`${i}-custom ${i}-icon`]:{fontSize:$},[`${i}-icon`]:{position:"relative","&:after":{content:'""',width:n,height:n,display:"block",position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)"}},[`${i}-active ${i}-icon`]:{[a("icon-size")]:u("icon-size-active")},[`&${t}-horizontal`]:{[`&, &${t}-small`]:de(e,s)}}}},pt=e=>{const{componentCls:t,lineWidthBold:n,antCls:r}=e,c=`${t}-item`,[,s]=z(r,"cmp-steps");return{[`${t}${t}-rtl`]:{direction:"rtl",[`&${t}-navigation${t}-horizontal`]:{[`${c}:after`]:{transform:"translateY(-50%) rotate(-45deg)"}},[`&${t}-panel`]:{[`${t}-panel-arrow`]:{transform:"scaleX(-1)"},[`&${t}-filled`]:{[c]:{"&:not(:first-child)":{clipPath:`polygon(${[`calc(0px - ${s("item-base-width")}) 0px`,`calc(100% - ${X(n)}) 0px`,`calc(100% - ${s("item-base-width")} - ${X(n)}) 50%`,`calc(100% - ${X(n)}) 100%`,`calc(0px - ${s("item-base-width")}) 100%`].join(",")})`}}}}}}},gt=e=>{const{componentCls:t,iconSizeSM:n,fontSize:r,lineHeight:c,marginXS:s,fontHeight:l,marginSM:$,paddingXS:m,antCls:i}=e,[a]=z(i,"cmp-steps");return{[`${t}${t}-small`]:{[a("icon-size")]:n,[a("title-horizontal-item-margin")]:$,[a("title-vertical-row-gap")]:m,[a("title-font-size")]:r,[a("title-line-height")]:c,[a("title-horizontal-rail-margin")]:s,[a("title-horizontal-title-height")]:l,[`&${t}-horizontal${t}-title-vertical`]:de(e,s)}}},te="wait",oe="process",ie="finish",ne="error",$t=e=>{const{componentCls:t,colorTextDisabled:n,colorTextLightSolid:r,colorPrimary:c,colorTextLabel:s,colorError:l,colorErrorHover:$,colorErrorBgFilledHover:m,colorFillTertiary:i,colorErrorBg:a,colorPrimaryBgHover:u,colorPrimaryBg:g,colorText:d,colorTextDescription:x,colorBgContainer:w,colorPrimaryHover:v,lineType:b,antCls:C}=e,h=`${t}-item`,[o,f]=z(C,"cmp-steps");return{[t]:[{[h]:{[o("item-solid-line-color")]:"#000",[o("item-title-color")]:"#000",[o("item-content-color")]:"#000",[o("item-subtitle-color")]:f("item-content-color"),[o("item-icon-custom-color")]:"#000",[o("item-icon-bg-color")]:"#000",[o("item-icon-border-color")]:"#000",[o("item-icon-text-color")]:"#fff",[o("item-icon-dot-color")]:"#000",[o("item-icon-dot-bg-color")]:f("item-icon-dot-color"),[o("item-icon-dot-border-color")]:f("item-icon-dot-color"),[o("item-text-hover-color")]:"#000",[o("item-icon-bg-hover-color")]:f("item-icon-bg-color"),[o("item-icon-border-hover-color")]:f("item-icon-border-color"),[o("item-icon-text-hover-color")]:f("item-icon-text-color"),[o("item-content-active-color")]:f("item-content-color"),[o("item-icon-active-bg-color")]:f("item-icon-bg-color"),[o("item-icon-active-border-color")]:f("item-icon-border-color"),[o("item-icon-active-text-color")]:f("item-icon-text-color"),[o("item-process-rail-line-style")]:b},[`${h}-rail`]:{borderColor:f("item-solid-line-color")},[`${h}-custom ${h}-icon`]:{color:f("item-icon-custom-color")},[`${h}-title`]:{color:f("item-title-color")},[`${h}-subtitle`]:{color:f("item-subtitle-color")},[`${h}-content`]:{color:f("item-content-color")},[`${h}-active ${h}-icon`]:{},[`${h}-active ${h}-content`]:{color:f("item-content-active-color")},[`${h}[role='button']:not(${h}-active):hover`]:{[`${h}-title, ${h}-content`]:{color:f("item-text-hover-color")}},[`&:not(${t}-dot)`]:{[`${h}:not(${h}-custom)`]:{[`${h}-icon`]:{background:f("item-icon-bg-color"),borderColor:f("item-icon-border-color"),color:f("item-icon-text-color")},[`&[role='button']:not(${h}-active):hover`]:{[`${h}-icon`]:{background:f("item-icon-bg-hover-color"),borderColor:f("item-icon-border-hover-color"),color:f("item-icon-text-hover-color")}},[`&${h}-active`]:{[`${h}-icon`]:{background:f("item-icon-active-bg-color"),borderColor:f("item-icon-active-border-color"),color:f("item-icon-active-text-color")}}}},[`&${t}-dot`]:{[`${h}-icon`]:{background:f("item-icon-dot-bg-color"),borderColor:f("item-icon-dot-border-color"),color:f("item-icon-dot-color"),[`&${h}-icon-dot-custom`]:{background:"transparent",border:"none"}}}},{[`${h}-${te}`]:{[o("item-icon-custom-color")]:n,[o("item-title-color")]:x,[o("item-content-color")]:x,[o("item-content-active-color")]:d,[o("item-text-hover-color")]:v},[`${h}-rail-${te}`]:{[o("item-solid-line-color")]:n},[`${h}-${oe}`]:{[o("item-icon-custom-color")]:c,[o("item-title-color")]:d,[o("item-content-color")]:x,[o("item-content-active-color")]:d,[o("item-text-hover-color")]:v},[`${h}-rail-${oe}`]:{[o("item-solid-line-color")]:c,[o("rail-line-style")]:f("item-process-rail-line-style")},[`${h}-${ie}`]:{[o("item-icon-custom-color")]:c,[o("item-title-color")]:d,[o("item-content-color")]:x,[o("item-content-active-color")]:d,[o("item-text-hover-color")]:v},[`${h}-rail-${ie}`]:{[o("item-solid-line-color")]:c},[`${h}-${ne}`]:{[o("item-icon-custom-color")]:l,[o("item-title-color")]:l,[o("item-content-color")]:l,[o("item-content-active-color")]:l,[o("item-text-hover-color")]:$},[`${h}-rail-${ne}`]:{[o("item-solid-line-color")]:l}},{[`&${t}-filled`]:{[h]:{[o("item-icon-dot-border-color")]:"transparent"},[`${h}-${te}`]:{[o("item-icon-bg-color")]:i,[o("item-icon-border-color")]:"transparent",[o("item-icon-text-color")]:s,[o("item-icon-dot-bg-color")]:n,[o("item-icon-bg-hover-color")]:u,[o("item-icon-border-hover-color")]:"transparent",[o("item-icon-text-hover-color")]:c,[o("item-icon-active-bg-color")]:c,[o("item-icon-active-border-color")]:"transparent",[o("item-icon-active-text-color")]:r},[`${h}-${oe}, ${h}-${ie}`]:{[o("item-icon-bg-color")]:g,[o("item-icon-border-color")]:"transparent",[o("item-icon-text-color")]:c,[o("item-icon-dot-bg-color")]:c,[o("item-icon-bg-hover-color")]:u,[o("item-icon-border-hover-color")]:"transparent",[o("item-icon-text-hover-color")]:c,[o("item-icon-active-bg-color")]:c,[o("item-icon-active-border-color")]:"transparent",[o("item-icon-active-text-color")]:r},[`${h}-${ne}`]:{[o("item-icon-bg-color")]:a,[o("item-icon-border-color")]:"transparent",[o("item-icon-text-color")]:l,[o("item-icon-dot-bg-color")]:l,[o("item-icon-bg-hover-color")]:m,[o("item-icon-border-hover-color")]:"transparent",[o("item-icon-text-hover-color")]:l,[o("item-icon-active-bg-color")]:l,[o("item-icon-active-border-color")]:"transparent",[o("item-icon-active-text-color")]:r}}},{[`&${t}-outlined`]:{[h]:{[o("item-icon-dot-bg-color")]:"transparent"},[`${h}-${te}`]:{[o("item-icon-bg-color")]:w,[o("item-icon-border-color")]:n,[o("item-icon-text-color")]:n,[o("item-icon-dot-color")]:n,[o("item-icon-bg-hover-color")]:"transparent",[o("item-icon-border-hover-color")]:v,[o("item-icon-text-hover-color")]:v,[o("item-icon-active-bg-color")]:i},[`${h}-${oe}, ${h}-${ie}`]:{[o("item-icon-bg-color")]:w,[o("item-icon-border-color")]:c,[o("item-icon-text-color")]:c,[o("item-icon-dot-color")]:c,[o("item-icon-bg-hover-color")]:"transparent",[o("item-icon-border-hover-color")]:v,[o("item-icon-text-hover-color")]:v,[o("item-icon-active-bg-color")]:g},[`${h}-${ne}`]:{[o("item-icon-bg-color")]:w,[o("item-icon-border-color")]:l,[o("item-icon-text-color")]:l,[o("item-icon-dot-color")]:l,[o("item-icon-bg-hover-color")]:"transparent",[o("item-icon-border-hover-color")]:$,[o("item-icon-text-hover-color")]:$,[o("item-icon-active-bg-color")]:a}}}]}},ut=e=>{const{componentCls:t,marginXXS:n,paddingSM:r,controlHeight:c,antCls:s,calc:l}=e,$=`${t}-item`,[m,i]=z(s,"cmp-steps");return{[`${t}-vertical`]:{[m("vertical-rail-margin")]:l(n).mul(1.5).equal(),flexDirection:"column",alignItems:"stretch",[`> ${$}`]:{minHeight:l(c).mul(1.5).equal(),paddingBottom:r,"&:last-child":{paddingBottom:0},[`${$}-icon`]:{marginInlineStart:`calc((${i("icon-size-max")} - ${i("icon-size")}) / 2)`},[`${$}-rail`]:{[m("rail-offset")]:l(i("heading-height")).sub(i("icon-size")).div(2).equal(),borderInlineStartWidth:i("rail-size"),position:"absolute",top:l(i("icon-size")).add(i("item-wrapper-padding-top")).add(i("rail-offset")).add(i("vertical-rail-margin")).equal(),insetInlineStart:l(i("icon-size-max")).div(2).equal(),bottom:l(i("vertical-rail-margin")).sub(i("rail-offset")).equal(),marginInlineStart:`calc(${i("rail-size")} / -2)`}}}}},ht=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-item`,[c,s]=z(n,"cmp-steps");return{[t]:{[c("title-font-size")]:e.fontSizeLG,[c("title-line-height")]:e.lineHeightLG,[c("subtitle-font-size")]:e.fontSize,[c("subtitle-line-height")]:e.lineHeight,[c("item-wrapper-padding-top")]:"0px",[c("rail-size")]:e.lineWidth,[c("rail-line-style")]:e.lineType,...we(e),display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[r]:{flex:"none",position:"relative"},[`${r}-wrapper`]:{display:"flex",flexWrap:"nowrap",paddingTop:s("item-wrapper-padding-top")},[`${r}-header`]:{display:"flex",flexWrap:"nowrap",alignItems:"center"},[`${r}-title`]:{color:e.colorText,fontSize:s("title-font-size"),lineHeight:s("title-line-height"),wordBreak:"break-word"},[`${r}-subtitle`]:{color:e.colorTextDescription,fontWeight:"normal",fontSize:s("subtitle-font-size"),lineHeight:s("subtitle-line-height"),marginInlineStart:e.marginXS,wordBreak:"break-word"},[`${r}-content`]:{color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word"},[`${r}-rail`]:{borderStyle:s("rail-line-style"),borderWidth:0},[`${r}-title, ${r}-subtitle, ${r}-content, ${r}-rail`]:{transition:`all ${e.motionDurationSlow}`},[`&${t}-ellipsis`]:{[`${r}-title, ${r}-subtitle, ${r}-content`]:Le},[`${r}[role='button']:not(${r}-active):hover`]:{cursor:"pointer"}}}},ft=e=>({titleLineHeight:e.controlHeight,customIconSize:e.controlHeight,customIconTop:0,customIconFontSize:e.controlHeightSM,iconSize:e.controlHeight,iconTop:-.5,iconFontSize:e.fontSize,iconSizeSM:e.fontSizeHeading3,dotSize:e.controlHeight/4,dotCurrentSize:e.controlHeightLG/4,navArrowColor:e.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:void 0,waitIconColor:e.wireframe?e.colorTextDisabled:e.colorTextLabel,waitIconBgColor:e.wireframe?e.colorBgContainer:e.colorFillContent,waitIconBorderColor:e.wireframe?e.colorTextDisabled:"transparent",finishIconBgColor:e.wireframe?e.colorBgContainer:e.controlItemBgActive,finishIconBorderColor:e.wireframe?e.colorPrimary:e.controlItemBgActive}),bt=ze("Steps",e=>{const t=ye(e,{inlineDotSize:6});return[ht(t),nt(t),ut(t),it(t),at(t),gt(t),dt(t),$t(t),ct(t),st(t),rt(t),mt(t),pt(t)]},ft),vt={itemIcon:Fe},St=e=>{const{size:t,className:n,rootClassName:r,style:c,variant:s="filled",type:l,classNames:$,styles:m,direction:i,orientation:a,responsive:u=!0,progressDot:g,labelPlacement:d,titlePlacement:x,ellipsis:w,offset:v=0,items:b,percent:C,current:h=0,onChange:o,iconRender:f,...A}=e,S=p.useContext(Te),M=Ie("steps"),{getPrefixCls:D,direction:I,className:y,style:H}=M;let P,N,B={};S?B={root:S.rootComponent,item:S.itemComponent}:{classNames:P,styles:N}=M;const R=D(),E=D("steps",e.prefixCls),q=`${E}-item-icon`,[_,O]=bt(E),[L]=z(R,"cmp-steps"),U=Oe(t),K=p.useMemo(()=>(b||[]).filter(Boolean),[b]),{xs:F}=je(u),W=p.useMemo(()=>l&&l!=="default"?l:g?"dot":l,[g,l]),pe=W==="inline",k=W==="dot"||W==="inline",ge=p.useMemo(()=>W==="dot"&&typeof g=="function"?g:void 0,[W,g]),J=p.useMemo(()=>{const j=a||i;return W==="panel"?"horizontal":u&&F||j==="vertical"?"vertical":"horizontal"},[a,i,W,u,F]),$e=p.useMemo(()=>k||J==="vertical"?J==="vertical"?"horizontal":"vertical":l==="navigation"?"horizontal":x||d||"horizontal",[k,d,J,x,l]),ee=pe?void 0:C,Pe={...e,variant:s,size:U,type:W,orientation:J,titlePlacement:$e,current:h,percent:ee,responsive:u,offset:v},[We,He]=Ne([vt,P,$],[N,m],{props:Pe}),Be=(j,V)=>{const{item:G,index:ue,active:Xe,components:{Icon:he}}=V,{status:fe,icon:be}=G;let Q=null;if(k||be)Q=be;else switch(fe){case"finish":Q=p.createElement(Ue,{className:`${q}-finish`});break;case"error":Q=p.createElement(Ye,{className:`${q}-error`});break;default:{let re=p.createElement("span",{className:`${q}-number`},V.index+1);fe==="process"&&ee!==void 0&&(re=p.createElement(ot,{prefixCls:E,rootPrefixCls:R,percent:ee},re)),Q=re}}let Z=p.createElement(he,null,Q);return f?Z=f(Z,{index:ue,active:Xe,item:G,components:{Icon:he}}):typeof ge=="function"&&(Z=ge(Z,{index:ue,...G})),Z},Me=(j,V)=>{let G=j;return pe&&V.item.content&&(G=p.createElement(Ve,{destroyOnHidden:!0,title:V.item.content},j)),p.createElement(Ge,{component:"Steps",disabled:V.item.disabled||!o,colorSource:s==="filled"?"color":null},G)},Ae=W==="panel"?j=>p.createElement(p.Fragment,null,j,p.createElement(tt,{prefixCls:E})):void 0,De={[L("items-offset")]:`${v}`,...H,...c},qe=T(y,`${E}-${s}`,{[`${E}-${W}`]:W!=="dot"?W:!1,[`${E}-rtl`]:I==="rtl",[`${E}-dot`]:k,[`${E}-ellipsis`]:w,[`${E}-with-progress`]:ee!==void 0,[`${E}-small`]:U==="small"},n,r,_,O);return p.createElement(et,{...A,prefixCls:E,className:qe,style:De,classNames:We,styles:He,orientation:J,titlePlacement:$e,components:B,current:h,items:K,onChange:o,iconRender:Be,itemRender:Me,itemWrapperRender:Ae})},xt=e=>{const{componentCls:t,fontHeight:n,antCls:r,paddingXS:c}=e,[s,l]=z(r,"cmp-steps"),[$,m]=z(r,"timeline"),i=`${t}-item`;return{[`${t}-horizontal`]:{[s("title-vertical-row-gap")]:c,[$("content-height")]:X(n),alignItems:"stretch",[`&${t}-layout-alternate`]:{[i]:{[`${i}-wrapper`]:{[$("alternate-content-offset")]:`calc(${m("content-height")} + ${l("title-vertical-row-gap")} * 2 + ${l("icon-size-max")})`,height:`calc(${m("content-height")} * 2 + ${l("title-vertical-row-gap")} * 2 + ${l("icon-size-max")})`},[`${i}-icon`]:{position:"absolute"},[`${i}-icon, ${i}-rail`]:{position:"absolute",top:"50%",transform:"translateY(-50%)",margin:0},[`${i}-title, ${i}-subtitle, ${i}-content`]:{whiteSpace:"nowrap",maxWidth:"unset"},[`${i}-title`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},[`${i}-content`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-placement-start":{[`${i}-title`]:{bottom:m("alternate-content-offset")},[`${i}-content`]:{top:m("alternate-content-offset")}},"&-placement-end":{[`${i}-title`]:{top:m("alternate-content-offset")},[`${i}-content`]:{bottom:m("alternate-content-offset")}}}},[`&:not(${t}-layout-alternate)`]:{[`${i}-placement-end`]:{display:"flex",alignItems:"flex-end",[`${i}-wrapper`]:{flex:"auto",flexDirection:"column-reverse"},[`${i}-rail`]:{top:"auto",bottom:l("horizontal-rail-margin"),transform:"translateY(50%)"}}}}}},Ct=e=>{const{componentCls:t,tailColor:n,fontHeight:r,dotSize:c,dotBg:s,dotBorderWidth:l,fontSize:$,lineHeight:m,colorText:i,tailWidth:a,colorPrimary:u,colorError:g,colorSuccess:d,colorTextDisabled:x,antCls:w}=e,v=`${t}-item`,[b,C]=z(w,"cmp-steps");return{[t]:[{...we(e),[v]:{[b("title-horizontal-title-height")]:r,[b("vertical-rail-margin")]:"0px",[b("title-horizontal-rail-gap")]:"0px",[b("icon-dot-size-origin")]:C("icon-size-active"),[b("icon-dot-size-custom")]:c,[b("item-icon-dot-bg-color-origin")]:C("item-icon-dot-bg-color"),[b("item-icon-dot-bg-color-custom")]:s,[b("icon-size")]:C("icon-dot-size-custom",C("icon-dot-size-origin")),[`${v}-icon`]:{[b("dot-icon-border-width")]:l,[b("dot-icon-size")]:C("icon-size"),[b("item-icon-dot-bg-color")]:C("item-icon-dot-bg-color-custom",C("item-icon-dot-bg-color-origin"))},[`${v}-title`]:{fontSize:$,lineHeight:m},[`${v}-content`]:{color:i},[`${v}-rail`]:{[b("item-solid-line-color")]:n,[b("rail-size")]:a}}},{[v]:{[b("item-process-rail-line-style")]:"dotted"},[`${v}${v}${v}-color`]:{"&-blue":{[b("item-icon-dot-color")]:u},"&-red":{[b("item-icon-dot-color")]:g},"&-green":{[b("item-icon-dot-color")]:d},"&-gray":{[b("item-icon-dot-color")]:x}}}]}},zt=e=>{const{calc:t,componentCls:n,itemPaddingBottom:r,margin:c,antCls:s}=e,l=`${n}-item`,[,$]=z(s,"cmp-steps"),[m,i]=z(s,"timeline");return{[`${n}:not(${n}-horizontal)`]:{[m("head-span")]:"12",[m("head-span-ptg")]:`calc(${i("head-span")} / 24 * 100%)`,[`&${n}-layout-alternate`]:{[l]:{[m("alternate-gap")]:t(c).mul(2).add($("dot-icon-size")).equal(),minHeight:"auto",paddingBottom:r,[`${l}-icon, ${l}-rail`]:{position:"absolute",insetInlineStart:i("head-span-ptg")},[`${l}-icon`]:{marginInlineStart:`calc(${$("icon-size")} / -2)`},[`${l}-section`]:{display:"flex",flexWrap:"nowrap",gap:i("alternate-gap")},[`${l}-header`]:{textAlign:"end",flexDirection:"column",alignItems:"stretch",flex:`1 1 calc(${i("head-span-ptg")} - ${i("alternate-gap")} / 2)`},[`${l}-content`]:{textAlign:"start",flex:`1 1 calc(100% - ${i("head-span-ptg")} - ${i("alternate-gap")} / 2)`},"&-placement-end":{[`${l}-header`]:{textAlign:"start",order:1},[`${l}-content`]:{textAlign:"end"},[`${l}-icon, ${l}-rail`]:{insetInlineStart:`calc(100% - ${i("head-span-ptg")})`}}}},[`&:not(${n}-layout-alternate)`]:{[`${l}-placement-end`]:{textAlign:"end",[`${l}-icon`]:{order:1},[`${l}-rail`]:{insetInlineStart:"auto",insetInlineEnd:`calc(${$("icon-size")} / 2)`,marginInlineEnd:`calc(${$("rail-size")} / -2)`}}}}}},yt=e=>({tailColor:e.colorSplit,tailWidth:e.lineWidthBold,dotBorderWidth:e.lineWidthBold,dotBg:void 0,dotSize:void 0,itemPaddingBottom:e.padding*1.25}),wt=ze("Timeline",e=>{const t=ye(e,{itemHeadSize:10,customHeadPaddingVertical:e.paddingXXS,paddingInlineEnd:2});return[Ct(t),zt(t),xt(t)]},yt),It=(e,t,n,r,c,s,l)=>{const $=`${t}-item`,[m]=z(e,"cmp-steps"),i=p.useMemo(()=>Array.isArray(r)?r:Ke(c).map(a=>({...a.props})),[r,c]);return p.useMemo(()=>{const a=i.map((u,g)=>{const{label:d,children:x,title:w,content:v,color:b,className:C,style:h,icon:o,dot:f,placement:A,position:S,loading:M,...D}=u;let I=h,y=C;b&&(["blue","red","green","gray"].includes(b)?y=T(C,`${$}-color-${b}`):I={[m("item-icon-dot-color")]:b,...h});const H=A??S??(n==="alternate"?g%2===0?"start":"end":n);y=T(y,`${$}-placement-${H}`);let P=o??f;return!P&&M&&(P=p.createElement(Se,null)),{...D,title:w??d,content:v??x,style:I,className:y,icon:P,status:M?"process":"finish"}});return s&&a.push({icon:l??p.createElement(Se,null),content:s,status:"process"}),a},[i,s,n,$,m,l])},Nt={rootComponent:"ol",itemComponent:"li"},Et=e=>{const{getPrefixCls:t,direction:n,className:r,style:c,classNames:s,styles:l}=Ie("timeline"),{prefixCls:$,className:m,style:i,classNames:a,styles:u,variant:g="outlined",mode:d,orientation:x="vertical",titleSpan:w,items:v,children:b,reverse:C,pending:h,pendingDot:o,...f}=e,A=t(),S=t("timeline",$),[M,D]=wt(S),[I]=z(A,"timeline"),y=p.useMemo(()=>({item:`${S}-item`,itemTitle:`${S}-item-title`,itemIcon:`${S}-item-icon`,itemContent:`${S}-item-content`,itemRail:`${S}-item-rail`,itemWrapper:`${S}-item-wrapper`,itemSection:`${S}-item-section`,itemHeader:`${S}-item-header`}),[S]),H=p.useMemo(()=>d==="left"?"start":d==="right"?"end":["alternate","start","end"].includes(d)?d:"start",[d]),P=It(A,S,H,v,b,h,o),N=p.useMemo(()=>C?Je(P).reverse():P,[C,P]),B={...e,variant:g,mode:H,orientation:x,items:N},[R,E]=Ne([y,s,a],[l,u],{props:B}),q=p.useMemo(()=>({railFollowPrevStatus:C}),[C]),_=p.useMemo(()=>H==="alternate"||x==="vertical"&&N.some(L=>L.title),[N,H,x]),O={...c,...i};return Qe(w)&&H!=="alternate"&&(typeof w=="number"&&!Number.isNaN(w)?O[I("head-span")]=w:O[I("head-span-ptg")]=w),p.createElement(Te.Provider,{value:Nt},p.createElement(Ee.Provider,{value:q},p.createElement(St,{...f,className:T(S,r,m,M,D,{[`${S}-${x}`]:x==="horizontal",[`${S}-layout-alternate`]:_,[`${S}-rtl`]:n==="rtl"}),style:O,classNames:R,styles:E,variant:g,orientation:x,type:"dot",items:N,current:N.length-1})))};Et.Item=()=>{};export{St as S,Et as T}; diff --git a/public/assets/XinForm-DX04WSwD.js b/public/assets/XinForm-DX04WSwD.js new file mode 100644 index 0000000..e551ad2 --- /dev/null +++ b/public/assets/XinForm-DX04WSwD.js @@ -0,0 +1,142 @@ +import{a as e,c as t,d as n,f as r,l as i,m as a,n as o,o as s,p as c,r as l,t as u,u as d}from"./tslib.es6-DffexlHv.js";import{n as f}from"./pagination-BklXHwQ9.js";import{t as p}from"./tabs-B0pGTc5N.js";import{t as m}from"./upload-DrAEBKrg.js";import{t as h}from"./tag-Bn-IyYw0.js";import{$i as g,$n as _,$r as v,$t as y,Bi as b,Bn as x,Bt as S,Ca as C,Ci as w,Cn as T,Cr as E,Ct as D,Dn as O,Dr as k,Dt as A,Ea as j,Ei as M,Fi as N,Fr as P,Gn as F,Hr as I,Ht as L,Ji as R,Jn as z,Jr as B,Jt as ee,Ki as V,Kn as H,Kr as te,Kt as ne,Li as re,Lr as U,Lt as W,Mn as ie,Nn as G,Pt as K,Qr as q,Qt as ae,Ri as oe,Rn as J,St as se,Ui as Y,Ut as ce,Vi as le,Vn as ue,Vt as de,Wr as fe,Wt as pe,Xn as me,Yi as he,Yr as ge,Zn as _e,Zr as X,Zt as ve,_a as ye,_i as be,_r as xe,a as Z,an as Se,ar as Ce,bi as we,bt as Te,c as Ee,cn as De,cr as Oe,di as ke,dn as Ae,ei as je,er as Me,fa as Ne,fr as Pe,gn as Fe,gr as Ie,ha as Le,hn as Re,hr as ze,i as Be,ia as Ve,kr as He,li as Ue,ln as We,lr as Ge,ma as Ke,mr as qe,na as Je,nr as Ye,or as Xe,pa as Ze,qi as Qe,qn as $e,r as et,rn as tt,s as nt,sn as rt,tr as it,ua as at,ui as ot,un as st,vi as ct,vr as lt,vt as ut,wa as dt,wi as ft,wr as pt,ya as mt,yi as ht,yr as gt,yt as _t,zi as vt,zn as yt,zr as bt,zt as xt}from"./index-DThTpSPU.js";var St=dt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekday=r()})(e,(function(){return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,n=this.$W,r=(n{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_localeData=r()})(e,(function(){return function(e,t,n){var r=t.prototype,i=function(e){return e&&(e.indexOf?e:e.s)},a=function(e,t,n,r,a){var o=e.name?e:e.$locale(),s=i(o[t]),c=i(o[n]),l=s||c.map((function(e){return e.slice(0,r)}));if(!a)return l;var u=o.weekStart;return l.map((function(e,t){return l[(t+(u||0))%7]}))},o=function(){return n.Ls[n.locale()]},s=function(e,t){return e.formats[t]||function(e){return e.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}(e.formats[t.toUpperCase()])},c=function(){var e=this;return{months:function(t){return t?t.format(`MMMM`):a(e,`months`)},monthsShort:function(t){return t?t.format(`MMM`):a(e,`monthsShort`,`months`,3)},firstDayOfWeek:function(){return e.$locale().weekStart||0},weekdays:function(t){return t?t.format(`dddd`):a(e,`weekdays`)},weekdaysMin:function(t){return t?t.format(`dd`):a(e,`weekdaysMin`,`weekdays`,2)},weekdaysShort:function(t){return t?t.format(`ddd`):a(e,`weekdaysShort`,`weekdays`,3)},longDateFormat:function(t){return s(e.$locale(),t)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return c.bind(this)()},n.localeData=function(){var e=o();return{firstDayOfWeek:function(){return e.weekStart||0},weekdays:function(){return n.weekdays()},weekdaysShort:function(){return n.weekdaysShort()},weekdaysMin:function(){return n.weekdaysMin()},months:function(){return n.months()},monthsShort:function(){return n.monthsShort()},longDateFormat:function(t){return s(e,t)},meridiem:e.meridiem,ordinal:e.ordinal}},n.months=function(){return a(o(),`months`)},n.monthsShort=function(){return a(o(),`monthsShort`,`months`,3)},n.weekdays=function(e){return a(o(),`weekdays`,null,null,e)},n.weekdaysShort=function(e){return a(o(),`weekdaysShort`,`weekdays`,3,e)},n.weekdaysMin=function(e){return a(o(),`weekdaysMin`,`weekdays`,2,e)}}}))})),wt=dt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekOfYear=r()})(e,(function(){var e=`week`,t=`year`;return function(n,r,i){var a=r.prototype;a.week=function(n){if(n===void 0&&(n=null),n!==null)return this.add(7*(n-this.week()),`day`);var r=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var a=i(this).startOf(t).add(1,t).date(r),o=i(this).endOf(e);if(a.isBefore(o))return 1}var s=i(this).startOf(t).date(r).startOf(e).subtract(1,`millisecond`),c=this.diff(s,e,!0);return c<0?i(this).startOf(`week`).week():Math.ceil(c)},a.weeks=function(e){return e===void 0&&(e=null),this.week(e)}}}))})),Tt=dt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_weekYear=r()})(e,(function(){return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return t===1&&e===11?n+1:e===0&&t>=52?n-1:n}}}))})),Et=dt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Dt=dt(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Q=j(C()),Ot=j(Re()),kt=j(St()),At=j(Ct()),jt=j(wt()),Mt=j(Tt()),Nt=j(Et()),Pt=j(Dt());Ot.default.extend(Pt.default),Ot.default.extend(Nt.default),Ot.default.extend(kt.default),Ot.default.extend(At.default),Ot.default.extend(jt.default),Ot.default.extend(Mt.default),Ot.default.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=(e||``).replace(`Wo`,`wo`);return r.bind(this)(t)}});var Ft={bn_BD:`bn-bd`,by_BY:`be`,en_GB:`en-gb`,en_US:`en`,fr_BE:`fr`,fr_CA:`fr-ca`,hy_AM:`hy-am`,kmr_IQ:`ku`,nl_BE:`nl-be`,pt_BR:`pt-br`,zh_CN:`zh-cn`,zh_HK:`zh-hk`,zh_TW:`zh-tw`},It=function(e){return Ft[e]||e.split(`_`)[0]},Lt=function(e){return!Ot.default.isDayjs(e)||e instanceof Ot.default?e:(0,Ot.default)(e.valueOf())},Rt={getNow:function(){var e=(0,Ot.default)();return typeof e.tz==`function`?e.tz():e},getFixedDate:function(e){return(0,Ot.default)(e,[`YYYY-M-DD`,`YYYY-MM-DD`])},getEndDate:function(e){return Lt(e).endOf(`month`)},getWeekDay:function(e){var t=Lt(e).locale(`en`);return t.weekday()+t.localeData().firstDayOfWeek()},getYear:function(e){return Lt(e).year()},getMonth:function(e){return Lt(e).month()},getDate:function(e){return Lt(e).date()},getHour:function(e){return Lt(e).hour()},getMinute:function(e){return Lt(e).minute()},getSecond:function(e){return Lt(e).second()},getMillisecond:function(e){return Lt(e).millisecond()},addYear:function(e,t){return Lt(e).add(t,`year`)},addMonth:function(e,t){return Lt(e).add(t,`month`)},addDate:function(e,t){return Lt(e).add(t,`day`)},setYear:function(e,t){return Lt(e).year(t)},setMonth:function(e,t){return Lt(e).month(t)},setDate:function(e,t){return Lt(e).date(t)},setHour:function(e,t){return Lt(e).hour(t)},setMinute:function(e,t){return Lt(e).minute(t)},setSecond:function(e,t){return Lt(e).second(t)},setMillisecond:function(e,t){return Lt(e).millisecond(t)},isAfter:function(e,t){return Lt(e).isAfter(Lt(t))},isValidate:function(e){return Lt(e).isValid()},locale:{getWeekFirstDay:function(e){return(0,Ot.default)().locale(It(e)).localeData().firstDayOfWeek()},getWeekFirstDate:function(e,t){return Lt(t).locale(It(e)).weekday(0)},getWeek:function(e,t){return Lt(t).locale(It(e)).week()},getShortWeekDays:function(e){return(0,Ot.default)().locale(It(e)).localeData().weekdaysMin()},getShortMonths:function(e){return(0,Ot.default)().locale(It(e)).localeData().monthsShort()},format:function(e,t,n){return Lt(t).locale(It(e)).format(n)},parse:function(e,t,n){for(var r=It(e),i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:`0`,r=String(e);r.lengthe.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=mn(Q.useState([!1,!1]),2),i=r[0],a=r[1];return[Q.useMemo(function(){return i.map(function(r,i){if(r)return!0;var a=e[i];return a?!!(!n[i]&&!a||a&&t(a,{activeIndex:i})):!1})},[e,i,t,n]),function(e,t){a(function(n){return tn(n,t,e)})}]}function xn(e){"@babel/helpers - typeof";return xn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xn(e)}function Sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&(o=t.addDate(o,-7)),o}function fr(e,t){var n=t.generateConfig,r=t.locale,i=t.format;return e?typeof i==`function`?i(e):n.locale.format(r.locale,e,i):``}function pr(e,t,n){var r=t,i=[`getHour`,`getMinute`,`getSecond`,`getMillisecond`];return[`setHour`,`setMinute`,`setSecond`,`setMillisecond`].forEach(function(t,a){r=n?e[t](r,e[i[a]](n)):e[t](r,0)}),r}function mr(e,t,n,r,i){return ye(function(a,o){return!!(n&&n(a,o)||r&&e.isAfter(r,a)&&!cr(e,t,r,a,o.type)||i&&e.isAfter(a,i)&&!cr(e,t,i,a,o.type))})}function hr(e){"@babel/helpers - typeof";return hr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hr(e)}function gr(e,t,n){return Q.useMemo(function(){var r=en(rn(e,t,n)),i=r[0],a=hr(i)===`object`&&i.type===`mask`?i.format:null;return[r.map(function(e){return typeof e==`string`||typeof e==`function`?e:e.format}),a]},[e,t,n])}function _r(e,t,n){return typeof e[0]==`function`||n?!0:t}function vr(e){"@babel/helpers - typeof";return vr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},vr(e)}function yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function br(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;return Q.useMemo(function(){var n=e&&en(e);return t&&n&&(n[1]=n[1]||n[0]),n},[e,t])}function Rr(e,t){var n=e.generateConfig,r=e.locale,i=e.picker,a=i===void 0?`date`:i,o=e.prefixCls,s=o===void 0?`rc-picker`:o,c=e.previewValue,l=c===void 0?`hover`:c,u=e.styles,d=u===void 0?{}:u,f=e.classNames,p=f===void 0?{}:f,m=e.order,h=m===void 0?!0:m,g=e.components,_=g===void 0?{}:g,v=e.inputRender,y=e.allowClear,b=e.clearIcon,x=e.needConfirm,S=e.multiple,C=e.format,w=e.inputReadOnly,T=e.disabledDate,E=e.minDate,D=e.maxDate,O=e.showTime,k=e.value,A=e.defaultValue,j=e.pickerValue,M=e.defaultPickerValue,N=Lr(k),P=Lr(A),F=Lr(j),I=Lr(M),L=a===`date`&&O?`datetime`:a,R=L===`time`||L===`datetime`,z=R||S,B=x??R,ee=jr(Jn(e),4),V=ee[0],H=ee[1],te=ee[2],ne=ee[3],re=kn(r,H),U=Q.useMemo(function(){return Yn(L,te,ne,V,re)},[L,te,ne,V,re]),W=Q.useMemo(function(){return Dr(Dr({},e),{},{previewValue:l,prefixCls:s,locale:re,picker:a,styles:d,classNames:p,order:h,components:Dr({input:v},_),clearIcon:Zn(s,y,b),showTime:U,value:N,defaultValue:P,pickerValue:F,defaultPickerValue:I},t?.())},[e]),ie=jr(gr(L,re,C),2),G=ie[0],K=ie[1],q=_r(G,w,S),ae=mr(n,r,T,E,D),oe=wr(n,a,ae,U);return[Q.useMemo(function(){return Dr(Dr({},W),{},{needConfirm:B,inputReadOnly:q,disabledDate:ae})},[W,B,q,ae]),L,z,G,K,oe]}function zr(e,t){return Wr(e)||Ur(e,t)||Vr(e,t)||Br()}function Br(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e,t){if(e){if(typeof e==`string`)return Hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hr(e,t)}}function Hr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,i=Kr(Gr(n.every(function(e){return e})?!1:e,t||!1,r),2),a=i[0],o=i[1];function s(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!t.inherit||a)&&o(e,t.force)}return[a,s]}function $r(e){var t=Q.useRef();return Q.useImperativeHandle(e,function(){return{nativeElement:t.current?.nativeElement,focus:function(e){var n;(n=t.current)==null||n.focus(e)},blur:function(){var e;(e=t.current)==null||e.blur()}}}),t}function ei(e,t){return ai(e)||ii(e,t)||ni(e,t)||ti()}function ti(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ni(e,t){if(e){if(typeof e==`string`)return ri(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ri(e,t)}}function ri(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=Q.useRef(t);r.current=t,Le(function(){if(e)r.current(e);else{var t=Qe(function(){r.current(e)},n);return function(){Qe.cancel(t)}}},[e])}function ci(e,t){return pi(e)||fi(e,t)||ui(e,t)||li()}function li(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ui(e,t){if(e){if(typeof e==`string`)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}}function di(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=ci(Q.useState(0),2),i=r[0],a=r[1],o=ci(Q.useState(!1),2),s=o[0],c=o[1],l=Q.useRef([]),u=Q.useRef(null),d=Q.useRef(null),f=function(e){u.current=e};return si(s||n,function(){s||(l.current=[],f(null))}),Q.useEffect(function(){s&&l.current.push(i)},[s,i]),[s,function(e){c(e)},function(e){return e&&(d.current=e),d.current},i,a,function(n){var r=l.current,i=new Set(r.filter(function(e){return n[e]||t[e]})),a=+(r[r.length-1]===0);return i.size>=2||e[a]?null:a},l.current,f,function(e){return u.current===e}]}function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hi(e)}function gi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _i(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n8&&arguments[8]!==void 0?arguments[8]:Fi,l=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Fi,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Fi,d=arguments.length>11?arguments[11]:void 0,f=arguments.length>12?arguments[12]:void 0,p=arguments.length>13?arguments[13]:void 0,m=o===`time`,h=a||0,g=function(t){var r=e.getNow();return m&&(r=pr(e,r)),c[t]||n[t]||r},_=Oi(l,2),v=_[0],y=_[1],b=Oi(Ze(function(){return g(0)},v),2),x=b[0],S=b[1],C=Oi(Ze(function(){return g(1)},y),2),w=C[0],T=C[1],E=Q.useMemo(function(){var t=[x,w][h];return m?t:pr(e,t,u[h])},[m,x,w,h,e,u]),D=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`panel`,a=[S,T][h];a(n);var s=[x,w];s[h]=n,d&&(!cr(e,t,x,s[0],o)||!cr(e,t,w,s[1],o))&&d(s,{source:i,range:h===1?`end`:`start`,mode:r})},O=function(n,r){if(s){var i={date:`month`,week:`month`,month:`year`,quarter:`year`}[o];if(i&&!cr(e,t,n,r,i)||o===`year`&&n&&Math.floor(e.getYear(n)/10)!==Math.floor(e.getYear(r)/10))return Pi(e,o,r,-1)}return r},k=Q.useRef(null);return Ke(function(){if(i&&!c[h]){var t=m?null:e.getNow();if(k.current!==null&&k.current!==h?t=[x,w][h^1]:n[h]?t=h===0?n[0]:O(n[0],n[1]):n[h^1]&&(t=n[h^1]),t){f&&e.isAfter(f,t)&&(t=f);var r=s?Pi(e,o,t,1):t;p&&e.isAfter(r,p)&&(t=s?Pi(e,o,p,-1):p),D(t,`reset`)}}},[i,h,n[h]]),Q.useEffect(function(){i?k.current=h:k.current=null},[i,h]),Ke(function(){i&&c&&c[h]&&D(c[h],`reset`)},[i,h]),[E,D]}function Li(e,t){return Hi(e)||Vi(e,t)||zi(e,t)||Ri()}function Ri(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zi(e,t){if(e){if(typeof e==`string`)return Bi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bi(e,t)}}function Bi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,o=[],s=n>=1?n|0:1,c=e;c<=t;c+=s){var l=i.includes(c);(!l||!r)&&o.push({label:$t(c,a),value:c,disabled:l})}return o}function Oa(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},i=r.use12Hours,a=r.hourStep,o=a===void 0?1:a,s=r.minuteStep,c=s===void 0?1:s,l=r.secondStep,u=l===void 0?1:l,d=r.millisecondStep,f=d===void 0?100:d,p=r.hideDisabledOptions,m=r.disabledTime,h=r.disabledHours,g=r.disabledMinutes,_=r.disabledSeconds,v=Q.useMemo(function(){return n||e.getNow()},[n,e]),y=Q.useCallback(function(e){var t=m?.(e)||{};return[t.disabledHours||h||Ea,t.disabledMinutes||g||Ea,t.disabledSeconds||_||Ea,t.disabledMilliseconds||Ea]},[m,h,g,_]),b=ba(Q.useMemo(function(){return y(v)},[v,y]),4),x=b[0],S=b[1],C=b[2],w=b[3],T=Q.useCallback(function(e,t,n,r){var a=Da(0,23,o,p,e());return[i?a.map(function(e){return ga(ga({},e),{},{label:$t(e.value%12||12,2)})}):a,function(e){return Da(0,59,c,p,t(e))},function(e,t){return Da(0,59,u,p,n(e,t))},function(e,t,n){return Da(0,999,f,p,r(e,t,n),3)}]},[p,o,i,f,c,u]),E=ba(Q.useMemo(function(){return T(x,S,C,w)},[T,x,S,C,w]),4),D=E[0],O=E[1],k=E[2],A=E[3];return[function(t,n){var r=function(){return D},i=O,a=k,o=A;if(n){var s=ba(y(n),4),c=s[0],l=s[1],u=s[2],d=s[3],f=ba(T(c,l,u,d),4),p=f[0],m=f[1],h=f[2],g=f[3];r=function(){return p},i=m,a=h,o=g}return pa(t,r,i,a,o,e)},D,O,k,A]}function ka(e,t){return Pa(e)||Na(e,t)||ja(e,t)||Aa()}function Aa(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ja(e,t){if(e){if(typeof e==`string`)return Ma(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(e,t)}}function Ma(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);ne.length)&&(t=e.length);for(var n=0,r=Array(t);n1&&arguments[1]!==void 0?arguments[1]:!1;ue(e),_?.(e),t&&de(e)},pe=function(e,t){ie(e),t&&fe(t),de(t,e)},me=function(e){if(Y(e),fe(e),W!==S){var t=[`decade`,`year`],n=[].concat(t,[`month`]),r={quarter:[].concat(t,[`quarter`]),week:[].concat(wc(n),[`week`]),date:[].concat(wc(n),[`date`])}[S]||n,i=r[r.indexOf(W)+1];i&&pe(i,e)}},he=Q.useMemo(function(){var e,t;if(Array.isArray(T)){var n=Oc(T,2);e=n[0],t=n[1]}else e=T;return!e&&!t?null:(e||=t,t||=e,a.isAfter(e,t)?[t,e]:[e,t])},[T,a]),ge=pn(E,D,O),_e=A[G]||Pc[G]||xo,X=Q.useMemo(function(){return{classNames:P?.popup??n??{},styles:F?.popup??r??{}}},[P,n,F,r]),ve=Q.useContext(qa),be=Q.useMemo(function(){return bc(bc({},ve),{},{hideHeader:j})},[ve,j]),xe=`${I}-panel`,Z=nn(e,[`showWeek`,`prevIcon`,`nextIcon`,`superPrevIcon`,`superNextIcon`,`disabledDate`,`minDate`,`maxDate`,`onHover`]);return Q.createElement(Ua.Provider,{value:X},Q.createElement(qa.Provider,{value:be},Q.createElement(`div`,{ref:L,tabIndex:l,className:b(xe,xc({},`${xe}-rtl`,o===`rtl`))},Q.createElement(_e,vc({},Z,{showTime:ne,prefixCls:I,locale:H,generateConfig:a,onModeChange:pe,pickerValue:le,onPickerValueChange:function(e){fe(e,!0)},value:J[0],onSelect:me,values:J,cellRender:ge,hoverRangeValue:he,hoverValue:w})))))}var Ic=Q.memo(Q.forwardRef(Fc));function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Lc(e)}function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bl(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function xl(e){var t=e.icon,n=e.type,r=yl(e,gl),i=Q.useContext(Bt),a=i.prefixCls,o=i.classNames,s=i.styles;return t?Q.createElement(`span`,vl({className:b(`${a}-${n}`,o.suffix),style:s.suffix},r),t):null}function Sl(e){var t=e.onClear,n=yl(e,_l);return Q.createElement(xl,vl({},n,{type:`clear`,role:`button`,onMouseDown:function(e){e.preventDefault()},onClick:function(e){e.stopPropagation(),t()}}))}function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Cl(e)}function wl(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Tl(e,t){for(var n=0;n=a&&e<=o)return r;var s=Math.min(Math.abs(e-a),Math.abs(e-o));se.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ql(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}var Jl=Q.forwardRef(function(e,t){var n=e.className,r=e.active,i=e.showActiveCls,a=i===void 0?!0:i,o=e.suffixIcon,s=e.format,c=e.validateFormat,l=e.onChange;e.onInput;var u=e.helped,d=e.onHelp,f=e.onSubmit,p=e.onKeyDown,m=e.preserveInvalidOnBlur,h=m===void 0?!1:m,g=e.invalid,_=e.clearIcon,v=Kl(e,Fl),y=e.value,x=e.onFocus,S=e.onBlur,C=e.onMouseUp,w=Q.useContext(Bt),T=w.prefixCls,E=w.input,D=E===void 0?`input`:E,O=w.classNames,k=w.styles,A=`${T}-input`,j=Bl(Q.useState(!1),2),M=j[0],N=j[1],P=Bl(Q.useState(y),2),F=P[0],I=P[1],L=Bl(Q.useState(``),2),R=L[0],z=L[1],B=Bl(Q.useState(null),2),ee=B[0],V=B[1],H=Bl(Q.useState(null),2),te=H[0],ne=H[1],re=F||``;Q.useEffect(function(){I(y)},[y]);var U=Q.useRef(null),W=Q.useRef(null),ie=Q.useRef(!1);Q.useImperativeHandle(t,function(){return{nativeElement:U.current,inputElement:W.current,focus:function(e){W.current.focus(e)},blur:function(){W.current.blur()}}});var G=Q.useMemo(function(){return new Ml(s||``)},[s]),K=Bl(Q.useMemo(function(){return u?[0,0]:G.getSelection(ee)},[G,ee,u]),2),q=K[0],ae=K[1],oe=function(e){e&&e!==s&&e!==y&&d()},J=ye(function(e){c(e)&&l(e),I(e),oe(e)}),se=function(e){if(!s){var t=e.target.value;oe(t),I(t),l(t)}},Y=function(e){if(ie.current){e.preventDefault();return}var t=e.clipboardData.getData(`text`);c(t)&&J(t)},ce=function(){ie.current=!0},le=function(e){var t=e.target.selectionStart;V(G.getMaskCellIndex(t)),ne({}),C?.(e),ie.current=!1},ue=function(e){N(!0),V(0),z(``),x(e)},de=function(e){S(e)},fe=function(e){N(!1),de(e)};si(r,function(){!r&&!h&&I(y)});var pe=function(e){e.key===`Enter`&&c(re)&&f(),p?.(e)},me=function(e){if(ie.current){e.preventDefault();return}pe(e);var t=e.key,n=null,r=null,i=ae-q,a=s.slice(q,ae),o=function(e){V(function(t){var n=t+e;return n=Math.max(n,0),n=Math.min(n,G.size()-1),n})},c=function(e){var t=Bl(Nl(a),3),n=t[0],r=t[1],i=t[2],o=re.slice(q,ae),s=Number(o);if(isNaN(s))return String(i||(e>0?n:r));var c=s+e,l=r-n+1;return String(n+(l+c-n)%l)};switch(t){case`Backspace`:case`Delete`:n=``,r=a;break;case`ArrowLeft`:n=``,o(-1);break;case`ArrowRight`:n=``,o(1);break;case`ArrowUp`:n=``,r=c(1);break;case`ArrowDown`:n=``,r=c(-1);break;default:isNaN(Number(t))||(n=R+t,r=n);break}n!==null&&(z(n),n.length>=i&&(o(1),z(``))),r!==null&&J((re.slice(0,q)+$t(r,i)+re.slice(ae)).slice(0,s.length)),ne({})},he=Q.useRef();Ke(function(){if(!(!M||!s||ie.current)){if(!G.match(re)){J(s);return}return W.current.setSelectionRange(q,ae),he.current=Qe(function(){W.current.setSelectionRange(q,ae)}),function(){Qe.cancel(he.current)}}},[G,s,M,re,ee,q,ae,te,J]);var ge=s?{onFocus:ue,onBlur:fe,onKeyDown:me,onMouseDown:ce,onMouseUp:le,onPaste:Y}:{};return Q.createElement(`div`,{ref:U,className:b(A,Ll(Ll({},`${A}-active`,r&&a),`${A}-placeholder`,u),n)},Q.createElement(D,Il({ref:W,"aria-invalid":g,autoComplete:`off`},v,{onKeyDown:pe,onBlur:de},ge,{value:re,onChange:se,className:O.input,style:k.input})),Q.createElement(xl,{type:`suffix`,icon:o}),_)}),Yl=`id.prefix.clearIcon.suffixIcon.separator.activeIndex.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.value.onChange.onSubmit.onInputChange.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onActiveInfo.placement.onMouseDown.required.aria-required.autoFocus.tabIndex`.split(`.`),Xl=[`index`];function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function du(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function fu(e,t){var n=e.id,r=e.prefix,i=e.clearIcon,a=e.suffixIcon,o=e.separator,s=o===void 0?`~`:o,c=e.activeIndex;e.activeHelp,e.allHelp;var l=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,f=e.style,p=e.onClick,m=e.onClear,h=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var g=e.disabled,_=e.invalid;e.inputReadOnly;var v=e.direction;e.onOpenChange;var y=e.onActiveInfo;e.placement;var x=e.onMouseDown;e.required,e[`aria-required`];var S=e.autoFocus,C=e.tabIndex,w=uu(e,Yl),T=v===`rtl`,E=Q.useContext(Bt),D=E.prefixCls,O=E.classNames,k=E.styles,A=Q.useMemo(function(){if(typeof n==`string`)return[n];var e=n||{};return[e.start,e.end]},[n]),j=Q.useRef(),M=Q.useRef(),N=Q.useRef(),P=function(e){return[M,N][e]?.current};Q.useImperativeHandle(t,function(){return{nativeElement:j.current,focus:function(e){if(lu(e)===`object`){var t,n=e||{},r=n.index,i=r===void 0?0:r,a=uu(n,Xl);(t=P(i))==null||t.focus(a)}else{var o;(o=P(e??0))==null||o.focus()}},blur:function(){var e,t;(e=P(0))==null||e.blur(),(t=P(1))==null||t.blur()}}});var F=hl(w),I=Q.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),L=ru(pl($l($l({},e),{},{id:A,placeholder:I})),1)[0],R=ru(Q.useState({position:`absolute`,width:0}),2),z=R[0],B=R[1],ee=ye(function(){var e=P(c);if(e){var t=e.nativeElement.getBoundingClientRect(),n=j.current.getBoundingClientRect(),r=t.left-n.left;B(function(e){return $l($l({},e),{},{width:t.width,left:r})}),y([t.left,t.right,n.width])}});Q.useEffect(function(){ee()},[c]);var V=i&&(h[0]&&!g[0]||h[1]&&!g[1]),H=S&&!g[0],te=S&&!H&&!g[1];return Q.createElement(le,{onResize:ee},Q.createElement(`div`,Zl({},F,{className:b(D,`${D}-range`,eu(eu(eu(eu({},`${D}-focused`,l),`${D}-disabled`,g.every(function(e){return e})),`${D}-invalid`,_.some(function(e){return e})),`${D}-rtl`,T),d),style:f,ref:j,onClick:p,onMouseDown:function(e){var t=e.target;t!==M.current.inputElement&&t!==N.current.inputElement&&e.preventDefault(),x?.(e)}}),r&&Q.createElement(`div`,{className:b(`${D}-prefix`,O.prefix),style:k.prefix},r),Q.createElement(Jl,Zl({ref:M},L(0),{className:`${D}-input-start`,autoFocus:H,tabIndex:C,"date-range":`start`})),Q.createElement(`div`,{className:`${D}-range-separator`},s),Q.createElement(Jl,Zl({ref:N},L(1),{className:`${D}-input-end`,autoFocus:te,tabIndex:C,"date-range":`end`})),Q.createElement(`div`,{className:`${D}-active-bar`,style:z}),Q.createElement(xl,{type:`suffix`,icon:a}),V&&Q.createElement(Sl,{icon:i,onClear:m})))}var pu=Q.forwardRef(fu);function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mu(e)}function hu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gu(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0&&q.current.focus({index:n})}le(!0),K?.(e)},$e=function(){ze(null),le(!1,{force:!0})},et=Mu(Q.useState(null),2),tt=et[0],nt=et[1],rt=Mu(Q.useState(null),2),it=rt[0],at=rt[1],ot=Q.useMemo(function(){return it||_e},[_e,it]);Q.useEffect(function(){Y||at(null)},[Y]);var st=Mu(Q.useState([0,0,0]),2),ct=st[0],lt=st[1],ut=function(e,t){p===`hover`&&(at(e),nt(t))},dt=oi(ne,re),ft=function(e){ut(e,`preset`)},pt=function(e){ze(e)&&(xe(`preset-click`),le(!1,{force:!0}))},mt=function(e){Xe(e)},ht=function(e){ut(e?Ye(e,Z):null,`cell`)},gt=function(e){le(!0),De(e)},_t=function(){xe(`panel`)},vt=function(e){me(tn(_e,Z,e)),!g&&!a&&i===Pe&&Xe(e)},yt=function(){le(!1)},bt=pn(W,ie,G,zu(Z)),xt=_e[Z]||null,St=ye(function(e){return c(e,{activeIndex:Z})}),Ct=Q.useMemo(function(){var e=R(r,!1);return he(r,[].concat(Cu(Object.keys(e)),[`onChange`,`onCalendarChange`,`style`,`className`,`onPanelChange`,`disabledTime`,`classNames`,`styles`]))},[r]),wt=Q.createElement(ol,Su({},Ct,{showNow:Ie,showTime:ke,range:!0,multiplePanel:Fe,activeInfo:ct,disabledDate:Be,onFocus:gt,onBlur:Oe,onPanelMouseDown:_t,picker:k,mode:Ne,internalMode:Pe,onPanelChange:Je,format:s,value:xt,isInvalid:St,onChange:null,onSelect:vt,pickerValue:Ge,defaultOpenValue:en(M?.defaultOpenValue)[Z],onPickerValueChange:qe,hoverValue:ot,onHover:ht,needConfirm:g,onSubmit:Xe,onOk:ge,presets:dt,onPresetHover:ft,onPresetSubmit:pt,onNow:mt,cellRender:bt,classNames:oe,styles:J})),Tt=function(e,t){me(Ye(e,t))},Et=function(){xe(`input`)},Dt=function(e,t){var n=we.length,r=we[n-1];if(n&&r!==t&&g&&!y[r]&&!Ee(r)&&_e[r]){q.current.focus({index:r});return}xe(`input`),le(!0,{inherit:!0}),Z!==t&&Y&&!g&&a&&Xe(null,!0),Se(t),De(e,t)},Ot=function(e,t){le(!1),!g&&xe()===`input`&&Re(Z,Ce(_e)===null),Oe(e,t)},kt=function(e,t){e.key===`Tab`&&Xe(null,!0),_?.(e,t)},At=Q.useMemo(function(){return{prefixCls:l,locale:D,generateConfig:O,button:U.button,input:U.input,classNames:oe,styles:J}},[l,D,O,U.button,U.input,oe,J]);return Ke(function(){Y&&Z!==void 0&&Je(null,k,!1)},[Y,Z,k]),Ke(function(){var e=xe();!Y&&e===`input`&&(le(!1),Xe(null,!0)),!Y&&a&&!g&&e===`panel`&&(le(!0),Xe())},[Y]),Q.createElement(Bt.Provider,{value:At},Q.createElement(Kt,Su({},on(r),{popupElement:wt,popupStyle:J.popup.root,popupClassName:b(u,oe.popup.root),visible:Y,onClose:yt,range:!0}),Q.createElement(pu,Su({},r,{ref:q,className:b(r.className,u,oe.root),style:Ou(Ou({},J.root),r.style),suffixIcon:V,activeIndex:ve||Y?Z:null,activeHelp:!!it,allHelp:!!it&&tt===`preset`,focused:ve,onFocus:Dt,onBlur:Ot,onKeyDown:kt,onSubmit:Xe,value:ot,maskFormat:s,onChange:Tt,onInputChange:Et,format:o,inputReadOnly:ee,disabled:v,open:Y,onOpenChange:le,onClick:Qe,onClear:$e,invalid:He,onInvalid:Ue,onActiveInfo:lt}))))}var Vu=Q.forwardRef(Bu);function Hu(e){var t=e.prefixCls,n=e.value,r=e.onRemove,i=e.removeIcon,a=i===void 0?`×`:i,o=e.formatDate,s=e.disabled,c=e.maxTagCount,l=e.tagRender,u=e.placeholder,d=`${t}-selector`,f=`${t}-selection`,p=`${f}-overflow`;function m(e,t){return Q.createElement(`span`,{className:b(`${f}-item`),title:typeof e==`string`?e:null},Q.createElement(`span`,{className:`${f}-item-content`},e),!s&&t&&Q.createElement(`span`,{onMouseDown:function(e){e.preventDefault()},onClick:t,className:`${f}-item-remove`},a))}function h(e){var t=o(e),n=!s,i=function(t){t&&t.stopPropagation(),s||r(e)};return l?l({label:t,value:e,disabled:!!s,closable:n,onClose:i}):m(t,i)}function g(e){return m(`+ ${e.length} ...`)}return Q.createElement(`div`,{className:d},Q.createElement(Me,{prefixCls:p,data:n,renderItem:h,renderRest:g,itemKey:function(e){return o(e)},maxCount:c}),!n.length&&Q.createElement(`span`,{className:`${t}-selection-placeholder`},u))}function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Uu(e)}var Wu=`id.open.prefix.clearIcon.suffixIcon.activeHelp.allHelp.focused.onFocus.onBlur.onKeyDown.locale.generateConfig.placeholder.className.style.onClick.onClear.internalPicker.value.onChange.onSubmit.onInputChange.multiple.maxTagCount.tagRender.format.maskFormat.preserveInvalidOnBlur.onInvalid.disabled.invalid.inputReadOnly.direction.onOpenChange.onMouseDown.required.aria-required.autoFocus.tabIndex.removeIcon`.split(`.`);function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function id(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function ad(e,t){e.id;var n=e.open,r=e.prefix,i=e.clearIcon,a=e.suffixIcon;e.activeHelp,e.allHelp;var o=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,c=e.generateConfig,l=e.placeholder,u=e.className,d=e.style,f=e.onClick,p=e.onClear,m=e.internalPicker,h=e.value,g=e.onChange,_=e.onSubmit;e.onInputChange;var v=e.multiple,y=e.maxTagCount,x=e.tagRender;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var S=e.disabled,C=e.invalid;e.inputReadOnly;var w=e.direction;e.onOpenChange;var T=e.onMouseDown;e.required,e[`aria-required`];var E=e.autoFocus,D=e.tabIndex,O=e.removeIcon,k=rd(e,Wu),A=w===`rtl`,j=Q.useContext(Bt),M=j.prefixCls,N=j.classNames,P=j.styles,F=Q.useRef(),I=Q.useRef();Q.useImperativeHandle(t,function(){return{nativeElement:F.current,focus:function(e){var t;(t=I.current)==null||t.focus(e)},blur:function(){var e;(e=I.current)==null||e.blur()}}});var L=hl(k),R=function(e){g([e])},z=function(e){g(h.filter(function(t){return t&&!cr(c,s,t,e,m)})),n||_()},B=Zu(pl(qu(qu({},e),{},{onChange:R}),function(e){return{value:e.valueTexts[0]||``,active:o}}),2),ee=B[0],V=B[1],H=!!(i&&h.length&&!S),te=v?Q.createElement(Q.Fragment,null,Q.createElement(Hu,{prefixCls:M,value:h,onRemove:z,formatDate:V,maxTagCount:y,tagRender:x,disabled:S,removeIcon:O,placeholder:l}),Q.createElement(`input`,{className:`${M}-multiple-input`,value:h.map(V).join(`,`),ref:I,readOnly:!0,autoFocus:E,tabIndex:D}),Q.createElement(xl,{type:`suffix`,icon:a}),H&&Q.createElement(Sl,{icon:i,onClear:p})):Q.createElement(Jl,Gu({ref:I},ee(),{autoFocus:E,tabIndex:D,suffixIcon:a,clearIcon:H&&Q.createElement(Sl,{icon:i,onClear:p}),showActiveCls:!1}));return Q.createElement(`div`,Gu({},L,{className:b(M,Ju(Ju(Ju(Ju(Ju({},`${M}-multiple`,v),`${M}-focused`,o),`${M}-disabled`,S),`${M}-invalid`,C),`${M}-rtl`,A),u),style:d,ref:F,onClick:f,onMouseDown:function(e){e.target!==I.current?.inputElement&&e.preventDefault(),T?.(e)}}),r&&Q.createElement(`div`,{className:b(`${M}-prefix`,N.prefix),style:P.prefix},r),te)}var od=Q.forwardRef(ad);function sd(e){"@babel/helpers - typeof";return sd=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},sd(e)}function cd(){return cd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n{let{multipleSelectItemHeight:t,paddingXXS:n,lineWidth:r,INTERNAL_FIXED_ITEM_MARGIN:i}=e,a=e.max(e.calc(n).sub(r).equal(),0);return{basePadding:a,containerPadding:e.max(e.calc(a).sub(i).equal(),0),itemHeight:N(t),itemLineHeight:N(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},Dd=e=>{let{componentCls:t,iconCls:n,borderRadiusSM:r,motionDurationSlow:i,paddingXS:a,multipleItemColorDisabled:o,multipleItemBorderColorDisabled:s,colorIcon:c,colorIconHover:l,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:`relative`,display:`flex`,flex:`auto`,flexWrap:`wrap`,maxWidth:`100%`,"&-item":{flex:`none`,alignSelf:`center`,maxWidth:`calc(100% - 4px)`,display:`inline-flex`},[`${t}-selection-item`]:{display:`flex`,alignSelf:`center`,flex:`none`,boxSizing:`border-box`,maxWidth:`100%`,marginBlock:u,borderRadius:r,cursor:`default`,transition:[`font-size`,`line-height`,`height`].map(e=>`${e} ${i}`).join(`, `),marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:o,borderColor:s,cursor:`not-allowed`},"&-content":{display:`inline-block`,marginInlineEnd:e.calc(a).div(2).equal(),overflow:`hidden`,whiteSpace:`pre`,textOverflow:`ellipsis`},"&-remove":{...ct(),display:`inline-flex`,alignItems:`center`,color:c,fontWeight:`bold`,fontSize:10,lineHeight:`inherit`,cursor:`pointer`,[`> ${n}`]:{verticalAlign:`-0.2em`},"&:hover":{color:l}}}}}},Od=(e,t)=>{let{componentCls:n,controlHeight:r}=e,i=t?`${n}-${t}`:``,a=Ed(e);return[{[`${n}-multiple${i}`]:{paddingBlock:a.containerPadding,paddingInlineStart:a.basePadding,minHeight:r,[`${n}-selection-item`]:{height:a.itemHeight,lineHeight:N(a.itemLineHeight)}}}]},kd=e=>{let{componentCls:t,calc:n,lineWidth:r}=e,i=M(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),a=M(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[Od(i,`small`),Od(e),Od(a,`large`),{[`${t}${t}-multiple`]:{width:`100%`,cursor:`text`,[`${t}-selector`]:{flex:`auto`,padding:0,position:`relative`,"&:after":{margin:0},[`${t}-selection-placeholder`]:{position:`absolute`,top:`50%`,insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:`translateY(-50%)`,transition:`all ${e.motionDurationSlow}`,flex:1,color:e.colorTextPlaceholder,pointerEvents:`none`,...ht}},...Dd(e),[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:`hidden`,position:`absolute`,zIndex:-1}}}]},Ad=e=>{let{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:i,motionDurationMid:a,cellHoverBg:o,lineWidth:s,lineType:c,colorPrimary:l,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:f,cellBgDisabled:p,colorFillSecondary:m}=e;return{"&::before":{position:`absolute`,top:`50%`,insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:`translateY(-50%)`,content:`""`,pointerEvents:`none`},[n]:{position:`relative`,zIndex:2,display:`inline-block`,minWidth:r,height:r,lineHeight:N(r),borderRadius:i,transition:`background-color ${a}`},[`&:hover:not(${t}-in-view):not(${t}-disabled), + &:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:o}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:`absolute`,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${N(s)} ${c} ${l}`,borderRadius:i,content:`""`}},[`&-in-view${t}-in-range, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{position:`relative`,[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected, + &-in-view${t}-range-start, + &-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:l},[`&${t}-disabled ${n}`]:{background:m}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:`50%`},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:`50%`},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:i,borderEndStartRadius:i,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i},"&-disabled":{color:f,cursor:`not-allowed`,[n]:{background:`transparent`},"&::before":{background:p}},[`&-disabled${t}-today ${n}::before`]:{borderColor:f}}},jd=e=>{let{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:i,pickerControlIconSize:a,cellWidth:o,paddingSM:s,paddingXS:c,paddingXXS:l,colorBgContainer:u,lineWidth:d,lineType:f,borderRadiusLG:p,colorPrimary:m,colorTextHeading:h,colorSplit:g,pickerControlIconBorderWidth:_,colorIcon:v,textHeight:y,motionDurationMid:b,colorIconHover:x,fontWeightStrong:S,cellHeight:C,pickerCellPaddingVertical:T,colorTextDisabled:E,colorText:D,fontSize:O,motionDurationSlow:k,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:j,borderRadiusSM:M,colorTextLightSolid:P,cellHoverBg:F,timeColumnHeight:I,timeColumnWidth:L,timeCellHeight:R,controlItemBgActive:z,marginXXS:B,pickerDatePanelPaddingHorizontal:ee,pickerControlIconMargin:V}=e,H=e.calc(o).mul(7).add(e.calc(ee).mul(2)).equal();return{[t]:{"&-panel":{display:`inline-flex`,flexDirection:`column`,textAlign:`center`,background:u,borderRadius:p,outline:`none`,"&-focused":{borderColor:m},"&-rtl":{[`${t}-prev-icon, + ${t}-super-prev-icon`]:{transform:`rotate(45deg)`},[`${t}-next-icon, + ${t}-super-next-icon`]:{transform:`rotate(-135deg)`},[`${t}-time-panel`]:{[`${t}-content`]:{direction:`ltr`,"> *":{direction:`rtl`}}}}},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel, &-week-panel, &-date-panel, &-time-panel":{display:`flex`,flexDirection:`column`,width:H},"&-header":{display:`flex`,padding:`0 ${N(c)}`,color:h,borderBottom:`${N(d)} ${f} ${g}`,"> *":{flex:`none`},button:{padding:0,color:v,lineHeight:N(y),background:`transparent`,border:0,cursor:`pointer`,transition:`color ${b}`,fontSize:`inherit`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,"&:empty":{display:`none`}},"> button":{minWidth:`1.6em`,fontSize:O,"&:hover":{color:x},"&:disabled":{opacity:.25,pointerEvents:`none`}},"&-view":{flex:`auto`,fontWeight:S,lineHeight:N(y),"> button":{color:`inherit`,fontWeight:`inherit`,verticalAlign:`top`,"&:not(:first-child)":{marginInlineStart:c},"&:hover":{color:m}}}},"&-prev-icon, &-next-icon, &-super-prev-icon, &-super-next-icon":{position:`relative`,width:a,height:a,"&::before":{position:`absolute`,top:0,insetInlineStart:0,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-super-prev-icon, &-super-next-icon":{"&::after":{position:`absolute`,top:V,insetInlineStart:V,display:`inline-block`,width:a,height:a,border:`0 solid currentcolor`,borderBlockStartWidth:_,borderInlineStartWidth:_,content:`""`}},"&-prev-icon, &-super-prev-icon":{transform:`rotate(-45deg)`},"&-next-icon, &-super-next-icon":{transform:`rotate(135deg)`},"&-content":{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`,"th, td":{position:`relative`,minWidth:C,fontWeight:`normal`},th:{height:e.calc(C).add(e.calc(T).mul(2)).equal(),color:D,verticalAlign:`middle`}},"&-cell":{padding:`${N(T)} 0`,color:E,cursor:`pointer`,"&-in-view":{color:D},...Ad(e)},"&-decade-panel, &-year-panel, &-quarter-panel, &-month-panel":{[`${t}-content`]:{height:e.calc(A).mul(4).equal()},[r]:{padding:`0 ${N(c)}`}},"&-quarter-panel":{[`${t}-content`]:{height:j}},"&-decade-panel":{[r]:{padding:`0 ${N(e.calc(c).div(2).equal())}`},[`${t}-cell::before`]:{display:`none`}},"&-year-panel, &-quarter-panel, &-month-panel":{[`${t}-body`]:{padding:`0 ${N(c)}`},[r]:{width:i}},"&-date-panel":{[`${t}-body`]:{padding:`${N(c)} ${N(ee)}`},[`${t}-content th`]:{boxSizing:`border-box`,padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background-color ${b}`},"&:first-child:before":{borderStartStartRadius:M,borderEndStartRadius:M},"&:last-child:before":{borderStartEndRadius:M,borderEndEndRadius:M}},"&:hover td:before":{background:F},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:m},[`&${t}-cell-week`]:{color:new w(P).setA(.5).toHexString()},[r]:{color:P}}},"&-range-hover td:before":{background:z}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${N(c)} ${N(s)}`},[`${t}-content th`]:{width:`auto`}},"&-datetime-panel":{display:`flex`,[`${t}-time-panel`]:{borderInlineStart:`${N(d)} ${f} ${g}`},[`${t}-date-panel, + ${t}-time-panel`]:{transition:`opacity ${k}`},"&-active":{[`${t}-date-panel, + ${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:`auto`,minWidth:`auto`,[`${t}-content`]:{display:`flex`,flex:`auto`,height:I},"&-column":{flex:`1 0 auto`,width:L,margin:`${N(l)} 0`,padding:0,overflowY:`auto`,textAlign:`start`,listStyle:`none`,transition:`background-color ${b}`,overflowX:`hidden`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:`block`,height:`calc(100% - ${N(R)})`,content:`""`},"&:not(:first-child)":{borderInlineStart:`${N(d)} ${f} ${g}`},"&-active":{background:new w(z).setA(.2).toHexString()},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:B,[`${t}-time-panel-cell-inner`]:{display:`block`,width:e.calc(L).sub(e.calc(B).mul(2)).equal(),height:R,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(L).sub(R).div(2).equal(),color:D,lineHeight:N(R),borderRadius:M,cursor:`pointer`,transition:`background-color ${b}`,"&:hover":{background:F}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:z}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:E,background:`transparent`,cursor:`not-allowed`}}}}}}}}},Md=e=>{let{componentCls:t,textHeight:n,lineWidth:r,paddingSM:i,antCls:a,colorPrimary:o,cellActiveWithRangeBg:s,colorPrimaryBorder:c,lineType:l,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${N(r)} ${l} ${u}`,"&-extra":{padding:`0 ${N(i)}`,lineHeight:N(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:`start`,"&:not(:last-child)":{borderBottom:`${N(r)} ${l} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:`space-between`},[`${t}-ranges`]:{marginBlock:0,paddingInline:N(i),overflow:`hidden`,textAlign:`start`,listStyle:`none`,display:`flex`,justifyContent:`center`,alignItems:`center`,"> li":{lineHeight:N(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:`inline-block`},[`${t}-now-btn-disabled`]:{pointerEvents:`none`,color:e.colorTextDisabled},[`${t}-preset > ${a}-tag-blue`]:{color:o,background:s,borderColor:c,cursor:`pointer`},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:`auto`}}}}},Nd=e=>{let{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:i}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(i).add(e.calc(r).div(2)).equal()}},Pd=e=>{let{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:i,paddingXXS:a,lineWidth:o}=e,s=a*2,c=o*2,l=Math.min(n-s,n-c),u=Math.min(r-s,r-c),d=Math.min(i-s,i-c);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new w(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new w(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:i*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:i,withoutTimeCellHeight:i*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:`transparent`,multipleItemHeight:l,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:`transparent`}},Fd=e=>({...st(e),...Pd(e),...G(e),presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),Id=e=>{let{componentCls:t}=e;return{[t]:[{...De(e),...We(e),...rt(e),...Se(e)},{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${N(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${N(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${N(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Ld=(e,t)=>({padding:`${N(e)} ${N(t)}`}),Rd=e=>{let{componentCls:t,colorError:n,colorWarning:r}=e,[i]=ot(e.antCls,`date-picker`);return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[i(`affix-color`)]:e.colorErrorAffix,[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[i(`affix-color`)]:e.colorWarningAffix,[`${t}-active-bar`]:{background:r}}}}},zd=e=>{let{componentCls:t,antCls:n,paddingInline:r,lineWidth:i,lineType:a,colorBorder:o,borderRadius:s,motionDurationMid:c,colorTextDisabled:l,colorTextPlaceholder:u,colorTextQuaternary:d,fontSizeLG:f,inputFontSizeLG:p,fontSizeSM:m,inputFontSizeSM:h,controlHeightSM:g,paddingInlineSM:_,paddingXS:v,marginXS:y,colorIcon:b,lineWidthBold:x,colorPrimary:S,motionDurationSlow:C,zIndexPopup:w,paddingXXS:T,sizePopupArrow:E,colorBgElevated:D,borderRadiusLG:O,boxShadowSecondary:k,borderRadiusSM:A,colorSplit:j,cellHoverBg:M,presetsWidth:P,presetsMaxWidth:F,boxShadowPopoverArrow:I,fontHeight:L,lineHeightLG:R}=e,[z,B]=ot(n,`date-picker`);return[{[t]:{[z(`affix-color`)]:`inherit`,...be(e),...Ld(e.paddingBlock,e.paddingInline),position:`relative`,display:`inline-flex`,alignItems:`center`,lineHeight:1,borderRadius:s,transition:[`border`,`box-shadow`,`background-color`].map(e=>`${e} ${c}`).join(`, `),[`${t}-prefix`]:{color:B(`affix-color`),flex:`0 0 auto`,marginInlineEnd:e.inputAffixPadding},[`${t}-input`]:{position:`relative`,display:`inline-flex`,alignItems:`center`,width:`100%`,"> input":{position:`relative`,display:`inline-block`,width:`100%`,color:`inherit`,fontSize:e.inputFontSize??e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`,...tt(u),flex:`auto`,minWidth:1,height:`auto`,padding:0,background:`transparent`,border:0,fontFamily:`inherit`,"&:focus":{boxShadow:`none`,outline:0},"&[disabled]":{background:`transparent`,color:l,cursor:`not-allowed`}},"&-placeholder":{"> input":{color:u}}},"&-large":{...Ld(e.paddingBlockLG,e.paddingInlineLG),borderRadius:e.borderRadiusLG,[`${t}-input > input`]:{fontSize:p??f,lineHeight:R}},"&-small":{...Ld(e.paddingBlockSM,e.paddingInlineSM),borderRadius:e.borderRadiusSM,[`${t}-input > input`]:{fontSize:h??m}},[`${t}-suffix`]:{display:`flex`,flex:`none`,alignSelf:`center`,marginInlineStart:e.calc(v).div(2).equal(),color:d,lineHeight:1,pointerEvents:`none`,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`,"&:not(:last-child)":{marginInlineEnd:y}}},[`${t}-clear`]:{position:`absolute`,top:`50%`,insetInlineEnd:0,color:d,lineHeight:1,transform:`translateY(-50%)`,cursor:`pointer`,opacity:0,transition:[`opacity`,`color`].map(e=>`${e} ${c}`).join(`, `),"> *":{verticalAlign:`top`},"&:hover":{color:b}},"&:hover":{[`${t}-clear`]:{opacity:1},[`${t}-suffix:not(:last-child)`]:{opacity:0}},[`${t}-separator`]:{position:`relative`,display:`inline-block`,width:`1em`,height:f,color:d,fontSize:f,verticalAlign:`top`,cursor:`default`,[`${t}-focused &`]:{color:b},[`${t}-range-separator &`]:{[`${t}-disabled &`]:{cursor:`not-allowed`}}},"&-range":{position:`relative`,display:`inline-flex`,[`${t}-active-bar`]:{bottom:e.calc(i).mul(-1).equal(),height:x,background:S,opacity:0,transition:`all ${C} ease-out`,pointerEvents:`none`},[`&${t}-focused`]:{[`${t}-active-bar`]:{opacity:1}},[`${t}-range-separator`]:{alignItems:`center`,padding:`0 ${N(v)}`,lineHeight:1}},"&-range, &-multiple":{[`${t}-clear`]:{insetInlineEnd:r},[`&${t}-small`]:{[`${t}-clear`]:{insetInlineEnd:_}}},"&-dropdown":{...be(e),...jd(e),pointerEvents:`none`,position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:w,[`&${t}-dropdown-hidden`]:{display:`none`},"&-rtl":{direction:`rtl`},[`&${t}-dropdown-placement-bottomLeft, + &${t}-dropdown-placement-bottomRight`]:{[`${t}-range-arrow`]:{top:0,display:`block`,transform:`translateY(-100%)`}},[`&${t}-dropdown-placement-topLeft, + &${t}-dropdown-placement-topRight`]:{[`${t}-range-arrow`]:{bottom:0,display:`block`,transform:`translateY(100%) rotate(180deg)`}},[`&${n}-slide-up-appear, &${n}-slide-up-enter`]:{[`${t}-range-arrow${t}-range-arrow`]:{transition:`none`}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-topRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-topRight`]:{animationName:ze},[`&${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-enter${n}-slide-up-enter-active${t}-dropdown-placement-bottomRight, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${t}-dropdown-placement-bottomRight`]:{animationName:xe},[`&${n}-slide-up-leave ${t}-panel-container`]:{pointerEvents:`none`},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-topRight`]:{animationName:Ie},[`&${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${t}-dropdown-placement-bottomRight`]:{animationName:lt},[`${t}-panel > ${t}-time-panel`]:{paddingTop:T},[`${t}-range-wrapper`]:{display:`flex`,position:`relative`},[`${t}-range-arrow`]:{position:`absolute`,zIndex:1,display:`none`,paddingInline:e.calc(r).mul(1.5).equal(),boxSizing:`content-box`,transition:`all ${C} ease-out`,...ie(e,D,I),"&:before":{insetInlineStart:e.calc(r).mul(1.5).equal()}},[`${t}-panel-container`]:{overflow:`hidden`,verticalAlign:`top`,background:D,borderRadius:O,boxShadow:k,transition:`margin ${C}`,display:`inline-block`,pointerEvents:`auto`,[`${t}-panel-layout`]:{display:`flex`,flexWrap:`nowrap`,alignItems:`stretch`},[`${t}-presets`]:{display:`flex`,flexDirection:`column`,minWidth:P,maxWidth:F,ul:{height:0,flex:`auto`,listStyle:`none`,overflow:`auto`,margin:0,padding:v,borderInlineEnd:`${N(i)} ${a} ${j}`,li:{...ht,borderRadius:A,paddingInline:v,paddingBlock:e.calc(g).sub(L).div(2).equal(),cursor:`pointer`,transition:`all ${C}`,"+ li":{marginTop:y},"&:hover":{background:M}}}},[`${t}-panels`]:{display:`inline-flex`,flexWrap:`nowrap`,"&:last-child":{[`${t}-panel`]:{borderWidth:0}}},[`${t}-panel`]:{verticalAlign:`top`,background:`transparent`,borderRadius:0,borderWidth:0,[`${t}-content, table`]:{textAlign:`center`},"&-focused":{borderColor:o}}}},"&-dropdown-range":{padding:`${N(e.calc(E).mul(2).div(3).equal())} 0`,"&-hidden":{display:`none`}},"&-rtl":{direction:`rtl`,[`${t}-separator`]:{transform:`scale(-1, 1)`},[`${t}-footer`]:{"&-extra":{direction:`rtl`}}}}},qe(e,`slide-up`),qe(e,`slide-down`),gt(e,`move-up`),gt(e,`move-down`)]},Bd=ke(`DatePicker`,e=>{let t=M(Ae(e),Nd(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Md(t),zd(t),Id(t),Rd(t),kd(t),Ge(e,{focusElCls:`${e.componentCls}-focused`})]},Fd),Vd=Q.createContext({}),Hd=`__rc_cascader_search_mark__`,Ud=(e,t,{label:n=``})=>t.some(t=>String(t[n]).toLowerCase().includes(e.toLowerCase())),Wd=(e,t,n,r)=>t.map(e=>e[r.label]).join(` / `),Gd=(e,t,n,r,i,a)=>{let{filter:o=Ud,render:s=Wd,limit:c=50,sort:l}=i;return Q.useMemo(()=>{let i=[];if(!e)return[];function u(t,d,f=!1){t.forEach(t=>{if(!l&&c!==!1&&c>0&&i.length>=c)return;let p=[...d,t],m=t[n.children],h=f||t.disabled;(!m||m.length===0||a)&&o(e,p,{label:n.label})&&i.push({...t,disabled:h,[n.label]:s(e,p,r,n),[Hd]:p,[n.children]:void 0}),m&&u(t[n.children],p,h)})}return u(t,[]),l&&i.sort((t,r)=>l(t[Hd],r[Hd],e,n)),c!==!1&&c>0?i.slice(0,c):i},[e,t,n,r,s,a,o,l,c])},Kd=`__RC_CASCADER_SPLIT__`,qd=`SHOW_PARENT`,Jd=`SHOW_CHILD`;function Yd(e){return e.join(Kd)}function Xd(e){return e.map(Yd)}function Zd(e){return e.split(Kd)}function Qd(e){let{label:t,value:n,children:r}=e||{},i=n||`value`;return{label:t||`label`,value:i,key:i,children:r||`children`}}function $d(e,t){return e.isLeaf??!e[t.children]?.length}function ef(e){let t=e.parentElement;if(!t)return;let n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}function tf(e,t){return e.map(e=>e[Hd]?.map(e=>e[t.value]))}function nf(e){return Array.isArray(e)&&Array.isArray(e[0])}function rf(e){return e?nf(e)?e:(e.length===0?[]:[e]).map(e=>Array.isArray(e)?e:[e]):[]}function af(e,t,n){let r=new Set(e),i=t();return e.filter(e=>{let t=i[e],a=t?t.parent:null,o=t?t.children:null;return t&&t.node.disabled?!0:n===`SHOW_CHILD`?!(o&&o.some(e=>e.key&&r.has(e.key))):!(a&&!a.node.disabled&&r.has(a.key))})}function of(e,t,n,r=!1){let i=t,a=[];for(let t=0;t{let t=e[n.value];return r?String(t)===String(o):t===o}),c=s===-1?null:i?.[s];a.push({value:c?.[n.value]??o,index:s,option:c}),i=c?.[n.children]}return a}var sf=((e,t,n,r,i)=>Q.useMemo(()=>{let a=i||(e=>{let t=r?e.slice(-1):e;return t.every(e=>[`string`,`number`].includes(typeof e))?t.join(` / `):t.reduce((e,t,n)=>{let r=Q.isValidElement(t)?Q.cloneElement(t,{key:n}):t;return n===0?[r]:[...e,` / `,r]},[])});return e.map(e=>{let r=of(e,t,n),i=a(r.map(({option:e,value:t})=>e?.[n.label]??t),r.map(({option:e})=>e)),o=Yd(e);return{label:i,value:o,key:o,valueCells:e,disabled:r[r.length-1]?.option?.disabled}})},[e,t,n,i,r]));function cf(e,t){return Q.useCallback(n=>{let r=[],i=[];return n.forEach(n=>{of(n,e,t).every(e=>e.option)?i.push(n):r.push(n)}),[i,r]},[e,t])}var lf=((e,t)=>{let n=Q.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return Q.useCallback(()=>(n.current.options!==e&&(n.current.options=e,n.current.info=a(e,{fieldNames:t,initWrapper:e=>({...e,pathKeyEntities:{}}),processEntity:(e,n)=>{let r=e.nodes.map(e=>e[t.value]).join(Kd);n.pathKeyEntities[r]=e,e.key=r}})),n.current.info.pathKeyEntities),[t,e])});function uf(e,t){let n=Q.useMemo(()=>t||[],[t]),r=lf(n,e);return[n,r,Q.useCallback(t=>{let n=r();return t.map(t=>{let{nodes:r}=n[t];return r.map(t=>t[e.value])})},[r,e])]}function df(e,t){let{autoClearSearchValue:n,searchValue:r,onSearch:i}=t;return Q.useMemo(()=>{if(!e)return[!1,{}];let t={matchInputWidth:!0,limit:50,autoClearSearchValue:n,searchValue:r,onSearch:i};return e&&typeof e==`object`&&(t={...t,...e}),t.limit<=0&&(t.limit=!1),[!0,t]},[e,n,r,i])}function ff(e,t,n,r,i,a,o,s){return l=>{if(!e)t(l);else{let e=Yd(l),u=Xd(n),d=Xd(r),f=u.includes(e),p=i.some(t=>Yd(t)===e),m=n,h=i;if(p&&!f)h=i.filter(t=>Yd(t)!==e);else{let t=f?u.filter(t=>t!==e):[...u,e],n=a(),r;f?{checkedKeys:r}=c(t,{checked:!1,halfCheckedKeys:d},n):{checkedKeys:r}=c(t,!0,n),m=o(af(r,a,s))}t([...h,...m])}}}function pf(e,t,n,r,i){return Q.useMemo(()=>{let[a,o]=i(t);if(!e||!t.length)return[a,[],o];let{checkedKeys:s,halfCheckedKeys:l}=c(Xd(a),!0,n());return[r(s),r(l),o]},[e,t,n,r,i])}function mf({prefixCls:e,checked:t,halfChecked:n,disabled:r,onClick:i,disableCheckbox:a}){let{checkable:o}=Q.useContext(Vd),s=typeof o==`boolean`?null:o;return Q.createElement(`span`,{className:b(`${e}`,{[`${e}-checked`]:t,[`${e}-indeterminate`]:!t&&n,[`${e}-disabled`]:r||a}),onClick:i},s)}function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;tf||e,O=Q.useMemo(()=>n.map(e=>{let{disabled:t,disableCheckbox:n}=e,r=e[Hd],a=e.__cascader_fix_label__??e[g.label],o=e[g.value],s=$d(e,g),d=r?r.map(e=>e[g.value]):[...i,o],f=Yd(d);return{disabled:t,label:a,value:o,isLeaf:s,isLoading:u.includes(f),checked:c.has(f),halfChecked:l.has(f),option:e,disableCheckbox:n,fullPath:d,fullPathKey:f}}),[n,c,g,l,u,i]);return Q.useEffect(()=>{if(h.current){let e=`.${m}-active`,t=h.current.querySelector(e);t&&ef(t)}},[r,m]),Q.createElement(`ul`,{className:b(p,w?.popup?.list),style:T?.popup?.list,ref:h,role:`menu`},O.map(({disabled:n,label:i,value:c,isLeaf:l,isLoading:u,checked:f,halfChecked:p,option:h,fullPath:g,fullPathKey:v,disableCheckbox:O})=>{let k=R(h,{aria:!0,data:!0}),A=()=>{if(D(n))return;let e=[...g];E&&l&&e.pop(),s(e)},j=()=>{d(h)&&!D(n)&&o(g,l)},M;return typeof h.title==`string`?M=h.title:typeof i==`string`&&(M=i),Q.createElement(`li`,hf({key:v},k,{className:b(m,w?.popup?.listItem,{[`${m}-expand`]:!l,[`${m}-active`]:r===c||r===v,[`${m}-disabled`]:D(n),[`${m}-loading`]:u}),style:{...S,...T?.popup?.listItem},role:`menuitemcheckbox`,title:M,"aria-checked":f,"data-path-key":v,onClick:()=>{A(),!O&&(!t||l)&&j()},onDoubleClick:()=>{_&&a(!1)},onMouseEnter:()=>{E&&A()},onMouseDown:e=>{e.preventDefault()}}),t&&Q.createElement(mf,{prefixCls:`${e}-checkbox`,checked:f,halfChecked:p,disabled:D(n)||O,disableCheckbox:O,onClick:e=>{O||(e.stopPropagation(),j())}}),Q.createElement(`div`,{className:`${m}-content`},C&&c!==`__EMPTY__`?C(h):i),!u&&y&&!l&&Q.createElement(`div`,{className:`${m}-expand-icon`},y),u&&x&&Q.createElement(`div`,{className:`${m}-loading-icon`},x))}))}var vf=(e,t)=>{let{values:n}=Q.useContext(Vd),r=n[0],[i,a]=Q.useState([]);return Q.useEffect(()=>{e||a(r||[])},[t,r]),[i,a]},yf=((e,t,n,r,i,a,o)=>{let{direction:s,searchValue:c,toggleOpen:l,open:u}=o,d=s===`rtl`,[f,p,m,h]=Q.useMemo(()=>{let e=-1,i=t,a=[],o=[],s=r.length,c=tf(t,n);for(let t=0;t(c[i]?Yd(c[i]):e[n.value])===r[t]);if(s===-1)break;e=s,a.push(e),o.push(r[t]),i=i[e][n.children]}let l=t;for(let e=0;e{i(e)},_=e=>{let t=m.length,r=p;r===-1&&e<0&&(r=t);for(let i=0;i{f.length>1?g(f.slice(0,-1)):l(!1)},y=()=>{let e=(m[p]?.[n.children]||[]).find(e=>!e.disabled);e&&g([...f,e[n.value]])};Q.useImperativeHandle(e,()=>({onKeyDown:e=>{let{which:t}=e;switch(t){case Je.UP:case Je.DOWN:{let e=0;t===Je.UP?e=-1:t===Je.DOWN&&(e=1),e!==0&&_(e);break}case Je.LEFT:if(c)break;d?y():v();break;case Je.RIGHT:if(c)break;d?v():y();break;case Je.BACKSPACE:c||v();break;case Je.ENTER:if(f.length){let e=m[p]?.__rc_cascader_search_mark__||[];e.length?a(e.map(e=>e[n.value]),e[e.length-1]):a(f,m[p])}break;case Je.ESC:l(!1),u&&e.stopPropagation()}},onKeyUp:()=>{}}))});function bf(){return bf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:n,multiple:r,searchValue:i,toggleOpen:a,notFoundContent:o,direction:s,open:c,disabled:l,lockOptions:u=!1}=e,d=Q.useRef(null),f=s===`rtl`,{options:p,values:m,halfValues:h,fieldNames:g,changeOnSelect:_,onSelect:v,searchOptions:y,popupPrefixCls:x,loadData:S,expandTrigger:C}=Q.useContext(Vd),w=x||n,[T,E]=Q.useState([]),D=e=>{if(!S||i)return;let t=of(e,p,g).map(({option:e})=>e),n=t[t.length-1];if(n&&!$d(n,g)){let n=Yd(e);E(e=>[...e,n]),S(t)}};Q.useEffect(()=>{T.length&&T.forEach(e=>{let t=of(Zd(e),p,g,!0).map(({option:e})=>e),n=t[t.length-1];(!n||n[g.children]||$d(n,g))&&E(t=>t.filter(t=>t!==e))})},[p,T,g]);let O=Q.useMemo(()=>new Set(Xd(m)),[m]),k=Q.useMemo(()=>new Set(Xd(h)),[h]),[A,j]=vf(r,c),M=e=>{j(e),D(e)},N=e=>{if(l)return!1;let{disabled:t}=e,n=$d(e,g);return!t&&(n||_||r)},P=(e,t,n=!1)=>{v(e),!r&&(t||_&&(C===`hover`||n))&&a(!1)},F=Q.useMemo(()=>i?y:p,[i,y,p]),I=at(()=>F,[c,u],(e,t)=>!!t[0]&&!t[1]),L=Q.useMemo(()=>{let e=[{options:I}],t=I,n=tf(t,g);for(let r=0;r(n[t]?Yd(n[t]):e[g.value])===i)?.[g.children];if(!a?.length)break;t=a,e.push({options:a})}return e},[I,A,g]);yf(t,I,g,A,M,(e,t)=>{N(t)&&P(e,$d(t,g),!0)},{direction:s,searchValue:i,toggleOpen:a,open:c}),Q.useEffect(()=>{if(!i)for(let e=0;e{let n=A.slice(0,t),r=A[t];return Q.createElement(_f,bf({key:t},B,{prefixCls:w,options:e.options,prevValuePath:n,activeValue:r}))});return Q.createElement(`div`,{className:b(`${w}-menus`,{[`${w}-menu-empty`]:R,[`${w}-rtl`]:f}),ref:d},ee)});function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{lockOptions:n,...r}=it();return Q.createElement(xf,Sf({},e,r,{lockOptions:n,ref:t}))});function wf(){}function Tf(e){let{prefixCls:t=`rc-cascader`,style:n,className:r,options:i,checkable:a,defaultValue:o,value:s,fieldNames:c,changeOnSelect:l,onChange:u,showCheckedStrategy:d,loadData:f,expandTrigger:p,expandIcon:m=`>`,loadingIcon:h,direction:g,notFoundContent:_=`Not Found`,disabled:v,optionRender:y}=e,x=!!a,[S,C]=Ze(o,s),w=rf(S),T=Q.useMemo(()=>Qd(c),[JSON.stringify(c)]),[E,D,O]=uf(T,i),[k,A,j]=pf(x,w,D,O,cf(E,T)),M=ff(x,ye(e=>{if(C(e),u){let t=rf(e),n=t.map(e=>of(e,E,T).map(e=>e.option));u(x?t:t[0],x?n:n[0])}}),k,A,j,D,O,d),N=ye(e=>{M(e)}),P=Q.useMemo(()=>({options:E,fieldNames:T,values:k,halfValues:A,changeOnSelect:l,onSelect:N,checkable:a,searchOptions:[],popupPrefixCls:void 0,loadData:f,expandTrigger:p,expandIcon:m,loadingIcon:h,popupMenuColumnStyle:void 0,optionRender:y}),[E,T,k,A,l,N,a,f,p,m,h,y]),F=`${t}-panel`,I=!E.length;return Q.createElement(Vd.Provider,{value:P},Q.createElement(`div`,{className:b(F,{[`${F}-rtl`]:g===`rtl`,[`${F}-empty`]:I},r),style:n},I?_:Q.createElement(xf,{prefixCls:t,searchValue:``,multiple:x,toggleOpen:wf,open:!0,direction:g,disabled:v})))}function Ef(){return Ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-cascader`,fieldNames:i,defaultValue:a,value:o,changeOnSelect:s,onChange:c,displayRender:l,checkable:u,showSearch:d,expandTrigger:f,options:p,popupPrefixCls:m,loadData:h,open:g,popupClassName:v,popupMenuColumnStyle:y,popupStyle:b,classNames:x,styles:S,placement:C,onPopupVisibleChange:w,expandIcon:T=`>`,loadingIcon:E,children:D,popupMatchSelectWidth:O=!1,showCheckedStrategy:k=qd,optionRender:A,...j}=e,M=Ne(n),N=!!u,[P,F]=Ze(a,o),I=rf(P),L=Q.useMemo(()=>Qd(i),[JSON.stringify(i)]),[R,z,B]=uf(L,p),[ee,V]=df(d,e),{autoClearSearchValue:H=!0,searchValue:te,onSearch:ne}=V,[re,U]=Ze(``,te),W=re||``,ie=(e,t)=>{U(e),t.source!==`blur`&&ne&&ne(e)},G=Gd(W,R,L,m||r,V,s||N),[K,q,ae]=pf(N,I,z,B,cf(R,L)),oe=sf(Q.useMemo(()=>{let e=af(Xd(K),z,k);return[...ae,...B(e)]},[K,z,B,ae,k]),R,L,N,l),J=ye(e=>{if(F(e),c){let t=rf(e),n=t.map(e=>of(e,R,L).map(e=>e.option));c(N?t:t[0],N?n:n[0])}}),se=ff(N,J,K,q,ae,z,B,k),Y=ye(e=>{(!N||H)&&U(``),se(e)}),ce=(e,t)=>{if(t.type===`clear`){J([]);return}let{valueCells:n}=t.values[0];Y(n)},le=e=>{w?.(e)},ue=Q.useMemo(()=>({classNames:x,styles:S,options:R,fieldNames:L,values:K,halfValues:q,changeOnSelect:s,onSelect:Y,checkable:u,searchOptions:G,popupPrefixCls:m,loadData:h,expandTrigger:f,expandIcon:T,loadingIcon:E,popupMenuColumnStyle:y,optionRender:A}),[x,S,R,L,K,q,s,Y,u,G,m,h,f,T,E,y,A]),de=!(W?G:R).length,fe=W&&V.matchInputWidth||de?{}:{minWidth:`auto`};return Q.createElement(Vd.Provider,{value:ue},Q.createElement(_,Ef({},j,{ref:t,id:M,prefixCls:r,autoClearSearchValue:H,popupMatchSelectWidth:O,classNames:x,styles:S,popupStyle:{...fe,...b},displayValues:oe,onDisplayValuesChange:ce,mode:N?`multiple`:void 0,searchValue:W,onSearch:ie,showSearch:ee,OptionList:Cf,emptyOptions:de,open:g,popupClassName:v,placement:C,onPopupVisibleChange:le,getRawInputElement:()=>D})))});Df.SHOW_PARENT=qd,Df.SHOW_CHILD=Jd,Df.Panel=Tf;var Of=Df;function kf(e,t){let{getPrefixCls:n,direction:r,renderEmpty:i}=Q.useContext(re),a=t||r;return[n(`select`,e),n(`cascader`,e),a,i]}function Af(e,t){return Q.useMemo(()=>t?Q.createElement(`span`,{className:`${e}-checkbox-inner`}):!1,[e,t])}var jf=Q.createElement(U,{spin:!0}),Mf=Q.createElement(Pe,null),Nf=Q.createElement(T,null);function Pf({contextExpandIcon:e,contextLoadingIcon:t,expandIcon:n,loadingIcon:r,isRtl:i}){return Q.useMemo(()=>({expandIcon:n??e??(i?Nf:Mf),loadingIcon:r??t??jf}),[e,t,n,i,r])}var Ff=e=>{let{prefixCls:t,componentCls:n}=e,r=`${n}-menu-item`,i=` + &${r}-expand ${r}-expand-icon, + ${r}-loading-icon +`;return[ae(`${t}-checkbox`,e),{[n]:{"&-checkbox":{top:0,marginInlineEnd:e.paddingXS,pointerEvents:`unset`},"&-menus":{display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:`100%`,height:`auto`,[r]:{color:e.colorTextDisabled}}}},"&-menu":{flexGrow:1,flexShrink:0,minWidth:e.controlItemWidth,height:e.dropdownHeight,margin:0,padding:e.menuPadding,overflow:`auto`,verticalAlign:`top`,listStyle:`none`,"-ms-overflow-style":`-ms-autohiding-scrollbar`,"&:not(:last-child)":{borderInlineEnd:`${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&-item":{display:`flex`,maxWidth:400,flexWrap:`nowrap`,alignItems:`center`,padding:e.optionPadding,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,"&:hover":{background:e.controlItemBgHover},"&-disabled":{color:e.colorTextDisabled,cursor:`not-allowed`,"&:hover":{background:`transparent`},[i]:{color:e.colorTextDisabled}},[`&-active:not(${r}-disabled)`]:{"&, &:hover":{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg}},"&-content":{flex:`auto`,minWidth:0,...ht},[i]:{marginInlineStart:e.paddingXXS,color:e.colorIcon,fontSize:e.fontSizeIcon},"&-keyword":{color:e.colorHighlight}}}}}]},If=e=>{let{componentCls:t,antCls:n}=e;return[{[t]:{width:e.controlWidth}},{[`${t}-dropdown`]:[{[`&${n}-select-dropdown`]:{padding:0}},Ff(e)]},{[`${t}-dropdown-rtl`]:{direction:`rtl`}},Ge(e)]},Lf=e=>{let t=Math.round((e.controlHeight-e.fontSize*e.lineHeight)/2);return{controlWidth:184,controlItemWidth:111,dropdownHeight:180,optionSelectedBg:e.controlItemBgActive,optionSelectedFontWeight:e.fontWeightStrong,optionPadding:`${t}px ${e.paddingSM}px`,menuPadding:e.paddingXXS,optionSelectedColor:e.colorText}},Rf=ke(`Cascader`,If,Lf,{resetFont:!1,unitless:{optionSelectedFontWeight:!0}}),zf=Ue([`Cascader`,`Panel`],e=>{let{componentCls:t}=e;return{[`${t}-panel`]:[Ff(e),{display:`inline-flex`,border:`${N(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,borderRadius:e.borderRadiusLG,overflowX:`auto`,maxWidth:`100%`,[`${t}-menus`]:{alignItems:`stretch`},[`${t}-menu`]:{height:`auto`},"&-empty":{padding:e.paddingXXS}}]}},Lf,{resetFont:!1});function Bf(e){let{prefixCls:t,className:n,multiple:r,rootClassName:i,notFoundContent:a,direction:o,expandIcon:s,loadingIcon:c,disabled:l}=e,{expandIcon:u,loadingIcon:d}=oe(`cascader`),f=Q.useContext(bt),p=l??f,[m,h,g,_]=kf(t,o),v=B(h),[y,x]=Rf(h,v);zf(h);let{expandIcon:S,loadingIcon:C}=Pf({contextExpandIcon:u,contextLoadingIcon:d,expandIcon:s,loadingIcon:c,isRtl:g===`rtl`}),w=a||_?.(`Cascader`)||Q.createElement(z,{componentName:`Cascader`}),T=Af(h,r);return Q.createElement(Tf,{...e,checkable:T,prefixCls:h,className:b(n,y,i,x,v),notFoundContent:w,direction:g,expandIcon:S,loadingIcon:C,disabled:p})}var{SHOW_CHILD:Vf,SHOW_PARENT:Hf}=Of,Uf=(e,t,n)=>{let r=e.toLowerCase().split(t).reduce((e,n,r)=>r===0?[n]:[].concat(vt(e),[t,n]),[]),i=[],a=0;return r.forEach((t,r)=>{let o=a+t.length,s=e.slice(a,o);a=o,r%2==1&&(s=Q.createElement(`span`,{className:`${n}-menu-item-keyword`,key:`separator-${r}`},s)),i.push(s)}),i},Wf=(e,t,n,r)=>{let i=[],a=e.toLowerCase();return t.forEach((e,t)=>{t!==0&&i.push(` / `);let o=e[r.label];(je(o)||q(o))&&(o=Uf(String(o),a,n)),i.push(o)}),i},Gf=Q.forwardRef((e,t)=>{let{prefixCls:n,size:r,disabled:i,className:a,rootClassName:o,multiple:s,bordered:c=!0,transitionName:l,choiceTransitionName:u=``,popupClassName:d,expandIcon:f,placement:p,showSearch:m,allowClear:h=!0,notFoundContent:g,direction:_,getPopupContainer:y,status:S,showArrow:C,builtinPlacements:w,style:T,variant:D,dropdownClassName:O,dropdownRender:A,onDropdownVisibleChange:j,onPopupVisibleChange:M,dropdownMenuColumnStyle:N,popupRender:P,dropdownStyle:I,popupMenuColumnStyle:L,onOpenChange:R,styles:ee,classNames:V,loadingIcon:te,clearIcon:ne,removeIcon:U,suffixIcon:W,...ie}=e,{getPrefixCls:G,getPopupContainer:K,className:q,style:ae,classNames:J,styles:se,expandIcon:Y,loadingIcon:ce,clearIcon:le,removeIcon:de,suffixIcon:fe,searchIcon:pe}=oe(`cascader`),{popupOverflow:he}=Q.useContext(re),{status:X,hasFeedback:ve,isFormItemInput:ye,feedbackIcon:be}=Q.useContext(Xe),xe=me(X,S),[Z,Se,Ce,we]=kf(n,_),Te=Ce===`rtl`,Ee=G(),De=B(Z),[Oe,ke]=F(Z,De),Ae=B(Se);Rf(Se,Ae);let{compactSize:je,compactItemClassnames:Me}=E(Z,_),[Ne,Pe]=$e(`cascader`,D,c),Fe=g||we?.(`Cascader`)||Q.createElement(z,{componentName:`Cascader`}),Ie=x(P||A),Le=L||N,Re=R||M||j,ze=Q.useMemo(()=>{if(!m)return m;let e={render:Wf};return v(m)&&(e={...e,...m}),e},[m]),Be=pt(e=>r??je??e),Ve=Q.useContext(bt),Ue=i??Ve,{expandIcon:We,loadingIcon:Ge}=Pf({contextExpandIcon:Y,contextLoadingIcon:ce,expandIcon:f,loadingIcon:te,isRtl:Te}),Ke=Af(Se,s),qe=yt(e.suffixIcon,C),{suffixIcon:Je,removeIcon:Ye,clearIcon:Ze}=ue({...e,clearIcon:ne,contextClearIcon:le,removeIcon:U,contextRemoveIcon:de,loadingIcon:Ge,suffixIcon:W,contextSuffixIcon:fe,searchIcon:v(m)?m.searchIcon:void 0,contextSearchIcon:pe,hasFeedback:ve,feedbackIcon:be,showSuffixIcon:qe,multiple:s,prefixCls:Z,componentName:`Cascader`}),Qe=Q.useMemo(()=>p===void 0?Te?`bottomRight`:`bottomLeft`:p,[p,Te]),et=h===!0?{clearIcon:Ze}:h,tt={...e,variant:Ne,size:Be,status:xe,disabled:Ue},[nt,rt]=ge([J,V],[se,ee],{props:tt},{popup:{_default:`root`}}),it={...rt.popup.root,...I},[at]=He(`SelectLike`,it?.zIndex),ot=b(d||O,`${Se}-dropdown`,{[`${Se}-dropdown-rtl`]:Ce===`rtl`},o,De,nt.popup.root,Ae,Oe,ke);return Q.createElement(Of,{prefixCls:Z,className:b(!n&&Se,{[`${Z}-lg`]:Be===`large`,[`${Z}-sm`]:Be===`small`,[`${Z}-rtl`]:Te,[`${Z}-${Ne}`]:Pe,[`${Z}-in-form-item`]:ye},_e(Z,xe,ve),Me,q,a,o,nt.root,De,Ae,Oe,ke),disabled:Ue,style:{...rt.root,...ae,...T},classNames:nt,styles:rt,...ie,builtinPlacements:H(w,he),direction:Ce,placement:Qe,notFoundContent:Fe,allowClear:et,showSearch:ze,expandIcon:We,suffixIcon:Je,removeIcon:Ye,loadingIcon:Ge,checkable:Ke,popupClassName:ot,popupPrefixCls:n||Se,popupStyle:{...it,zIndex:at},popupRender:Ie,popupMenuColumnStyle:Le,onPopupVisibleChange:Re,choiceTransitionName:k(Ee,``,u),transitionName:k(Ee,`slide-up`,l),getPopupContainer:y||K,ref:t})}),Kf=Ye(Gf,`popupAlign`,e=>he(e,[`visible`]));Gf.SHOW_PARENT=Hf,Gf.SHOW_CHILD=Vf,Gf.Panel=Bf,Gf._InternalPanelDoNotUseOrYouWillBeFired=Kf;var qf=(e,t,n,r,i,a)=>{let{classNames:o,styles:s}=oe(e),[c,l]=ge([o,t],[s,n],{props:a},{popup:{_default:`root`}});return Q.useMemo(()=>[{...c,popup:{...c.popup,root:b(c.popup?.root,r)}},{...l,popup:{...l.popup,root:{...l.popup?.root,...i}}}],[c,l,r,i])},Jf=(e,t,n)=>X(n)?n:t===`year`&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t===`quarter`&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t===`month`&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t===`week`&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t===`time`&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder,Yf=(e,t,n)=>X(n)?n:t===`year`&&e.lang.rangeYearPlaceholder?e.lang.rangeYearPlaceholder:t===`quarter`&&e.lang.rangeQuarterPlaceholder?e.lang.rangeQuarterPlaceholder:t===`month`&&e.lang.rangeMonthPlaceholder?e.lang.rangeMonthPlaceholder:t===`week`&&e.lang.rangeWeekPlaceholder?e.lang.rangeWeekPlaceholder:t===`time`&&e.timePickerLocale.rangePlaceholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder,Xf=(e,t)=>{let{allowClear:n=!0}=e,{clearIcon:r,removeIcon:i}=ue({...e,prefixCls:t,componentName:`DatePicker`});return[Q.useMemo(()=>n===!1?!1:{clearIcon:r,...n===!0?{}:n},[n,r]),i]},[Zf,Qf]=[`week`,`WeekPicker`],[$f,ep]=[`month`,`MonthPicker`],[tp,np]=[`year`,`YearPicker`],[rp,ip]=[`quarter`,`QuarterPicker`],[ap,op]=[`time`,`TimePicker`],sp=e=>Q.createElement(Oe,{size:`small`,type:`primary`,...e});function cp(e){return(0,Q.useMemo)(()=>({button:sp,...e}),[e])}var lp=({picker:e,hasFeedback:t,feedbackIcon:n,suffixIcon:r})=>r===null||r===!1?null:r===!0||r===void 0?Q.createElement(Q.Fragment,null,e===ap?Q.createElement(S,{"aria-hidden":`true`}):Q.createElement(de,{"aria-hidden":`true`}),t&&n):r,up=e=>(0,Q.forwardRef)((t,n)=>{let{prefixCls:r,getPopupContainer:i,components:a,className:o,style:s,classNames:c,styles:l,placement:u,size:d,disabled:f,bordered:p=!0,placeholder:m,status:h,variant:g,picker:_,dropdownClassName:v,popupClassName:y,popupStyle:x,rootClassName:S,suffixIcon:C,separator:w,allowClear:T,clearIcon:D,...O}=t,k=_===ap?`timePicker`:`datePicker`,{suffixIcon:A,clearIcon:j,allowClear:M}=oe(k),[N,F]=qf(k,c,l,y||v,x),I=Q.useRef(null),{getPrefixCls:R,direction:z,getPopupContainer:ee,rangePicker:V}=(0,Q.useContext)(re),H=R(`picker`,r),{compactSize:ne,compactItemClassnames:U}=E(H,z),W=R(),ie=w??V?.separator,[G,K]=$e(`rangePicker`,g,p),q=B(H),[ae,J]=Bd(H,q),se=b(ae,J,q,S),ce=P({componentName:`RangePicker`,allowClear:T,clearIcon:D,contextAllowClear:M,contextClearIcon:j,defaultAllowClear:!0}),le=cp(a),ue=pt(e=>d??ne??e),de=Q.useContext(bt),pe=f??de,{hasFeedback:he,status:ge,feedbackIcon:X}=(0,Q.useContext)(Xe),ve=lp({picker:_,hasFeedback:he,feedbackIcon:X,suffixIcon:C===void 0?A:C});(0,Q.useImperativeHandle)(n,()=>I.current);let[ye]=fe(`Calendar`,te),be=Y(ye,t.locale||{}),[xe]=He(`DatePicker`,F?.popup?.root?.zIndex);return Q.createElement(Ce,{space:!0},Q.createElement(Vu,{separator:Q.createElement(`span`,{"aria-label":`to`,className:`${H}-separator`},ie??Q.createElement(L,null)),disabled:pe,ref:I,placement:u,placeholder:Yf(be,_,m),suffixIcon:ve,prevIcon:Q.createElement(`span`,{className:`${H}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${H}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${H}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${H}-super-next-icon`}),transitionName:`${W}-slide-up`,picker:_,...O,locale:be.lang,getPopupContainer:i||ee,generateConfig:e,components:le,direction:z,prefixCls:H,rootClassName:se,className:b({[`${H}-large`]:ue===`large`,[`${H}-small`]:ue===`small`,[`${H}-${G}`]:K},_e(H,me(ge,h),he),U,o,V?.className),style:{...V?.style,...s},classNames:N,styles:{...F,popup:{...F.popup,root:{...F.popup.root,zIndex:xe}}},allowClear:ce}))}),dp=e=>{let t=(t,n=`DatePicker`)=>{let r=n===op?`timePicker`:`datePicker`;return(0,Q.forwardRef)((i,a)=>{let{prefixCls:o,getPopupContainer:s,components:c,style:l,className:u,size:d,bordered:f,placement:p,placeholder:m,disabled:h,status:g,variant:_,onCalendarChange:v,classNames:y,styles:x,dropdownClassName:S,popupClassName:C,popupStyle:w,rootClassName:T,suffixIcon:D,allowClear:O,clearIcon:k,...A}=i,{suffixIcon:j,clearIcon:M,allowClear:N}=oe(n===op?`timePicker`:`datePicker`),{getPrefixCls:F,direction:I,getPopupContainer:L,[r]:R}=(0,Q.useContext)(re),z=F(`picker`,o),{compactSize:ee,compactItemClassnames:V}=E(z,I),H=pt(e=>d??ee??e),ne=Q.useContext(bt),U=h??ne,W={...i,size:H,disabled:U,status:g,variant:_},[ie,G]=qf(r,y,x,C||S,w,W),K=Q.useRef(null),[q,ae]=$e(`datePicker`,_,f),J=B(z),[se,ce]=Bd(z,J),le=b(se,ce,J,T);(0,Q.useImperativeHandle)(a,()=>K.current);let ue={showToday:!0},de=t||i.picker,pe=F(),{onSelect:he,multiple:ge}=A,X=he&&t===`time`&&!ge,ve=(e,t,n)=>{v?.(e,t,n),X&&he(e)},[,ye]=Xf(i,z),be=P({componentName:n,allowClear:O,clearIcon:k,contextAllowClear:N,contextClearIcon:M,defaultAllowClear:!0}),xe=cp(c),{hasFeedback:Z,status:Se,feedbackIcon:we}=(0,Q.useContext)(Xe),Te=lp({picker:de,hasFeedback:Z,feedbackIcon:we,suffixIcon:D===void 0?j:D}),[Ee]=fe(`DatePicker`,te),De=Y(Ee,i.locale||{}),[Oe]=He(`DatePicker`,G?.popup?.root?.zIndex);return Q.createElement(Ce,{space:!0},Q.createElement(Td,{ref:K,placeholder:Jf(De,de,m),suffixIcon:Te,placement:p,prevIcon:Q.createElement(`span`,{className:`${z}-prev-icon`}),nextIcon:Q.createElement(`span`,{className:`${z}-next-icon`}),superPrevIcon:Q.createElement(`span`,{className:`${z}-super-prev-icon`}),superNextIcon:Q.createElement(`span`,{className:`${z}-super-next-icon`}),transitionName:`${pe}-slide-up`,picker:t,onCalendarChange:ve,...ue,...A,locale:De.lang,getPopupContainer:s||L,generateConfig:e,components:xe,direction:I,disabled:U,prefixCls:z,rootClassName:le,className:b({[`${z}-large`]:H===`large`,[`${z}-small`]:H===`small`,[`${z}-${q}`]:ae},_e(z,me(Se,g),Z),V,R?.className,u),style:{...R?.style,...l},classNames:ie,styles:{...G,popup:{...G.popup,root:{...G.popup.root,zIndex:Oe}}},allowClear:be,removeIcon:ye}))})},n=t(),r=t(Zf,Qf),i=t($f,ep),a=t(tp,np),o=t(rp,ip);return{DatePicker:n,WeekPicker:r,MonthPicker:i,YearPicker:a,TimePicker:t(ap,op),QuarterPicker:o}},fp=e=>{let{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:i,TimePicker:a,QuarterPicker:o}=dp(e),s=up(e),c=t;return c.WeekPicker=n,c.MonthPicker=r,c.YearPicker=i,c.RangePicker=s,c.TimePicker=a,c.QuarterPicker=o,c},pp=fp(Rt);pp._InternalPanelDoNotUseOrYouWillBeFired=Ye(pp,`popupAlign`,void 0,`picker`),pp._InternalRangePanelDoNotUseOrYouWillBeFired=Ye(pp.RangePicker,`popupAlign`,void 0,`picker`),pp.generatePicker=fp;function mp(e,t){let{disabled:n,prefixCls:r,character:i,characterRender:a,index:o,count:s,value:c,allowHalf:l,focused:u,onHover:d,onClick:f}=e,p=e=>{d(e,o)},m=e=>{f(e,o)},h=e=>{e.keyCode===Je.ENTER&&f(e,o)},g=o+1,_=new Set([r]);c===0&&o===0&&u?_.add(`${r}-focused`):l&&c+.5>=g&&co?`true`:`false`,"aria-posinset":o+1,"aria-setsize":s,tabIndex:n?-1:0},Q.createElement(`div`,{className:`${r}-first`},v),Q.createElement(`div`,{className:`${r}-second`},v)));return a&&(y=a(y,e)),y}var hp=Q.forwardRef(mp);function gp(){let e=Q.useRef({});function t(t){return e.current[t]}function n(t){return n=>{e.current[t]=n}}return[t,n]}function _p(e){let t=e.pageXOffset,n=`scrollLeft`;if(typeof t!=`number`){let r=e.document;t=r.documentElement[n],typeof t!=`number`&&(t=r.body[n])}return t}function vp(e){let t,n,r=e.ownerDocument,{body:i}=r,a=r&&r.documentElement,o=e.getBoundingClientRect();return t=o.left,n=o.top,t-=a.clientLeft||i.clientLeft||0,n-=a.clientTop||i.clientTop||0,{left:t,top:n}}function yp(e){let t=vp(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=_p(r),t.left}function bp(){return bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{f||E.current?.focus()};Q.useImperativeHandle(t,()=>({focus:D,blur:()=>{f||E.current?.blur()}}));let[O,k]=Ze(i||0,a),[A,j]=Ze(null),M=(e,t)=>{let n=p===`rtl`,r=e+1;if(s){let i=w(e),a=yp(i),o=i.clientWidth;(n&&t-a>o/2||!n&&t-a{k(e),_?.(e)},[P,F]=Q.useState(!1),I=()=>{F(!0),v?.()},L=()=>{F(!1),y?.()},[z,B]=Q.useState(null),ee=(e,t)=>{let n=M(t,e.pageX);n!==A&&(B(n),j(null)),g?.(n)},V=e=>{f||(B(null),j(null),g?.(void 0)),e&&S?.(e)},H=(e,t)=>{let n=M(t,e.pageX),r=!1;c&&(r=n===O),V(),N(r?0:n),j(r?n:null)},te=e=>{let{keyCode:t}=e,n=p===`rtl`,r=s?.5:1;l&&(t===Je.RIGHT&&O0&&!n||t===Je.RIGHT&&O>0&&n?(N(O-r),e.preventDefault()):t===Je.LEFT&&O{h&&!f&&D()},[]);let ne=Array(o).fill(0).map((e,t)=>Q.createElement(hp,{ref:T(t),index:t,count:o,disabled:f,prefixCls:`${n}-star`,allowHalf:s,value:z===null?O:z,onClick:H,onHover:ee,key:e||t,character:u,characterRender:d,focused:P})),re=b(n,r,{[`${n}-disabled`]:f,[`${n}-rtl`]:p===`rtl`});return Q.createElement(`ul`,bp({className:re,onMouseLeave:V,tabIndex:f?-1:m,onFocus:f?null:I,onBlur:f?null:L,onKeyDown:f?null:te,ref:E},R(C,{aria:!0,data:!0,attr:!0})),ne)}var Sp=Q.forwardRef(xp),Cp=e=>{let{componentCls:t}=e;return{[`${t}-star`]:{position:`relative`,display:`inline-block`,color:`inherit`,cursor:`pointer`,"&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.starHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${N(e.lineWidth)} dashed ${e.starColor}`,transform:e.starHoverScale}},"&-first, &-second":{color:e.starBg,transition:`all ${e.motionDurationMid}`,userSelect:`none`},"&-first":{position:`absolute`,top:0,insetInlineStart:0,width:`50%`,height:`100%`,overflow:`hidden`,opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:`inherit`}}}},wp=e=>({[`&-rtl${e.componentCls}`]:{direction:`rtl`}}),Tp=e=>{let{componentCls:t}=e;return{[t]:{...be(e),display:`inline-block`,margin:0,padding:0,color:e.starColor,fontSize:e.starSize,lineHeight:1,listStyle:`none`,outline:`none`,"&-small":{fontSize:e.starSizeSM},"&-large":{fontSize:e.starSizeLG},[`&-disabled${t} ${t}-star`]:{cursor:`default`,"> div:hover":{transform:`scale(1)`}},...Cp(e),...wp(e)}}},Ep=ke(`Rate`,e=>Tp(M(e,{})),e=>({starColor:e.yellow6,starSize:e.controlHeight*.625,starSizeSM:e.controlHeightSM*.625,starSizeLG:e.controlHeightLG*.625,starHoverScale:`scale(1.1)`,starBg:e.colorFillContent})),Dp=Q.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,tooltips:o,character:s=Q.createElement(Te,null),disabled:c,size:l,...u}=e,d=(e,{index:t})=>{if(!o)return e;let n=o[t];return v(n)?Q.createElement(O,{...n},e):Q.createElement(O,{title:n},e)},{getPrefixCls:f,direction:p,className:m,style:h}=oe(`rate`),g=f(`rate`,n),[_,y]=Ep(g),x={...h,...a},S=Q.useContext(bt),C=c??S,w=pt(e=>l??e);return Q.createElement(Sp,{ref:t,character:s,characterRender:d,disabled:C,...u,className:b({[`${g}-large`]:w===`large`,[`${g}-small`]:w===`small`},r,i,_,y,m),style:x,prefixCls:g,direction:p})}),{TimePicker:Op,RangePicker:kp}=pp,Ap=Q.forwardRef((e,t)=>Q.createElement(kp,{...e,picker:`time`,mode:void 0,ref:t})),jp=Q.forwardRef((e,t)=>{let{addon:n,renderExtraFooter:r,variant:i,bordered:a,classNames:o,styles:s,popupClassName:c,popupStyle:l,...u}=e,[d]=$e(`timePicker`,i,a),f=Q.useMemo(()=>{if(r)return r;if(n)return n},[n,r]),[p,m]=qf(`timePicker`,o,s,c,l,{...e,variant:d});return Q.createElement(Op,{...u,mode:void 0,ref:t,renderExtraFooter:f,variant:d,classNames:p,styles:m})}),Mp=Ye(jp,`popupAlign`,void 0,`picker`);jp._InternalPanelDoNotUseOrYouWillBeFired=Mp,jp.RangePicker=Ap,jp._InternalPanelDoNotUseOrYouWillBeFired=Mp;var Np=(e=>{let t=Q.useRef({valueLabels:new Map});return Q.useMemo(()=>{let{valueLabels:n}=t.current,r=new Map,i=e.map(e=>{let{value:t,label:i}=e,a=i??n.get(t);return r.set(t,a),{...e,label:a}});return t.current.valueLabels=r,[i]},[e])}),Pp=(e,t,n,r)=>Q.useMemo(()=>{let i=e=>e.map(({value:e})=>e),a=i(e),o=i(t),s=a.filter(e=>!r[e]),l=a,u=o;if(n){let e=c(a,!0,r);l=e.checkedKeys,u=e.halfCheckedKeys}return[Array.from(new Set([...s,...l])),u]},[e,t,n,r]),Fp=e=>Array.isArray(e)?e:e===void 0?[]:[e],Ip=e=>{let{label:t,value:n,children:r}=e||{};return{_title:t?[t]:[`title`,`label`],value:n||`value`,key:n||`value`,children:r||`children`}},Lp=e=>!e||e.disabled||e.disableCheckbox||e.checkable===!1,Rp=(e,t)=>{let n=[],r=e=>{e.forEach(e=>{let i=e[t.children];i&&(n.push(e[t.value]),r(i))})};return r(e),n},zp=e=>e==null,Bp=((e,t)=>Q.useMemo(()=>a(e,{fieldNames:t,initWrapper:e=>({...e,valueEntities:new Map}),processEntity:(e,n)=>{let r=e.node[t.value];n.valueEntities.set(r,e)}}),[e,t])),Vp=()=>null;function Hp(e){return V(e).map(e=>{if(!Q.isValidElement(e)||!e.type)return null;let{key:t,props:{children:n,value:r,...i}}=e,a={key:t,value:r,...i},o=Hp(n);return o.length&&(a.children=o),a}).filter(e=>e)}function Up(e){if(!e)return e;let t={...e};return`props`in t||Object.defineProperty(t,"props",{get(){return g(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Wp(e,t,n,r,i,a){let o=null,s=null;function c(){function e(r,i=`0`,c=!1){return r.map((r,l)=>{let u=`${i}-${l}`,d=r[a.value],f=n.includes(d),p=e(r[a.children]||[],u,f),m=Q.createElement(Vp,r,p.map(e=>e.node));if(t===d&&(o=m),f){let e={pos:u,node:m,children:p};return c||s.push(e),e}return null}).filter(e=>e)}s||(s=[],e(r),s.sort(({node:{props:{value:e}}},{node:{props:{value:t}}})=>n.indexOf(e)-n.indexOf(t)))}Object.defineProperty(e,"triggerNode",{get(){return g(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),c(),o}}),Object.defineProperty(e,"allCheckedNodes",{get(){return g(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),c(),i?s:s.map(({node:e})=>e)}})}var Gp=(e,t,n)=>{let{fieldNames:r,treeNodeFilterProp:i,filterTreeNode:a}=n,{children:o}=r;return Q.useMemo(()=>{if(!t||a===!1)return e;let n=typeof a==`function`?a:(e,n)=>String(n[i]).toUpperCase().includes(t.toUpperCase()),r=(e,i=!1)=>e.reduce((e,a)=>{let s=a[o],c=i||n(t,Up(a)),l=r(s||[],c);return(c||l.length)&&e.push({...a,isLeaf:void 0,[o]:l}),e},[]);return r(e)},[e,t,o,i,a])};function Kp(e){let t=Q.useRef();return t.current=e,Q.useCallback((...e)=>t.current(...e),[])}function qp(e,t){let{id:n,pId:r,rootPId:i}=t,a=new Map,o=[];return e.forEach(e=>{let t=e[n],r={...e,key:e.key||t};a.set(t,r)}),a.forEach(e=>{let t=e[r],n=a.get(t);n?(n.children=n.children||[],n.children.push(e)):(t===i||i===null)&&o.push(e)}),o}function Jp(e,t,n){return Q.useMemo(()=>e?n?qp(e,{id:`id`,pId:`pId`,rootPId:null,...typeof n==`object`?n:{}}):e:Hp(t),[t,n,e])}var Yp=Q.createContext(null),Xp=Q.createContext(null);function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:i,multiple:a,searchValue:o,toggleOpen:s,open:c,notFoundContent:l}=it(),{virtual:u,listHeight:d,listItemHeight:f,listItemScrollOffset:p,treeData:m,fieldNames:h,onSelect:g,popupMatchSelectWidth:_,treeExpandAction:v,treeTitleRender:y,onPopupScroll:b,leftMaxCount:x,leafCountOnly:S,valueEntities:C,classNames:w,styles:T}=Q.useContext(Xp),{checkable:E,checkedKeys:D,halfCheckedKeys:O,treeExpandedKeys:k,treeDefaultExpandAll:A,treeDefaultExpandedKeys:j,onTreeExpand:M,treeIcon:N,showTreeIcon:P,switcherIcon:F,treeLine:I,treeNodeFilterProp:L,loadData:R,treeLoadedKeys:z,treeMotion:B,onTreeLoad:ee,keyEntities:V}=Q.useContext(Yp),H=Q.useRef(),te=at(()=>m,[c,m],(e,t)=>t[0]&&e[1]!==t[1]),ne=Q.useMemo(()=>E?{checked:D,halfChecked:O}:null,[E,D,O]);Q.useEffect(()=>{c&&!a&&D.length&&H.current?.scrollTo({key:D[0]})},[c]);let re=e=>{e.preventDefault()},U=(e,t)=>{let{node:n}=t;E&&Lp(n)||(g(n.key,{selected:!D.includes(n.key)}),a||s(!1))},[W,ie]=Q.useState(j),[G,K]=Q.useState(null),q=Q.useMemo(()=>k?[...k]:o?G:W,[W,G,k,o]),ae=e=>{ie(e),K(e),M&&M(e)},oe=String(o).toLowerCase(),J=e=>oe?String(e[L]).toLowerCase().includes(oe):!1;Q.useEffect(()=>{o&&K(Rp(m,h))},[o]);let[se,Y]=Q.useState(()=>new Map);Q.useEffect(()=>{x&&Y(new Map)},[x]);function ce(e){let t=e[h.value];if(!se.has(t)){let e=C.get(t);if((e.children||[]).length!==0){let n=e.children.filter(e=>!e.node.disabled&&!e.node.disableCheckbox&&!D.includes(e.node[h.value])).length;se.set(t,n>x)}else se.set(t,!1)}return se.get(t)}let le=ye(e=>{let t=e[h.value];return D.includes(t)||x===null?!1:x<=0?!0:S&&x?ce(e):!1}),ue=e=>{for(let t of e)if(!(t.disabled||t.selectable===!1)){if(o){if(J(t))return t}else return t;if(t[h.children]){let e=ue(t[h.children]);if(e)return e}}return null},[de,fe]=Q.useState(null),pe=V[de];Q.useEffect(()=>{if(!c)return;let e=null;e=!a&&D.length&&!o?D[0]:(()=>{let e=ue(te);return e?e[h.value]:null})(),fe(e)},[c,o]),Q.useImperativeHandle(t,()=>({scrollTo:H.current?.scrollTo,onKeyDown:e=>{let{which:t}=e;switch(t){case Je.UP:case Je.DOWN:case Je.LEFT:case Je.RIGHT:H.current?.onKeyDown(e);break;case Je.ENTER:if(pe){let e=le(pe.node),{selectable:t,value:n,disabled:r}=pe?.node||{};t!==!1&&!r&&!e&&U(null,{node:{key:de},selected:!D.includes(n)})}break;case Je.ESC:s(!1)}},onKeyUp:()=>{}}));let me=at(()=>!o,[o,k||W],([e],[t,n])=>e!==t&&!!(t||n))?R:null;if(te.length===0)return Q.createElement(`div`,{role:`listbox`,className:`${i}-empty`,onMouseDown:re},l);let he={fieldNames:h};return z&&(he.loadedKeys=z),q&&(he.expandedKeys=q),Q.createElement(`div`,{onMouseDown:re},pe&&c&&Q.createElement(`span`,{style:Qp,"aria-live":`assertive`},pe.node.value),Q.createElement(r.Provider,{value:{nodeDisabled:le}},Q.createElement(n,Zp({classNames:w?.popup,styles:T?.popup,ref:H,focusable:!1,prefixCls:`${i}-tree`,treeData:te,height:d,itemHeight:f,itemScrollOffset:p,virtual:u!==!1&&_!==!1,multiple:a,icon:N,showIcon:P,switcherIcon:F,showLine:I,loadData:me,motion:B,activeKey:de,checkable:E,checkStrictly:!0,checkedKeys:ne,selectedKeys:E?[]:D,defaultExpandAll:A,titleRender:y},he,{onActiveChange:fe,onSelect:U,onCheck:U,onExpand:ae,onLoad:ee,filterTreeNode:J,expandAction:v,onScroll:b}))))}),em=`SHOW_ALL`,tm=`SHOW_PARENT`,nm=`SHOW_CHILD`;function rm(e,t,n,r){let i=new Set(e);return t===`SHOW_CHILD`?e.filter(e=>{let t=n[e];return!t||!t.children||!t.children.some(({node:e})=>i.has(e[r.value]))||!t.children.every(({node:e})=>Lp(e)||i.has(e[r.value]))}):t===`SHOW_PARENT`?e.filter(e=>{let t=n[e],r=t?t.parent:null;return!r||Lp(r.node)||!i.has(r.key)}):e}function im(e,t){let{searchValue:n,inputValue:r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s}=t;return Q.useMemo(()=>{let t=typeof e==`object`,c={searchValue:n??r,onSearch:i,autoClearSearchValue:a,filterTreeNode:o,treeNodeFilterProp:s,...t?e:{}};return[t?!0:e,c]},[e,n,r,i,a,o,s])}function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{id:n,prefixCls:r=`rc-tree-select`,value:i,defaultValue:a,onChange:o,onSelect:s,onDeselect:l,showSearch:u,searchValue:d,inputValue:f,onSearch:p,autoClearSearchValue:m,filterTreeNode:h,treeNodeFilterProp:g,showCheckedStrategy:v,treeNodeLabelProp:y,multiple:b,treeCheckable:x,treeCheckStrictly:S,labelInValue:C,maxCount:w,fieldNames:T,treeDataSimpleMode:E,treeData:D,children:O,loadData:k,treeLoadedKeys:A,onTreeLoad:j,treeDefaultExpandAll:M,treeExpandedKeys:N,treeDefaultExpandedKeys:P,onTreeExpand:F,treeExpandAction:I,virtual:L,listHeight:R=200,listItemHeight:z=20,listItemScrollOffset:B=0,onPopupVisibleChange:ee,popupMatchSelectWidth:V=!0,treeLine:H,treeIcon:te,showTreeIcon:ne,switcherIcon:re,treeMotion:U,treeTitleRender:W,onPopupScroll:ie,classNames:G,styles:K,...q}=e,ae=Ne(n),oe=x&&!S,J=x||S,se=S||C,Y=J||b,[ce,le]=im(u,{searchValue:d,inputValue:f,onSearch:p,autoClearSearchValue:m,filterTreeNode:h,treeNodeFilterProp:g}),{searchValue:ue,onSearch:de,autoClearSearchValue:fe=!0,filterTreeNode:pe,treeNodeFilterProp:me=`value`}=le,[he,ge]=Ze(a,i),_e=Q.useMemo(()=>x?v||`SHOW_CHILD`:em,[v,x]),X=Q.useMemo(()=>Ip(T),[JSON.stringify(T)]),[ve,ye]=Ze(``,ue),be=ve||``,xe=e=>{ye(e),de?.(e)},Z=Jp(D,O,E),{keyEntities:Se,valueEntities:Ce}=Bp(Z,X),we=Q.useCallback(e=>{let t=[],n=[];return e.forEach(e=>{Ce.has(e)?n.push(e):t.push(e)}),{missingRawValues:t,existRawValues:n}},[Ce]),Te=Gp(Z,be,{fieldNames:X,treeNodeFilterProp:me,filterTreeNode:pe}),Ee=Q.useCallback(e=>{if(e){if(y)return e[y];let{_title:t}=X;for(let n=0;nFp(e).map(e=>om(e)?{value:e}:e),[]),Oe=Q.useCallback(e=>De(e).map(e=>{let{label:t}=e,{value:n,halfChecked:r}=e,i,a=Ce.get(n);return a?(t=W?W(a.node):t??Ee(a.node),i=a.node.disabled):t===void 0&&(t=De(he).find(e=>e.value===n).label),{label:t,value:n,halfChecked:r,disabled:i}}),[Ce,Ee,De,he]),ke=Q.useMemo(()=>De(he===null?[]:he),[De,he]),[Ae,je]=Q.useMemo(()=>{let e=[],t=[];return ke.forEach(n=>{n.halfChecked?t.push(n):e.push(n)}),[e,t]},[ke]),Me=Q.useMemo(()=>Ae.map(e=>e.value),[Ae]),[Pe,Fe]=Pp(Ae,je,oe,Se),[Ie]=Np(Q.useMemo(()=>{let e=Oe(rm(Pe,_e,Se,X).map(e=>Se[e]?.node?.[X.value]??e).map(e=>{let t=Ae.find(t=>t.value===e);return{value:e,label:C?t?.label:W?.(t)}})),t=e[0];return!Y&&t&&zp(t.value)&&zp(t.label)?[]:e.map(e=>({...e,label:e.label??e.value}))},[X,Y,Pe,Ae,Oe,_e,Se])),Le=Q.useMemo(()=>Y&&(_e===`SHOW_CHILD`||S||!x)?w:null,[w,Y,S,_e,x]),Re=Kp((e,t,n)=>{let r=rm(e,_e,Se,X);if(!(Le&&r.length>Le)&&(ge(Oe(e)),fe&&ye(``),o)){let i=e;oe&&(i=r.map(e=>{let t=Ce.get(e);return t?t.node[X.value]:e}));let{triggerValue:a,selected:s}=t||{triggerValue:void 0,selected:void 0},c=i;if(S){let e=je.filter(e=>!i.includes(e.value));c=[...c,...e]}let l=Oe(c),u={preValue:Ae,triggerValue:a},d=!0;(S||n===`selection`&&!s)&&(d=!1),Wp(u,a,e,Z,d,X),J?u.checked=s:u.selected=s;let f=se?l:l.map(e=>e.value);o(Y?f:f[0],se?null:l.map(e=>e.label),u)}}),ze=Q.useCallback((e,{selected:t,source:n})=>{let r=Se[e]?.node,i=r?.[X.value]??e;if(!Y)Re([i],{selected:!0,triggerValue:i},`option`);else{let e=t?[...Me,i]:Pe.filter(e=>e!==i);if(oe){let{missingRawValues:n,existRawValues:r}=we(e),i=r.map(e=>Ce.get(e).key),a;t?{checkedKeys:a}=c(i,!0,Se):{checkedKeys:a}=c(i,{checked:!1,halfCheckedKeys:Fe},Se),e=[...n,...a.map(e=>Se[e].node[X.value])]}Re(e,{selected:t,triggerValue:i},n||`option`)}t||!Y?s?.(i,Up(r)):l?.(i,Up(r))},[we,Ce,Se,X,Y,Me,Re,oe,s,l,Pe,Fe,w]),Be=Q.useCallback(e=>{ee&&ee(e)},[ee]),Ve=Kp((e,t)=>{let n=e.map(e=>e.value);if(t.type===`clear`){Re(n,{},`selection`);return}t.values.length&&ze(t.values[0].value,{selected:!1,source:`selection`})}),He=Q.useMemo(()=>({virtual:L,popupMatchSelectWidth:V,listHeight:R,listItemHeight:z,listItemScrollOffset:B,treeData:Te,fieldNames:X,onSelect:ze,treeExpandAction:I,treeTitleRender:W,onPopupScroll:ie,leftMaxCount:w===void 0?null:w-Ie.length,leafCountOnly:_e===`SHOW_CHILD`&&!S&&!!x,valueEntities:Ce,classNames:G,styles:K}),[L,V,R,z,B,Te,X,ze,I,W,ie,w,Ie.length,_e,S,x,Ce,G,K]),Ue=Q.useMemo(()=>({checkable:J,loadData:k,treeLoadedKeys:A,onTreeLoad:j,checkedKeys:Pe,halfCheckedKeys:Fe,treeDefaultExpandAll:M,treeExpandedKeys:N,treeDefaultExpandedKeys:P,onTreeExpand:F,treeIcon:te,treeMotion:U,showTreeIcon:ne,switcherIcon:re,treeLine:H,treeNodeFilterProp:me,keyEntities:Se}),[J,k,A,j,Pe,Fe,M,N,P,F,te,U,ne,re,H,me,Se]);return Q.createElement(Xp.Provider,{value:He},Q.createElement(Yp.Provider,{value:Ue},Q.createElement(_,am({ref:t},q,{classNames:G,styles:K,id:ae,prefixCls:r,mode:Y?`multiple`:void 0,displayValues:Ie,onDisplayValuesChange:Ve,autoClearSearchValue:fe,showSearch:ce,searchValue:be,onSearch:xe,OptionList:$p,emptyOptions:!Z.length,onPopupVisibleChange:Be,popupMatchSelectWidth:V}))))});sm.TreeNode=Vp,sm.SHOW_ALL=em,sm.SHOW_PARENT=tm,sm.SHOW_CHILD=nm;var cm=sm,lm=e=>{let{componentCls:t,treePrefixCls:n,colorBgElevated:r}=e,a=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${N(e.paddingXS)} ${N(e.calc(e.paddingXS).div(2).equal())}`},i(n,M(e,{colorBgContainer:r}),!1),{[a]:{borderRadius:0,[`${a}-list-holder-inner`]:{alignItems:`stretch`,[`${a}-treenode`]:{[`${a}-node-content-wrapper`]:{flex:`auto`}}}}},ae(`${n}-checkbox`,e),{"&-rtl":{direction:`rtl`,[`${a}-switcher${a}-switcher_close`]:{[`${a}-switcher-icon svg`]:{transform:`rotate(90deg)`}}}}]}]};function um(e,t,n){return ke(`TreeSelect`,e=>lm(M(e,{treePrefixCls:t})),d,{resetFont:!1})(e,n)}var dm=Q.forwardRef((e,n)=>{let{prefixCls:r,size:i,disabled:a,bordered:o=!0,style:s,className:c,rootClassName:l,treeCheckable:u,multiple:d,listHeight:f=256,listItemHeight:p,placement:m,notFoundContent:h,switcherIcon:g,treeLine:_,getPopupContainer:v,popupClassName:y,dropdownClassName:S,treeIcon:C=!1,transitionName:w,choiceTransitionName:T=``,status:D,treeExpandAction:O,builtinPlacements:A,dropdownMatchSelectWidth:j,popupMatchSelectWidth:M,allowClear:N,variant:P,dropdownStyle:I,dropdownRender:L,popupRender:R,onDropdownVisibleChange:ee,onOpenChange:V,tagRender:te,maxCount:ne,showCheckedStrategy:U,treeCheckStrictly:W,styles:ie,classNames:G,...K}=e,{getPrefixCls:q,getPopupContainer:ae,direction:J,styles:se,classNames:Y,switcherIcon:ce}=oe(`treeSelect`),{renderEmpty:le,virtual:de,popupMatchSelectWidth:fe,popupOverflow:pe}=Q.useContext(re),[,X]=we(),ve=p??X?.controlHeightSM+X?.paddingXXS,ye=q(),be=q(`select`,r),xe=q(`select-tree`,r),Z=q(`tree-select`,r),{compactSize:Se,compactItemClassnames:Ce}=E(be,J),Te=B(be),Ee=B(Z),[De,Oe]=F(be,Te);um(Z,xe,Ee);let[ke,Ae]=$e(`treeSelect`,P,o),je=pt(e=>i??Se??e),Me=Q.useContext(bt),Ne=a??Me,{status:Pe,hasFeedback:Fe,isFormItemInput:Ie,feedbackIcon:Le}=Q.useContext(Xe),Re=me(Pe,D),ze={...e,size:je,disabled:Ne,status:Re,variant:ke},[Be,Ve]=ge([Y,G],[se,ie],{props:ze},{popup:{_default:`root`}}),Ue=b(y||S,`${Z}-dropdown`,{[`${Z}-dropdown-rtl`]:J===`rtl`},l,Be.root,Be.popup?.root,Oe,Te,Ee,De),We=x(R||L),Ge=V||ee,Ke=!!(u||d),qe=Q.useMemo(()=>{if(!(ne&&(U===`SHOW_ALL`&&!W||U===`SHOW_PARENT`)))return ne},[ne,U,W]),Je=yt(e.suffixIcon,e.showArrow),Ye=M??j??fe,{suffixIcon:Ze,removeIcon:Qe,clearIcon:et}=ue({...K,multiple:Ke,showSuffixIcon:Je,hasFeedback:Fe,feedbackIcon:Le,prefixCls:be,componentName:`TreeSelect`}),tt=N===!0?{clearIcon:et}:N,nt;nt=h===void 0?le?.(`Select`)||Q.createElement(z,{componentName:`Select`}):h;let rt=he(K,[`suffixIcon`,`removeIcon`,`clearIcon`]),it=Q.useMemo(()=>m===void 0?J===`rtl`?`bottomRight`:`bottomLeft`:m,[m,J]),at=b(!r&&Z,{[`${be}-lg`]:je===`large`,[`${be}-sm`]:je===`small`,[`${be}-rtl`]:J===`rtl`,[`${be}-${ke}`]:Ae,[`${be}-in-form-item`]:Ie},_e(be,Re,Fe),Ce,c,l,Be?.root,Oe,Te,Ee,De),ot=g??ce,st=e=>Q.createElement(t,{prefixCls:xe,switcherIcon:ot,treeNodeProps:e,showLine:_}),[ct]=He(`SelectLike`,Ve.popup?.root?.zIndex);return Q.createElement(cm,{classNames:Be,styles:Ve,virtual:de,disabled:Ne,...rt,popupMatchSelectWidth:Ye,builtinPlacements:H(A,pe),ref:n,prefixCls:be,className:at,style:{...Ve?.root,...s},listHeight:f,listItemHeight:ve,treeCheckable:u&&Q.createElement(`span`,{className:`${be}-tree-checkbox-inner`}),treeLine:!!_,suffixIcon:Ze,multiple:Ke,placement:it,removeIcon:Qe,allowClear:tt,switcherIcon:st,showTreeIcon:C,notFoundContent:nt,getPopupContainer:v||ae,treeMotion:null,popupClassName:Ue,popupStyle:{...Ve.root,...Ve.popup?.root,zIndex:ct},popupRender:We,onPopupVisibleChange:Ge,choiceTransitionName:k(ye,``,T),transitionName:k(ye,`slide-up`,w),treeExpandAction:O,tagRender:Ke?te:void 0,maxCount:qe,showCheckedStrategy:U,treeCheckStrictly:W})}),fm=Ye(dm,`popupAlign`,e=>he(e,[`visible`]));dm.TreeNode=Vp,dm.SHOW_ALL=em,dm.SHOW_PARENT=tm,dm.SHOW_CHILD=nm,dm._InternalPanelDoNotUseOrYouWillBeFired=fm;var $=nt(),pm=({value:e,onChange:t,placeholder:n,disabled:r=!1,readonly:i=!1})=>{let{t:a}=Ee(),[o,s]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(e);Q.useEffect(()=>{l(e)},[e]);let u=(0,Q.useCallback)(e=>{l(e),t?.(e),s(!1)},[t]),d=(0,Q.useCallback)(()=>{l(void 0),t?.(null)},[t]),f=(0,Q.useCallback)(({type:e})=>(0,$.jsx)(`div`,{className:`flex flex-wrap max-h-[400px] overflow-auto gap-2`,children:Z[e].map(e=>(0,$.jsx)(`div`,{className:`cursor-pointer p-2 border border-gray-300 rounded hover:border-blue-500 hover:bg-blue-50 transition-all flex items-center justify-center`,onClick:()=>u(e),title:e,children:(0,$.jsx)(Be,{name:e,style:{fontSize:20}})},e))}),[u]),m=(0,Q.useMemo)(()=>[{key:`use`,label:a(`xin.form.iconSelector.tabs.use`),children:(0,$.jsx)(f,{type:`useIcons`})},{key:`suggestion`,label:a(`xin.form.iconSelector.tabs.suggestion`),children:(0,$.jsx)(f,{type:`suggestionIcons`})},{key:`direction`,label:a(`xin.form.iconSelector.tabs.direction`),children:(0,$.jsx)(f,{type:`directionIcons`})},{key:`editor`,label:a(`xin.form.iconSelector.tabs.editor`),children:(0,$.jsx)(f,{type:`editorIcons`})},{key:`data`,label:a(`xin.form.iconSelector.tabs.data`),children:(0,$.jsx)(f,{type:`dataIcons`})},{key:`logo`,label:a(`xin.form.iconSelector.tabs.logo`),children:(0,$.jsx)(f,{type:`logoIcons`})},{key:`other`,label:a(`xin.form.iconSelector.tabs.other`),children:(0,$.jsx)(f,{type:`otherIcons`})}],[f,a]),h=(0,Q.useMemo)(()=>c?[{label:(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Be,{name:c}),(0,$.jsx)(`span`,{children:c})]}),value:c}]:[],[c]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{value:c,placeholder:n||a(`xin.form.iconSelector.placeholder`),disabled:r,open:!1,onClick:()=>!r&&!i&&s(!0),options:h,style:{width:`100%`},allowClear:!0,onClear:d,suffixIcon:c?(0,$.jsx)(Be,{name:c}):void 0}),(0,$.jsx)(se,{title:a(`xin.form.iconSelector.modal.title`),open:o,onCancel:()=>s(!1),footer:null,width:800,children:(0,$.jsx)(p,{defaultActiveKey:`use`,items:m})})]})},mm=dt(((e,t)=>{var n=!1,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;function v(){if(!n){n=!0;var e=navigator.userAgent,t=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),v=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(m=/\b(iPhone|iP[ao]d)/.exec(e),h=/\b(iP[ao]d)/.exec(e),f=/Android/i.exec(e),g=/FBAN\/\w+;/i.exec(e),_=/Mobile/i.exec(e),p=!!/Win64/.exec(e),t){r=t[1]?parseFloat(t[1]):t[5]?parseFloat(t[5]):NaN,r&&document&&document.documentMode&&(r=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);c=y?parseFloat(y[1])+4:r,i=t[2]?parseFloat(t[2]):NaN,a=t[3]?parseFloat(t[3]):NaN,o=t[4]?parseFloat(t[4]):NaN,o?(t=/(?:Chrome\/(\d+\.\d+))/.exec(e),s=t&&t[1]?parseFloat(t[1]):NaN):s=NaN}else r=i=a=s=o=NaN;if(v){if(v[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);l=b?parseFloat(b[1].replace(`_`,`.`)):!0}else l=!1;u=!!v[2],d=!!v[3]}else l=u=d=!1}}var y={ie:function(){return v()||r},ieCompatibilityMode:function(){return v()||c>r},ie64:function(){return y.ie()&&p},firefox:function(){return v()||i},opera:function(){return v()||a},webkit:function(){return v()||o},safari:function(){return y.webkit()},chrome:function(){return v()||s},windows:function(){return v()||u},osx:function(){return v()||l},linux:function(){return v()||d},iphone:function(){return v()||m},mobile:function(){return v()||m||h||f||_},nativeApp:function(){return v()||g},android:function(){return v()||f},ipad:function(){return v()||h}};t.exports=y})),hm=dt(((e,t)=>{var n=!!(typeof window<`u`&&window.document&&window.document.createElement);t.exports={canUseDOM:n,canUseWorkers:typeof Worker<`u`,canUseEventListeners:n&&!!(window.addEventListener||window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n}})),gm=dt(((e,t)=>{var n=hm(),r;n.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature(``,``)!==!0);function i(e,t){if(!n.canUseDOM||t&&!(`addEventListener`in document))return!1;var i=`on`+e,a=i in document;if(!a){var o=document.createElement(`div`);o.setAttribute(i,`return;`),a=typeof o[i]==`function`}return!a&&r&&e===`wheel`&&(a=document.implementation.hasFeature(`Events.wheel`,`3.0`)),a}t.exports=i})),_m=dt(((e,t)=>{var n=mm(),r=gm(),i=10,a=40,o=800;function s(e){var t=0,n=0,r=0,s=0;return`detail`in e&&(n=e.detail),`wheelDelta`in e&&(n=-e.wheelDelta/120),`wheelDeltaY`in e&&(n=-e.wheelDeltaY/120),`wheelDeltaX`in e&&(t=-e.wheelDeltaX/120),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=t*i,s=n*i,`deltaY`in e&&(s=e.deltaY),`deltaX`in e&&(r=e.deltaX),(r||s)&&e.deltaMode&&(e.deltaMode==1?(r*=a,s*=a):(r*=o,s*=o)),r&&!t&&(t=r<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:s}}s.getEventType=function(){return n.firefox()?`DOMMouseScroll`:r(`wheel`)?`wheel`:`mousewheel`},t.exports=s})),vm=j(dt(((e,t)=>{t.exports=_m()}))(),1);function ym(e,t,n,r,i,a){a===void 0&&(a=0);var o=Nm(e,t,a),s=o.width,c=o.height,l=Math.min(s,n),u=Math.min(c,r);return l>u*i?{width:u*i,height:u}:{width:l,height:l/i}}function bm(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}function xm(e,t,n,r,i){i===void 0&&(i=0);var a=Nm(t.width,t.height,i),o=a.width,s=a.height;return{x:Sm(e.x,o,n.width,r),y:Sm(e.y,s,n.height,r)}}function Sm(e,t,n,r){var i=Math.abs(t*r/2-n/2);return Pm(e,-i,i)}function Cm(e,t){return Math.sqrt((e.y-t.y)**2+(e.x-t.x)**2)}function wm(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI}function Tm(e,t,n,r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=!0);var s=o?Em:Dm,c=Nm(t.width,t.height,a),l=Nm(t.naturalWidth,t.naturalHeight,a),d={x:s(100,((c.width-n.width/i)/2-e.x/i)/c.width*100),y:s(100,((c.height-n.height/i)/2-e.y/i)/c.height*100),width:s(100,n.width/c.width*100/i),height:s(100,n.height/c.height*100/i)},f=Math.round(s(l.width,d.width*l.width/100)),p=Math.round(s(l.height,d.height*l.height/100)),m=l.width>=l.height*r?{width:Math.round(p*r),height:p}:{width:f,height:Math.round(f/r)};return{croppedAreaPercentages:d,croppedAreaPixels:u(u({},m),{x:Math.round(s(l.width-m.width,d.x*l.width/100)),y:Math.round(s(l.height-m.height,d.y*l.height/100))})}}function Em(e,t){return Math.min(e,Math.max(0,t))}function Dm(e,t){return t}function Om(e,t,n,r,i,a){var o=Nm(t.width,t.height,n),s=Pm(r.width/o.width*(100/e.width),i,a);return{crop:{x:s*o.width/2-r.width/2-o.width*s*(e.x/100),y:s*o.height/2-r.height/2-o.height*s*(e.y/100)},zoom:s}}function km(e,t,n){var r=bm(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}function Am(e,t,n,r,i,a){n===void 0&&(n=0);var o=Nm(t.naturalWidth,t.naturalHeight,n),s=Pm(km(e,t,r),i,a),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((o.width-e.width)/2-e.x)*c,y:((o.height-e.height)/2-e.y)*c},zoom:s}}function jm(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Mm(e){return e*Math.PI/180}function Nm(e,t,n){var r=Mm(n);return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function Pm(e,t,n){return Math.min(Math.max(e,t),n)}function Fm(){return[...arguments].filter(function(e){return typeof e==`string`&&e.length>0}).join(` `).trim()}var Im=`.reactEasyCrop_Container { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden; + user-select: none; + touch-action: none; + cursor: move; + display: flex; + justify-content: center; + align-items: center; +} + +.reactEasyCrop_Image, +.reactEasyCrop_Video { + will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */ +} + +.reactEasyCrop_Contain { + max-width: 100%; + max-height: 100%; + margin: auto; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} +.reactEasyCrop_Cover_Horizontal { + width: 100%; + height: auto; +} +.reactEasyCrop_Cover_Vertical { + width: auto; + height: 100%; +} + +.reactEasyCrop_CropArea { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid rgba(255, 255, 255, 0.5); + box-sizing: border-box; + box-shadow: 0 0 0 9999em; + color: rgba(0, 0, 0, 0.5); + overflow: hidden; +} + +.reactEasyCrop_CropAreaRound { + border-radius: 50%; +} + +.reactEasyCrop_CropAreaGrid::before { + content: ' '; + box-sizing: border-box; + position: absolute; + border: 1px solid rgba(255, 255, 255, 0.5); + top: 0; + bottom: 0; + left: 33.33%; + right: 33.33%; + border-top: 0; + border-bottom: 0; +} + +.reactEasyCrop_CropAreaGrid::after { + content: ' '; + box-sizing: border-box; + position: absolute; + border: 1px solid rgba(255, 255, 255, 0.5); + top: 33.33%; + bottom: 33.33%; + left: 0; + right: 0; + border-left: 0; + border-right: 0; +} +`,Lm=1,Rm=3,zm=1,Bm=function(e){l(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.cropperRef=Q.createRef(),n.imageRef=Q.createRef(),n.videoRef=Q.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=typeof document<`u`?document:null,n.currentWindow=typeof window<`u`?window:null,n.resizeObserver=null,n.previousCropSize=null,n.isInitialized=!1,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(!(window.ResizeObserver===void 0||!n.containerRef)){var e=!0;n.resizeObserver=new window.ResizeObserver(function(t){if(e){e=!1;return}n.computeSizes()}),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener(`mousemove`,n.onMouseMove),n.currentDoc.removeEventListener(`mouseup`,n.onDragStopped),n.currentDoc.removeEventListener(`touchmove`,n.onTouchMove),n.currentDoc.removeEventListener(`touchend`,n.onDragStopped),n.currentDoc.removeEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.removeEventListener(`gestureend`,n.onGestureEnd),n.currentDoc.removeEventListener(`scroll`,n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener(`wheel`,n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.previousCropSize=e,n.emitCropData(),n.setInitialCrop(e),n.isInitialized=!0),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=Om(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,i=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}else if(n.props.initialCroppedAreaPixels){var a=Am(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=a.crop,i=a.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(i)}},n.computeSizes=function(){var e=n.imageRef.current||n.videoRef.current;if(e&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var t=n.containerRect.width/n.containerRect.height,r=n.imageRef.current?.naturalWidth||n.videoRef.current?.videoWidth||0,i=n.imageRef.current?.naturalHeight||n.videoRef.current?.videoHeight||0,a=e.offsetWidtho?{width:n.containerRect.height*o,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/o};break;case`horizontal-cover`:s={width:n.containerRect.width,height:n.containerRect.width/o};break;case`vertical-cover`:s={width:n.containerRect.height*o,height:n.containerRect.height};break}else s={width:e.offsetWidth,height:e.offsetHeight};n.mediaSize=u(u({},s),{naturalWidth:r,naturalHeight:i}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var c=n.props.cropSize?n.props.cropSize:ym(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(n.state.cropSize?.height!==c.height||n.state.cropSize?.width!==c.width)&&n.props.onCropSizeChange&&n.props.onCropSizeChange(c),n.setState({cropSize:c},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(c),c}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`mousemove`,n.onMouseMove),n.currentDoc.addEventListener(`mouseup`,n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,!(n.props.onTouchRequest&&!n.props.onTouchRequest(e))&&(n.currentDoc.addEventListener(`touchmove`,n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener(`touchend`,n.onDragStopped),n.saveContainerPosition(),e.touches.length===2?n.onPinchStart(e):e.touches.length===1&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),e.touches.length===2?n.onPinchMove(e):e.touches.length===1&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener(`gesturechange`,n.onGestureChange),n.currentDoc.addEventListener(`gestureend`,n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureChange=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),i=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var a=n.gestureRotationStart+e.rotation;n.props.onRotationChange(a)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r;n.dragStartPosition={x:e.x,y:e.y},n.dragStartCrop=u({},n.props.crop),(r=(t=n.props).onInteractionStart)==null||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame(function(){if(n.state.cropSize&&!(t===void 0||r===void 0)){var e=t-n.dragStartPosition.x,i=r-n.dragStartPosition.y,a={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+i},o=n.props.restrictPosition?xm(a,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):a;n.props.onCropChange(o)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),(t=(e=n.props).onInteractionEnd)==null||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&!(n.props.onWheelRequest&&!n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),i=(0,vm.default)(e).pixelY,a=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(a,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},function(){var e;return(e=n.props).onInteractionStart?.call(e)}),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout(function(){return n.setState({hasWheelJustStarted:!1},function(){var e;return(e=n.props).onInteractionEnd?.call(e)})},250)}},n.getPointOnContainer=function(e,t){var r=e.x,i=e.y;if(!n.containerRect)throw Error(`The Cropper is not mounted`);return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(i-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,i=n.props,a=i.crop,o=i.zoom;return{x:(t+a.x)/o,y:(r+a.y)/o}},n.setNewZoom=function(e,t,r){var i=(r===void 0?{}:r).shouldUpdatePosition,a=i===void 0?!0:i;if(!(!n.state.cropSize||!n.props.onZoomChange)){var o=Pm(e,n.props.minZoom,n.props.maxZoom);if(a){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),l={x:c.x*o-s.x,y:c.y*o-s.y},u=n.props.restrictPosition?xm(l,n.mediaSize,n.state.cropSize,o,n.props.rotation):l;n.props.onCropChange(u)}n.props.onZoomChange(o)}},n.getCropData=function(){return n.state.cropSize?Tm(n.props.restrictPosition?xm(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.crop;if(n.isInitialized&&n.previousCropSize?.width&&n.previousCropSize?.height&&(Math.abs(n.previousCropSize.width-n.state.cropSize.width)>1e-6||Math.abs(n.previousCropSize.height-n.state.cropSize.height)>1e-6)){var t=n.state.cropSize.width/n.previousCropSize.width,r=n.state.cropSize.height/n.previousCropSize.height;e={x:n.props.crop.x*t,y:n.props.crop.y*r}}var i=n.props.restrictPosition?xm(e,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):e;n.previousCropSize=n.state.cropSize,n.props.onCropChange(i),n.emitCropData()}},n.onKeyDown=function(e){var t,r,i=n.props,a=i.crop,o=i.onCropChange,s=i.keyboardStep,c=i.zoom,l=i.rotation,d=s;if(n.state.cropSize){e.shiftKey&&(d*=.2);var f=u({},a);switch(e.key){case`ArrowUp`:f.y-=d,e.preventDefault();break;case`ArrowDown`:f.y+=d,e.preventDefault();break;case`ArrowLeft`:f.x-=d,e.preventDefault();break;case`ArrowRight`:f.x+=d,e.preventDefault();break;default:return}n.props.restrictPosition&&(f=xm(f,n.mediaSize,n.state.cropSize,c,l)),e.repeat||(r=(t=n.props).onInteractionStart)==null||r.call(t),o(f)}},n.onKeyUp=function(e){var t,r;switch(e.key){case`ArrowUp`:case`ArrowDown`:case`ArrowLeft`:case`ArrowRight`:e.preventDefault();break;default:return}n.emitCropData(),(r=(t=n.props).onInteractionEnd)==null||r.call(t)},n}return t.prototype.componentDidMount=function(){!this.currentDoc||!this.currentWindow||(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),window.ResizeObserver===void 0&&this.currentWindow.addEventListener(`resize`,this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}),this.containerRef.addEventListener(`gesturestart`,this.onGestureStart)),this.currentDoc.addEventListener(`scroll`,this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement(`style`),this.styleRef.setAttribute(`type`,`text/css`),this.props.nonce&&this.styleRef.setAttribute(`nonce`,this.props.nonce),this.styleRef.innerHTML=Im,this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;!this.currentDoc||!this.currentWindow||(window.ResizeObserver===void 0&&this.currentWindow.removeEventListener(`resize`,this.computeSizes),(e=this.resizeObserver)==null||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener(`gesturestart`,this.preventZoomSafari),this.styleRef&&((t=this.styleRef.parentNode)==null||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t;e.rotation===this.props.rotation?e.aspect===this.props.aspect&&e.objectFit===this.props.objectFit?e.zoom===this.props.zoom?e.cropSize?.height!==this.props.cropSize?.height||e.cropSize?.width!==this.props.cropSize?.width?this.computeSizes():(e.crop?.x!==this.props.crop?.x||e.crop?.y!==this.props.crop?.y)&&this.emitCropAreaChange():this.recomputeCropPosition():this.computeSizes():(this.computeSizes(),this.recomputeCropPosition()),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener(`wheel`,this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&((t=this.videoRef.current)==null||t.load());var n=this.getObjectFit();n!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:n},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){if(this.props.objectFit===`cover`){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var e=this.containerRect.width/this.containerRect.height;return(this.imageRef.current?.naturalWidth||this.videoRef.current?.videoWidth||0)/(this.imageRef.current?.naturalHeight||this.videoRef.current?.videoHeight||0){let{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:o,resetBtnText:s,modalImage:c,aspect:l,minZoom:u,maxZoom:d,minAspect:f,maxAspect:p,cropShape:m,showGrid:h,cropperProps:g}=e,[_,v]=(0,Q.useState)({x:0,y:0}),[y,b]=(0,Q.useState)(Hm),[x,S]=(0,Q.useState)(Wm),[C,w]=(0,Q.useState)(l),T=(0,Q.useRef)({width:0,height:0,x:0,y:0}),E=(0,Q.useCallback)((e,t)=>{T.current=t},[]),D=(0,Q.useRef)(l);D.current!==l&&(D.current=l,w(l));let O=y!==Hm||x!==Wm||C!==l,k=()=>{b(Hm),S(Wm),w(l)};(0,Q.useImperativeHandle)(t,()=>({rotation:x,cropPixelsRef:T,onReset:k}));let A=`[display:flex] [align-items:center] [width:60%] [margin-inline:auto]`,j=`[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]`,M=`[flex:1]`;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Bm,Object.assign({},g,{ref:n,image:c,crop:_,zoom:y,rotation:x,aspect:C,minZoom:u,maxZoom:d,zoomWithScroll:r,cropShape:m,showGrid:h,onCropChange:v,onZoomChange:b,onRotationChange:S,onCropComplete:E,classes:{containerClassName:`${Vm}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${Vm}-media`}})),r&&(0,$.jsxs)(`section`,{className:`${Vm}-control ${Vm}-control-zoom ${A}`,children:[(0,$.jsx)(`button`,{className:j,onClick:()=>b(+(y-Um).toFixed(1)),disabled:y-Umb(+(y+Um).toFixed(1)),disabled:y+Um>d,children:`+`})]}),i&&(0,$.jsxs)(`section`,{className:`${Vm}-control ${Vm}-control-rotation ${A}`,children:[(0,$.jsx)(`button`,{className:`${j} [font-size:16px]`,onClick:()=>S(x-qm),disabled:x===Gm,children:`↺`}),(0,$.jsx)(pe,{className:M,min:Gm,max:Km,step:qm,value:x,onChange:S}),(0,$.jsx)(`button`,{className:`${j} [font-size:16px]`,onClick:()=>S(x+qm),disabled:x===Km,children:`↻`})]}),a&&(0,$.jsxs)(`section`,{className:`${Vm}-control ${Vm}-control-aspect ${A}`,children:[(0,$.jsx)(`button`,{className:j,onClick:()=>w(+(C-Jm).toFixed(2)),disabled:C-Jmw(+(C+Jm).toFixed(2)),disabled:C+Jm>p,children:`↔`})]}),o&&(r||i||a)&&(0,$.jsx)(Fe,{className:`[position:absolute] [bottom:20px]`,style:O?{}:{opacity:.3,pointerEvents:`none`},onClick:k,children:s})]})})),Xm=`/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */.visible{visibility:visible}.\\!\\[position\\:relative\\]{position:relative!important}.\\[position\\:absolute\\]{position:absolute}.\\[bottom\\:20px\\]{bottom:20px}.container{width:100%}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[display\\:flex\\]{display:flex}.grid{display:grid}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.\\[width\\:100\\%\\]{width:100%}.\\[flex\\:1\\]{flex:1}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[align-items\\:center\\]{align-items:center}.\\[justify-content\\:center\\]{justify-content:center}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.disabled\\:\\[cursor\\:default\\]{&:disabled{cursor:default}}.disabled\\:\\[opacity\\:20\\%\\]{&:disabled{opacity:20%}}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]{&~section:first-of-type{margin-top:16px}}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]{&~section:last-of-type{margin-bottom:16px}}`;(function(){if(typeof document>`u`)return;let e=document.createElement(`style`),t=document.querySelector(`meta[name="csp-nonce"]`);t&&t.content&&e.setAttribute(`nonce`,t.content),e.textContent=Xm,document.head.appendChild(e)})();var Zm=(e,t)=>{let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number),i=Math.max(n.length,r.length);for(let e=0;ei)return!0;if(t{let{quality:r=.4,fillColor:i=`white`,zoomSlider:a=!0,rotationSlider:s=!1,aspectSlider:c=!1,showReset:l=!1,resetText:u,aspect:d=1,minZoom:f=1,maxZoom:p=3,minAspect:h=.5,maxAspect:g=2,cropShape:_=`rect`,showGrid:v=!1,cropperProps:y,modalClassName:b,modalTitle:x,modalWidth:S,modalOk:C,modalCancel:w,onModalOk:T,onModalCancel:E,modalProps:D,beforeCrop:O,children:k}=t,A=(0,Q.useRef)({});A.current.onModalOk=T,A.current.onModalCancel=E,A.current.beforeCrop=O;let j=(0,Q.useRef)(null),M=(0,Q.useCallback)(e=>{let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=((e?.getRootNode)?.call(e)||document).querySelector(`.${Vm}-media`),{width:a,height:o,x:c,y:l}=j.current.cropPixelsRef.current;if(s&&j.current.rotation!==Wm){let{naturalWidth:e,naturalHeight:s}=r,u=j.current.rotation*(Math.PI/180),d=Math.abs(Math.sin(u)),f=Math.abs(Math.cos(u)),p=e*f+s*d,m=s*f+e*d;t.width=p,t.height=m,n.fillStyle=i,n.fillRect(0,0,p,m);let h=p/2,g=m/2;n.translate(h,g),n.rotate(u),n.translate(-h,-g);let _=(p-e)/2,v=(m-s)/2;n.drawImage(r,0,0,e,s,_,v,e,s);let y=n.getImageData(0,0,p,m);t.width=a,t.height=o,n.putImageData(y,-c,-l)}else t.width=a,t.height=o,n.fillStyle=i,n.fillRect(0,0,a,o),n.drawImage(r,c,l,a,o,0,0,a,o);return t},[i,s]),[N,P]=(0,Q.useState)(!1),[F,I]=(0,Q.useState)(``),L=(0,Q.useRef)(void 0),R=(0,Q.useRef)(void 0),z=(0,Q.useCallback)(e=>o(void 0,[e],void 0,function*({beforeUpload:e,file:t,resolve:n,reject:r}){let i=t;if(typeof e!=`function`){n(i);return}try{let r=yield e(t,[t]);n(r===!1?!1:r!==!0&&r||i)}catch(e){r(e)}}),[]),B=(0,Q.useCallback)(e=>((t,n)=>new Promise((i,a)=>o(void 0,void 0,void 0,function*(){let s=t;if(typeof A.current.beforeCrop==`function`)try{let r=yield A.current.beforeCrop(t,n);if(r===!1)return z({beforeUpload:e,file:t,resolve:i,reject:a});r!==!0&&(s=r||t)}catch{return z({beforeUpload:e,file:t,resolve:i,reject:a})}let c=new FileReader;c.addEventListener(`load`,()=>{typeof c.result==`string`&&(P(!0),setTimeout(()=>{I(c.result)},10))}),c.readAsDataURL(s),L.current=()=>{var e,t;P(!1),I(``),j.current.onReset();let n=!1;(t=(e=A.current).onModalCancel)==null||t.call(e,e=>{i(e),n=!0}),n||i(m.LIST_IGNORE)},R.current=t=>o(void 0,void 0,void 0,function*(){P(!1),I(``),j.current.onReset();let n=M(t.target),{type:c,name:l,uid:u}=s;n.toBlob(t=>o(void 0,void 0,void 0,function*(){let n=new File([t],l,{type:c});Object.assign(n,{uid:u}),z({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),(n=(t=A.current).onModalOk)==null||n.call(t,e)},reject:e=>{var t,n;a(e),(n=(t=A.current).onModalOk)==null||n.call(t,e)}})}),c,r)})}))),[M,r,z]),ee=(0,Q.useCallback)(t=>{let n=Array.isArray(t)?t[0]:t,r=n.props,{beforeUpload:i,accept:a}=r,o=e(r,[`beforeUpload`,`accept`]);return Object.assign(Object.assign({},n),{props:Object.assign(Object.assign({},o),{accept:a||`image/*`,beforeUpload:B(i)})})},[B]),V=(0,Q.useMemo)(()=>{let e={};return S!==void 0&&(e.width=S),C!==void 0&&(e.okText=C),w!==void 0&&(e.cancelText=w),e},[w,C,S]),H=`${Vm}-modal${b?` ${b}`:``}`,te=(typeof window>`u`?``:window.navigator.language)===`zh-CN`,ne=x||(te?`编辑图片`:`Edit image`),re=u||(te?`重置`:`Reset`);return(0,$.jsxs)($.Fragment,{children:[ee(k),(0,$.jsx)(se,Object.assign({},D,V,{open:N,title:ne,onCancel:L.current,onOk:R.current,wrapClassName:H,destroyOnHidden:!0},Zm(ft,`6.3.1`)?{mask:{closable:!1}}:{maskClosable:!0},{children:(0,$.jsx)(Ym,{ref:j,cropperRef:n,zoomSlider:a,rotationSlider:s,aspectSlider:c,showReset:l,resetBtnText:re,modalImage:F,aspect:d,minZoom:f,maxZoom:p,minAspect:h,maxAspect:g,cropShape:_,showGrid:v,cropperProps:y})}))]})}),$m=({action:e,value:t,onChange:n,mode:r=`single`,disabled:i=!1,maxCount:a,maxWidth:o=1920,maxHeight:s=1080,maxSize:c=5,croppable:l=!1,cropperOptions:u})=>{let{t:d}=Ee(),[f,p]=(0,Q.useState)([]),h=(0,Q.useMemo)(()=>a||(r===`single`?1:9),[r,a]),g=e=>({uid:e.id?.toString()||`${e.id}`,name:e.file_name||`image-${e.id}`,status:`done`,url:e.preview_url,response:{success:!0,data:e,message:`Upload success`}});(0,Q.useEffect)(()=>{if(!t){p([]);return}p((Array.isArray(t)?t:[t]).map(g))},[t]);let _=(0,Q.useCallback)(e=>new Promise((t,n)=>{if(!e.type.startsWith(`image/`)){D.error(d(`xin.form.imageUploader.error.notImage`)),n(!1);return}if(!(e.size/1024/1024{let r=document.createElement(`img`);r.src=e.target?.result,r.onload=()=>{let e=r.width<=o,i=r.height<=s;if(!e||!i){D.error(d(`xin.form.imageUploader.error.dimensionExceeded`,{maxWidth:o,maxHeight:s})),n(!1);return}t(!0)},r.onerror=()=>{D.error(d(`xin.form.imageUploader.error.loadFailed`)),n(!1)}},r.onerror=()=>{D.error(d(`xin.form.imageUploader.error.readFailed`)),n(!1)}}),[c,o,s]),v=({fileList:e})=>{if(e.length!==0&&(p(e),e.every(e=>e.status===`done`||e.status===`error`))){let t=e.filter(e=>e.status===`done`&&e.response).map(e=>e.response.data);r===`single`?n?.(t[0]):n?.(t);let i=e.filter(e=>e.status===`error`);p([...t.map(g),...i])}},b=(0,Q.useMemo)(()=>(0,$.jsxs)(`button`,{style:{border:0,background:`none`},type:`button`,children:[(0,$.jsx)(y,{}),(0,$.jsx)(`div`,{style:{marginTop:8},children:d(`xin.form.imageUploader.uploadText`)})]}),[d]),x=(0,$.jsx)(m,{listType:`picture-card`,name:`file`,fileList:f,beforeUpload:_,onChange:v,disabled:i,maxCount:h,multiple:r===`multiple`,headers:{Authorization:`Bearer ${localStorage.getItem(`token`)}`},onRemove:e=>{p(f.filter(t=>t.uid!=e.uid))},action:`/index.php`+e,accept:`image/*`,children:f.length>=h?null:b});return(0,$.jsx)($.Fragment,{children:l&&r===`single`?(0,$.jsx)(Qm,{...u,children:x}):x})};function eh(e,t,n){return mt({url:e,method:`get`,params:t,...n||{}})}function th(e,t,n){return mt({url:e,method:`post`,data:t,...n||{}})}function nh(e,t,n){return mt({url:e,method:`put`,data:t,...n||{}})}function rh(e,t,n){return mt({url:e,method:`delete`,params:t,...n||{}})}var ih=({value:e,onChange:t,mode:n=`single`,placeholder:r,disabled:i=!1,readonly:a=!1,showDept:o=!0,maxTagCount:c=2})=>{let{t:l}=Ee(),[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(!1),[m,g]=(0,Q.useState)([]),[_,v]=(0,Q.useState)([]),[y,b]=(0,Q.useState)(!1),[x,S]=(0,Q.useState)([]),[C,w]=(0,Q.useState)({current:1,pageSize:10,total:0}),[T,E]=(0,Q.useState)();(0,Q.useEffect)(()=>{if(!e){g([]),v([]);return}let t=Array.isArray(e)?e:[e];if(typeof t[0]==`object`){g(t),v(t.map(e=>e.id));return}p(!0),Promise.all(t.map(e=>eh(`/sys-user/list`,{id:e}))).then(e=>{let t=e.map(e=>e.data.data?.data?.[0]).filter(Boolean);g(t),v(t.map(e=>e.id))}).catch(e=>console.error(`Failed to load users:`,e)).finally(()=>p(!1))},[e]);let D=(0,Q.useMemo)(()=>[{title:l(`system.user.id`),dataIndex:`id`,width:80,align:`center`},{title:l(`system.user.username`),dataIndex:`username`,width:120,align:`center`},{title:l(`system.user.nickname`),dataIndex:`nickname`,width:120,align:`center`},{title:l(`system.user.mobile`),dataIndex:`mobile`,width:130,align:`center`},...o?[{title:l(`system.user.dept`),dataIndex:`dept_name`,width:120,align:`center`,render:e=>e?(0,$.jsx)(h,{color:`volcano`,children:e}):`-`}]:[],{title:l(`system.user.status`),dataIndex:`status`,width:100,align:`center`,render:e=>e===1?(0,$.jsx)(h,{color:`success`,children:l(`system.user.status.1`)}):(0,$.jsx)(h,{color:`error`,children:l(`system.user.status.0`)})}],[l,o]),O=(0,Q.useCallback)(()=>{t?.(n===`single`?m[0]?.id||null:m.map(e=>e.id)),d(!1)},[n,m,t]),k=(0,Q.useCallback)((e,t)=>{if(n===`single`&&e.length>1){let n=e[e.length-1],r=t.find(e=>e.id===n);v([n]),g([r])}else v(e),g(t)},[n]),j=(0,Q.useCallback)(async(e=1,t=10,n)=>{b(!0);try{let r=await eh(`/system-user/list`,{page:e,pageSize:t,keywordSearch:n});S(r.data.data?.data||[]),w(n=>({...n,current:e,pageSize:t,total:r.data.data?.total||0}))}catch(e){console.error(`Failed to fetch users:`,e),S([])}finally{b(!1)}},[]);(0,Q.useEffect)(()=>{u&&j(1,C.pageSize,T?.keywordSearch)},[u]);let M=(0,Q.useMemo)(()=>({columns:D,rowKey:`id`,dataSource:x,loading:y,rowSelection:{type:n===`single`?`radio`:`checkbox`,selectedRowKeys:_,onChange:k,preserveSelectedRowKeys:!0},pagination:{...C,showSizeChanger:!0,showQuickJumper:!0,onChange:(e,t)=>{j(e,t,T?.keywordSearch)}},bordered:!0,size:`small`,scroll:{x:800}}),[D,x,y,n,_,k,C,T,j]),N=(0,Q.useCallback)(e=>{n===`single`?(!m.find(t=>t.id===e)&&e&&eh(`/sys-user/list`,{id:e}).then(e=>{let t=e.data.data?.data?.[0];t&&(g([t]),v([t.id]))}).catch(e=>console.error(`Failed to load user:`,e)),t?.(e||null)):t?.(e)},[n,m,t]),P=(0,Q.useMemo)(()=>m.map(e=>({label:e.nickname||e.username,value:e.id})),[m]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{mode:n===`multiple`?`multiple`:void 0,value:n===`single`?m[0]?.id||void 0:m.map(e=>e.id),onChange:N,placeholder:r||l(`xin.form.userSelector.placeholder`),disabled:i,loading:f,maxTagCount:c,open:!1,onClick:()=>!i&&!a&&d(!0),options:P,style:{width:`100%`},allowClear:!0,onClear:()=>{g([]),v([]),t?.(n===`single`?null:[])}}),(0,$.jsxs)(se,{title:l(`xin.form.userSelector.modal.title`),open:u,onCancel:()=>d(!1),onOk:O,width:1e3,okText:l(`xin.form.userSelector.modal.okText`),cancelText:l(`xin.form.userSelector.modal.cancelText`),children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(A.Search,{placeholder:l(`system.user.searchPlaceholder`),style:{width:304},onSearch:e=>{E({keywordSearch:e}),j(1,C.pageSize,e)},allowClear:!0})}),(0,$.jsx)(s,{...M})]})]})},{TextArea:ah,Password:oh}=A,{RangePicker:sh}=pp;function ch(e){let{valueType:t,...n}=e,r;switch(t){case`password`:r=(0,$.jsx)(oh,{...n});break;case`textarea`:r=(0,$.jsx)(ah,{rows:4,...n});break;case`digit`:r=(0,$.jsx)(ne,{style:{width:`100%`},...n});break;case`money`:r=(0,$.jsx)(ne,{style:{width:`100%`},precision:2,prefix:`¥`,...n});break;case`select`:r=(0,$.jsx)(J,{...n});break;case`treeSelect`:r=(0,$.jsx)(dm,{...n});break;case`cascader`:r=(0,$.jsx)(Gf,{...n});break;case`radio`:r=(0,$.jsx)(f.Group,{options:[],optionType:`default`,...n});break;case`radioButton`:r=(0,$.jsx)(f.Group,{options:[],optionType:`button`,...n});break;case`checkbox`:r=(0,$.jsx)(ve.Group,{options:[],...n});break;case`switch`:r=(0,$.jsx)(ut,{...n});break;case`rate`:r=(0,$.jsx)(Dp,{...n});break;case`slider`:r=(0,$.jsx)(pe,{...n});break;case`date`:r=(0,$.jsx)(pp,{style:{width:`100%`},...n});break;case`dateTime`:r=(0,$.jsx)(pp,{style:{width:`100%`},showTime:!0,...n});break;case`dateRange`:r=(0,$.jsx)(sh,{style:{width:`100%`},...n});break;case`time`:r=(0,$.jsx)(jp,{style:{width:`100%`},...n});break;case`timeRange`:r=(0,$.jsx)(jp.RangePicker,{style:{width:`100%`},...n});break;case`week`:r=(0,$.jsx)(pp,{style:{width:`100%`},picker:`week`,...n});break;case`month`:r=(0,$.jsx)(pp,{style:{width:`100%`},picker:`month`,...n});break;case`quarter`:r=(0,$.jsx)(pp,{style:{width:`100%`},picker:`quarter`,...n});break;case`year`:r=(0,$.jsx)(pp,{style:{width:`100%`},picker:`year`,...n});break;case`color`:r=(0,$.jsx)(ce,{...n});break;case`image`:r=(0,$.jsx)($m,{...n});break;case`icon`:r=(0,$.jsx)(pm,{...n});break;case`user`:r=(0,$.jsx)(ih,{...n});break;default:r=(0,$.jsx)(A,{...n});break}return r}var lh=et();function uh(e){let{columns:t,layoutType:n=`Form`,grid:r=!1,rowProps:i,colProps:a={span:12},onFinish:o,formRef:s,form:c,modalProps:l,drawerProps:u,trigger:d,submitter:f,...p}=e,{t:m}=Ee(),[h]=K.useForm(c),[g,_]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1);(0,Q.useImperativeHandle)(s,()=>({...h,open:x,close:S,isOpen:()=>g,setLoading:e=>y(e)}));let b=(0,Q.useCallback)(async e=>{if(o)try{y(!0),await o(e)!==!1&&(n===`ModalForm`||n===`DrawerForm`)&&_(!1)}finally{y(!1)}},[o,n]),x=()=>_(!0),S=()=>_(!1),C=(0,Q.useCallback)((e,t)=>{let{dataIndex:n,valueType:i,title:o=``,fieldProps:s={},dependency:c,fieldRender:l,colProps:u={span:12}}=e,d=(0,lh.pick)(e,`colon.extra.getValueFromEvent.help.hidden.htmlFor.initialValue.name.normalize.noStyle.preserve.tooltip.trigger.required.rules.validateFirst.validateDebounce.validateStatus.hasFeedback.validateTrigger.valuePropName.messageVariables.wrapperCol.layout.label.labelAlign.labelCol`.split(`.`)),f=String(n)||`form-item-${t}`;if(c)return(0,$.jsx)(K.Item,{noStyle:!0,shouldUpdate:!0,children:({getFieldsValue:t})=>{let p=t();if(c.visible&&!c.visible(p))return null;let m=c.disabled?c.disabled(p):!1,g=c.fieldProps?c.fieldProps(p):{},_=(0,$.jsx)(ch,{valueType:i,placeholder:o,...s,...g,disabled:m||s?.disabled});return r?(0,Q.createElement)(ee,{...a,...u,key:f},(0,$.jsx)(K.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):_},f)):(0,$.jsx)(K.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):_},f)}});{let t=(0,$.jsx)(ch,{valueType:i,placeholder:o,...s});return r?(0,Q.createElement)(ee,{...a,...u,key:f},(0,$.jsx)(K.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)):(0,$.jsx)(K.Item,{name:n,label:e.title||e.label,...d,children:l?l(h):t},f)}},[r,c]),w=(0,Q.useMemo)(()=>{if(f?.render===!1)return null;let e={submit:(0,$.jsx)(Fe,{type:`primary`,loading:v,onClick:()=>h.submit(),...f?.submitButtonProps,children:f?.submitText||m(`xin.form.submit`)}),close:(0,$.jsx)(Fe,{loading:v,onClick:S,...f?.closeButtonProps,children:f?.closeText||m(`xin.form.cancel`)}),reset:(0,$.jsx)(Fe,{loading:v,onClick:()=>h.resetFields(),...f?.resetButtonProps,children:f?.resetText||m(`xin.form.reset`)})};return typeof f?.render==`function`?f.render(e,s):n===`Form`?(0,$.jsx)(K.Item,{children:(0,$.jsxs)(W,{children:[e.reset,e.submit]})}):(0,$.jsxs)(W,{children:[e.reset,e.submit,e.close]})},[v,c,f,m]),T=(0,Q.useMemo)(()=>(0,$.jsxs)(K,{...p,form:h,onFinish:b,children:[r?(0,$.jsx)(_t,{...i,children:t.map((e,t)=>C(e,t))}):t.map((e,t)=>C(e,t)),n===`Form`&&w]}),[c,b,e,r,i,t,C,n,w]),E=(0,Q.useMemo)(()=>d?Q.cloneElement(d,{onClick:x}):null,[d,x]);return n===`ModalForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(se,{open:g,onCancel:S,footer:w,...l,children:T})]}):n===`DrawerForm`?(0,$.jsxs)($.Fragment,{children:[E,(0,$.jsx)(xt,{open:g,onClose:S,footer:w,...u,children:T})]}):T}export{eh as a,rh as i,ch as n,nh as o,th as r,dm as s,uh as t}; \ No newline at end of file diff --git a/public/assets/XinTable-D_6_7i3V.js b/public/assets/XinTable-D_6_7i3V.js new file mode 100644 index 0000000..156b86b --- /dev/null +++ b/public/assets/XinTable-D_6_7i3V.js @@ -0,0 +1 @@ +import{o as e,s as t}from"./tslib.es6-DffexlHv.js";import{a as n,i as r,n as i,o as a,r as o,t as s}from"./XinForm-DX04WSwD.js";import{t as c}from"./card-BDbI8Gdq.js";import{t as l}from"./flex-Chz2_RPk.js";import{$t as u,Ca as d,Dn as f,Dt as p,Ea as m,Hn as ee,It as te,Jt as h,K as ne,Lt as g,Pt as _,Rr as re,Tn as ie,V as ae,at as oe,c as v,gn as y,ot as se,q as ce,qt as le,r as b,s as x,w as ue,xt as de,yt as fe}from"./index-DThTpSPU.js";import{t as S}from"./AuthButton-B-7Fg-gg.js";var C=m(d(),1),w=b(),T=x();function pe(e){let{columns:t,handleSearch:n,submitter:r,form:a,grid:o=!0,rowProps:s={gutter:[20,20],wrap:!0},colProps:c={xs:24,sm:12,md:12,lg:8,xl:6,xxl:4},...l}=e,{t:u}=v(),[d]=_.useForm(a),f=(0,C.useCallback)((e,t)=>{let{dataIndex:n,valueType:r,title:a=``,fieldProps:s={},fieldRender:l}=e,u=(0,w.pick)(e,[`colon`,`extra`,`getValueFromEvent`,`help`,`htmlFor`,`initialValue`,`labelAlign`,`labelCol`,`name`,`normalize`,`noStyle`,`tooltip`,`wrapperCol`,`layout`]),f=String(n)||`form-item-${t}`,p=(0,T.jsx)(i,{valueType:r,placeholder:a,...s}),m=(0,T.jsx)(_.Item,{style:{marginBottom:0},name:f,label:e.title,...u,required:!1,children:l?l(d):p},f);return o?(0,C.createElement)(h,{...c,...e.colProps,key:f},m):m},[d,o,c]),p=(0,C.useMemo)(()=>{if(r?.render===!1)return null;let e={search:(0,T.jsx)(y,{type:`primary`,onClick:()=>d.submit(),...r?.submitButtonProps,children:r?.submitText||u(`xin.table.search.search`)}),reset:(0,T.jsx)(y,{onClick:()=>d.resetFields(),...r?.resetButtonProps,children:r?.resetText||u(`xin.table.search.reset`)})};return typeof r?.render==`function`?r.render(e):(0,T.jsx)(_.Item,{style:{marginBottom:0},children:(0,T.jsxs)(g,{size:16,children:[e.reset,e.search]})})},[d,r,u]);return(0,T.jsx)(_,{...l,form:d,onFinish:n,style:{width:`100%`},children:o?(0,T.jsxs)(fe,{...s,children:[t.map((e,t)=>f(e,t)),(0,T.jsx)(h,{...c,children:p})]}):(0,T.jsxs)(T.Fragment,{children:[t.map((e,t)=>f(e,t)),p]})})}var me=10,he=1;function E(i){let{api:d,accessName:m,rowKey:h,columns:b,tableRef:x,formProps:fe,modalProps:E,cardProps:ge,searchProps:_e,operateProps:ve={},pagination:ye={},addShow:be=!0,editShow:D=!0,deleteShow:O=!0,searchShow:k=!0,operateShow:A=!0,paginationShow:xe=!0,keywordSearchShow:Se=!0,toolBarRender:j,actionBarRender:M,operateRender:N,handleRequest:P,requestParams:F,handleFinish:I}=i,{t:L}=v(),R=(0,C.useRef)(null),[z,B]=(0,C.useState)(!0),[V,H]=(0,C.useState)([]),[U,Ce]=(0,C.useState)(0),[W,G]=(0,C.useState)({page:he,pageSize:me}),[we,K]=(0,C.useState)(),[q,Te]=(0,C.useState)(),[J]=_.useForm(),[Y,Ee]=(0,C.useState)([]),[De,Oe]=(0,C.useState)(!1),[X,ke]=(0,C.useState)(`create`),[Z,Ae]=(0,C.useState)(void 0),Q=(0,C.useCallback)(async e=>{try{B(!0);let t=Object.assign({page:he,pageSize:me},e),r=F?F(t):t,i;if(P)i=await P(r);else{let{data:e}=await n(d,r);i=e.data}H(i.data),Ce(i.total)}finally{B(!1)}},[d,P,F]),je=(0,C.useCallback)(()=>{ke(`create`),Ae(void 0),R.current?.resetFields(),R.current?.open()},[]),Me=(0,C.useCallback)(e=>{ke(`update`),Ae(e),R.current?.setFieldsValue(e),R.current?.open()},[]);(0,C.useImperativeHandle)(x,()=>({reload:async()=>{await Q()},reset:async()=>{J.resetFields(),G({page:1,pageSize:10}),await Q({page:1,pageSize:10})},getDataSource:()=>V,setDataSource:H,getTotal:()=>U,getLoading:()=>z,setLoading:B,setPageInfo:(e,t)=>{G(n=>({...n,...e!==void 0&&{page:e},...t!==void 0&&{pageSize:t}}))},getForm:()=>R.current,getSearchForm:()=>J})),(0,C.useEffect)(()=>{Q()},[]);let Ne=async(e,t,n)=>{let r={...W,page:e.current??W.page,pageSize:e.pageSize??W.pageSize};(0,w.isEmpty)(t)||(r.filterValues=t),n&&!(0,w.isArray)(n)&&!(0,w.isEmpty)(n)&&n.field?r.sorterValue={field:String(n.field),order:n.order===`ascend`?`asc`:`desc`}:delete r.sorterValue,G(r),await Q(r)},Pe=async e=>{if(!e){window.$message?.warning(L(`xin.table.keywordEmpty`));return}let t={...W,page:1,keywordSearch:e};G(t),await Q(t)},Fe=e=>{if(e.target.value)G({...W,keywordSearch:e.target.value});else{let e={...W};delete e.keywordSearch,G(e)}},Ie=async()=>{let e=J.getFieldsValue();Object.keys(e).forEach(t=>{(e[t]===``||e[t]===void 0)&&delete e[t]}),await Q({page:1,...W,...e})},Le=(0,C.useMemo)(()=>k?b.filter(e=>e.hideInSearch!==!0):[],[b,k]),Re=(0,C.useMemo)(()=>b.filter(e=>X===`update`?e.hideInForm!==!0&&e.hideInUpdate!==!0:e.hideInForm!==!0&&e.hideInCreate!==!0),[b,X]),$=(0,C.useMemo)(()=>b.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>(0,w.omit)(e,[`hideInTable`,`hideInForm`,`hideInSearch`,`search`])),[b]);(0,C.useEffect)(()=>{Ee($.map(e=>e.dataIndex))},[$]);let ze=e=>{let t=()=>(typeof D==`function`?D(e):D)?(0,T.jsx)(S,{auth:i.accessName+`.update`,children:(0,T.jsx)(f,{title:L(`xin.table.edit`),children:(0,T.jsx)(y,{type:`primary`,icon:(0,T.jsx)(oe,{}),size:`small`,onClick:()=>Me(e)})})},`update`):null,n=()=>(typeof O==`function`?O(e):O)?(0,T.jsx)(S,{auth:i.accessName+`.delete`,children:(0,T.jsx)(f,{title:L(`xin.table.delete`),children:(0,T.jsx)(y,{danger:!0,type:`primary`,icon:(0,T.jsx)(se,{}),size:`small`,onClick:()=>Be(e)})})},`delete`):null;return N?N(e,{del:n(),edit:t()}):[n(),t()]},Be=async e=>{window.$modal?.confirm({title:L(`xin.table.deleteConfirm`,{id:e[h]}),okText:L(`xin.table.deleteOk`),cancelText:L(`xin.table.deleteCancel`),onOk:async()=>{await r(d+`/${e[h]}`),window.$message?.success(L(`xin.table.deleteSuccess`)),await Q(W)}})},Ve=async e=>{try{if(R.current?.setLoading(!0),I){await I(e,X,R,Z)&&(await Q(W),R.current?.close());return}if(X===`create`)await o(d,e),window.$message?.success(L(`xin.table.form.createSuccess`));else if(Z&&h)await a(d+`/${Z[h]}`,e),window.$message?.success(L(`xin.table.form.updateSuccess`));else{window.$message?.error(L(`xin.table.form.updateKeyUndefined`));return}await Q(W),R.current?.close()}finally{R.current?.setLoading(!1)}},He={items:[{key:`large`,label:L(`xin.table.density.default`),onClick:()=>K(`large`)},{key:`middle`,label:L(`xin.table.density.middle`),onClick:()=>K(`middle`)},{key:`small`,label:L(`xin.table.density.compact`),onClick:()=>K(`small`)}],selectedKeys:[we||`large`]},Ue=(0,C.useMemo)(()=>b.filter(e=>e.hideInTable!==!0&&e.dataIndex).map(e=>({key:String(e.dataIndex),title:e.title})),[b]),We=e=>{(0,w.isArray)(e)&&Ee(e)},Ge=(0,C.useMemo)(()=>{let e=$.filter(e=>Y.includes(e.dataIndex));return A?[...e,{title:L(`xin.table.operate`),key:`operate`,align:`center`,...ve,render:(e,t)=>(0,T.jsx)(g,{children:[...ze(t)]})}]:e},[$,Y,A]),Ke={showQuickJumper:!0,showSizeChanger:!0,showTotal:e=>L(`xin.table.total`,{total:e}),pageSize:W.pageSize,...ye,current:W.page,total:U},qe=()=>{let e=be?(0,T.jsx)(S,{auth:m+`.create`,children:(0,T.jsx)(y,{type:`primary`,onClick:je,icon:(0,T.jsx)(u,{}),children:L(`xin.table.add`)})}):null,t=k?(0,T.jsx)(y,{type:`primary`,icon:(0,T.jsx)(ee,{}),onClick:()=>Oe(!De),children:`搜索`}):null,n=Se?(0,T.jsx)(p.Search,{onChange:Fe,placeholder:L(`xin.table.keywordPlaceholder`),style:{width:200},value:W.keywordSearch,onSearch:Pe}):null;return M?M({add:e,search:t,keywordSearch:n}).filter(Boolean):[e,t,n].filter(Boolean)},Je=()=>{let e=(0,T.jsx)(f,{title:`刷新表格`,children:(0,T.jsx)(y,{type:`text`,icon:(0,T.jsx)(de,{}),onClick:()=>Q()})}),n=(0,T.jsx)(te,{menu:He,trigger:[`click`],children:(0,T.jsx)(y,{type:`text`,icon:(0,T.jsx)(ae,{})})}),r=(0,T.jsx)(f,{title:L(q?`xin.table.hideBorder`:`xin.table.showBorder`),children:(0,T.jsx)(y,{type:`text`,icon:q?(0,T.jsx)(ce,{}):(0,T.jsx)(ne,{}),onClick:()=>Te(!q)})}),i=(0,T.jsx)(ie,{content:(0,T.jsx)(re,{theme:{components:{Tree:{switcherSize:12}}},children:(0,T.jsx)(t,{icon:!1,blockNode:!0,checkable:!0,treeData:Ue,selectable:!1,checkedKeys:Y,onCheck:We})}),trigger:`click`,placement:`bottomRight`,title:L(`xin.table.columnSettings`),children:(0,T.jsx)(f,{title:L(`xin.table.columnSettings`),children:(0,T.jsx)(y,{type:`text`,icon:(0,T.jsx)(ue,{})})})});return j?j({reload:e,columnHeight:n,hideBorder:r,columnSetting:i}).filter(Boolean):[e,n,r,i]};return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(c,{...ge,children:[De&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(pe,{form:J,columns:Le,handleSearch:Ie,..._e}),(0,T.jsx)(le,{})]}),(0,T.jsxs)(l,{justify:`space-between`,align:`center`,style:{marginBottom:20},children:[(0,T.jsx)(g,{children:[...qe()]}),(0,T.jsx)(g,{size:1,children:[...Je()]})]}),(0,T.jsx)(e,{loading:z,dataSource:V,size:we,bordered:q,...i,columns:Ge,rowKey:h,onChange:Ne,pagination:xe?Ke:!1})]}),(0,T.jsx)(s,{...fe,columns:Re,formRef:R,layoutType:`ModalForm`,modalProps:{title:L(X===`update`?`xin.table.form.editTitle`:`xin.table.form.createTitle`),styles:{header:{marginBottom:16}},...E},onFinish:Ve})]})}export{E as t}; \ No newline at end of file diff --git a/public/assets/address-CKNj6Kud.js b/public/assets/address-CKNj6Kud.js new file mode 100644 index 0000000..0d1f53a --- /dev/null +++ b/public/assets/address-CKNj6Kud.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/member/address`,columns:[{title:t(`member.address.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`member.address.user_id`),dataIndex:`user_id`,valueType:`digit`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.user_id.required`)}],render:(e,t)=>t.user?`${t.user.nickname||t.user.username} (${t.user.mobile||`-`})`:`ID: ${t.user_id}`},{title:t(`member.address.name`),dataIndex:`name`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.name.required`)}]},{title:t(`member.address.mobile`),dataIndex:`mobile`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.mobile.required`)}]},{title:t(`member.address.province`),dataIndex:`province`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.province.required`)}],hideInSearch:!0},{title:t(`member.address.city`),dataIndex:`city`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.city.required`)}],hideInSearch:!0},{title:t(`member.address.district`),dataIndex:`district`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.district.required`)}],hideInSearch:!0},{title:t(`member.address.detail`),dataIndex:`detail`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`member.address.detail.required`)}],hideInSearch:!0},{title:t(`member.address.full_address`),dataIndex:`full_address`,hideInForm:!0,hideInSearch:!0,align:`center`,render:(e,t)=>[t.province,t.city,t.district,t.detail].filter(Boolean).join(``)},{title:t(`member.address.is_default`),dataIndex:`is_default`,valueType:`switch`,align:`center`,render:n=>n===1?(0,d.jsx)(e,{color:`blue`,children:t(`member.address.is_default.1`)}):(0,d.jsx)(e,{children:t(`member.address.is_default.0`)})},{title:t(`member.address.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`member.address.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`member.address`,scroll:{x:1400},formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`member.address.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`member.address.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/agent-B0_A2P2o.js b/public/assets/agent-B0_A2P2o.js new file mode 100644 index 0000000..a191f91 --- /dev/null +++ b/public/assets/agent-B0_A2P2o.js @@ -0,0 +1 @@ +import{ya as e}from"./index-DThTpSPU.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t}; \ No newline at end of file diff --git a/public/assets/agent-CX8pvui9.js b/public/assets/agent-CX8pvui9.js new file mode 100644 index 0000000..ec42b8b --- /dev/null +++ b/public/assets/agent-CX8pvui9.js @@ -0,0 +1 @@ +import{t as e}from"./card-BDbI8Gdq.js";import{t}from"./spin-D1ik486_.js";import{t as n}from"./tag-Bn-IyYw0.js";import{Ca as r,Dn as i,Ea as a,Lt as o,Yn as s,ba as c,c as l,gn as u,rr as d,rt as f,s as p,st as m,vt as h,wn as g}from"./index-DThTpSPU.js";import{n as _,r as v}from"./agent-B0_A2P2o.js";var y=a(r(),1),b=p(),{Title:x,Text:S,Paragraph:C}=f;function w(){let{t:r}=l(),{token:a}=m.useToken(),{message:f}=d.useApp(),p=c(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{T((await _()).data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(e,t)=>{try{await v(e,{enabled:t}),T(n=>n.map(n=>n.id===e?{...n,enabled:t}:n)),f.success(r(`ai.agent.update.success`))}catch{f.error(r(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:a.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:a.marginXS},children:r(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:r(`ai.agent.page.description`)})]})}),(0,b.jsx)(t,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(t=>(0,b.jsx)(i,{title:t.description,children:(0,b.jsxs)(e,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(g,{src:t.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:t.name})]}),(0,b.jsx)(h,{checked:t.enabled,size:`small`,onChange:e=>k(t.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:a.marginSM},children:t.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:t.tags?.map(e=>(0,b.jsx)(n,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:a.marginSM},children:(0,b.jsx)(u,{type:`primary`,size:`small`,block:!0,onClick:()=>p(`/ai/chat?agent_id=${t.id}`),children:r(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(s,{description:r(`ai.agent.empty`)})})]})}export{w as default}; \ No newline at end of file diff --git a/public/assets/ai-L4EiXBaM.js b/public/assets/ai-L4EiXBaM.js new file mode 100644 index 0000000..cacfb92 --- /dev/null +++ b/public/assets/ai-L4EiXBaM.js @@ -0,0 +1,2 @@ +import{t as e}from"./alert-nEKP-pli.js";import{t}from"./XinForm-DX04WSwD.js";import{t as n}from"./card-BDbI8Gdq.js";import{t as r}from"./spin-D1ik486_.js";import{Ca as i,Ct as a,Ea as o,Jt as s,Pt as c,b as l,c as u,gn as d,rt as f,s as p,ya as m,yt as h}from"./index-DThTpSPU.js";var g=o(i(),1);async function _(){return m({url:`/system/ai/list`,method:`get`})}async function v(){return m({url:`/system/ai/config`,method:`get`})}async function y(e){return m({url:`/system/ai/save`,method:`post`,data:e})}var b=p(),{Text:x,Title:S}=f,C=()=>{let{t:i}=u(),o=(0,g.useRef)(null),[f]=c.useForm(),[p,m]=(0,g.useState)({default:[]}),[C,w]=(0,g.useState)(!1),[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(null),k=e=>({dependencies:[`default`],visible:t=>t.default===e}),A=e=>({dataIndex:[`providers`,e,`key`],valueType:`password`,title:i(`system.ai.provider.api_key`,{lab:e}),fieldProps:{placeholder:`sk-...`},colProps:{span:16},dependency:k(e)}),j=(e,t=``)=>({dataIndex:[`providers`,e,`url`],valueType:`text`,title:i(`system.ai.provider.url`,{lab:e}),fieldProps:{placeholder:i(`system.ai.provider.url.placeholder`,{url:t})},colProps:{span:8},dependency:k(e)}),M=[A(`anthropic`),j(`anthropic`,`https://api.anthropic.com/v1`)],N=[A(`openai`),j(`openai`,`https://api.openai.com/v1`)],P=[A(`gemini`),j(`gemini`,`https://generativelanguage.googleapis.com/v1beta/`)],F=[A(`ollama`),j(`ollama`,`http://localhost:11434`)],I=[A(`azure`),j(`azure`,`https://.openai.azure.com`),{dataIndex:[`providers`,`azure`,`api_version`],valueType:`text`,title:i(`system.ai.azure.api_version`),fieldProps:{placeholder:`2025-04-01-preview`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`deployment`],valueType:`text`,title:i(`system.ai.azure.deployment`),fieldProps:{placeholder:`gpt-4o`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`embedding_deployment`],valueType:`text`,title:i(`system.ai.azure.embedding_deployment`),fieldProps:{placeholder:`text-embedding-3-small`},colProps:{span:8},dependency:k(`azure`)},{dataIndex:[`providers`,`azure`,`image_deployment`],valueType:`text`,title:i(`system.ai.azure.image_deployment`),fieldProps:{placeholder:`gpt-image-1`},colProps:{span:12},dependency:k(`azure`)}],L=[{dataIndex:[`providers`,`bedrock`,`region`],valueType:`text`,title:i(`system.ai.bedrock.region`),fieldProps:{placeholder:`us-east-1`},colProps:{span:12},dependency:k(`bedrock`)},A(`bedrock`),{dataIndex:[`providers`,`bedrock`,`access_key_id`],valueType:`password`,title:i(`system.ai.bedrock.access_key_id`),fieldProps:{placeholder:i(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`secret_access_key`],valueType:`password`,title:i(`system.ai.bedrock.secret_access_key`),fieldProps:{placeholder:i(`system.ai.provider.api_key.placeholder`)},colProps:{span:12},dependency:k(`bedrock`)},{dataIndex:[`providers`,`bedrock`,`session_token`],valueType:`password`,title:i(`system.ai.bedrock.session_token`),fieldProps:{placeholder:i(`system.ai.provider.api_key.placeholder`)},colProps:{span:24},dependency:k(`bedrock`)}],R=[{dataIndex:`default`,valueType:`radio`,title:i(`system.ai.default`),tooltip:i(`system.ai.default.tooltip`),colProps:{span:24},fieldProps:{options:p.default.map(e=>({label:e,value:e}))}},...M,...N,...P,...I,...L,...F,A(`cohere`),A(`deepseek`),A(`eleven`),A(`groq`),A(`jina`),A(`mistral`),A(`openrouter`),A(`voyageai`),A(`xai`)];(0,g.useEffect)(()=>{z(),_().then(e=>e.data.data&&m(e.data.data))},[]);let z=async()=>{let{data:e}=await v();e.success&&f.setFieldsValue(e.data)};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`div`,{className:`mb-5`,children:[(0,b.jsx)(S,{level:3,children:i(`system.ai.page.title`)}),(0,b.jsx)(x,{type:`secondary`,children:i(`system.ai.page.description`)})]}),(0,b.jsxs)(h,{gutter:24,children:[(0,b.jsx)(s,{span:16,children:(0,b.jsx)(n,{variant:`borderless`,children:(0,b.jsx)(t,{columns:R,layout:`vertical`,formRef:o,form:f,grid:!0,onFinish:async e=>{await y(e),a.success(i(`system.ai.save.success`))},rowProps:{gutter:[10,0]}})})}),(0,b.jsx)(s,{span:8,children:(0,b.jsx)(n,{title:i(`system.ai.test.title`),children:(0,b.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,b.jsx)(x,{type:`secondary`,children:i(`system.ai.test.hint`)}),(0,b.jsx)(d,{type:`primary`,block:!0,icon:(0,b.jsx)(l,{}),loading:C,onClick:async()=>{w(!0),E(null),O(null);try{let e=localStorage.getItem(`token`),t=await fetch(`/index.php/system/ai/test`,{method:`POST`,headers:{Authorization:`Bearer ${e}`,Accept:`text/event-stream`}});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.msg||`HTTP ${t.status}`)}let n=t.body?.getReader();if(!n)throw Error(`Stream not supported`);let r=new TextDecoder,o=``,s=``;for(;;){let{done:e,value:t}=await n.read();if(e)break;o+=r.decode(t,{stream:!0});let i=o.split(` +`);o=i.pop()||``;for(let e of i){if(!e.startsWith(`data: `))continue;let t=e.slice(6).trim();if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(s+=e.delta,E(s))}catch{}}}a.success(i(`system.ai.test.success`))}catch(e){let t=e?.message||`Connection test failed`;O(t),a.error(t)}finally{w(!1)}},children:i(C?`system.ai.test.testing`:`system.ai.test.button`)}),C&&!T&&(0,b.jsx)(`div`,{className:`flex justify-center py-8`,children:(0,b.jsx)(r,{description:i(`system.ai.test.testing`)})}),T&&(0,b.jsx)(e,{type:`success`,title:i(`system.ai.test.success`),description:T,showIcon:!0}),D&&(0,b.jsx)(e,{type:`error`,title:i(`system.ai.test.error`),description:D,showIcon:!0})]})})})]})]})};export{C as default}; \ No newline at end of file diff --git a/public/assets/alert-nEKP-pli.js b/public/assets/alert-nEKP-pli.js new file mode 100644 index 0000000..85af985 --- /dev/null +++ b/public/assets/alert-nEKP-pli.js @@ -0,0 +1 @@ +import{$r as e,Ai as t,Bi as n,Ca as r,Di as i,Ea as a,Fi as o,Ji as s,Mi as c,Oi as l,Ri as u,Yr as d,Zr as f,_i as p,ai as m,di as h,hi as g,ii as _,ji as v,ki as y,oa as b,oi as x,ri as S,si as C,ti as ee}from"./index-DThTpSPU.js";var w=a(r()),T=(e,t,n)=>({background:e,[`${n}-icon`]:{color:t}}),E=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:s,lineHeight:c,borderRadiusLG:l,motionEaseInOutCirc:u,withDescriptionIconSize:d,colorText:f,colorTextHeading:m,withDescriptionPadding:h,defaultPadding:g,lineWidth:_,lineType:v,colorSuccessBorder:y,colorWarningBorder:b,colorErrorBorder:x,colorInfoBorder:S}=e;return{[t]:{...p(e),position:`relative`,display:`flex`,alignItems:`center`,padding:g,wordWrap:`break-word`,borderRadius:l,borderWidth:o(_),borderStyle:v,[`&${t}-success`]:{borderColor:y},[`&${t}-info`]:{borderColor:S},[`&${t}-warning`]:{borderColor:b},[`&${t}-error`]:{borderColor:x},[`&${t}-filled`]:{borderColor:`transparent`},[`&${t}-rtl`]:{direction:`rtl`},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:c},"&-title":{color:m},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:[`max-height`,`opacity`,`padding-top`,`padding-bottom`,`margin-bottom`].map(e=>`${e} ${n} ${u}`).join(`, `)},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}},[`${t}-with-description`]:{alignItems:`flex-start`,padding:h,[`${t}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${t}-title`]:{display:`block`,marginBottom:r,color:m,fontSize:s},[`${t}-description`]:{display:`block`,color:f}},[`${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},D=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBg:r,colorWarning:i,colorWarningBg:a,colorError:o,colorErrorBg:s,colorInfo:c,colorInfoBg:l}=e;return{[t]:{"&-success":T(r,n,t),"&-info":T(l,c,t),"&-warning":T(a,i,t),"&-error":{...T(s,o,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},O=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:s,colorIconHover:c}=e;return{[t]:{"&-actions":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:o(a),backgroundColor:`transparent`,border:`none`,cursor:`pointer`,...g(e),[`${n}-close`]:{color:s,transition:`color ${r}`,"&:hover":{color:c}}},"&-close-text":{color:s,transition:`color ${r}`,"&:hover":{color:c}}}}},te=h(`Alert`,e=>[E(e),D(e),O(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),ne=e=>{let{icon:t,type:n,className:r,style:i,successIcon:a,infoIcon:o,warningIcon:s,errorIcon:c}=e,l={success:a??w.createElement(C,null),info:o??w.createElement(S,null),error:c??w.createElement(x,null),warning:s??w.createElement(_,null)};return w.createElement(`span`,{className:r,style:i},t??l[n])},re=e=>{let{isClosable:t,prefixCls:r,closeIcon:i,handleClose:a,ariaProps:o,className:s,style:c}=e,l=i===!0||i===void 0?w.createElement(m,null):i;return t?w.createElement(`button`,{type:`button`,onClick:a,className:n(`${r}-close-icon`,s),tabIndex:0,style:c,...o},l):null},k=w.forwardRef((t,r)=>{let{description:i,prefixCls:a,message:o,title:c,banner:l,className:p,rootClassName:m,style:h,onMouseEnter:g,onMouseLeave:_,onClick:v,afterClose:y,showIcon:x,closable:S,closeText:C,closeIcon:T,action:E,id:D,styles:O,classNames:k,...A}=t,j=c??o,[M,ie]=w.useState(!1),N=w.useRef(null);w.useImperativeHandle(r,()=>({nativeElement:N.current}));let{getPrefixCls:ae,direction:P,variant:oe,closable:F,closeIcon:I,className:L,style:R,classNames:z,styles:B,successIcon:V,infoIcon:H,warningIcon:U,errorIcon:W}=u(`alert`),G=ae(`alert`,a),[K,se]=te(G),{onClose:ce,afterClose:le}=e(S)?S:{},ue=e=>{ie(!0),(ce??t.onClose)?.(e)},q=w.useMemo(()=>t.type===void 0?l?`warning`:`info`:t.type,[t.type,l]),J=t.variant??oe??`outlined`,Y=w.useMemo(()=>e(S)&&S.closeIcon||C?!0:typeof S==`boolean`?S:T!==!1&&f(T)?!0:!!F,[C,T,S,F]),X=l&&x===void 0?!0:x,Z={...t,prefixCls:G,variant:J,type:q,showIcon:X,closable:Y},[Q,$]=d([z,k],[B,O],{props:Z}),de=n(G,`${G}-${q}`,`${G}-${J}`,{[`${G}-with-description`]:!!i,[`${G}-no-icon`]:!X,[`${G}-banner`]:!!l,[`${G}-rtl`]:P===`rtl`},L,p,m,Q.root,se,K),fe=s(A,{aria:!0,data:!0}),pe=w.useMemo(()=>e(S)&&S.closeIcon?S.closeIcon:C||(T===void 0?e(F)&&F.closeIcon?F.closeIcon:I:T),[T,S,F,C,I]),me=w.useMemo(()=>{let t=S??F;return e(t)?s(t,{data:!0,aria:!0}):{}},[S,F]);return w.createElement(ee,{visible:!M,motionName:`${G}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:le??y},({className:e,style:r},a)=>w.createElement(`div`,{id:D,ref:b(N,a),"data-show":!M,className:n(de,e),style:{...$.root,...R,...h,...r},onMouseEnter:g,onMouseLeave:_,onClick:v,role:`alert`,...fe},X?w.createElement(ne,{className:n(`${G}-icon`,Q.icon),style:$.icon,description:i,icon:t.icon,prefixCls:G,type:q,successIcon:V,infoIcon:H,warningIcon:U,errorIcon:W}):null,w.createElement(`div`,{className:n(`${G}-section`,Q.section),style:$.section},j?w.createElement(`div`,{className:n(`${G}-title`,Q.title),style:$.title},j):null,i?w.createElement(`div`,{className:n(`${G}-description`,Q.description),style:$.description},i):null),E?w.createElement(`div`,{className:n(`${G}-actions`,Q.actions),style:$.actions},E):null,w.createElement(re,{className:Q.close,style:$.close,isClosable:Y,prefixCls:G,closeIcon:pe,handleClose:ue,ariaProps:me})))});function A(e,t,n){return t=y(t),i(e,l()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}var j=function(e){function n(){var e;return c(this,n),e=A(this,n,arguments),e.state={error:void 0,info:{}},e}return t(n,e),v(n,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,title:t,description:n,id:r,children:i}=this.props,{error:a,info:o}=this.state,s=t??e,c=o?.componentStack||null,l=f(s)?s:a?.toString(),u=f(n)?n:c;return a?w.createElement(k,{id:r,type:`error`,title:l,description:w.createElement(`pre`,{style:{fontSize:`0.9em`,overflowX:`auto`}},u)}):i}}])}(w.PureComponent),M=k;M.ErrorBoundary=j;export{M as t}; \ No newline at end of file diff --git a/public/assets/analysis-BBx1J67b.js b/public/assets/analysis-BBx1J67b.js new file mode 100644 index 0000000..ee54ccf --- /dev/null +++ b/public/assets/analysis-BBx1J67b.js @@ -0,0 +1,40 @@ +import{a as e,i as t,n,o as r,r as i,t as a}from"./tslib.es6-DffexlHv.js";import{n as o}from"./pagination-BklXHwQ9.js";import{t as s}from"./card-BDbI8Gdq.js";import{t as c}from"./list-DldRat7g.js";import{t as l}from"./tag-Bn-IyYw0.js";import{Ca as u,Ea as d,Jt as f,Lt as p,N as m,Q as h,Ta as g,Z as _,c as v,s as y,st as b,wa as x,wn as S,x as C,yt as w}from"./index-DThTpSPU.js";var T=d(u()),E=function(e,t){return E=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])},E(e,t)};function D(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);E(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var O=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),k=new(function(){function e(){this.browser=new O,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`?(k.wxa=!0,k.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?k.worker=!0:!k.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(k.node=!0,k.svgSupported=!0):A(navigator.userAgent,k);function A(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var j=`12px sans-serif`,ee=20,te=100,ne=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function re(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;cut,HashMap:()=>it,RADIAN_TO_DEGREE:()=>lt,assert:()=>Xe,assignProps:()=>Te,bind:()=>L,clone:()=>M,concatArray:()=>at,createCanvas:()=>Ee,createHashMap:()=>U,createObject:()=>ot,curry:()=>Ie,defaults:()=>P,disableUserSelect:()=>st,each:()=>F,eqNaN:()=>Ge,extend:()=>N,filter:()=>Me,find:()=>Ne,guid:()=>xe,hasOwn:()=>W,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isArrayLike:()=>Ae,isBuiltInObject:()=>ze,isDom:()=>Ve,isFunction:()=>z,isGradientObject:()=>He,isImagePatternObject:()=>Ue,isNumber:()=>Re,isObject:()=>V,isPrimitive:()=>et,isRegExp:()=>We,isString:()=>B,isStringSafe:()=>Le,isTypedArray:()=>Be,keys:()=>Pe,logError:()=>Se,map:()=>I,merge:()=>Ce,mergeAll:()=>we,mixin:()=>ke,noop:()=>ct,normalizeCssArray:()=>Ye,reduce:()=>je,retrieve:()=>Ke,retrieve2:()=>H,retrieve3:()=>qe,setAsPrimitive:()=>$e,slice:()=>Je,trim:()=>Ze}),ce=je([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),le=je([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),ue=Object.prototype.toString,de=Array.prototype,fe=de.forEach,pe=de.filter,me=de.slice,he=de.map,ge=function(){}.constructor,_e=ge?ge.prototype:null,ve=`__proto__`,ye=2311,be=2**53-1;function xe(){return ye>=be&&(ye=0),ye++}function Se(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function M(e){if(typeof e!=`object`||!e)return e;var t=e,n=ue.call(e);if(n===`[object Array]`){if(!et(e)){t=[];for(var r=0,i=e.length;rgt,applyTransform:()=>Pt,clone:()=>mt,copy:()=>pt,create:()=>ft,dist:()=>kt,distSquare:()=>jt,distance:()=>Ot,distanceSquare:()=>At,div:()=>wt,dot:()=>Tt,len:()=>yt,lenSquare:()=>xt,length:()=>bt,lengthSquare:()=>St,lerp:()=>Nt,max:()=>It,min:()=>Ft,mul:()=>Ct,negate:()=>Mt,normalize:()=>Dt,scale:()=>Et,scaleAndAdd:()=>_t,set:()=>ht,sub:()=>vt});function ft(e,t){return e??=0,t??=0,[e,t]}function pt(e,t){return e[0]=t[0],e[1]=t[1],e}function mt(e){return[e[0],e[1]]}function ht(e,t,n){return e[0]=t,e[1]=n,e}function gt(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function _t(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function vt(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function yt(e){return Math.sqrt(xt(e))}var bt=yt;function xt(e){return e[0]*e[0]+e[1]*e[1]}var St=xt;function Ct(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function wt(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Tt(e,t){return e[0]*t[0]+e[1]*t[1]}function Et(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Dt(e,t){var n=yt(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Ot(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var kt=Ot;function At(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var jt=At;function Mt(e,t){return e[0]=-t[0],e[1]=-t[1],e}function Nt(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 Pt(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 Ft(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function It(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Lt=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),Rt=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 Lt(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 Lt(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 Lt(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new Lt(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Lt(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new Lt(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),zt=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>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(){F(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Yt(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?Ht(s,o):Ht(o,s))}function Xt(e){return e.nodeName.toUpperCase()===`CANVAS`}var Zt=/([&<>"'])/g,Qt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function $t(e){return e==null?``:(e+``).replace(Zt,function(e,t){return Qt[t]})}var en=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,tn=[],nn=k.browser.firefox&&+k.browser.version.split(`.`)[0]<39;function rn(e,t,n,r){return n||={},r?an(e,t,n):nn&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?an(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function an(e,t,n){if(k.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Xt(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(qt(tn,e,r,i)){n.zrX=tn[0],n.zrY=tn[1];return}}n.zrX=n.zrY=0}function on(e){return e||window.event}function sn(e,t,n){if(t=on(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&&rn(e,i,t,n)}else{rn(e,t,t,n);var a=cn(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&en.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function cn(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 ln(e,t,n,r){e.addEventListener(t,n,r)}function un(e,t,n,r){e.removeEventListener(t,n,r)}var dn=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function fn(e){return e.which===2||e.which===3}var pn=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;a1&&r&&r.length>1){var a=mn(r)/mn(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=hn(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},_n=g({clone:()=>En,copy:()=>bn,create:()=>vn,identity:()=>yn,invert:()=>Tn,mul:()=>xn,rotate:()=>Cn,scale:()=>wn,translate:()=>Sn});function vn(){return[1,0,0,1,0,0]}function yn(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function bn(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 xn(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 Sn(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 Cn(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 wn(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 Tn(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 En(e){var t=vn();return bn(t,e),t}var G=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}(),Dn=Math.min,On=Math.max,kn=Math.abs,An=[`x`,`y`],jn=[`width`,`height`],Mn=new G,Nn=new G,Pn=new G,Fn=new G,In=Xn(),Ln=In.minTv,Rn=In.maxTv,zn=[0,0],K=function(){function e(e,t,n,r){Vn(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=Dn(e.x,this.x),n=Dn(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=On(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=On(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Un(vn(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&G.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=Vn(Kn,t.x,t.y,t.width,t.height)),n instanceof e||(n=Vn(qn,n.x,n.y,n.width,n.height));var s=!!r;In.reset(i,s);var c=In.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=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){Hn(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&&Hn(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Mn.x=Pn.x=t.x,Mn.y=Fn.y=t.y,Nn.x=Fn.x=t.x+t.width,Nn.y=Pn.y=t.y+t.height,Mn.transform(n),Fn.transform(n),Nn.transform(n),Pn.transform(n),e.x=Dn(Mn.x,Nn.x,Pn.x,Fn.x),e.y=Dn(Mn.y,Nn.y,Pn.y,Fn.y);var s=On(Mn.x,Nn.x,Pn.x,Fn.x),c=On(Mn.y,Nn.y,Pn.y,Fn.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=yn(e||[]),Sn(e,e,ht(Jn,-t.x,-t.y)),wn(e,e,ht(Jn,r,i)),Sn(e,e,ht(Jn,n.x,n.y)),e},e}(),Bn=K.create,Vn=K.set,Hn=K.copy,Un=K.calculateTransform,Wn=K.applyTransform,Gn=K.contain,Kn=new K(0,0,0,0),qn=new K(0,0,0,0),Jn=[];function Yn(e,t,n,r,i,a,o,s){var c=kn(t-n),l=kn(r-e),u=Dn(c,l),d=An[i],f=An[1-i],p=jn[i];t=l||!In.bidirectional)&&(Ln[d]=-l,Ln[f]=0,In.useDir&&In.calcDirMTV())))}function Xn(){var e=0,t=new G,n=new G,r={minTv:new G,maxTv:new G,useDir:!1,dirMinTv:new G,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=On(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(rr.copy(u.getBoundingRect()),u.transform&&rr.applyTransform(u.transform),rr.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function ar(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?Zn:!0}return!1}function or(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=ar(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Zn)){t.target=o;break}}}function sr(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var cr=32,lr=7;function ur(e){for(var t=0;e>=cr;)t|=e&1,e>>=1;return e+t}function dr(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function fr(e,t,n){for(n--;t>>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 mr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function hr(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function gr(e,t){var n=lr,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])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=lr||m>=lr);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=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-mr(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=lr||g>=lr);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;cs&&(c=s),pr(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var vr=!1;function yr(){vr||(vr=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function br(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var xr=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=br}return e.prototype.traverse=function(e,t){for(var n=0;n=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}(),Sr=k.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Cr={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Cr.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?Cr.bounceIn(e*2)*.5:Cr.bounceOut(e*2-1)*.5+.5}},wr=Math.pow,Tr=Math.sqrt,Er=1e-8,Dr=1e-4,Or=Tr(3),kr=1/3,Ar=ft(),jr=ft(),Mr=ft();function Nr(e){return e>-Er&&eEr||e<-Er}function Fr(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 Ir(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function Lr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Nr(u)&&Nr(d))if(Nr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Nr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Tr(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-wr(-y,kr):wr(y,kr),b=b<0?-wr(-b,kr):wr(b,kr);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Tr(u*u*u)),S=Math.acos(x)/3,C=Tr(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Or*Math.sin(S)))/(3*o),T=(-s+C*(w-Or*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 Rr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Nr(o)){if(Pr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Nr(u))i[0]=-a/(2*o);else if(u>0){var d=Tr(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 zr(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 Br(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Ar[0]=c,Ar[1]=l;for(var v=0;v<1;v+=.05)jr[0]=Fr(e,n,i,o,v),jr[1]=Fr(t,r,a,s,v),g=jt(Ar,jr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Nr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Tr(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 Gr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Kr(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 qr(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Ar[0]=o,Ar[1]=s;for(var f=0;f<1;f+=.05){jr[0]=Hr(e,n,i,f),jr[1]=Hr(t,r,a,f);var p=jt(Ar,jr);p=0&&p=1?1:Lr(0,r,a,1,e,s)&&Fr(0,i,o,1,s[0])}}}var Zr=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||ct,this.ondestroy=e.ondestroy||ct,this.onrestart=e.onrestart||ct,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=z(e)?e:Cr[e]||Xr(e)},e}(),Qr=function(){function e(e){this.value=e}return e}(),$r=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qr(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}(),ei=function(){function e(e){this._list=new $r,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 Qr(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}(),ti=g({fastLerp:()=>bi,fastMapToColor:()=>xi,lerp:()=>Si,lift:()=>vi,liftColor:()=>Ai,lum:()=>Di,mapToColor:()=>Ci,modifyAlpha:()=>Ti,modifyHSL:()=>wi,parse:()=>hi,parseCssFloat:()=>si,parseCssInt:()=>oi,random:()=>Oi,stringify:()=>Ei,toHex:()=>yi}),ni={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ri(e){return e=Math.round(e),e<0?0:e>255?255:e}function ii(e){return e=Math.round(e),e<0?0:e>360?360:e}function ai(e){return e<0?0:e>1?1:e}function oi(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ri(parseFloat(t)/100*255):ri(parseInt(t,10))}function si(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ai(parseFloat(t)/100):ai(parseFloat(t))}function ci(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 li(e,t,n){return e+(t-e)*n}function ui(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function di(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var fi=new ei(20),pi=null;function mi(e,t){pi&&di(pi,t),pi=fi.put(e,pi||t.slice())}function hi(e,t){if(e){t||=[];var n=fi.get(e);if(n)return di(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in ni)return di(t,ni[r]),mi(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)){ui(t,0,0,0,1);return}return ui(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),mi(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){ui(t,0,0,0,1);return}return ui(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),mi(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?ui(t,+l[0],+l[1],+l[2],1):ui(t,0,0,0,1);u=si(l.pop());case`rgb`:if(l.length>=3)return ui(t,oi(l[0]),oi(l[1]),oi(l[2]),l.length===3?u:si(l[3])),mi(e,t),t;ui(t,0,0,0,1);return;case`hsla`:if(l.length!==4){ui(t,0,0,0,1);return}return l[3]=si(l[3]),gi(l,t),mi(e,t),t;case`hsl`:if(l.length!==3){ui(t,0,0,0,1);return}return gi(l,t),mi(e,t),t;default:return}}ui(t,0,0,0,1)}}function gi(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=si(e[1]),i=si(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],ui(t,ri(ci(o,a,n+1/3)*255),ri(ci(o,a,n)*255),ri(ci(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function _i(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 vi(e,t){var n=hi(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 Ei(n,n.length===4?`rgba`:`rgb`)}}function yi(e){var t=hi(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function bi(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]=ri(li(o[0],s[0],c)),n[1]=ri(li(o[1],s[1],c)),n[2]=ri(li(o[2],s[2],c)),n[3]=ai(li(o[3],s[3],c)),n}}var xi=bi;function Si(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=hi(t[i]),s=hi(t[a]),c=r-i,l=Ei([ri(li(o[0],s[0],c)),ri(li(o[1],s[1],c)),ri(li(o[2],s[2],c)),ai(li(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Ci=Si;function wi(e,t,n,r){var i=hi(e);if(e)return i=_i(i),t!=null&&(i[0]=ii(z(t)?t(i[0]):t)),n!=null&&(i[1]=si(z(n)?n(i[1]):n)),r!=null&&(i[2]=si(z(r)?r(i[2]):r)),Ei(gi(i),`rgba`)}function Ti(e,t){var n=hi(e);if(n&&t!=null)return n[3]=ai(t),Ei(n,`rgba`)}function Ei(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 Di(e,t){var n=hi(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Oi(){return Ei([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var ki=new ei(100);function Ai(e){if(B(e)){var t=ki.get(e);return t||(t=vi(e,-.1),ki.put(e,t)),t}else if(He(e)){var n=N({},e);return n.colorStops=I(e.colorStops,function(e){return{offset:e.offset,color:vi(e.color,-.1)}}),n}return e}var ji=Math.round;function Mi(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=hi(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Ni=1e-4;function Pi(e){return e-Ni}function Fi(e){return ji(e*1e3)/1e3}function Ii(e){return ji(e*1e4)/1e4}function Li(e){return`matrix(`+Fi(e[0])+`,`+Fi(e[1])+`,`+Fi(e[2])+`,`+Fi(e[3])+`,`+Ii(e[4])+`,`+Ii(e[5])+`)`}var Ri={left:`start`,right:`end`,center:`middle`,middle:`middle`};function zi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function Bi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function Vi(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 Hi(e){return e&&!!e.image}function Ui(e){return e&&!!e.svgElement}function Wi(e){return Hi(e)||Ui(e)}function Gi(e){return e.type===`linear`}function Ki(e){return e.type===`radial`}function qi(e){return e&&(e.type===`linear`||e.type===`radial`)}function Ji(e){return`url(#`+e+`)`}function Yi(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 Xi(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*lt,i=H(e.scaleX,1),a=H(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(`+ji(o*lt)+`deg, `+ji(s*lt)+`deg)`),c.join(` `)}var Zi=(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}})(),Qi=Array.prototype.slice;function $i(e,t,n){return(t-e)*n+e}function ea(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=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=ha,s=t;if(Ae(t)){var c=ca(t);o=c,(c===1&&!Re(t[0])||c===2&&!Re(t[0][0]))&&(a=!0)}else if(Re(t)&&!Ge(t))o=la;else if(B(t))if(!isNaN(+t))o=la;else{var l=hi(t);l&&(s=l,o=fa)}else if(He(t)){var u=N({},s);u.colorStops=I(t.colorStops,function(e){return{offset:e.offset,color:hi(e.color)}}),Gi(t)?o=pa:Ki(t)&&(o=ma),s=u}i===0?this.valType=o:(o!==this.valType||o===ha)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=z(n)?n:Cr[n]||Xr(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=_a(r),c=ga(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);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?va:e[s];if((_a(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(_a(i))i===ua?ea(g,f[r],p[r],h):ta(g,f[r],p[r],h);else if(ga(i)){var _=f[r],v=p[r],y=i===pa;e[s]={type:y?`linear`:`radial`,x:$i(_.x,v.x,h),y:$i(_.y,v.y,h),colorStops:I(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:$i(e.offset,n.offset,h),color:sa(ea([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=$i(_.x2,v.x2,h),e[s].y2=$i(_.y2,v.y2,h)):e[s].r=$i(_.r,v.r,h)}else if(c)ea(g,f[r],p[r],h),n||(e[s]=sa(g));else{var b=$i(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===la?e[n]=e[n]+r:t===fa?(hi(e[n],va),na(va,va,r,1),e[n]=sa(va)):t===ua?na(e[n],e[n],r,1):t===da&&ra(e[n],e[n],r,1)},e}(),ba=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Se(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Pe(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,oa(c),r),this._trackKeys.push(o)}s.addKeyframe(e,oa(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;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function xa(){return new Date().getTime()}var Sa=function(e){D(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=xa()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Sr(t),!e._paused&&e.update())}Sr(t)},t.prototype.start=function(){this._running||(this._time=xa(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xa(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xa()-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 ba(e,t.loop);return this.addAnimator(n),n},t}(zt),Ca=300,wa=k.domSupported,Ta=(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:I(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ea={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Da=!1;function Oa(e){var t=e.pointerType;return t===`pen`||t===`touch`}function ka(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 Aa(e){e&&(e.zrByTouch=!0)}function ja(e,t){return sn(e.dom,new Na(e,t),!0)}function Ma(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Na=function(){function e(e,t){this.stopPropagation=ct,this.stopImmediatePropagation=ct,this.preventDefault=ct,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Pa={mousedown:function(e){e=sn(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=sn(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=sn(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=sn(this.dom,e);var t=e.toElement||e.relatedTarget;Ma(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Da=!0,e=sn(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Da||(e=sn(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=sn(this.dom,e),Aa(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Pa.mousemove.call(this,e),Pa.mousedown.call(this,e)},touchmove:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`change`),Pa.mousemove.call(this,e)},touchend:function(e){e=sn(this.dom,e),Aa(e),this.handler.processGesture(e,`end`),Pa.mouseup.call(this,e),new Date-+this.__lastTouchMomentYa||e<-Ya}var Za=[],Qa=[],$a=vn(),eo=Math.abs,to=function(){function e(){}return e.prototype.getLocalTransform=function(e){return no(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 Xa(this.rotation)||Xa(this.x)||Xa(this.y)||Xa(this.scaleX-1)||Xa(this.scaleY-1)||Xa(this.skewX)||Xa(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ja(n),this.invTransform=null);return}n||=vn(),t?this.getLocalTransform(n):Ja(n),e&&(t?xn(n,e,n):bn(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||vn(),Tn(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Za);var n=Za[0]<0?-1:1,r=Za[1]<0?-1:1,i=((Za[0]-n)*t+n)/Za[0]||0,a=((Za[1]-r)*t+r)/Za[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||vn(),xn(Qa,e.invTransform,t),t=Qa);var n=this.originX,r=this.originY;(n||r)&&($a[4]=n,$a[5]=r,xn(Qa,t,$a),Qa[4]-=n,Qa[5]-=r,t=Qa),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&&Pt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Pt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&eo(e[0]-1)>1e-10&&eo(e[3]-1)>1e-10?Math.sqrt(eo(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ao(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&&Cn(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}(),no=to.getLocalTransform;function ro(){return new to}var io=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ao(e,t){return Te(e,t,io)}function oo(e){so||=new ei(100),e||=`12px sans-serif`;var t=so.get(e);return t||(t={font:e,strWidthCache:new ei(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:ae.measureText(`国`,e).width,asciiCharWidth:ae.measureText(`a`,e).width},so.put(e,t)),t}var so;function co(e){if(!(lo>=uo)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=ae.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?lo=uo:i>2&&lo++,t}}var lo=0,uo=5;function fo(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=co(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function po(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=ae.measureText(t,e.font).width,n.put(t,r)),r}function mo(e,t,n,r){var i=po(oo(t),e),a=vo(t);return new K(go(0,i,n),_o(0,a,r),i,a)}function ho(e,t,n,r){var i=((e||``)+``).split(` +`);if(i.length===1)return mo(i[0],t,n,r);for(var a=new K(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function bo(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+=yo(r[0],n.width),l+=yo(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var xo=`__zr_normal__`,So=io.concat([`ignore`]),Co=je(io,function(e,t){return e[t]=!0,e},{ignore:!1}),wo={},To=new K(0,0,0,0),Eo=[],Do=function(){function e(e){this.id=xe(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=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=To,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(wo,n,d):bo(wo,n,d),i.x=wo.x,i.y=wo.y,a=wo.align,o=wo.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=yo(f[0],d.width),m=yo(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 K(0,0,0,0);i.getLocalTransform(Eo),Tn(Eo,Eo),K.copy(_,d),_.applyTransform(Eo)}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()?Ka:Ga},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&hi(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,Ei(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||{},N(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(V(e))for(var n=Pe(e),r=0;r0},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(xo,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===xo;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(De(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){Se(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Fo(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,Lo(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=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=De(r,e),a=De(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=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;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var q=function(e){D(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=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=De(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=De(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nGo,disposeAll:()=>Ko,getElementSSRData:()=>Xo,getInstance:()=>qo,init:()=>Wo,registerPainter:()=>Jo,registerSSRDataGetter:()=>Zo,version:()=>Qo}),zo={},Bo={};function Vo(e){delete Bo[e]}function Ho(e){if(!e)return!1;if(typeof e==`string`)return Di(e,1)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;t0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var J=ms;function ms(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%`;break}return hs(e,t,n)}function hs(e,t,n){return B(e)?_s(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function gs(e){return B(e)&&_s(e)}function _s(e){return!!ts(e).match(/%$/)}function vs(e,t,n){return isNaN(t)?n?``+e:+e:(t=ns(rs(0,t),es),e=(+e).toFixed(t),n?e:+e)}function ys(e,t,n){return t??=10,vs(e,t,n)}function bs(e){return e.sort(function(e,t){return e-t}),e}function xs(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(as(e*t)/t===e)return n}return Ss(e)}function Ss(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 rs(0,(a<0?0:i-1-a)-r)}function Cs(e,t){var n=os(ls(e[1]-e[0])/us),r=as(ls(is(t[1]-t[0]))/us),i=ns(rs(-n+r,0),es);return isFinite(i)?i:es}function ws(e,t,n){var r=is(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ls(2*is(n||1)*is(r))/us,a=ls(is(t))/us,o=rs(0,ss(-i+a));return isFinite(o)||(o=NaN),o}function Ts(e,t,n){return e[t]&&Es(e,n)[t]||0}function Es(e,t){var n=je(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=cs(10,t),i=I(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=I(i,function(e){return os(e)}),s=je(o,function(e,t){return e+t},0),c=I(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return I(o,function(e){return e/r})}function Ds(e,t){var n=rs(xs(e),xs(t)),r=e+t;return n>es?r:vs(r,n)}var Os=cs(2,53)-1;function ks(e){var t=ds*2;return(e%t+t)%t}function As(e){return e>-$o&&e<$o}var js=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Ms(e){if(e instanceof Date)return e;if(B(e)){var t=js.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(e==null)return new Date(NaN);return new Date(as(e))}function Ns(e){return cs(10,Ps(e))}function Ps(e){if(e===0)return 0;var t=os(ls(e)/us);return e/cs(10,t)>=10&&t++,t}function Fs(e,t){var n=Ps(e),r=cs(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,vs(e,-n)}function Is(e,t){var n=(e.length-1)*t+1,r=os(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function Ls(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e}();function Fc(e){e.option=e.parentModel=e.ecModel=null}function Ic(){return[1/0,-1/0]}function Lc(e,t){Vc(t)&&(te[1]&&(e[1]=t))}function Rc(e,t){Vc(t)&&te[1]&&(e[1]=t)}function Bc(e,t){Hc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Vc(e){return e!=null&&isFinite(e)}function Hc(e,t){return Vc(e)&&Vc(t)&&e<=t}function Uc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Wc(e){Hc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Gc(){var e=`__ec_once_`+ Kc++;return function(t,n){W(t,e)||(t[e]=1,n())}}var Kc=Bs();function qc(e,t,n){var r=U(),i=0;F(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 Jc(e){return e.value+``}function Yc(e){return e+``}function Xc(e,t){return H(t,!0)?e.seriesIndex+2:0}function Zc(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 Qc(e,t){return{seriesType:e,overallReset:t}}function $c(e){return{overallReset:e}}var el=`.`,tl=`___EC__COMPONENT__CONTAINER___`,nl=`___EC__EXTENDED_CLASS___`;function rl(e){var t={main:``,sub:``};if(e){var n=e.split(el);t.main=n[0]||``,t.sub=n[1]||``}return t}function il(e){Xe(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function al(e){return!!(e&&e[nl])}function ol(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return sl(t)?n=function(e){D(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Oe(n,this)),N(n.prototype,e),n[nl]=!0,n.extend=this.extend,n.superCall=dl,n.superApply=fl,n.superClass=t,n}}function sl(e){return z(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function cl(e,t){e.extend=t.extend}var ll=Math.round(Math.random()*10);function ul(e){var t=[`__\0is_clz`,ll++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function dl(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function fl(e,t,n){return this.superClass.prototype[t].apply(e,n)}function pl(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){il(r),e.prototype.type=r;var i=rl(r);if(!i.sub)t[i.main]=e;else if(i.sub!==tl){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[tl]&&(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=rl(e),r=[],i=t[n.main];return i&&i[tl]?F(i,function(e,t){t!==tl&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[rl(e).main]},e.getAllClassMainTypes=function(){var e=[];return F(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[rl(e).main];return n&&n[tl]};function n(e){var n=t[e.main];return(!n||!n[tl])&&(n=t[e.main]={},n[tl]=!0),n}}function ml(e,t){for(var n=0;n=0||i&&De(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var hl=ml([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),gl=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return hl(this,e,t)},e}(),_l=new ei(50);function vl(e){if(typeof e==`string`){var t=_l.get(e);return t&&t.image}else return e}function yl(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=_l.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!xl(t)&&a.pending.push(o)):(t=ae.loadImage(e,bl,bl),t.__zrImageSrc=e,_l.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function bl(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=po(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 El(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=po(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Dl(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=po(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Dl(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Tl(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)El(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=oo(l),S=0;S<_.length;S++)w=Math.max(po(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var kl=function(){function e(){}return e}(),Al=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),jl=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ml(e,t,n,r,i){var a=new jl,o=Vl(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=Sl.lastIndex=0,h;(h=Sl.exec(o))!=null;){var g=h.index;g>m&&Nl(a,o.substring(m,g),t,p),Nl(a,h[2],t,p,h[1]),m=Sl.lastIndex}md){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.length0&&m+r.accumWidth>r.width&&(u=t.split(` +`),l=!0),r.accumWidth=m}else{var h=Ll(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` +`);for(var g=oo(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Fl=je(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Il(e){return Pl(e)?!!Fl[e]:!0}function Ll(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=oo(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Rl(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;K.set(zl,go(n,o,i),_o(r,s,a),o,s),K.intersect(t,zl,null,Bl);var c=Bl.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=go(c.x,c.width,i,!0),e.baseY=_o(c.y,c.height,a,!0)}}var zl=new K(0,0,0,0),Bl={outIntersectRect:{},clamp:!0};function Vl(e){return e==null?e=``:e+=``}function Hl(e){var t=Vl(e.text),n=e.font;return Ul(e,po(oo(n),t),vo(n),null)}function Ul(e,t,n,r){var i=new K(go(e.x||0,t,e.textAlign),_o(e.y||0,n,e.textBaseline),t,n),a=r??(Wl(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Wl(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Gl=`__zr_style_`+Math.round(Math.random()*10),Kl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ql={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Kl[Gl]=!0;var Jl=[`z`,`z2`,`invisible`],Yl=[`invisible`],Xl=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=Pe(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(au[0]=ru(i)*n+e,au[1]=nu(i)*r+t,ou[0]=ru(a)*n+e,ou[1]=nu(a)*r+t,l(s,au,ou),u(c,au,ou),i%=iu,i<0&&(i+=iu),a%=iu,a<0&&(a+=iu),i>a&&!o?a+=iu:ii&&(su[0]=ru(p)*n+e,su[1]=nu(p)*r+t,l(s,su,s),u(c,su,c))}var hu={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},gu=[],_u=[],vu=[],yu=[],bu=[],xu=[],Su=Math.min,Cu=Math.max,wu=Math.cos,Tu=Math.sin,Eu=Math.abs,Du=Math.PI,Ou=Du*2,ku=typeof Float32Array<`u`,Au=[];function ju(e){return Math.round(e/Du*1e8)/1e8%2*Du}function Mu(e,t){var n=ju(e[0]);n<0&&(n+=Ou);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ou?i=n+Ou:t&&n-i>=Ou?i=n-Ou:!t&&n>i?i=n+(Ou-ju(n-i)):t&&n0&&(this._ux=Eu(n/Ua/e)||0,this._uy=Eu(n/Ua/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(hu.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=Eu(e-this._xi),r=Eu(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(hu.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(hu.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(hu.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(),Au[0]=r,Au[1]=i,Mu(Au,a),r=Au[0],i=Au[1];var o=i-r;return this.addData(hu.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=wu(i)*n+e,this._yi=Tu(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(hu.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(hu.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)&&ku&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(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;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){vu[0]=vu[1]=bu[0]=bu[1]=Number.MAX_VALUE,yu[0]=yu[1]=xu[0]=xu[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;an||Eu(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case hu.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Vr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case hu.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Jr(i,a,y,b,h,g,10),i=h,a=g;break;case hu.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=wu(D)*T+C,s=Tu(D)*E+w),m=Cu(T,E)*Su(Ou,Math.abs(O)),i=wu(k)*T+C,a=Tu(k)*E+w;break;case hu.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case hu.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case hu.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case hu.L:u=n[x++],d=n[x++];var w=Eu(u-c),T=Eu(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 hu.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;zr(c,k,j,te,D,gu),zr(l,A,ee,ne,D,_u),e.bezierCurveTo(gu[1],_u[1],gu[2],_u[2],gu[3],_u[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,te,ne),c=te,l=ne;break;case hu.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;Kr(c,k,j,D,gu),Kr(l,A,ee,D,_u),e.quadraticCurveTo(gu[1],_u[1],gu[2],_u[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case hu.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=Eu(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=wu(se)*ae+re,s=Tu(se)*oe+ie),c=wu(pe)*ae+re,l=Tu(pe)*oe+ie;break;case hu.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 _e=_-h;e.moveTo(u,d),e.lineTo(u+Su(_e,he),d),_e-=he,_e>0&&e.lineTo(u+he,d+Su(_e,ge)),_e-=ge,_e>0&&e.lineTo(u+Cu(he-_e,0),d+ge),_e-=he,_e>0&&e.lineTo(u,d+Cu(ge-_e,0));break lo}h+=E}e.rect(u,d,he,ge);break;case hu.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=hu,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Pu(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||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=zu);var f=Math.atan2(c,s);return f<0&&(f+=zu),f>=r&&f<=i||f+zu>=r&&f+zu<=i}function Vu(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Hu=Nu.CMD,Uu=Math.PI*2,Wu=1e-4;function Gu(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&Ju(),p=Fr(t,r,a,s,qu[0]),f>1&&(m=Fr(t,r,a,s,qu[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Hr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);Ku[0]=-c,Ku[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=Uu-1e-4){r=0,i=Uu;var u=a?1:-1;return o>=Ku[0]+e&&o<=Ku[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=Uu,i+=Uu);for(var f=0,p=0;p<2;p++){var m=Ku[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=Uu+h),(h>=r&&h<=i||h+Uu>=r&&h+Uu<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Vu(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Hu.M:u=a[m++],d=a[m++],c=u,l=d;break;case Hu.L:if(n){if(Pu(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Vu(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.C:if(n){if(Fu(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Yu(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 Hu.Q:if(n){if(Iu(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Xu(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Hu.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+=Vu(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Bu(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Zu(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Hu.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(Pu(u,d,f,d,t,r,i)||Pu(f,d,f,p,t,r,i)||Pu(f,p,u,p,t,r,i)||Pu(u,p,u,d,t,r,i))return!0}else s+=Vu(f,d,f,p,r,i),s+=Vu(u,p,u,d,r,i);break;case Hu.Z:if(n){if(Pu(c,l,u,d,t,r,i))return!0}else s+=Vu(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!Gu(l,d)&&(s+=Vu(c,l,u,d,r,i)||0),s!==0}function $u(e,t,n){return Qu(e,0,!1,t,n)}function ed(e,t,n,r){return Qu(e,t,!0,n,r)}var td=P({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Kl),nd={style:P({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ql.style)},rd=io.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),id=function(e){D(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.5?Ga:t>.2?qa:Ka}else if(e)return Ka}return Ga},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(B(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Di(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 Nu(!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)),ed(a,o/s,e,t)))return!0}if(this.hasFill())return $u(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:N(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ot(td,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=N({},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=N({},r.shape),N(c,n.shape)):(c=N({},i?this.shape:r.shape),N(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=N({},this.shape);for(var l={},u=Pe(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var fd=Math.round;function pd(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?(fd(r*2)===fd(i*2)&&(e.x1=e.x2=hd(r,s,!0)),fd(a*2)===fd(o*2)&&(e.y1=e.y2=hd(a,s,!0)),e):e}}function md(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=hd(r,s,!0),e.y=hd(i,s,!0),e.width=Math.max(hd(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(hd(i+o,s,!1)-e.y,o===0?0:1),e):e}}function hd(e,t,n){if(!t)return e;var r=fd(e*2);return(r+fd(t))%2==0?r/2:(r+(n?1:-1))/2}var gd=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),_d={},vd=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new gd},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=md(_d,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?dd(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(id);vd.prototype.type=`rect`;var yd={fill:`#000`},bd=2,xd={},Sd={style:P({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},ql.style)},Cd=function(e){D(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=yd,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;t0,T=0;T=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&&Id(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=Pd(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(od),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Nd(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Md(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=bd,_=!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=qe(s.opacity,t.opacity,1),Od(p,s),y&&(p.lineWidth=qe(s.lineWidth,t.lineWidth,g),p.lineDash=H(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Ul(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(vd),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=H(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(ud),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=H(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=qe(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return kd(e)&&(t=[e.fontStyle,e.fontWeight,Dd(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Ze(t)||e.textFont||e.font},t}(Xl),wd={left:!0,right:1,center:1},Td={top:1,bottom:1,middle:1},Ed=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Dd(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Od(e,t){for(var n=0;n=0,a=!1;if(e instanceof id){var o=$d(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(uf(s)||uf(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=N({},r),l=N({},l),l.fill=s):!uf(l.fill)&&uf(s)?(a=!0,r=N({},r),l=N({},l),l.fill=Ai(s)):!uf(l.stroke)&&uf(c)&&(a||(r=N({},r),l=N({},l)),l.stroke=Ai(c)),r.style=l}}if(r&&r.z2==null){a||(r=N({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Cf(e,t,n){if(n&&n.z2==null){n=N({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function wf(e,t,n){var r=De(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:xf(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=N({},n),o=N({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Tf(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Sf(this,e,t,n);if(e===`blur`)return wf(this,e,n);if(e===`select`)return Cf(this,e,n)}return n}function Ef(e){e.stateProxy=Tf;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Tf),n&&(n.stateProxy=Tf)}function Df(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,ff)}function Of(e,t){!Ff(e,t)&&!e.__highByOuter&&yf(e,pf)}function kf(e,t){e.__highByOuter|=1<<(t||0),yf(e,ff)}function Af(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&yf(e,pf)}function jf(e){yf(e,mf)}function Mf(e){yf(e,hf)}function Nf(e){yf(e,gf)}function Pf(e){yf(e,_f)}function Ff(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function If(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=ef(i),o=Xd(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){hf(e)}),s&&n.push(i)),a.isBlured=!1}),F(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Lf(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Kf(e,t,n){$f(e,!0),yf(e,Ef),Yf(e,t,n)}function qf(e){$f(e,!1)}function Jf(e,t,n,r){r?qf(e):Kf(e,t,n)}function Yf(e,t,n){var r=Y(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Xf=[`emphasis`,`blur`,`select`],Zf={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Qf(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=dp(m),s*=dp(m));var h=(i===a?-1:1)*dp((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+pp(d)*g-fp(d)*_,y=(t+r)/2+fp(d)*g+pp(d)*_,b=_p([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=_p(x,S);if(gp(x,S)<=-1&&(C=mp),gp(x,S)>=1&&(C=0),C<0){var w=Math.round(C/mp*1e6)/1e6;C=mp*2+w%2*mp}u.addData(l,v,y,o,s,b,C,d,a)}var yp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,bp=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function xp(e){var t=new Nu;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Nu.CMD,c=e.match(yp);if(!c)return t;for(var l=0;lA*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 Kp(e){var t;if(R(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 qp(e,t){var n,r=Vp(t.r,0),i=Vp(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=zp(c-s),p=f>Pp&&f%Pp;if(p>Up&&(f=p),!(r>Up))e.moveTo(l,u);else if(f>Pp-Up)e.moveTo(l+r*Ip(s),u+r*Fp(s)),e.arc(l,u,r,s,c,!d),i>Up&&(e.moveTo(l+i*Ip(c),u+i*Fp(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*Ip(s),j=r*Fp(s),ee=i*Ip(c),te=i*Fp(c),ne=f>Up;if(ne){var re=t.cornerRadius;re&&(n=Kp(re),m=n[0],h=n[1],g=n[2],_=n[3]);var ie=zp(r-i)/2;if(v=Hp(ie,g),y=Hp(ie,_),b=Hp(ie,m),x=Hp(ie,h),w=S=Vp(v,y),T=C=Vp(b,x),(S>Up||C>Up)&&(E=r*Ip(c),D=r*Fp(c),O=i*Ip(s),k=i*Fp(s),fUp){var fe=Hp(g,w),pe=Hp(_,w),me=Gp(O,k,A,j,r,fe,d),he=Gp(E,D,ee,te,r,pe,d);e.moveTo(l+me.cx+me.x0,u+me.cy+me.y0),w0&&e.arc(l+me.cx,u+me.cy,fe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,r,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),!d),pe>0&&e.arc(l+he.cx,u+he.cy,pe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Up)||!ne)e.lineTo(l+ee,u+te);else if(T>Up){var fe=Hp(m,T),pe=Hp(h,T),me=Gp(ee,te,E,D,i,-pe,d),he=Gp(A,j,O,k,i,-fe,d);e.lineTo(l+me.cx+me.x0,u+me.cy+me.y0),T0&&e.arc(l+me.cx,u+me.cy,pe,Rp(me.y0,me.x0),Rp(me.y1,me.x1),!d),e.arc(l,u,i,Rp(me.cy+me.y1,me.cx+me.x1),Rp(he.cy+he.y1,he.cx+he.x1),d),fe>0&&e.arc(l+he.cx,u+he.cy,fe,Rp(he.y1,he.x1),Rp(he.y0,he.x0),!d))}else e.lineTo(l+ee,u+te),e.arc(l,u,i,c,s,d)}e.closePath()}}}var Jp=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}(),Yp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Jp},t.prototype.buildPath=function(e,t){qp(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(id);Yp.prototype.type=`sector`;var Xp=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Zp=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Xp},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}(id);Zp.prototype.type=`ring`;function Qp(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=2){if(r){var a=Qp(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;sxm[1]){if(i=!1,Sm.negativeSize||n)return i;var s=ym(xm[0]-bm[1]),c=ym(bm[0]-xm[1]);_m(s,c)>wm.len()&&(s=c||!Sm.bidirectional)&&(G.scale(Cm,o,-c*r),Sm.useDir&&Sm.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;c0){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 jm(e,t,n,r,i,a){Am(`update`,e,t,n,r,i,a)}function Mm(e,t,n,r,i,a){Am(`enter`,e,t,n,r,i,a)}function Nm(e){if(!e.__zr)return!0;for(var t=0;tfm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,OrientedBoundingRect:()=>Tm,Path:()=>id,Point:()=>G,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,WH:()=>Vm,XY:()=>X,applyTransform:()=>nh,calcZ2Range:()=>Th,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,decomposeTransform:()=>kh,ensureCopyRect:()=>Sh,ensureCopyTransform:()=>Ch,expandOrShrinkRect:()=>mh,extendPath:()=>Wm,extendShape:()=>Hm,getCurrentCanvasPainter:()=>jh,getShapeClass:()=>Km,getTransform:()=>th,groupTransition:()=>oh,initProps:()=>Mm,isBoundingRectAxisAligned:()=>bh,isElementRemoved:()=>Nm,lineLineIntersect:()=>dh,linePolygonIntersect:()=>uh,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,payloadDisableAnimation:()=>Oh,registerShape:()=>Gm,removeElement:()=>Pm,removeElementWithFadeOut:()=>Im,resizePath:()=>Zm,retrieveZInfo:()=>wh,setTooltipConfig:()=>_h,subPixelOptimize:()=>eh,subPixelOptimizeLine:()=>Qm,subPixelOptimizeRect:()=>$m,transformDirection:()=>rh,traverseElements:()=>yh,traverseUpdateZ:()=>Eh,updateProps:()=>jm}),Bm={},X=[`x`,`y`],Vm=[`width`,`height`];function Hm(e){return id.extend(e)}var Um=Ep;function Wm(e,t){return Um(e,t)}function Gm(e,t){Bm[e]=t}function Km(e){if(Bm.hasOwnProperty(e))return Bm[e]}function qm(e,t,n,r){var i=Tp(e,t);return n&&(r===`center`&&(n=Ym(n,i.getBoundingRect())),Zm(i,n)),i}function Jm(e,t,n){var r=new ud({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(Ym(t,i))}}});return r}function Ym(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Xm=Dp;function Zm(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function Qm(e,t){return pd(e,e,{lineWidth:t}),e}function $m(e,t){return md(e,e,t),e}var eh=hd;function th(e,t){for(var n=yn([]);e&&e!==t;)xn(n,e.getLocalTransform(),n),e=e.parent;return n}function nh(e,t,n){return t&&!Ae(t)&&(t=to.getLocalTransform(t)),n&&(t=Tn([],t)),Pt([],e,t)}function rh(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:is(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:is(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=nh(a,t,n),is(a[0])>is(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function ih(e){return!e.isGroup}function ah(e){return e.shape!=null}function oh(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){ih(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return ah(e)&&(t.shape=M(e.shape)),t}var a=r(e);t.traverse(function(e){if(ih(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),jm(e,r,n,Y(e).dataIndex)}}})}function sh(e,t){return I(e,function(e){var n=e[0];n=rs(n,t.x),n=ns(n,t.x+t.width);var r=e[1];return r=rs(r,t.y),r=ns(r,t.y+t.height),[n,r]})}function ch(e,t){var n=rs(e.x,t.x),r=ns(e.x+e.width,t.x+t.width),i=rs(e.y,t.y),a=ns(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 lh(e,t,n){var r=N({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),P(i,n),new ud(r)):qm(e.replace(`path://`,``),r,n,`center`)}function uh(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=fh(p,m,u,d)/f;return!(g<0||g>1)}function fh(e,t,n,r){return e*r-n*t}function ph(e){return e<=1e-6&&e>=-1e-6}function mh(e,t,n,r,i){return t==null?e:(Re(t)?hh[0]=hh[1]=hh[2]=hh[3]=t:(hh[0]=t[0],hh[1]=t[1],hh[2]=t[2],hh[3]=t[3]),r&&(hh[0]=rs(0,hh[0]),hh[1]=rs(0,hh[1]),hh[2]=rs(0,hh[2]),hh[3]=rs(0,hh[3])),n&&(hh[0]=-hh[0],hh[1]=-hh[1],hh[2]=-hh[2],hh[3]=-hh[3]),gh(e,hh,`x`,`width`,3,1,i&&i[0]||0),gh(e,hh,`y`,`height`,0,2,i&&i[1]||0),e)}var hh=[0,0,0,0];function gh(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=rs(0,ns(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:is(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function _h(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=B(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&&F(Pe(c),function(e){W(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Y(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:P({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function vh(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function yh(e,t){if(e)if(R(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Eh(e,t,n){Dh(e,t,n,-1/0)}function Dh(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=0&&n.push(e)}),n}}function dg(e,t){return Ce(Ce({},e,!0),t,!0)}var fg={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:`. `}}}},pg={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:``}}}},mg=`ZH`,hg=`EN`,gg=hg,_g={},vg={},yg=k.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||gg).toUpperCase().indexOf(mg)>-1?mg:gg}():gg;function bg(e,t){e=e.toUpperCase(),vg[e]=new og(t),_g[e]=t}function xg(e){if(B(e)){var t=_g[e.toUpperCase()]||{};return e===mg||e===hg?M(t):Ce(M(t),M(_g[gg]),!1)}else return Ce(M(e),M(_g[gg]),!1)}function Sg(e){return vg[e]}function Cg(){return vg[gg]}bg(hg,fg),bg(mg,pg);var wg=null;function Tg(e){wg||=e}function Eg(){return wg}function Dg(e,t){var n=Eg(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Og(e){var t=e.brk;return t?t.breaks:[]}function kg(e){var t=e.brk;return t?t.hasBreaks():!1}var Ag=1e3,jg=Ag*60,Mg=jg*60,Ng=Mg*24,Pg=Ng*365,Fg={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})/},Ig={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Lg=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Rg=`{yyyy}-{MM}-{dd}`,zg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Rg,hour:Rg+` `+Ig.hour,minute:Rg+` `+Ig.minute,second:Rg+` `+Ig.second,millisecond:Lg},Bg=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Vg=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Hg(e){return!B(e)&&!z(e)?Ug(e):e}function Ug(e){e||={};var t={},n=!0;return F(Bg,function(t){n&&=e[t]==null}),F(Bg,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Bg[s],l=V(a)&&!R(a)?a[c]:a,u=void 0;R(l)?(u=l.slice(),o=u[0]||``):B(l)?(o=l,u=[o]):(o==null?o=Ig[r]:Fg[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Wg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Gg(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 Kg(e){return e===Gg(e)}function qg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Jg(e,t,n,r){var i=Ms(e),a=i[Qg(n)](),o=i[$g(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[e_(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[t_(n)](),d=(u-1)%12+1,f=i[n_(n)](),p=i[r_(n)](),m=i[i_(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof og?r:Sg(r||yg)||Cg()).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,Wg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Wg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Wg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Wg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Wg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Wg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Wg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Wg(m,3)).replace(/{S}/g,m+``)}function Yg(e,t,n,r,i){var a=null;if(B(n))a=n;else if(z(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Eg();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=Xg(e.value,i);a=n[u][u][0]}}return Jg(new Date(e.value),a,i,r)}function Xg(e,t){var n=Ms(e),r=n[$g(t)]()+1,i=n[e_(t)](),a=n[t_(t)](),o=n[n_(t)](),s=n[r_(t)](),c=n[i_(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 Zg(e,t,n){switch(t){case`year`:e[o_(n)](0);case`month`:e[s_(n)](1);case`day`:e[c_(n)](0);case`hour`:e[l_(n)](0);case`minute`:e[u_(n)](0);case`second`:e[d_(n)](0)}return e}function Qg(e){return e?`getUTCFullYear`:`getFullYear`}function $g(e){return e?`getUTCMonth`:`getMonth`}function e_(e){return e?`getUTCDate`:`getDate`}function t_(e){return e?`getUTCHours`:`getHours`}function n_(e){return e?`getUTCMinutes`:`getMinutes`}function r_(e){return e?`getUTCSeconds`:`getSeconds`}function i_(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function a_(e){return e?`setUTCFullYear`:`setFullYear`}function o_(e){return e?`setUTCMonth`:`setMonth`}function s_(e){return e?`setUTCDate`:`setDate`}function c_(e){return e?`setUTCHours`:`setHours`}function l_(e){return e?`setUTCMinutes`:`setMinutes`}function u_(e){return e?`setUTCSeconds`:`setSeconds`}function d_(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function f_(e,t,n,r,i,a,o,s){return new Cd({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function p_(e){if(!zs(e))return B(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function m_(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var h_=Ye;function g_(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Ze(e)?e:`-`}function a(e){return Us(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Ms(e):e;if(!isNaN(+c))return Jg(c,r,n);if(s)return`-`}if(t===`ordinal`)return Le(e)?i(e):Re(e)&&a(e)?e+``:`-`;var l=Rs(e);return a(l)?p_(l):Le(e)?i(e):typeof e==`boolean`?e+``:`-`}var __=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],v_=function(e,t){return`{`+e+(t??``)+`}`};function y_(e,t,n){R(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{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 S_(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd +yyyy`);var r=Ms(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r[i+`Date`](),c=r[i+`Hours`](),l=r[i+`Minutes`](),u=r[i+`Seconds`](),d=r[i+`Milliseconds`]();return e=e.replace(`MM`,Wg(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,Wg(a%100+``,2)).replace(`dd`,Wg(s,2)).replace(`d`,s).replace(`hh`,Wg(c,2)).replace(`h`,c).replace(`mm`,Wg(l,2)).replace(`m`,l).replace(`ss`,Wg(u,2)).replace(`s`,u).replace(`SSS`,Wg(d,3)),e}function C_(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function w_(e,t){return t||=`transparent`,B(e)?e:V(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function T_(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var E_={},D_={},O_=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(E_,!0),this._normalMasterList=n(D_,!1);function n(n,r){var i=[];return F(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){F(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){E_[e]=t;return}D_[e]=t},e.get=function(e){return D_[e]||E_[e]},e}();function k_(e){return!!E_[e]}function A_(e){j_.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var j_=U();function M_(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=j_.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function N_(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&&!k_(n)&&(i=0))}return{coordSysType:n,kind:i}}function P_(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=N_(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var F_=function(e,t){var n=t.getReferringComponents(e,Tc).models[0];return n&&n.coordinateSystem},I_=F,L_=[`left`,`right`,`top`,`bottom`,`width`,`height`],R_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function z_(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var B_=z_;Ie(z_,`vertical`),Ie(z_,`horizontal`);function V_(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 H_(e,t){var n=q_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===K_.point)a=n.refPoint,i=W_(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=R(o)?o:[o,o];i=W_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[J(s[0],i.width)+i.x,J(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function U_(e,t){var n=H_(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);R(a)||(a=[0,a]);var o=J(r.width,t.getWidth()),s=J(r.height,t.getHeight()),c=Math.min(o,s),l=J(a[0],c/2),u=J(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function W_(e,t,n){n=h_(n||0);var r=t.width,i=t.height,a=J(e.left,r),o=J(e.top,i),s=J(e.right,r),c=J(e.bottom,i),l=J(e.width,r),u=J(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new K((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function G_(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Ce(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Dc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return V_(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}(og);cl(tv,og),pl(tv),lg(tv),ug(tv,nv);function nv(e){var t=[];return F(tv.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=I(t,function(e){return rl(e).main}),e!==`dataset`&&De(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Z={color:{},darkColor:{},size:{}},rv=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)`};for(var iv in N(rv,{primary:rv.neutral80,secondary:rv.neutral70,tertiary:rv.neutral60,quaternary:rv.neutral50,disabled:rv.neutral20,border:rv.neutral30,borderTint:rv.neutral20,borderShade:rv.neutral40,background:rv.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:rv.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:rv.neutral70,axisLineTint:rv.neutral40,axisTick:rv.neutral70,axisTickMinor:rv.neutral60,axisLabel:rv.neutral70,axisSplitLine:rv.neutral15,axisMinorSplitLine:rv.neutral05}),rv)if(rv.hasOwnProperty(iv)){var av=rv[iv];iv===`theme`?Z.darkColor.theme=rv.theme.slice():iv===`highlight`?Z.darkColor.highlight=`rgba(255,231,130,0.4)`:iv.indexOf(`accent`)===0?Z.darkColor[iv]=wi(av,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Z.darkColor[iv]=wi(av,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};var ov=``;typeof navigator<`u`&&(ov=navigator.platform||``);var sv=`rgba(0, 0, 0, 0.2)`,cv=Z.color.theme[0],lv=wi(cv,null,null,.9),uv={darkMode:`auto`,colorBy:`series`,color:Z.color.theme,gradientColor:[lv,cv],aria:{decal:{decals:[{color:sv,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sv,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sv,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sv,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sv,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sv,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:ov.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},dv={Must:1,Might:2,Not:3},fv=xc();function pv(e){fv(e).datasetMap=U()}function mv(e,t,n){var r={},i=gv(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=fv(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),F(e,function(t,n){var i=V(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});F(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;rt)return e[r];return e[n-1]}function Ov(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:Dv(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 kv(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Av,jv,Mv,Nv=`\0_ec_inner`,Pv=1,Fv=function(e){D(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 og(r),this._locale=new og(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Bv(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Bv(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`?Mv(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&&F(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=U(),s=t&&t.replaceMergeMainTypeMap;pv(this),F(e,function(e,t){e!=null&&(tv.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?M(e):Ce(n[t],e,!0))}),s&&s.each(function(e,t){tv.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),tv.topologicalTravel(a,tv.getAllClassMainTypes(),c,this);function c(t){var a=Sv(this,t,$s(e[t])),o=r.get(t),c=ic(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);_c(c,t,tv),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;F(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=tv.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=N({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),N(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`&&Av(this)}this._seriesIndices||Av(this)},t.prototype.getOption=function(){var e=M(this.option);return F(e,function(t,n){if(tv.hasClass(n)){for(var r=$s(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!hc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[Nv],e},t.prototype.setTheme=function(e){this._theme=new og(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=t:n===`max`?e<=t:e===t}function Kv(e,t){return e.join(`,`)===t.join(`,`)}var qv=F,Jv=V,Yv=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function Xv(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=Yv.length;n0?e[n-1].seriesModel:null)}),yy(e))})}function yy(e){F(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=Ds(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var by=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;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Fy=(e={},e[Vd+`_`+Kd]={pure:!0,appendData:i},e[Vd+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Hd]={pure:!0,appendData:i},e[Ud]={pure:!0,appendData:function(e){var t=this._data;F(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Bd]={appendData:i},e[Wd]={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=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return Yy(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Qy(e){var t,n;return V(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function $y(e){return new eb(e)}var eb=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(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}},ob=function(){function e(e,t){Re(t)||Ys(``),this._opFn=ab[e],this._rvalFloat=Rs(t)}return e.prototype.evaluate=function(e){return Re(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},e}(),sb=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=Re(e)?e:Rs(e),r=Re(t)?t:Rs(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=B(e),s=B(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}(),cb=function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(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=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},e}();function lb(e,t){return e===`eq`||e===`ne`?new cb(e===`eq`,t):W(ab,e)?new ob(e,t):null}function ub(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 db(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,wb=typeof Uint16Array>`u`?Array:Uint16Array,Tb=typeof Int32Array>`u`?Array:Int32Array,Eb=typeof Float64Array>`u`?Array:Float64Array,Db={float:Eb,int:Tb,ordinal:Array,number:Array,time:Eb},Ob;function kb(e){return e>65535?Cb:wb}function Ab(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function jb(e,t,n,r,i){var a=Db[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[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=I(a,function(e){return e.property}),l=0;lg[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=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)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=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=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=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return sg[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(kb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(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=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 nb(e[r],this._dimensions[r])}Ob={arrayRows:e,objectRows:function(e,t,n,r){return nb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return nb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Nb=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(Fb(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=Be(o)?Wd:Bd,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=H(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=H(u.sourceHeader,d.sourceHeader),m=H(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Sy(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=[Sy(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&&Ib(``);var i,a=[],o=[];return F(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&Ib(``),a.push(t),o.push(e._getVersionSign())}),n?i=bb(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[wy(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return F(e.blocks,function(e){var n=Gb(e);n>=t&&(t=n+ +(r&&(!n||Ub(e)&&!e.noHeader)))}),t}return 0}function Kb(e,t,n,r){var i=t.noHeader,a=Yb(Gb(t)),o=[],s=t.blocks||[];Xe(!s||R(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(W(l,c)){var u=new sb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}F(s,function(n,i){var s=t.valueFormatter,c=Wb(n)(s?N(N({},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):Xb(r,o.join(``),i?n:a.html);if(i)return d;var f=g_(t.header,`ordinal`,e.useUTC),p=zb(r,e.renderMode).nameStyle,m=Rb(r);return e.renderMode===`richText`?$b(e,f,p)+a.richText+d:Xb(r,`
`+$t(f)+`
`+d,n)}function qb(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=R(e)?e:[e],I(e,function(e,t){return g_(e,R(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Z.color.secondary,i),f=a?``:g_(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=zb(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:$b(e,f,v))+(o?``:ex(e,m,h,g,y)):Xb(r,(s?``:d)+(a?``:Zb(f,!s,v))+(o?``:Qb(m,h,g,y)),n)}}function Jb(e,t,n,r,i,a){if(e)return Wb(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Yb(e){return{html:Bb[e],richText:Vb[e]}}function Xb(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=Rb(e);return`
`+t+r+`
`}function Zb(e,t,n){var r=t?`margin-left:2px`:``;return``+$t(e)+``}function Qb(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=R(e)?e:[e],``+I(e,function(e){return $t(e)}).join(`  `)+``}function $b(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ex(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(R(t)?t.join(` `):t,a)}function tx(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return w_(n)}function nx(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var rx=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Bs()}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=x_({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};R(t)?F(t,function(e){return N(n,e)}):N(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function ix(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=R(s),l=tx(t,n),u,d,f,p;if(o>1||c&&!o){var m=ax(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=Yy(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=mc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Hb(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Hb(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Ze(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function ax(e,t,n,r,i){var a=t.getData(),o=je(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?F(r,function(e){u(Yy(a,n,e),e)}):F(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Hb(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var ox=xc();function sx(e,t){return e.getName(t)||e.getId(t)}var cx=`__universalTransitionEnabled`,lx=function(e){D(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=$y({count:fx,reset:px}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(ox(this).sourceManager=new Nb(this)).prepareSource();var r=this.getInitialData(e,n);hx(r,this),this.dataTask.context.data=r,ox(this).dataBeforeProcessed=r,ux(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=X_(this),r=n?Q_(e):{},i=this.subType;tv.hasClass(i)&&(i+=`Series`),Ce(e,t.getTheme().get(this.subType)),Ce(e,this.getDefaultOption()),ec(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Z_(e,r,n)},t.prototype.mergeOption=function(e,t){e=Ce(this.option,e,!0),this.fillDataTextStyle(e.data);var n=X_(this);n&&Z_(this.option,e,n);var r=ox(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);hx(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,ox(this).dataBeforeProcessed=i,ux(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Be(e))for(var t=[`show`],n=0;n=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 ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(k.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=Tv.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=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[sx(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?!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`){V(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return tv.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}(tv);ke(lx,Zy),ke(lx,Tv),cl(lx,tv);function ux(e){var t=e.name;mc(e)||(e.name=dx(e)||t)}function dx(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return F(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function fx(e){return e.model.getRawData().count()}function px(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),mx}function mx(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function hx(e,t){F(at(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,Ie(gx,t))})}function gx(e,t){var n=_x(e);return n&&n.setOutputEnd((t||this).count()),t}function _x(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var vx=function(){function e(){this.group=new q,this.uid=cg(`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}();ol(vx),pl(vx);function yx(){var e=xc();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var bx=xc(),xx=yx(),Sx=function(){function e(){this.group=new q,this.uid=cg(`viewChart`),this.renderTask=$y({plan:Ex,reset:Dx}),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&&Tx(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&Tx(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){yh(this.group,e)},e.markUpdateMethod=function(e,t){bx(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function Cx(e,t,n){e&&ep(e)&&(t===`emphasis`?kf:Af)(e,n)}function Tx(e,t,n){var r=bc(e,t),i=t&&t.highlightKey!=null?np(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Cx(e,n,i)}):F($s(r),function(t){Cx(e.getItemGraphicEl(t),n,i)})}ol(Sx,[`dispose`]),pl(Sx);function Ex(e){return xx(e.model)}function Dx(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&bx(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Ox[c]}var Ox={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)}}},kx=`\0__throttleOriginMethod`,Ax=`\0__throttleRate`,jx=`\0__throttleType`;function Mx(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 Nx(e,t,n,r){var i=e[t];if(i){var a=i[kx]||i,o=i[jx];if(i[Ax]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Mx(a,n,r===`debounce`),i[kx]=a,i[jx]=r,i[Ax]=n}return i}}function Px(e,t){var n=e[t];n&&n[kx]&&(n.clear&&n.clear(),e[t]=n[kx])}var Fx=xc(),Ix={itemStyle:ml(rg,!0),lineStyle:ml(eg,!0)},Lx={lineStyle:`stroke`,itemStyle:`fill`};function Rx(e,t){return e.visualStyleMapper||Ix[t]||(console.warn(`Unknown style type '`+t+`'.`),Ix.itemStyle)}function zx(e,t){return e.visualDrawType||Lx[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Bx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Rx(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=zx(e,r),c=a[s],l=z(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`||z(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||z(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=N({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Vx=new og,Hx={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Rx(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Vx.option=n[r];var o=i(Vx);N(e.ensureUniqueItemVisual(t,`style`),o),Vx.option.decal&&(e.setItemVisual(t,`decal`,Vx.option.decal),Vx.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},Ux={performRawSeries:!0,overallReset:function(e){var t=U();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();Fx(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=Fx(e).scope,a=zx(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)}})}})}},Wx=Math.PI;function Gx(e,t){t||={},P(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 q,r=new vd({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Cd({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 vd({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 fm({shape:{startAngle:-Wx/2,endAngle:-Wx/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:Wx*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Wx*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Kx=function(){function e(e,t,n,r){this._stageTaskMap=U(),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):Zc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=U();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;F(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Xe(!(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;F(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=U(),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)||$y({plan:Zx,reset:Qx,count:tS}));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||$y({reset:qx});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=U(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Xe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):F(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,$y({reset:Jx,onDirty:Xx})));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 z(e)&&(e={overallReset:e,seriesType:nS(e)}),e.uid=cg(`stageHandler`),t&&(e.visualType=t),e},e}();function qx(e){e.overallReset(e.ecModel,e.api,e.payload)}function Jx(e){return e.dirtyOnOverallProgress&&Yx}function Yx(){this.agent.dirty(),this.getDownstream().dirty()}function Xx(){this.agent&&this.agent.dirty()}function Zx(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Qx(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=$s(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?I(t,function(e,t){return eS(t)}):$x}var $x=eS(0);function eS(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&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}(),fS=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],pS=fS.concat([`symbolKeepAspect`]),mS={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=0&&qS(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XS(e,t,n){for(var r=t.type===`radial`?YS(e,t,n):JS(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:Re(e)?[e]:R(e)?e:null}function tC(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eC(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=I(n,function(e){return e/i}),r/=i)}return[n,r]}var nC=new Nu(!0);function rC(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iC(e){return typeof e==`string`&&e!==`none`}function aC(e){var t=e.fill;return t!=null&&t!==`none`}function oC(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 sC(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 cC(e,t,n){var r=yl(t.image,t.__image,n);if(xl(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)*lt),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lC(e,t,n,r,i){var a,o=rC(n),s=aC(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nC,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?XS(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XS(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cC(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cC(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=tC(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&&sC(e,n),s&&oC(e,n)):(s&&oC(e,n),o&&sC(e,n)),T&&e.setLineDash([])}function uC(e,t,n){var r=t.__image=yl(n.image,t.__image,t,t.onload);if(!(!r||!xl(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 dC(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=tC(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rC(n)&&e.strokeText(i,n.x,n.y),aC(n)&&e.fillText(i,n.x,n.y)):(aC(n)&&e.fillText(i,n.x,n.y),rC(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fC=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pC=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mC(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TC(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Kl.opacity:o}(r||t.blend!==n.blend)&&(a||=(TC(e,i),!0),e.globalCompositeOperation=t.blend||Kl.blend);for(var s=0;s0&&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[sw]){if(this._disposed){this.id;return}var r,i,a;if(V(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[sw]=!0,zw(this),!this._model||t){var o=new Hv(this._api),s=this._theme,c=this._model=new Fv;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},qw);var l={seriesTransition:a,optionChanged:!0};if(n)this[lw]={silent:r,updateParams:l},this[sw]=!1,this.getZr().wakeUp();else{try{xw(this),ww.update.call(this,null,l)}catch(e){throw this[lw]=null,this[sw]=!1,e}this._ssr||this._zr.flush(),this[lw]=null,this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[sw]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[lw]&&(r??=this[lw].silent,i=this[lw].updateParams,this[lw]=null),this[sw]=!0,zw(this);try{this._updateTheme(e),n.setTheme(this._theme),xw(this),ww.update.call(this,{type:`setTheme`},i)}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype._updateTheme=function(e){B(e)&&(e=Yw[e]),e&&(e=M(e),e&&gy(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||k.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 F(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;F(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 F(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(Qw[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();F(Zw,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(M(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=ae.createCanvas(),h=Wo(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return F(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new vd({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),F(u,function(e){var t=new ud({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return Tw(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Tw(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Tw(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return F(Cc(n,e),function(e,n){n.indexOf(`Models`)>=0&&F(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=Cc(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?_S(i,t):gS(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;F(Hw,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&SS(i,function(e){var t=Y(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=N({},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;F(Gw,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),xS(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&kc(this.getDom(),tT,``);var e=this,t=e._api,n=e._model;F(e._componentsViews,function(e){e.dispose(n,t)}),F(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 Zw[e.id]},t.prototype.resize=function(e){if(!this[sw]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[lw]&&(r??=this[lw].silent,n=!0,this[lw]=null),this[sw]=!0,zw(this);try{n&&xw(this),ww.update.call(this,{type:`resize`,animation:N({duration:0},e&&e.animation)})}catch(e){throw this[sw]=!1,e}this[sw]=!1,Ow.call(this,r),kw.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(V(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),Xw[e]){var n=Xw[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=N({},e);return t.type=Ww[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(V(t)||(t={silent:!!t}),Uw[e.type]&&this._model){if(this[sw]){this._pendingActions.push(e);return}var n=t.silent;Dw.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&k.browser.weChat&&this._throttledZrFlush(),Ow.call(this,n),kw.call(this,n)}},t.prototype.updateLabelLayout=function(){CS.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){xw=function(e){jS(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),Sw(e,!0),Sw(e,!1),t.plan()},Sw=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;cH(t.get(`hoverLayerThreshold`),uv.hoverLayerThreshold)&&!k.node&&!k.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=wh(e);t.eachRendered(function(e){return Eh(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Nm(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(Nm(e))return;if(e instanceof id&&ap(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)}})}Fw=function(e){return new(function(t){D(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){kf(t,n),Lw(e)},n.prototype.leaveEmphasis=function(t,n){Af(t,n),Lw(e)},n.prototype.enterBlur=function(t){jf(t),Lw(e)},n.prototype.leaveBlur=function(t){Mf(t),Lw(e)},n.prototype.enterSelect=function(t){Nf(t),Lw(e)},n.prototype.leaveSelect=function(t){Pf(t),Lw(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[cw]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Yd))(e)},Iw=function(e){function t(e,t){for(var n=0;n=0)){xT.push(n);var o=Kx.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function CT(e,t){Xw[e]=t}function wT(e){oe({createCanvas:e})}function TT(e,t,n){var r=ES(`registerMap`);r&&r(e,t,n)}function ET(e){var t=ES(`getMap`);return t&&t(e)}var DT=yb;bT(QC,Bx),bT(tw,Hx),bT(tw,Ux),bT(QC,mS),bT(tw,hS),bT(aw,zC),uT(gy),dT(GC,_y),CT(`default`,Gx),hT({type:rf,event:rf,update:rf},ct),hT({type:af,event:af,update:af},ct),hT({type:of,event:lf,update:of,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:sf,event:lf,update:sf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0}),hT({type:cf,event:lf,update:cf,action:ct,refineEvent:OT,publishNonRefinedEvent:!0});function OT(e,t,n,r){return{eventContent:{selected:Gf(n),isFromClick:t.isFromClick||!1}}}lT(`default`,{}),lT(`dark`,uS);var kT={},AT=[],jT={registerPreprocessor:uT,registerProcessor:dT,registerPostInit:fT,registerPostUpdate:pT,registerUpdateLifecycle:mT,registerAction:hT,registerCoordinateSystem:gT,registerLayout:yT,registerVisual:bT,registerTransform:DT,registerLoading:CT,registerMap:TT,registerImpl:TS,PRIORITY:ow,ComponentModel:tv,ComponentView:vx,SeriesModel:lx,ChartView:Sx,registerComponentModel:function(e){tv.registerClass(e)},registerComponentView:function(e){vx.registerClass(e)},registerSeriesModel:function(e){lx.registerClass(e)},registerChartView:function(e){Sx.registerClass(e)},registerCustomSeries:function(e,t){OS(e,t)},registerSubTypeDefaulter:function(e,t){tv.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Jo(e,t)}};function MT(e){if(R(e)){F(e,function(e){MT(e)});return}De(AT,e)>=0||(AT.push(e),z(e)&&(e={install:e}),e.install(jT))}function NT(e){return e==null?0:e.length||1}function PT(e){return e}var FT=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||PT,this._newKeyGetter=r||PT,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;a1){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;o1&&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;f1)for(var o=0;o30}var YT=V,XT=I,ZT=typeof Int32Array>`u`?Array:Int32Array,QT=`e\0\0`,$T=-1,eE=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],tE=[`_approximateExtent`],nE,rE,iE,aE,oE,sE,cE,lE=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;GT(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=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;o0},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),R(i)?i=i.slice():YT(i)&&(i=N({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,YT(t)?N(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){YT(e)?N(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?N(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Ld(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){F(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:XT(this.dimensions,this._getDimInfo,this),this.hostModel),oE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];z(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Je(arguments)))})},e.internalField=function(){nE=function(e){var t=e._invertedIndicesMap;F(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new ZT(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function uE(e,t){return dE(e,t).dimensions}function dE(e,t){xy(e)||(e=Cy(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=U(),a=[],o=fE(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&JT(o),c=r===e.dimensionsDefine,l=c?qT(e):KT(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=U(u),f=new Tb(o),p=0;p0&&(e.name+=t-1)}),new WT({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function fE(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return F(t,function(e){var t;V(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function pE(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var mE=function(){function e(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}return e}();function hE(e){var t=e.get(`coordinateSystem`),n=new mE(t),r=gE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var gE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tc).models[0],a=e.getReferringComponents(`yAxis`,Tc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),_E(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),_E(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),_E(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),_E(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),_E(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();F(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),_E(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function _E(e){return e.get(`type`)===`category`}function vE(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;yE(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(F(a,function(e,t){B(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),F(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;F(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 yE(e){return!GT(e.schema)}function bE(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function xE(e,t){return bE(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function SE(e,t){var n=e.get(`coordinateSystem`),r=O_.get(n),i;return t&&t.coordSysDims&&(i=I(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=zT(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function CE(e,t,n){var r,i;return n&&F(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 wE(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Cy(e)):(i=r.getSource(),a=i.sourceFormat===Bd);var o=hE(t),s=SE(t,o),c=n.useEncodeDefaulter,l=z(c)?c:c?Ie(mv,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=dE(i,u),f=CE(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=vE(t,{schema:d,store:p}),h=new lE(d,t);h.setCalculationInfo(m);var g=f!=null&&TE(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 TE(e){if(e.sourceFormat===`original`)return!R(nc(EE(e.data||[])))}function EE(e){for(var t=0;t=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){VE(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),VE(r,e,t,n)},freeze:function(){}};function VE(e,t,n,r){Hc(n,r)&&(e[t][0]=n,e[t][1]=r)}function HE(e){return UE(e)||GE(e)}function UE(e){return e.type===`interval`}function WE(e){return e.type===`time`}function GE(e){return e.type===`log`}function KE(e){return e.type===`ordinal`}function qE(e){var t=Ps(e),n=cs(10,t),r=as(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,vs(r*n,-t)}function JE(e){return xs(e)+2}function YE(e,t){return ls(e)/ls(t)}function XE(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var tD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,NE(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new kE({}),R(i)&&(i=new kE({categories:I(i,function(e){return V(e)?e.value:e})})),r._ordinalMeta=i;var a=ME(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,PE(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=as(e),e},t.prototype.getTicks=function(){var e=[];return eD(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ns(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ns(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=vs(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=vs(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?vs(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 nD(this,e,Og(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=xs(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),p_(vs(e.value,n,!0))},t.type=`interval`,t}(DE);DE.registerClass(rD);var iD=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function lD(e){var t=30*Ng;return e/=t,e>6?6:e>3?3:e>2?2:1}function uD(e){return e/=Mg,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function dD(e,t){return e/=t?jg:Ag,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function fD(e){return rs(Fs(e,!0),1)}function pD(e,t,n){var r=Math.max(0,De(Bg,t)-1);return Zg(new Date(e),Bg[r],n).getTime()}function mD(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 hD(e,t,n,r,i,a){var o=3e3,s=Vg,c=0;function l(e,t,n,i,s,l,u){for(var d=mD(s,e),f=t,p=new Date(f);fo));)if(p[s](p[i]()+e),f=p.getTime(),a){var m=a.calcNiceTickMultiple(f,d);m>0&&(p[s](p[i]()+m*e),f=p.getTime())}u.push({value:f,notAdd:f>r[1]})}function u(e,i,a){var o=[],s=!i.length;if(!sD(Gg(e),r[0],r[1],n)){s&&(i=[{value:pD(r[0],e,n)},{value:r[1]}]);for(var c=0;c=r[0]&&u<=r[1]&&l(f,u,d,p,m,h,o),e===`year`&&a.length>1&&c===0&&a.unshift({value:a[0].value-f})}}for(var c=0;c=r[0]&&y<=r[1]&&p++)}var b=i/t;if(p>b*1.5&&m>b/1.5||(d.push(_),p>b||e===s[h]))break}f=[]}}for(var x=Me(I(d,function(e){return Me(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),S=x.length-1,C=[],h=0;hr[0])&&C.unshift({value:r[0],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),(!O||O.values&&(a=s);var c=oD.length,l=Math.min(iD(oD,a,0,c),c-1),u=oD[l][1],d=oD[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};DE.registerClass(aD);var _D=0,vD=1,yD=2,bD=function(e){D(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=rD.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[_D]=i[vD]=a[_D]=a[vD]=NaN,NE(r,t.mapperMethods);var s=Eg(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},yD,l),r.powStub=new rD({breakParsed:l.original}),r.intervalStub=new rD({breakParsed:l.transformed}),PE(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Eg(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return I(i.getTicks(e||{}),function(e){var i=e.value,o=XE(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Og(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return nD(this,e,Og(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(YE(e,this.base))},scale:function(e){return XE(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=YE(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return xD.depth=n,SD.lookup=this._lookup,XE(n===2?e:this.intervalStub.transformOut(e,xD),this.base,SD)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Hc(t,n)||t<=0||n<=0)){var r=CD,i=CD;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[_D]=t,r[vD]=n);var o=this.base;this.intervalStub.setExtent2(e,i[_D]=YE(t,o),i[vD]=YE(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Hc(t[0],t[1])&&Us(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}(DE);DE.registerClass(bD);var xD={},SD={},CD=[],wD={value:1,category:1,time:1,log:1},TD=xc();function ED(e){var t=e.get(`type`);return(t==null||!W(wD,t)&&!DE.getClass(t))&&(t=`value`),t}function DD(e,t,n){var r=Eg(),i;switch(r&&(i=RD(e,t,n)),t){case`category`:return new tD({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Ic()});case`time`:return new aD({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new bD({logBase:e.get(`logBase`),breakOption:i});case`value`:return new rD({breakOption:i});default:return new((DE.getClass(t))||rD)({})}}function OD(e,t,n){var r=n?IE(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Hc(i,a)?i===t||a===t?2:it?1:3:3}function kD(e){TD(e).noOnMyZero=!0}function AD(e){return TD(e).noOnMyZero}function jD(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Hg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(z(t)){if(e.type===`category`)return function(n,r){return t(MD(e,n),n.value-e.scale.getExtent()[0],null)};var r=Eg();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(MD(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function MD(e,t){var n=e.scale;return KE(n)?n.getLabel(t):t.value}function ND(e){return e.get(`interval`)??`auto`}function PD(e){return e.type===`category`&&ND(e.getLabelModel())===0}function FD(e,t){var n={};return F(e.mapDimensionsAll(t),function(t){n[xE(e,t)]=!0}),Pe(n)}function ID(e){return e===`middle`||e===`center`}function LD(e){return e.getShallow(`show`)}function RD(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Eg()||!n||!zD(t)?void 0:r}function zD(e){return e!==`category`}function BD(e,t,n,r,i,a){var o=GE(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=QE(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function VD(e,t){return KE(e)?e.getRawOrdinalNumber(t.value):t.value}function HD(e,t){return KE(e)&&!!t.get(`boundaryGap`)}var UD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),WD=Gc(),GD=xc(),KD=xc();function qD(e,t){var n=e.model,r=GD(PS(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function JD(e,t){return ZD(qD(e,t))}function YD(e,t){var n=[];return XD(e.model.ecModel,function(e){for(var r=0;r0&&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=hO(e,t.get(`startValue`,!0)),x=b!=null;!Us(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Us(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),mO(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),mO(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function mO(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),Wc(t))}function hO(e,t){return t==null?null:Ge(t)?NaN:e.parse(t)}function gO(e,t){var n;if(KE(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=R(r)?r:[r,r]}return[_O(n[0]),_O(n[1])]}function _O(e){return yo(typeof e==`boolean`?0:e,1)||0}function vO(e){var t=dO(e.scale);return t.extent||=Ic(),t}function yO(e,t){vO(e).dimIdxInCoord=t.get(e.dim)}function bO(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||xO(n,e,i,r,t)}function xO(e,t,n,r,i){var a=vO(t),o=a.extent,s=!1;QD(t,function(r){if(r.boxCoordinateSystem){var i=M_(r).coord,c=a.dimIdxInCoord;if(c>=0&&R(i)){var l=i[c];l!=null&&!R(l)&&Lc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;F(FD(u,n),function(e){Bc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=DO(e,t,r);CO(e,new pO(e,r,o,s,c),i),a.extent=null}function SO(e,t){var n=e.scale;CO(n,new pO(n,e.model,t,!1,!1),fO)}function CO(e,t,n){e.rawExtentInfo=t,t.from=n}function wO(e,t){TO.set(e,t)}var TO=U();function EO(e,t,n,r,i){e.rawExtentInfo||SO({scale:e,model:t},i||Ic());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 DO(e,t,n){var r=HD(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return rO(t,function(e){a=!!TO.get(e)||a}),a}function OO(e,t,n,r){if(n.ctnShp){var i;if(rO(e,function(t){var n=TO.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Rc(i,a[0]),zc(i,a[1]),kD(e))}}),i){var a=t.getExtent();if(KE(t))e.onBand||t.setExtent2(1,ns(a[0],a[0]+i[0]),rs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ns(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=rs(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function kO(e,t){var n=GE(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=ZE(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?jO(r,t):AO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=JE(d)),i[0]||(s[0]=vs(os(s[0]/u)*u,l)),i[1]||(s[1]=vs(ss(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),BD(e,i,o,s,a,c)}function AO(e,t){var n=$E(t.splitNumber,5),r=RE(e),i=t.minInterval,a=t.maxInterval,o=Fs(r/n,!0);i!=null&&oa&&(o=a);var s=JE(o),c=e.getExtent(),l=[vs(ss(c[0]/o)*o,s),vs(os(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function jO(e,t){var n=$E(t.splitNumber,10),r=e.getExtent(),i=RE(e),a=rs(Ns(i),1);n/i*a<=.5&&(a*=10);var o=JE(a),s=[vs(ss(r[0]/a)*a,o),vs(os(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function MO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;NO(t,n,r,i,null)}function NO(e,t,n,r,i){var a=EO(e,t,r,n,i),o=UE(e)||WE(e);PO(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&&OO(n,e,a,r)}function PO(e,t){FO[e.type](e,t)}var FO={interval:kO,log:kO,time:gD,ordinal:ct},IO=g({createDimensions:()=>uE,createList:()=>LO,createScale:()=>zO,createSymbol:()=>WS,createTextStyle:()=>VO,dataStack:()=>RO,enableHoverEmphasis:()=>Kf,getECData:()=>Y,getLayoutRect:()=>W_,mixinAxisModelCommonMethods:()=>BO});function LO(e){return wE(null,e)}var RO={isDimensionStacked:bE,enableDataStack:vE,getStackedDimension:xE};function zO(e,t){var n=t;t instanceof og||(n=new og(t));var r=ED(n),i=DD(n,r,!1);return e[1]n&&(t=i,n=o)}if(t)return JO(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return F(i,function(t){t.type===`polygon`?qO(t.exterior,n,r,e):F(t.points,function(t){qO(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function rk(e,t){return e=ek(e),I(Me(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new XO(a[0],a.slice(1)));break;case`MultiPolygon`:F(r.coordinates,function(e){e[0]&&i.push(new XO(e[0],e.slice(1)))});break;case`LineString`:i.push(new ZO([r.coordinates]));break;case`MultiLineString`:i.push(new ZO(r.coordinates))}var o=new QO(n[t||`name`],i,n.cp);return o.properties=n,o})}var ik=g({MAX_SAFE_INTEGER:()=>Os,asc:()=>bs,getPercentWithPrecision:()=>Ts,getPixelPrecision:()=>Cs,getPrecision:()=>xs,getPrecisionSafe:()=>Ss,isNumeric:()=>zs,isRadianAroundZero:()=>As,linearMap:()=>ps,nice:()=>Fs,numericToNumber:()=>Rs,parseDate:()=>Ms,parsePercent:()=>J,quantile:()=>Is,quantity:()=>Ns,quantityExponent:()=>Ps,reformIntervals:()=>Ls,remRadian:()=>ks,round:()=>ys}),ak=g({format:()=>Jg,parse:()=>Ms,roundTime:()=>Zg}),ok=g({Arc:()=>fm,BezierCurve:()=>um,BoundingRect:()=>K,Circle:()=>Ap,CompoundPath:()=>pm,Ellipse:()=>Mp,Group:()=>q,Image:()=>ud,IncrementalDisplayable:()=>Dm,Line:()=>om,LinearGradient:()=>hm,Polygon:()=>tm,Polyline:()=>rm,RadialGradient:()=>gm,Rect:()=>vd,Ring:()=>Zp,Sector:()=>Yp,Text:()=>Cd,clipPointsByRect:()=>sh,clipRectByRect:()=>ch,createIcon:()=>lh,extendPath:()=>Wm,extendShape:()=>Hm,getShapeClass:()=>Km,getTransform:()=>th,initProps:()=>Mm,makeImage:()=>Jm,makePath:()=>qm,mergePath:()=>Xm,registerShape:()=>Gm,resizePath:()=>Zm,updateProps:()=>jm}),sk=g({addCommas:()=>p_,capitalFirst:()=>C_,encodeHTML:()=>$t,formatTime:()=>S_,formatTpl:()=>y_,getTextRect:()=>f_,getTooltipMarker:()=>x_,normalizeCssArray:()=>h_,toCamelCase:()=>m_,truncateText:()=>Cl}),ck=g({bind:()=>L,clone:()=>M,curry:()=>Ie,defaults:()=>P,each:()=>F,extend:()=>N,filter:()=>Me,indexOf:()=>De,inherits:()=>Oe,isArray:()=>R,isFunction:()=>z,isObject:()=>V,isString:()=>B,map:()=>I,merge:()=>Ce,reduce:()=>je}),lk=xc(),uk=xc(),dk={estimate:1,determine:2};function fk(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function pk(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:I(hk(n,r),function(t,n){return{formattedLabel:jD(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?gk(e,t):yk(e)}function mk(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:hk(i,r)}:e.type===`category`?vk(e,t):{ticks:r.getTicks(n)}}function hk(e,t){var n=t.getExtent(),r=[];return F(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),qc(r,Yc,null),bs(r),I(r,function(e){return{value:e}})}function gk(e,t){var n=e.getLabelModel(),r=_k(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function _k(e,t,n){var r=xk(e),i=ND(t),a=n.kind===dk.estimate;if(!a){var o=Ck(r,i);if(o)return o}var s,c;z(i)?s=Ak(e,i,!1):(c=i===`auto`?Tk(e,n):i,s=Ak(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return wk(r,i,l),!0}):wk(r,i,l),l}function vk(e,t){var n=bk(e),r=ND(t),i=Ck(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),z(r))a=Ak(e,r,!0);else if(r===`auto`){var s=_k(e,e.getLabelModel(),fk(dk.determine));o=s.labelCategoryInterval,a=I(s.labels,function(e){return e.tick})}else o=r,a=Ak(e,o,!0);return wk(n,r,{ticks:a,tickCategoryInterval:o})}function yk(e){var t=e.scale.getTicks(),n=jD(e);return{labels:I(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var bk=Sk(`axisTick`),xk=Sk(`axisLabel`);function Sk(e){return function(t){return uk(t)[e]||(uk(t)[e]={list:[]})}}function Ck(e,t){for(var n=0;nu&&(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=ho(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===dk.estimate?(t.out.noPxChangeTryDetermine.push(L(Dk,null,e,S,c)),S):Ok(e,S,c)??S}function Dk(e,t,n){return Ok(e,t,n)==null}function Ok(e,t,n){var r=lk(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 kk(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 Ak(e,t,n){var r=jD(e),i=e.scale,a=[],o=z(t);return eD(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var jk=.8;function Mk(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=LE(r);Us(o)||(o=NaN);var s=e.getExtent(),c=is(s[1]-s[0]);return KE(r)?Nk(n,e,o,c):i&&Pk(n,e,o,c,i),a!=null&&(n.w=Us(n.w)?rs(a,n.w):a),n}function Nk(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 Pk(e,t,n,r,i){var a=!1,o=-1/0;F(i.key?[JD(t,i.key)]:YD(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Us(n)&&n>0&&Us(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*jk,e.w2=e.w*n/r)}var Fk=[0,1],Ik=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)),ps(e,Fk,Lk(this),t)},e.prototype.coordToData=function(e,t){var n=ps(e,Lk(this),Fk,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=I(mk(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(VD(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Rk(this,n,r);return I(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(KE(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),I(this.scale.getMinorTicks(e),function(e){return I(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=fk(dk.determine),pk(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 Mk(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=fk(dk.determine),Ek(this,e)},e}();function Lk(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 Rk(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Mk(e).w;if(!i)return!1;F(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 zk(e){var t=tv.extend(e);return tv.registerClass(t),t}function Bk(e){var t=vx.extend(e);return vx.registerClass(t),t}function Vk(e){var t=lx.extend(e);return lx.registerClass(t),t}function Hk(e){var t=Sx.extend(e);return Sx.registerClass(t),t}var Uk=Math.PI*2,Wk=Nu.CMD,Gk=[`top`,`right`,`bottom`,`left`];function Kk(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);break}}function qk(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)%Uk<1e-4)return c[0]=u,c[1]=d,l-n;if(a){var f=r;r=Ru(i),i=Ru(f)}else r=Ru(r),i=Ru(i);r>i&&(i+=Uk);var p=Math.atan2(s,o);if(p<0&&(p+=Uk),p>=r&&p<=i||p+Uk>=r&&p+Uk<=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 v0){t=t/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,$k,eA),G.sub(rA,tA,eA);var n=nA.len(),r=rA.len();if(!(n<.001||r<.001)){nA.scale(1/n),rA.scale(1/r);var i=nA.dot(rA);if(Math.cos(t)1&&G.copy(oA,tA),oA.toArray(e[1])}}}}function cA(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,$k.fromArray(e[0]),eA.fromArray(e[1]),tA.fromArray(e[2]),G.sub(nA,eA,$k),G.sub(rA,tA,eA);var r=nA.len(),i=rA.len();if(!(r<.001||i<.001)&&(nA.scale(1/r),rA.scale(1/i),nA.dot(t)=o)G.copy(oA,tA);else{oA.scaleAndAdd(rA,a/Math.tan(Math.PI/2-s));var c=tA.x===eA.x?(oA.y-eA.y)/(tA.y-eA.y):(oA.x-eA.x)/(tA.x-eA.x);if(isNaN(c))return;c<0?G.copy(oA,eA):c>1&&G.copy(oA,tA)}oA.toArray(e[1])}}}function lA(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 uA(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=kt(r[0],r[1]),a=kt(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=Nt([],r[1],r[0],o/i),c=Nt([],r[1],r[2],o/a),l=Nt([],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;u0&&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;i0)for(var c=0;c0;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;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function DA(e){for(var t=0;t=0&&n.attr(i.oldLayoutSelect),De(u,`emphasis`)>=0&&n.attr(i.oldLayoutEmphasis)),jm(n,c,t,s)}else if(n.attr(c),!Kh(n).valueAnimation){var d=H(n.style.opacity,1);n.style.opacity=0,Mm(n,{style:{opacity:d}},t,s)}if(i.oldLayout=c,n.states.select){var f=i.oldLayoutSelect={};IA(f,c,LA),IA(f,n.states.select,LA)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};IA(p,c,LA),IA(p,n.states.emphasis,LA)}Jh(n,s,l,t,t)}if(r&&!r.ignore&&!r.invisible){var i=FA(r),a=i.oldLayout,m={points:r.shape.points};a?(r.attr({shape:a}),jm(r,{shape:m},t)):(r.setShape(m),r.style.strokePercent=0,Mm(r,{style:{strokePercent:1}},t)),i.oldLayout=m}},e}(),zA=xc();function BA(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){var r=zA(t).labelManager;r||=zA(t).labelManager=new RA,r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){var r=zA(t).labelManager;F(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}var VA=Math.sin,HA=Math.cos,UA=Math.PI,WA=Math.PI*2,GA=180/UA,KA=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=Pi(u-WA)||(l?c>=WA:-c>=WA),f=c>0?c%WA:c%WA+WA,p=!1;p=d?!0:Pi(u)?!1:f>=UA==!!l;var m=e+n*HA(a),h=t+r*VA(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*GA);if(d){var _=1/this._p,v=(l?1:-1)*(WA-_);this._add(`A`,n,r,g,1,+l,e+n*HA(a+v),t+r*VA(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*HA(o),b=t+r*VA(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`}function cj(e){return``}function lj(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return sj(i,a)+(i===`style`?o||``:$t(o))+(t?``+n+I(t,function(e){return r(e)}).join(n)+n:``)+cj(i)}return r(e)}function uj(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=I(Pe(e),function(t){return t+i+I(Pe(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=I(Pe(t),function(e){return`@keyframes `+e+i+I(Pe(t[e]),function(n){return n+i+I(Pe(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?``:[``].join(r)}function dj(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fj(e,t,n,r){return oj(`svg`,`root`,{width:e,height:t,xmlns:ej,"xmlns:xlink":tj,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var pj=0;function mj(){return pj++}var hj={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`},gj=`transform-origin`;function _j(e,t,n){var r=N({},e.shape);N(r,t),e.buildPath(n,r);var i=new KA;return i.reset(Yi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function vj(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[gj]=n+`px `+r+`px`)}var yj={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function bj(e,t){var n=t.zrId+`-ani-`+ t.cssAnimIdx++;return t.cssAnims[n]=e,n}function xj(e,t,n){var r=e.shape.paths,i={},a,o;if(F(r,function(e){var t=dj(n.zrId);t.animation=!0,Cj(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=Pe(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=bj(i,n);return a.replace(o,s)}}function Sj(e){return B(e)?hj[e]?`cubic-bezier(`+hj[e]+`)`:Xr(e)?e:``:``}function Cj(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof pm){var s=xj(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return bj(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-`+mj();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function wj(e,t,n){if(!e.ignore)if(e.isSilent()){var r={"pointer-events":`none`};Tj(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=Ai(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),Tj(r,t,n,!0)}}function Tj(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+mj(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var Ej=Math.round;function Dj(e){return e&&B(e.src)}function Oj(e){return e&&z(e.toDataURL)}function kj(e,t,n,r){$A(function(i,a){var o=i===`fill`||i===`stroke`;o&&qi(a)?Wj(t,e,i,r):o&&Wi(a)?Gj(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Uj(n,e,r)}function Aj(e,t){var n=Xo(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[ij+`silent`]=`true`))}function jj(e){return Pi(e[0]-1)&&Pi(e[1])&&Pi(e[2])&&Pi(e[3]-1)}function Mj(e){return Pi(e[4])&&Pi(e[5])}function Nj(e,t,n){if(t&&!(Mj(t)&&jj(t))){var r=n?10:1e4;e.transform=jj(t)?`translate(`+Ej(t[4]*r)/r+` `+Ej(t[5]*r)/r+`)`:Li(t)}}function Pj(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Xe(f,g),Xe(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=yl(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=oj(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=M(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=Xi(i);x&&(o.patternTransform=x);var S=oj(`pattern`,``,o,[d]),C=lj(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+ r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=oj(`pattern`,T,o,[d])),t[n]=Ji(T)}}function Kj(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]=oj(`clipPath`,a,o,[zj(e,n)])}t[`clip-path`]=Ji(a)}function qj(e){return document.createTextNode(e)}function Jj(e,t,n){e.insertBefore(t,n)}function Yj(e,t){e.removeChild(t)}function Xj(e,t){e.appendChild(t)}function Zj(e){return e.parentNode}function Qj(e){return e.nextSibling}function $j(e,t){e.textContent=t}var eM=58,tM=120,nM=oj(``,``);function rM(e){return e===void 0}function iM(e){return e!==void 0}function aM(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 oM(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function sM(e){var t,n=e.children,r=e.tag;if(iM(r)){var i=e.elm=aj(r);if(uM(nM,e),R(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,cM(e,m,n,i,c)):lM(e,t,r,a))}function fM(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(uM(e,t),rM(t.text)?iM(r)&&iM(i)?r!==i&&dM(n,r,i):iM(i)?(iM(e.text)&&$j(n,``),cM(n,null,i,0,i.length-1)):iM(r)?lM(n,r,0,r.length-1):iM(e.text)&&$j(n,``):e.text!==t.text&&(iM(r)&&lM(n,r,0,r.length-1),$j(n,t.text)))}function pM(e,t){if(oM(e,t))fM(e,t);else{var n=e.elm,r=Zj(n);sM(t),r!==null&&(Jj(r,t.elm,Qj(n)),lM(r,[e],0,0))}return t}var mM=0,hM=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=gM(`configLayer`),this.storage=t,this._opts=n=N({},n),this.root=e,this._id=`zr`+ mM++,this._oldVNode=fj(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=aj(`svg`);uM(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`,pM(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return Hj(e,dj(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=dj(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=_M(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=oj(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=I(Pe(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(oj(`defs`,`defs`,{},c)),e.animation){var l=uj(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=oj(`style`,`stl`,{},[],l);a.push(u)}}return fj(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},lj(this.renderToVNode({animation:H(e.cssAnimation,!0),emphasis:H(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:H(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=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=a}}for(var l=xM(this),u=l.startIdx;u=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!bM(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)}PM(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},BM),k.wxa&&IM(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=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=bM(e),c=s&&ae.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d15){d++;break}}}OC(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=wM,t=0);var i=FM(this._i,e)[t];return i||(i=AM(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&Ce(i,this._layerConfig[e],!0),(n||r&&e!==wM)&&(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])&&OM(e)){for(var l=o.length,u=0;u0&&(c=FM(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),FM(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 IM(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},LM)},e.prototype.eachOtherLayer=function(e,t){return IM(this._i,function(n,r){e.call(t,n,r)},RM)},e.prototype.getLayers=function(){var e={};return IM(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=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;(bM(t)?s=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=$S(i,0,r),t=$S(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,IM(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(wM).resize(e,t)}return this},e.prototype.clearLayer=function(e){F(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[wM][0].dom;var t=new SM(`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;IM(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-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}(lx);function WM(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=Yy(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var KM=function(e){D(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=WS(e,-1,-1,2,2,null,a);o.attr({z2:H(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=qM,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(){kf(this.childAt(0))},t.prototype.downplay=function(){Af(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):jm(f,p,o,n),Lm(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,Mm(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=Ih(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=KS(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 ud){var S=a.style;a.useStyle(N({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(N({},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;Fh(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):WM(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),Jf(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=Y(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Pm(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Pm(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return GS(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(q);function qM(e,t){this.parent.drift(e,t)}function JM(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 YM(e){return e!=null&&!V(e)&&(e={isIgnore:e}),e||{}}function XM(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:Ih(t),cursorStyle:t.get(`cursor`)}}function ZM(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var QM=function(){function e(e){this.group=new q,this._SymbolCtor=e||KM}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=YM(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=XM(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);JM(e,i,r,t)&&ZM(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!JM(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):jm(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();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function tN(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 nN(e,t){return!isFinite(e)||!isFinite(t)}var rN=typeof Float32Array<`u`?Float32Array:void 0,iN=typeof Float64Array<`u`?Float64Array:void 0;function aN(e){return oN({ctor:rN},e).arr}function oN(e,t){var n=e.arr,r=e.ctor;if(t>Os&&(t=Os),!n||e.typed&&n.length=i||h<0)break;if(nN(_,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||nN(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=lN(O,uN(S,_)),k=lN(k,uN(C,v)),O=uN(O,lN(S,_)),k=uN(k,lN(C,v)),E=O-_,D=k-v,p=_-E*ne/re,m=v-D*ne/re,p=lN(p,uN(l,_)),m=lN(m,uN(u,v)),p=uN(p,lN(l,_)),m=uN(m,lN(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}var fN=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),pN=function(e){D(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 fN},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&nN(n[i*2-2],n[i*2-1]);i--);for(;r=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?Lr(i,u,f,m,e,s):Lr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?Fr(a,d,p,h,b):Fr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(id),mN=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(fN),hN=function(e){D(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 mN},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&&nN(n[a*2-2],n[a*2-1]);a--);for(;i=0,a=e.fill||Z.color.neutral99;DN(r,t);var o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Z.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth??=2):(o&&(r.textFill=e.fill||n.outsideFill||Z.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,F(t.rich,function(e){DN(e,e)}),r}function DN(e,t){t&&(W(t,`fill`)&&(e.textFill=t.fill),W(t,`stroke`)&&(e.textStroke=t.fill),W(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),W(t,`font`)&&(e.font=t.font),W(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),W(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),W(t,`fontSize`)&&(e.fontSize=t.fontSize),W(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),W(t,`align`)&&(e.textAlign=t.align),W(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),W(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),W(t,`width`)&&(e.textWidth=t.width),W(t,`height`)&&(e.textHeight=t.height),W(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),W(t,`padding`)&&(e.textPadding=t.padding),W(t,`borderColor`)&&(e.textBorderColor=t.borderColor),W(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),W(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),W(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),W(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),W(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),W(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),W(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),W(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),W(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),W(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function ON(e,t){if(e.length===t.length){for(var n=0;nt){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 FN(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=I(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=PN(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`;F(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 hm(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function IN(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&LN(a,t))){var o=t.mapDimension(a.dim),s={};return F(a.getViewLabels(),function(e){e.tick.offInterval||(s[VD(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function LN(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;or)return!1;return!0}function RN(e){for(var t=e.length/2;t>0&&nN(e[t*2-2],e[t*2-1]);t--);return t-1}function zN(e,t){return[e[t*2],e[t*2+1]]}function BN(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function VN(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}Y(f).seriesIndex=e.seriesIndex,Jf(f,k,A,j);var te=jN(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(P(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),re&&(ie=jN(re.get(`smooth`))),p.setShape({smooth:te,stackedOnSmooth:ie,smoothMonotone:ne,connectNulls:x}),Qf(p,e,`areaStyle`),Y(p).seriesIndex=e.seriesIndex,Jf(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){Y(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=bc(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(nN(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new KM(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 Sx.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bc(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 Sx.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;bf(this._polyline,e),t&&bf(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new pN({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 hN({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`);z(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=z(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=z(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(VN(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 Cd({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=RN(o);c>=0&&(Fh(a,Ih(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?WM(i,e):GM(i,n)},enableTextSetter:!0},UN(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=BN(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=zN(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=Nc(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=zN(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Kh(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=cN(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=NN(u.stackedOnCurrent,u.current,n,i,o),d=NN(u.current,null,n,i,o),m=NN(u.stackedOnNext,u.next,n,i,o),p=NN(u.next,null,n,i,o)),AN(d,p)>3e3||c&&AN(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),jm(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),jm(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;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&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;B(i)?p=KN[i]:z(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,qN))}}}}}function YN(e){e.registerChartView(WN),e.registerSeriesModel(UM),e.registerLayout(GN(`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,JN(`line`))}var XN=function(e){D(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}(Ik),ZN=null;function QN(e){ZN||=e}function $N(){return ZN}var eP=`expandAxisBreak`,tP=`collapseAxisBreak`,nP=`toggleAxisBreak`,rP=`axisbreakchanged`,iP={type:eP,event:rP,update:`update`,refineEvent:sP},aP={type:tP,event:rP,update:`update`,refineEvent:sP},oP={type:nP,event:rP,update:`update`,refineEvent:sP};function sP(e,t,n,r){var i=[];return F(e,function(e){i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function cP(e){e.registerAction(iP,t),e.registerAction(aP,t),e.registerAction(oP,t);function t(e,t){var n=[],r=Cc(t,e);function i(t,i){F(r[t],function(t){F(t.updateAxisBreaks(e).breaks,function(e){var r;n.push(P((r={},r[i]=t.componentIndex,r),e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}var lP=Math.PI,uP=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],dP=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],fP=xc(),pP=xc(),mP=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function hP(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=zP(e.axisName)&&ID(e.nameLocation);F(r,function(e){var t=yA(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Tn(gP,n.transform):yn(gP),t.transform&&xn(gP,gP,t.transform),K.copy(_P,t.localRect),_P.applyTransform(gP),s?s.union(_P):K.copy(s=new K(0,0,0,0),_P))}});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 K(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var gP=vn(),_P=new K(0,0,0,0),vP=function(e,t,n,r,i,a){if(ID(e.nameLocation)){var o=a.stOccupiedRect;o&&yP(SA({},o,a.transGroup.transform),r,i)}else bP(a.labelInfoList,a.dirVec,r,i)};function yP(e,t,n){var r=new G;kA(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&CA(t,r)}function bP(e,t,n,r){for(var i=G.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):As(r-lP)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`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}(),SP=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],CP={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&&(Pt(u,u,l),Pt(d,d,l));var p=N({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&kg(r.axis.scale))$N().buildAxisBreakLine(r,i,a,m);else{var h=new om(N({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));Qm(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`]);B(g)&&(g=[g,g]),(B(_)||Re(_))&&(_=[_,_]);var v=KS(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];F([{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=WS(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){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){MP(t,i,s)&&wP(e,t,n,r,i,a,o,dk.determine);var c=AP(e,i,a,r);DP(e,t.labelLayoutList,c),jP(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(zP(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 G(0,0),_=new G(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=vn();_.transform(Cn(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*lP/180);var b,x;ID(u)?b=xP.innerTextLayout(e.rotation,y??e.rotation,d):(b=TP(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=Ke(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Cd({x:g.x,y:g.y,rotation:b.rotation,silent:xP.isLabelSilent(r),style:Lh(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(_h({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=xP.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Y(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=yA({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ID(u)?uP[E]:dP[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function wP(e,t,n,r,i,a,o,s){PP(t)||NP(e,t,i,s,r,o);var c=t.labelLayoutList;IP(e,r,c,a),VP(r,e.rotation,c);var l=e.optionHideOverlap;EP(r,c,l),l&&OA(Me(c,function(e){return e&&!e.label.ignore})),hP(e,n,r,c)}function TP(e,t,n,r){var i=ks(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return As(i-lP/2)?(o=c?`bottom`:`top`,a=`center`):As(i-lP*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=ilP/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function EP(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(PD(r))return;function a(e,a,o){var s=yA(t[a]),c=yA(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=fP(s.label).labelInfo.tick;if(WE(l)&&u.notNice||KE(l)&&u.offInterval){OP(s.label);return}}if(e===!1||s.suggestIgnore){OP(s.label);return}if(c.suggestIgnore){OP(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=wA({marginForce:f},s),c=wA({marginForce:f},c)}kA(s,c,null,{touchThreshold:d})&&OP(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 DP(e,t,n){e.showMinorTicks||F(t,function(e){if(e&&e.label.ignore)for(var t=0;t=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}oN(XP,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var XP=oN({ctor:iN},50);function ZP(e){return function(t,n){var r=Mk(t,{fromStat:{key:e}});if(Us(r.w2))return[-r.w2/2,r.w2/2]}}function QP(e){return e+`|&`}function $P(e,t){return e+`|&`+t}function eF(e){return JP(),{liPosMinGap:!KE(e.scale)}}var tF=`pictorialBar`;function nF(e,t,n,r){lO(e,{key:t,seriesType:n,coordSysType:r,getMetrics:eF})}function rF(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var iF={left:0,right:0,top:0,bottom:0},aF=[`25%`,`25%`],oF=`cartesian2d`,sF=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Q_(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Z_(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Z_(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:iF,outerBoundsContain:`all`,outerBoundsClampWidth:aF[0],outerBoundsClampHeight:aF[1],backgroundColor:Z.color.transparent,borderWidth:1,borderColor:Z.color.neutral30},t}(tv),cF=Gc(),lF=`__ec_stack_`;function uF(e){return e.get(`stack`)||lF+e.seriesIndex}function dF(e){if(KE(e.axis.scale)){for(var t=Mk(e.axis),n=[],r=0;ro&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=rs(u,0);var d=0,f;F(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 F(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 hF(e){return{seriesType:e,overallReset:function(t){var n=$P(e,oF);nO(t,n,function(t){var r=fF(t,e);$D(t,n,function(e){var t=r.columnMap[uF(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function gF(e){return{seriesType:e,plan:yx(),reset:function(e){if(UP(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=bE(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(rF(i))),p=_F(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&&aN(r*3),c=p&&s&&aN(r*3),l=p&&aN(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,is(k)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}(lx);lx.registerClass(bF);var xF=function(e){D(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 wE(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=Zc(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=dg(bF.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}(bF),SF=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),CF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new SF},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-cMath.PI/2&&ua)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){Im(t,e,Y(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}(Sx),MF={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=kF(t.x,e.x),s=AF(t.x+t.width,i),c=kF(t.y,e.y),l=AF(t.y+t.height,a),u=si?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=AF(t.r,e.r),a=kF(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}},NF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new vd({shape:N({},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?CF:Yp,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=wF(HF(i),{isRoundCap:l===CF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?jm:Mm)(u,{shape:p},a)}return u}};function PF(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 FF(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?jm:Mm)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?jm:Mm)(n,{shape:l},u,i)}function IF(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function VF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function HF(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 UF(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;N(u,OF(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?QF(i,a.coordinateSystem):$F(i,a.coordinateSystem),p=Ih(r);Fh(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:WM(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,TF(e,h===`outside`?f:h,HF(o),r.get([`label`,`rotate`]))}qh(m,p,a.getRawValue(n),function(e){return GM(t,e)});var g=r.getModel([`emphasis`]);Jf(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),Qf(e,r),VF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,F(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function WF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var GF=function(){function e(){}return e}(),KF=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new GF},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=0?n:null},30,!1);function YF(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=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function XF(e,t,n){if(xN(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function ZF(e,t,n){return new(e.type===`polar`?Yp:vd)({shape:XF(t,n,e),silent:!0,z2:0})}function QF(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function $F(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function eI(e){e.registerChartView(jF),e.registerSeriesModel(xF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JN(`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)})}),yF(e)}function tI(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=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),iI=xc(),aI=function(e){D(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 rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=iI(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=Es(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){ec(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}(lx);A_({fullType:aI.type,getCoord2:function(e){return e.getShallow(`center`)}});var oI=Math.PI/180;function sI(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;sn?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)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}uI(a,r)}}}function uI(e,t){fI.rect=e,bA(fI,t,dI)}var dI={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},fI={};function pI(e){return e.position===`center`}function mI(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*oI,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=J(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=J(T,l);var E=w.get(`length2`);if(E=J(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var le=Math.PI,ue=0,de=v.get(`rotate`);if(Re(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 K(0,0,0,0);uI(me,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new G(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`)&&cI(n,r,i,c,l,f,u,d);for(var h=0;hr?(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?ps(e,b,[c,s]):s}),O=i}),E0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(Sx);function SI(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!(Re(r)&&!isNaN(r)&&r<0)})}}}function CI(e){e.registerChartView(xI),e.registerSeriesModel(aI),yS(`pie`,e.registerAction),e.registerLayout(_I),e.registerProcessor(tI(`pie`)),e.registerProcessor(SI(`pie`))}var wI=function(e){D(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 wE(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}(lx),TI=4,EI=function(){function e(){}return e}(),DI=function(e){D(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 EI},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]=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=0&&(c.dataIndex=n+(e.startIndex||0))})},e.prototype.remove=function(){this._clear()},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),kI=function(e){D(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,AI(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(),Xc(t),AI(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=GN(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(AI(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 OI:new QM,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}(Sx);function AI(e){return{clipShape:bN(e)}}var jI=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tc).models[0]},t.type=`cartesian2dAxis`,t}(tv);ke(jI,UD);var MI={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`}},NI=Ce({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},MI),PI=Ce({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}}},MI),FI={category:NI,value:PI,time:Ce({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},PI),log:P({logBase:10},PI)};function II(e,t,n,r){F(wD,function(i,a){var o=Ce(Ce({},FI[a],!0),r,!0),s=function(e){D(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=X_(this),r=n?Q_(e):{};Ce(e,t.getTheme().get(a+`Axis`)),Ce(e,this.getDefaultOption()),e.type=LI(e),n&&Z_(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=kE.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=$N();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,LI)}function LI(e){return e.type||(e.data?`category`:`value`)}var RI=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 I(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Me(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}(),zI=[`x`,`y`];function BI(e){return(e.type===`interval`||e.type===`time`)&&!kg(e)}var VI=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=oF,t.dimensions=zI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!BI(e)||!BI(t))){var n=IE(e,null),r=IE(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=Tn([],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 K(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 Pt(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 Pt(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 K(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(RI);function HI(e,t){var n=e.scale,r=e.model,i=EO(n,r,r.ecModel,e,null),a=GE(n),o=GE(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=is(l[0].value-l[1].value),g=is(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(ne(),k=vs(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=vs(ss(C[0]/E)*E,D),O=vs(os(C[1]/E)*E,D);var e=as((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=os(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}BD(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}var UI=[[3,1],[0,2]],WI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=zI,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;F(this._axesList,function(e){bO(e,1);var t=e.scale;KE(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=Pe(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):MO(i)}F(n,function(e){YI(e,e.__alignTo)?MO(e):HI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};F(n.x,function(e){KI(n,`y`,e,i)}),F(n.y,function(e){KI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=q_(e,t),i=this._rect=W_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(ZI(a,i),!n){var c=nL(i,o,a,s,t),l=void 0;if(s)$I?($I(this._axesList,i),ZI(a,i)):l=tL(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=iL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=tL(d,f,p,i,a,c,r))}rL(i,a,dk.determine,null,l,r),F(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]}V(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];HE(a.scale)&&RD(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&F(r,function(e){e.__alignTo=n})}function YI(e,t){return kg(e.scale)||kg(t.scale)||t.scale.getTicks().length<2}function XI(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 ZI(e,t){F(e.x,function(e){return QI(e,t.x,t.width)}),F(e.y,function(e){return QI(e,t.y,t.height)})}function QI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),XI(e,t)}var $I;function eL(e){$I=e}function tL(e,t,n,r,i,a,o){rL(r,i,dk.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=Ne(s,function(e){return e>0})==null;return mh(r,s,!0,!0,n),ZI(i,r),c;function l(e){F(i[X[e]],function(t){if(LD(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ge(t)&&t>1e-4&&(e/=t),e}}function nL(e,t,n,r,i){var a=new mP(aL);return F(n,function(n){return F(n,function(n){if(LD(n.model)){var o=!r;n.axisBuilder=GP(e,t,n.model,i,a,o)}})}),a}function rL(e,t,n,r,i,a){var o=n===dk.determine;F(t,function(t){return F(t,function(t){LD(t.model)&&(KP(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[X[1-t]]=e[Vm[t]]<=a.refContainer[Vm[t]]*.5?0:1-t==1?2:1}F(t,function(e,t){return F(e,function(e){LD(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function iL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=W_(e.get(`outerBounds`,!0)||iF,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||De([`all`,`axisLabel`],a)<0?`all`:a,s=[hs(H(e.get(`outerBoundsClampWidth`,!0),aF[0]),t.width),hs(H(e.get(`outerBoundsClampHeight`,!0),aF[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var aL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;vP(e,t,n,r,i,a),ID(e.nameLocation)||F(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&bP(e.labelInfoList,e.dirVec,r,i)})};function oL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return sL(n,e,t),n.seriesInvolved&&lL(n,e),n}function sL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];F(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=gL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(F(n.getAxes(),Ie(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)&&F(f.baseAxes,Ie(p,d?`cross`:!0,u)),d&&F(f.otherAxes,Ie(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!hL(d))){s??=d.get(`triggerTooltip`),d=r?cL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=gL(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:hL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=uL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function cL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};F(s,function(e){c[e]=M(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&&P(l,u.textStyle)}return e.model.getModel(`axisPointer`,new og(c,n,r))}function lL(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||F(e.coordSysAxesInfo[gL(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 uL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function fL(e){var t=pL(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=hL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o0;return o&&s}var PL=xc();function FL(e,t,n,r){if(e instanceof XN&&e.scale.type!==`ordinal`)return n;var i=e.model,a=i.get(`jitter`);if(!(a>0))return n;var o=i.get(`jitterOverlap`),s=i.get(`jitterMargin`)||0,c=KE(e.scale)?Mk(e).w:null;return o?IL(n,a,c,r):LL(e,t,n,r,a,s)}function IL(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;var i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function LL(e,t,n,r,i,a){var o=PL(e);o.items||=[];var s=o.items,c=RL(s,t,n,r,i,a,1),l=RL(s,t,n,r,i,a,-1),u=Math.abs(c-n)i/2||d&&f>d/2-r?IL(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function RL(e,t,n,r,i,a,o){for(var s=n,c=0;ci/2)return Number.MAX_VALUE;if(o===1&&m>s||o===-1&&m0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var p=s;f.color!=null&&(p=P({color:f.color},s));var m=Ce(M(f),{boundaryGap:e,splitNumber:t,clockwise:n,scale:r,axisLine:i,axisTick:a,axisLabel:o,name:f.text,showName:c,nameLocation:`end`,nameGap:u,nameTextStyle:p,triggerEvent:d},!1);if(B(l)){var h=m.name;m.name=l.replace(`{value}`,h??``)}else z(l)&&(m.name=l(m.name,m));var g=new og(m,null,this.ecModel);return ke(g,UD.prototype),g.mainType=`radar`,g.componentIndex=this.componentIndex,g.uid=cg(`ec_radar`),g},this);this._indicatorModels=f},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type=JL,t.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,clockwise:!1,axisName:{show:!0,color:Z.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:Ce({lineStyle:{color:Z.color.neutral20}},KL.axisLine),axisLabel:XL(KL.axisLabel,!1),axisTick:XL(KL.axisTick,!1),splitLine:XL(KL.splitLine,!0),splitArea:XL(KL.splitArea,!0),indicator:[]},t}(tv),QL=function(e){D(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(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,t){var n=e.coordinateSystem;F(I(n.getIndicatorAxes(),function(e){var r=e.model.get(`showName`)?e.name:``;return new xP(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;var r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=R(u)?u:[u],p=R(d)?d:[d],m=[],h=[];function g(e,t,n){var r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`)for(var _=n[0].getTicksCoords(),v=t.cx,y=t.cy,b=0;b<_.length;b++){if(c){var x=g(m,f,b);m[x].push(new Ap({shape:{cx:v,cy:y,r:_[b].coord}}))}if(l&&b<_.length-1){var x=g(h,p,b);h[x].push(new Zp({shape:{cx:v,cy:y,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var S,C=I(n,function(e,n){var r=e.getTicksCoords();return S=S==null?r.length-1:Math.min(r.length-1,S),I(r,function(e){return t.coordToPoint(e.coord,n)})}),w=[],b=0;b<=S;b++){for(var T=[],E=0;E3?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(!(uR(this._zr,`globalPan`)||mR(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)&&(dn(r.event),r.__ecRoamConsumed=!0,xR(e,t,n,r,i))},t}(zt);function mR(e){return e.__ecRoamConsumed}var hR=xc();function gR(e){var t=hR(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function _R(e,t,n,r){for(var i=gR(e).roam,a=i[t]=i[t]||[],o=0;o=4&&(l={x:parseFloat(d[0]||0),y:parseFloat(d[1]||0),width:parseFloat(d[2]),height:parseFloat(d[3])})}if(l&&o!=null&&s!=null&&(u=JR(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){var f=r;r=new q,r.add(f),f.scaleX=f.scaleY=u.scale,f.x=u.x,f.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new vd({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}},e.prototype._parseNode=function(e,t,n,r,i,a){var o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){var l=wR[o];if(l&&W(wR,o)){s=l.call(this,e,t);var u=e.getAttribute(`name`);if(u){var d={name:u,namedFrom:null,svgNodeTagLower:o,el:s};n.push(d),o===`g`&&(c=d)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}var f=AR[o];if(f&&W(AR,o)){var p=f.call(this,e),m=e.getAttribute(`id`);m&&(this._defs[m]=p)}}if(s&&s.isGroup)for(var h=e.firstChild;h;)h.nodeType===1?this._parseNode(h,s,n,c,i,a):h.nodeType===3&&a&&this._parseText(h,s),h=h.nextSibling},e.prototype._parseText=function(e,t){var n=new od({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});NR(t,n),FR(e,n,this._defsUsePending,!1,!1),IR(n,t);var r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);var a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n},e.internalField=(function(){wR={g:function(e,t){var n=new q;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new vd;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){var n=new Ap;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){var n=new om;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){var n=new Mp;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new tm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute(`points`),r;n&&(r=PR(n));var i=new rm({shape:{points:r||[]},silent:!0});return NR(t,i),FR(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ud;return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);var o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){var n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));var i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new q;return NR(t,o),FR(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){var n=Tp(e.getAttribute(`d`)||``);return NR(t,n),FR(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),e}(),AR={lineargradient:function(e){var t=new hm(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return jR(e,t),MR(e,t),t},radialgradient:function(e){var t=new gm(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return jR(e,t),MR(e,t),t}};function jR(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function MR(e,t){for(var n=e.firstChild;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){var r=n.getAttribute(`offset`),i=void 0;i=r&&r.indexOf(`%`)>0?parseInt(r,10)/100:r?parseFloat(r):0;var a={};KR(n,a,a);var o=a.stopColor||n.getAttribute(`stop-color`)||`#000000`,s=a.stopOpacity||n.getAttribute(`stop-opacity`);if(s){var c=hi(o);c&&c[3]&&(c[3]*=si(s),o=Ei(c,`rgba`))}t.colorStops.push({offset:i,color:o})}n=n.nextSibling}}function NR(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||={},P(t.__inheritedStyle,e.__inheritedStyle))}function PR(e){for(var t=VR(e),n=[],r=0;r0;a-=2){var o=r[a],s=r[a-1],c=VR(o);switch(i||=vn(),s){case`translate`:Sn(i,i,[parseFloat(c[0]),parseFloat(c[1]||`0`)]);break;case`scale`:wn(i,i,[parseFloat(c[0]),parseFloat(c[1]||c[0])]);break;case`rotate`:Cn(i,i,-parseFloat(c[0])*UR,[parseFloat(c[1]||`0`),parseFloat(c[2]||`0`)]);break;case`skewX`:var l=Math.tan(parseFloat(c[0])*UR);xn(i,[1,0,l,1,0,0],i);break;case`skewY`:var u=Math.tan(parseFloat(c[0])*UR);xn(i,[1,u,0,1,0,0],i);break;case`matrix`:i[0]=parseFloat(c[0]),i[1]=parseFloat(c[1]),i[2]=parseFloat(c[2]),i[3]=parseFloat(c[3]),i[4]=parseFloat(c[4]),i[5]=parseFloat(c[5]);break}}t.setLocalTransform(i)}}var GR=/([^\s:;]+)\s*:\s*([^:;]+)/g;function KR(e,t,n){var r=e.getAttribute(`style`);if(r){GR.lastIndex=0;for(var i;(i=GR.exec(r))!=null;){var a=i[1],o=W(TR,a)?TR[a]:null;o&&(t[o]=i[2]);var s=W(DR,a)?DR[a]:null;s&&(n[s]=i[2])}}}function qR(e,t,n){for(var r=0;r1e-6;sB[0]=o?(i[0]-r.x)/a:i[0],sB[1]=o?(i[1]-r.y)/a:i[1],Pt(sB,sB,e.mtRawInv);var s=rB(e,sB);cB(t,s,a),F(n,function(e){e!==t&&cB(e,s.slice(),a)})}var sB=[];function cB(e,t,n){var r=e.option;r.center=t,r.zoom=n}function lB(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 uB(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=gz(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function dB(e,t,n,r,i,a,o,s){if(!Qz(e)){n.disable();return}n.enable(H(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=Oh(P({type:hB(r,e.subType,qd)},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 fB(e){return function(t,n,r){return pB.copy(e.getBoundingRect()),pB.applyTransform(e.getComputedTransform()),pB.contain(n,r)}}var pB=new K(0,0,0,0);function mB(e,t,n){var r=hB(t,n,qd);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Oc(e,t,n),function(t){Zz(e,t),$z(e,t,r,i)})})}function hB(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function gB(e){return e.zoom!=null}function _B(e,t,n,r,i,a,o){var s=new vz(null,aB(e.ecModel,t));return Az(s,n,r,i,a),o?jz(s,o.x,o.y,o.width,o.height):jz(s,n,r,i,a),kz(s,e),s}var vB=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],yB=U(vB),bB=U(vB.concat([`g`])),xB=U(vB.concat([`g`])),SB=xc();function CB(e){var t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function wB(e){var t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var TB=function(){function e(e){var t=this.group=new q,n=this._transformGroup=new q;t.add(n),this.uid=cg(`ec_map_draw`),this._controller=new pR(e.getZr()),n.add(this._regionsGroup=new q),n.add(this._svgGroup=new q)}return e.prototype.draw=function(e,t,n,r,i){var a=this,o=e.getData&&e.getData();MB(e)&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});var s=e.coordinateSystem,c=s.view,l=this._regionsGroup,u=this._transformGroup,d=!l.childAt(0)||i,f;s.shouldClip()?(f=Cz(null,c),this.group.setClipPath(new vd({shape:f.clone()}))):this.group.removeClipPath(),qz(u,1,c,d?null:e);var p=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0;s.resourceType===`geoJSON`?this._buildGeoJSON(c,n,s,e,o,p):s.resourceType===`geoSVG`&&this._buildSVG(c,n,s,e,o,p),dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},f,function(){a._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(e,l,n,r)},e.prototype.__updateOnOwnRoam=function(e){qz(this._transformGroup,1,e.coordinateSystem.view,null)},e.prototype._buildGeoJSON=function(e,t,n,r,i,a){var o=this._regionsGroupByName=U(),s=U(),c=this._regionsGroup,l=n.projection,u=l&&l.stream,d=no(wz(null,e,0));function f(e,t){return t&&(e=t(e)),e&&Pt([],e,d)}function p(e){for(var t=[],n=!u&&l&&l.project,r=0;r=0)&&(u=e);var d=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;Fh(n,Ih(i),{labelFetcher:u,labelDataIndex:l,defaultText:r},d);var f=n.getTextContent();if(f&&(SB(f).ignore=f.ignore,n.textConfig&&o)){var p=n.getBoundingRect().clone();n.textConfig.layoutRect=p,n.textConfig.position=[(o[0]-p.x)/p.width*100+`%`,(o[1]-p.y)/p.height*100+`%`]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function OB(e,t,n,r,i,a){t?t.setItemGraphicEl(a,n):Y(n).eventData={componentType:`geo`,componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:r,region:i&&i.option||{}}}function kB(e,t,n,r,i){t||_h({el:n,componentModel:e,itemName:r,itemTooltipOption:i.get(`tooltip`)})}function AB(e,t,n,r){t.highDownSilentOnTouch=!!e.get(`selectedMode`);var i=r.getModel(`emphasis`),a=i.get(`focus`);return Jf(t,a,i.get(`blurScope`),i.get(`disabled`)),MB(e)&&tp(t,e,n),a}function jB(e,t,n){var r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere:function(){}});return!n&&s.polygonStart(),F(e,function(e){s.lineStart();for(var t=0;t-1&&(n.style.stroke=n.style.fill,n.style.fill=Z.color.neutral00,n.style.lineWidth=2),n},t.prototype.__ownRoamView=function(){return FB(this)?this.coordinateSystem.view:null},t.type=`series.map`,t.dependencies=[`geo`],t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:Z.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Z.color.border,areaColor:Z.color.background},emphasis:{label:{show:!0,color:Z.color.primary},itemStyle:{areaColor:Z.color.highlight}},select:{label:{show:!0,color:Z.color.primary},itemStyle:{color:Z.color.highlight}},nameProperty:`name`},t}(lx);function PB(e){return e.indexOf(`i`)===0}function FB(e){return IB(e.seriesGroup)===e&&!e.getHostGeoModel()}function IB(e){return e.f[0]}function LB(e,t){var n={};return e.eachRawSeriesByType(`map`,function(r){var i=r.getHostGeoModel(),a=i?`o`+i.id:`i`+r.getMapType(),o=n[a]=n[a]||{f:[],r:[]};!e.isSeriesFiltered(r)&&!t&&o.f.push(r),o.r.push(r)}),n}var RB=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`map`,t}return t.prototype.render=function(e,t,n,r){if(!(r&&r.type===`mapToggleSelect`&&r.from===this.uid)){var i=this.group;if(i.removeAll(),!e.getHostGeoModel()){var a=this._mapDraw;a&&r&&r.type===`geoRoam`&&a.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id?a&&i.add(a.group):FB(e)?(a||=this._mapDraw=new TB(n),i.add(a.group),a.draw(e,t,n,this,r)):this._clearMapDraw(),e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e)}}},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=this._mapDraw;FB(t)&&r&&r.__updateOnOwnRoam(t)},t.prototype.remove=function(){this._clearMapDraw(),this.group.removeAll()},t.prototype.dispose=function(){this._clearMapDraw()},t.prototype._clearMapDraw=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},t.prototype._renderSymbols=function(e){var t=e.originalData,n=this.group;t.each(t.mapDimension(`value`),function(r,i){if(!isNaN(r)){var a=t.getItemLayout(i);if(!(!a||!a.point)){var o=a.point,s=a.offset,c=new Ap({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var l=IB(e.seriesGroup).getData(),u=t.getName(i),d=l.indexOfName(u),f=t.getItemModel(i),p=f.getModel(`label`),m=l.getItemGraphicEl(d);Fh(c,Ih(f),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(d,n)}},defaultText:u}),c.disableLabelAnimation=!0,p.get(`position`)||c.setTextConfig({position:`bottom`}),m.onHoverStateChange=function(e){bf(c,e)}}n.add(c)}}})},t.type=`map`,t}(Sx),zB={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},BB=[`lng`,`lat`],VB=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;i.dimensions=BB,i.type=`geo`,i._nameCoordMap=U(),i.name=t;var a=r.projection,o=hz.load(n,r.nameMap,r.nameProperty),s=hz.getGeoResource(n);i.resourceType=s?s.type:null;var c=i.regions=o.regions,l=zB[s.type];i._clip=r.clip,i.view=new vz(a?!1:l.invertLongitute,aB(r.ecModel,r.api),i),i.map=n,i._regionsMap=o.regionsMap,i.regions=o.regions,i.projection=a;var u;if(a)for(var d=0;d1?(b.width=y,b.height=y/g):(b.height=y,b.width=y*g),b.y=v[1]-b.height/2,b.x=v[0]-b.width/2;else{var x=e.getBoxLayoutParams();x.aspect=g,b=W_(x,h),b=G_(e,b,g)}jz(n,b.x,b.y,b.width,b.height),kz(n,e)}function WB(e,t){F(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}var GB=new(function(){function e(){this.dimensions=BB}return e.prototype.create=function(e,t){var n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`),clip:e.getShallow(`clip`,!0)}}return e.eachComponent(`geo`,function(i,a){var o=i.get(`map`),s=new VB(o+a,o,N({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=UB,s.resize(i,t)}),e.eachSeries(function(e){P_({targetModel:e,coordSysType:`geo`,coordSysProvider:function(){var t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,Tc).models[0];return t&&t.coordinateSystem},allowNotFound:!0})}),F(LB(e,!0),function(i,a){if(PB(a)){var o=i.r[0],s=[];F(i.r,function(e){s.push(e.get(`nameMap`)),e.seriesGroup=null});var c=a.slice(1),l=new VB(c,c,N({nameMap:we(s),api:t,ecModel:e},r(o))),u;F(i.r,function(e){u=H(u,e.get(`scaleLimit`))}),n.push(l),l.resize=UB,l.resize(o,t),F(i.r,function(e){e.coordinateSystem=l,WB(l,e)})}}),n},e.prototype.getFilledRegions=function(e,t,n,r){for(var i=(e||[]).slice(),a=U(),o=0;o=0;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}function rV(e,t){var n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){sV(e);var a=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=cV(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function iV(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function aV(e){return arguments.length?e:pV}function oV(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function sV(e){for(var t=e.children,n=t.length,r=0,i=0;--n>=0;){var a=t[n];a.hierNode.prelim+=r,a.hierNode.modifier+=r,i+=a.hierNode.change,r+=a.hierNode.shift+i}}function cV(e,t,n,r){if(t){for(var i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;s=lV(s),a=uV(a),s&&a;){i=lV(i),o=uV(o),i.hierNode.ancestor=e;var f=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);f>0&&(fV(dV(s,e,n),e,f),l+=f,c+=f),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!lV(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!uV(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function lV(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function uV(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function dV(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function fV(e,t,n){var r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function pV(e,t){return e.parentNode===t.parentNode?1:2}var mV=xc();function hV(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,SV(t,n,e),F(n,function(n){F(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,Ie(gV,e))})}),t.wrapMethod(`cloneShallow`,Ie(vV,e)),F(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,Ie(_V,e))}),Xe(n[t.dataType]===t)}function gV(e,t){if(xV(this)){var n=N({},mV(this).datas);n[this.dataType]=t,SV(t,n,e)}else CV(t,this.dataType,mV(this).mainData,e);return t}function _V(e,t){return e.struct&&e.struct.update(),t}function vV(e,t){return F(mV(t).datas,function(n,r){n!==t&&CV(n.cloneShallow(),r,t,e)}),t}function yV(e){var t=mV(this).mainData;return e==null||t==null?t:mV(t).datas[e]}function bV(){var e=mV(this).mainData;return e==null?[{data:e}]:I(Pe(mV(e).datas),function(t){return{type:t,data:mV(e).datas[t]}})}function xV(e){return mV(e).mainData===e}function SV(e,t,n){mV(e).datas={},F(t,function(t,r){CV(t,r,e,n)})}function CV(e,t,n,r){mV(n).datas[t]=e,mV(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=yV,e.getLinkedDataAll=bV}var wV=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){z(e)&&(n=t,t=e,e=null),e||={},B(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&&ot&&(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=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=0){var r=n.getData().tree.root,i=e.targetNode;if(B(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 OV(e){for(var t=[];e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function kV(e,t){return De(OV(e),t)>=0}function AV(e,t){for(var n=[];e;){var r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}var jV=`tree`,MV=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.ignoreStyleOnData=!0,n}return t.prototype.getInitialData=function(e){var t={name:e.name,children:e.data},n=new og(e.leaves||{},this,this.ecModel),r=TV.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){var i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}var a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data},t.prototype.getOrient=function(){var e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e},t.prototype.formatTooltip=function(e,t,n){for(var r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return Hb(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=AV(r,this),n.collapsed=!r.isExpand,n},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+jV,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Z.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500},t}(lx),NV=function(){function e(){this.parentPoint=[],this.childPoints=[]}return e}(),PV=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new NV},t.prototype.buildPath=function(e,t){var n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}var s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=J(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(var f=1;fv.x,x||(b-=Math.PI));var C=x?`left`:`right`,w=s.getModel(`label`),T=w.get(`rotate`),E=Math.PI/180*T,D=g.getTextContent();D&&(g.setTextConfig({position:w.get(`position`)||C,rotation:T==null?-b:E,origin:`center`}),D.setStyle(`verticalAlign`,`middle`))}var O=s.get([`emphasis`,`focus`]),k=O===`relative`?at(o.getAncestorsIndices(),o.getDescendantIndices()):O===`ancestor`?o.getAncestorsIndices():O===`descendant`?o.getDescendantIndices():null;k&&(Y(n).focus=k),RV(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){var r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||bf(n.__edge,t)}})}function RV(e,t,n,r,i,a,o,s){var c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||=r.__edge=new um({shape:HV(u,d,f,i,i)}),jm(h,{shape:HV(u,d,f,a,o)},e));else if(l===`polyline`&&u===`orthogonal`&&t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,_=[],v=0;v=0;a--)n.push(i[a])}}function GV(e,t){e.eachSeriesByType(`tree`,function(e){KV(e,t)})}function KV(e,t){var n=q_(e,t).refContainer,r=W_(e.getBoxLayoutParams(),n);e.layoutInfo=r;var i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=aV(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=aV());var c=e.getData().tree.root,l=c.children[0];if(l){nV(c),UV(l,rV,s),c.hierNode.modifier=-l.hierNode.prelim,WV(l,iV);var u=l,d=l,f=l;WV(l,function(e){var t=e.getLayout().x;td.getLayout().x&&(d=e),e.depth>f.depth&&(f=e)});var p=u===d?1:s(u,d)/2,m=p-u.getLayout().x,h=0,g=0,_=0,v=0;if(i===`radial`)h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=(e.depth-1)*g;var t=oV(_,v);e.setLayout({x:t.x,y:t.y,rawX:_,rawY:v},!0)});else{var y=e.getOrient();y===`RL`||y===`LR`?(g=o/(d.getLayout().x+p+m),h=a/(f.depth-1||1),WV(l,function(e){v=(e.getLayout().x+m)*g,_=y===`LR`?(e.depth-1)*h:a-(e.depth-1)*h,e.setLayout({x:_,y:v},!0)})):(y===`TB`||y===`BT`)&&(h=a/(d.getLayout().x+p+m),g=o/(f.depth-1||1),WV(l,function(e){_=(e.getLayout().x+m)*h,v=y===`TB`?(e.depth-1)*g:o-(e.depth-1)*g,e.setLayout({x:_,y:v},!0)}))}}}function qV(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:jV,query:e},function(t){var n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),mB(e,Rd,jV)}var JV=Qc(jV,YV);function YV(e){e.eachSeriesByType(jV,function(e){var t=e.getData();t.tree.eachNode(function(e){var n=e.getModel().getModel(`itemStyle`).getItemStyle();N(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function XV(e){e.registerChartView(FV),e.registerSeriesModel(MV),e.registerLayout(GV),e.registerVisual(JV),qV(e)}var ZV=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function QV(e){for(var t=0;t1;)r=r.parentNode;var i=Ev(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var eH=function(e){D(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};tH(n);var r=e.levels||[],i=new og({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=nH(r,t);var a=I(r||[],function(e){return new og(e,i,t)},this),o=TV.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 Hb(`nameValue`,{name:r.getName(e),value:i})},t.prototype.getDataParams=function(t){var n=e.prototype.getDataParams.apply(this,arguments);return n.treeAncestors=AV(this.getData().tree.getNodeByDataIndex(t),this),n.treePathInfo=n.treeAncestors,n},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},N(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=U(),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(){$V(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:.32*.32,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}(lx);function tH(e){var t=0;F(e.children,function(e){tH(e);var n=e.value;R(n)&&(n=n[0]),t+=n});var n=e.value;R(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),R(e.value)?e.value[0]=n:e.value=n}function nH(e,t){var n=$s(t.get(`color`)),r=$s(t.get([`aria`,`decal`,`decals`]));if(n){e||=[];var i,a;F(e,function(e){var t=new og(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]||={};return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}}var rH=8,iH=8,aH=5,oH=function(){function e(e){this.group=new q,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=q_(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=W_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),J_(a,d,u)}},e.prototype._prepare=function(e,t,n){for(var r=e;r;r=r.parentNode){var i=pc(r.getModel().get(`name`),``),a=n.getTextRect(i),o=Math.max(a.width+rH*2,t.emptyItemWidth);t.totalWidth+=o+iH,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 tm({shape:{points:sH(c,0,_,u,m===f.length-1,m===0)},style:P(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new Cd({style:Lh(a,{text:v})}),textConfig:{position:`inside`},z2:10*1e4,onclick:Ie(s,g)});y.disableLabelAnimation=!0,y.getTextContent().ensureState(`emphasis`).style=Lh(o,{text:v}),y.ensureState(`emphasis`).style=p,Jf(y,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(y),cH(y,e,g),c+=_+iH}},e.prototype.remove=function(){this.group.removeAll()},e}();function sH(e,t,n,r,i,a){var o=[[i?e:e-aH,t],[e+n,t],[e+n,t+r],[i?e:e-aH,t+r]];return!a&&o.splice(2,0,[e+n+aH,t+r/2]),!i&&o.push([e,t+r/2]),o}function cH(e,t,n){Y(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&&AV(n,t)}}var lH=function(){function e(){this._storage=[],this._elExistsMap={}}return e.prototype.add=function(e,t,n,r,i){return this._elExistsMap[e.id]?!1:(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=0;c--){var l=i[r===`asc`?o-c-1:c].getValue();l/n*ts[1]&&(s[1]=t)})),{sum:r,dataExtent:s}}function wH(e,t,n){for(var r=0,i=1/0,a=0,o=void 0,s=e.length;ar&&(r=o));var c=e.area*e.area,l=t*t*n;return c?dH(l*r/c,c/(l*i)):1/0}function TH(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;dOs&&(u=Os),i=c}uPH||Math.abs(e.dy)>PH)){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 K(o.x,o.y,o.width,o.height),c=i.layoutInfo,l=AH(c,o),u=l*r;u=jH(u,i);var d=u/l;t-=c.x,n-=c.y;var f=vn();Sn(f,f,[-t,-n]),wn(f,f,[d,d]),Sn(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&&T_(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 oH(this.group)).render(e,t,n.node,function(t){r._state!==`animating`&&(kV(e.getViewRoot(),t)?r._rootToNode({node:t}):r._zoomToNode({node:t}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=WH(),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}(Sx);function WH(){return{nodeGroup:[],background:[],content:[]}}function GH(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`,MH);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),HH(D).nodeWidth=p,HH(D).nodeHeight=m,u.isAboveViewRoot)return D;var O=le(`background`,NH,l,RH);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)ep(D)&&$f(D,!1),O&&($f(O,!ee),d.setItemGraphicEl(o.dataIndex,O),Yf(O,te,j));else{var ne=le(`content`,NH,l,zH);ne&&ae(D,ne),O.disableMorphing=!0,O&&ep(O)&&$f(O,!1),$f(D,!ee),d.setItemGraphicEl(o.dataIndex,D);var re=f.getShallow(`cursor`);re&&ne.attr(`cursor`,re),Yf(D,te,j)}return D;function ie(t,n,r){var i=Y(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=VH(S);c.fill=s;var l=BH(C);l.fill=C.get(`borderColor`);var u=BH(w);u.fill=w.get(`borderColor`);var d=BH(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,Ef(n)}t.add(n)}function ae(t,n){var r=Y(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=VH(S);l.fill=c,l.decal=s.decal;var u=BH(C),d=BH(w),f=BH(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,Ef(n)}t.add(n)}function oe(e){!e.invisible&&a.push(e)}function se(t,n,r,i){var a=f.getModel(i?IH:FH),s=pc(f.get(`name`),null),c=a.getShallow(`show`);Fh(t,Ih(f,i?IH:FH),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});var l=t.getTextContent();if(l){var d=l.style,p=Ye(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 Xl&&(s.z2=KH(a,o)),de(c,s)),t[e][_]=s}function ue(e,t){var n=e[_]={};t instanceof MH?(n.oldX=t.x,n.oldY=t.y):n.oldShape=N({},t.shape)}function de(e,t){var n=e[_]={},a=o.parentNode,s=t instanceof q;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 KH(e,t){return e*LH+t}var qH=F,JH=V,YH=-1,XH=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=M(t);this.type=r,this.mappingMethod=n,this._normalizeData=cU[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?($H(i),ZH(i)):n===`category`?i.categories?QH(i):$H(i,!0):(Xe(n!==`linear`||i.dataExtent),$H(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return L(this._normalizeData,this)},e.listVisualTypes=function(){return Pe(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){V(e)?F(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=R(t)?[]:V(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&&qH(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(R(e))e=e.slice();else if(JH(e)){var t=[];qH(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=0;a--)r[a]??(delete n[t[a]],t.pop())}function $H(e,t){var n=e.visual,r=[];V(n)?qH(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]),sU(e,r)}function eU(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:aU([0,1])}}function tU(e){var t=this.option.visual;return t[Math.round(ps(e,[0,1],[0,t.length-1],!0))]||{}}function nU(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function rU(e){var t=this.option.visual;return t[this.option.loop&&e!==YH?e%t.length:e]}function iU(){return this.option.visual[0]}function aU(e){return{linear:function(t){return ps(t,e,this.option.visual,!0)},category:rU,piecewise:function(t,n){var r=oU.call(this,n);return r??=ps(t,e,this.option.visual,!0),r},fixed:iU}}function oU(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[XH.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function sU(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=I(t,function(e){return hi(e)||[0,0,0,1]})),t}var cU={linear:function(e){return ps(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=XH.findPieceIndex(e,t,!0);if(n!=null)return ps(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??YH},fixed:ct};function lU(e,t,n){return e?t<=n:t=n.length||e===n[e.depth])&&pU(e,bU(i,c,e,t,m,r),n,r)})}}}function mU(e,t,n){var r=N({},t),i=n.designatedVisualItemStyle;return F([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];var a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function hU(e){var t=_U(e,`color`);if(t){var n=_U(e,`colorAlpha`),r=_U(e,`colorSaturation`);return r&&(t=wi(t,null,null,r)),n&&(t=Ti(t,n)),t}}function gU(e,t){return t==null?null:wi(t,null,null,e)}function _U(e,t){var n=e[t];if(n!=null&&n!==`none`)return n}function vU(e,t,n,r,i,a){if(!(!a||!a.length)){var o=yU(t,`color`)||i.color!=null&&i.color!==`none`&&(yU(t,`colorAlpha`)||yU(t,`colorSaturation`));if(o){var s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&sl[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 XH(d);return dU(f).drColorMappingBy=u,f}}}function yU(e,t){var n=e.get(t);return R(n)&&n.length?{name:t,range:n}:null}function bU(e,t,n,r,i,a){var o=N({},t);if(i){var s=i.type,c=s===`color`&&dU(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 xU(e){e.registerSeriesModel(eH),e.registerChartView(UH),e.registerVisual(fU),e.registerLayout(vH),QV(e)}function SU(e){return`_EC_`+e}var CU=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[SU(e)]){var r=new wU(e,t);return r.hostGraph=this,this.nodes.push(r),n[SU(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[SU(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(Re(e)&&(e=this.nodes[e]),Re(t)&&(t=this.nodes[t]),e instanceof wU||(e=r[SU(e)]),t instanceof wU||(t=r[SU(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new TU(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 wU&&(e=e.id),t instanceof wU&&(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=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=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 wU||(t=this._nodesMap[SU(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),TU=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=U(),t=U();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function EU(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)}}}ke(wU,EU(`hostGraph`,`data`)),ke(TU,EU(`hostGraph`,`edgeData`));function DU(e,t,n,r,i){for(var a=new CU(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=wE(e,n);else{var h=O_.get(p),g=h&&h.dimensions||[];De(g,`value`)<0&&g.concat([`value`]);var _=dE(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new lE(_,n),m.initData(e)}var v=new lE([`value`],n);return v.initData(c,s),i&&i(m,v),hV({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var OU=`-->`,kU=function(e){return e.get(`autoCurveness`)||null},AU=function(e,t){var n=kU(e),r=20,i=[];if(Re(n))r=n;else if(R(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return ix({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=I(this.option.categories||[],function(e){return e.value==null?N({value:0},e):e}),t=new lE([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return Kz(e)&&e},t.type=`series.`+zU,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Z.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Z.color.primary}}},t}(lx);function VU(e){return e instanceof Array||(e=[e,e]),e}var HU=Qc(zU,UU);function UU(e){e.eachSeriesByType(zU,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=VU(e.get(`edgeSymbol`)),i=VU(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=VU(r.getShallow(`symbol`,!0)),o=VU(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(N(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill;break}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function WU(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),GU(n,e)}}function GU(e,t){e.eachEdge(function(e,n){var r=qe(e.getModel().get([`lineStyle`,`curveness`]),-RU(e,t,n,!0),0),i=mt(e.node1.getLayout()),a=mt(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var KU=Qc(zU,qU);function qU(e,t){e.eachSeriesByType(zU,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];F(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(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].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;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(q),xW=function(){function e(e){this.group=new q,this._LineCtor=e||bW}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=CW(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=CW(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!SW(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function CW(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:Ih(t)}}function wW(e){return isNaN(e[0])||isNaN(e[1])}function TW(e){return e&&!wW(e[0])&&!wW(e[1])}var EW=[],DW=[],OW=[],kW=Hr,AW=jt,jW=Math.abs;function MW(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){EW[0]=kW(r[0],i[0],a[0],u),EW[1]=kW(r[1],i[1],a[1],u);var d=jW(AW(EW,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function NW(e,t){var n=[],r=Kr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[mt(c[0]),mt(c[1])],c[2]&&c.__original.push(mt(c[2])));var d=c.__original;if(c[2]!=null){if(pt(i[0],d[0]),pt(i[1],d[2]),pt(i[2],d[1]),l&&l!==`none`){var f=YU(e.node1),p=MW(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=YU(e.node2),p=MW(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}pt(c[0],i[0]),pt(c[1],i[2]),pt(c[2],i[1])}else{if(pt(a[0],d[0]),pt(a[1],d[1]),vt(o,a[1],a[0]),Dt(o,o),l&&l!==`none`){var f=YU(e.node1);_t(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=YU(e.node2);_t(a[1],a[1],o,-f*t)}pt(c[0],a[0]),pt(c[1],a[1])}})}var PW=xc();function FW(e){if(e)return PW(e).bridge}function IW(e,t){e&&(PW(e).bridge=t)}var LW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=zU,t}return t.prototype.init=function(e,t){var n=new QM,r=new xW,i=this.group,a=new q;this._controller=new pR(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=Qz(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&qz(o,2,i,this._firstRender?null:e),NW(e.getGraph(),JU(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&dB(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),QU(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),GU(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Y(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Y(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){eW(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=Qz(t);!this._active||!r||(qz(this._mainGroup,2,r,null),gB(e)&&(this._updateNodeAndLinkScale(),NW(t.getGraph(),JU(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=JU(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(NW(e.getGraph(),JU(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=FW(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(bz(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new q,o=n.group.children(),s=r.group.children(),c=new q,l=new q;a.add(l),a.add(c);for(var u=0;u `),value:r.value,noValue:r.value==null})}return Hb(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);if(n===`node`){var i=this.getData(),a=this.getGraph().getNodeByIndex(t);r.name??=i.getName(t),r.value??=a.getLayout().value}return r},t.type=`series.`+UW,t.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}},t}(lx),GW=function(e){D(t,e);function t(t,n,r){var i=e.call(this)||this;Y(i).dataType=`node`,i.z2=2;var a=new Cd;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.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=N(OF(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):jm(d,{shape:u},o,t);var f=N(OF(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),Qf(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),Qf(d,s,`itemStyle`);var p=c.get(`focus`);Jf(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))},t.prototype._updateLabel=function(e,t,n){var r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);var l=Ih(t),u=n.getVisual(`style`);Fh(r,l,{labelFetcher:{getFormattedLabel:function(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,qe(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});var d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p=d===`outside`?i.r+f:(i.r+i.r0)/2;this.textConfig={inside:d!==`outside`};var m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})},t}(Yp);(function(){function e(){this.s1=[0,0],this.s2=[0,0],this.sStartAngle=0,this.sEndAngle=0,this.t1=[0,0],this.t2=[0,0],this.tStartAngle=0,this.tEndAngle=0,this.cx=0,this.cy=0,this.r=0,this.clockwise=!0}return e})();var KW=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;return Y(a).dataType=`edge`,a.updateData(t,n,r,i,!0),a}return t.prototype.buildPath=function(e,t){e.moveTo(t.s1[0],t.s1[1]);var n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()},t.prototype.updateData=function(e,t,n,r,i){var a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=N(OF(c.getModel(`itemStyle`),s,!0),s),m=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){m.setShape(p);return}i?(m.setShape(p),qW(m,o,e,u)):(Lm(m),qW(m,o,e,u),jm(m,{shape:p},a,n)),Jf(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),Qf(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m)},t}(id);function qW(e,t,n,r){var i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:var s=n.getItemVisual(i.dataIndex,`style`).fill,c=n.getItemVisual(a.dataIndex,`style`).fill;if(B(s)&&B(c)){var l=e.shape;o.fill=new hm((l.s1[0]+l.s2[0])/2,(l.s1[1]+l.s2[1])/2,(l.t1[0]+l.t2[0])/2,(l.t1[1]+l.t2[1])/2,[{offset:0,color:s},{offset:1,color:c}],!0)}break}}var JW=Math.PI/180,YW=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=UW,t}return t.prototype.init=function(e,t){},t.prototype.render=function(e,t,n){var r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*JW;if(r.diff(i).add(function(e){if(r.getItemLayout(e)){var t=new GW(r,e,o);Y(t).dataIndex=e,a.add(t)}}).update(function(t,n){var s=i.getItemGraphicEl(n);if(!r.getItemLayout(t)){s&&Im(s,e,n);return}s?s.updateData(r,t,o):s=new GW(r,t,o),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),!i){var s=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=J(s[0],n.getWidth()),this.group.originY=J(s[1],n.getHeight()),Mm(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)},t.prototype.renderEdges=function(e,t){var n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){var i=new KW(n,r,e,t);Y(i).dataIndex=e,a.add(i)}).update(function(e,o){var s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){var n=i.getItemGraphicEl(t);n&&Im(n,e,t)}).execute(),this._edgeData=r},t.prototype.dispose=function(){},t.type=UW,t}(Sx),XW=Math.PI/180,ZW=Qc(UW,QW);function QW(e,t){e.eachSeriesByType(UW,function(e){$W(e,t)})}function $W(e,t){var n=e.getData(),r=n.graph,i=e.getEdgeData();if(i.count()){var a=U_(e,t),o=a.cx,s=a.cy,c=a.r,l=a.r0,u=Math.max((e.get(`padAngle`)||0)*XW,0),d=Math.max((e.get(`minAngle`)||0)*XW,0),f=-e.get(`startAngle`)*XW,p=f+Math.PI*2,m=e.get(`clockwise`),h=m?1:-1,g=[f,p];Mu(g,!m);var _=g[0],v=g[1]-_,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){var t=y?1:e.getValue(`value`);y&&(t>0||d)&&(x+=2);var n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});var S=0;if(r.eachNode(function(e){var t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||d)&&x++,S+=b[e.dataIndex]||0}),!(x===0||S===0)){u*x>=Math.abs(v)&&(u=Math.max(0,(Math.abs(v)-d*x)/x)),(u+d)*x>=Math.abs(v)&&(d=(Math.abs(v)-u*x)/x);var C=(v-u*x*h)/S,w=0,T=0,E=0,D=1/0;r.eachNode(function(e){var t=b[e.dataIndex]||0,n=C*(S?t:1)*h;Math.abs(n)T){var k=w/T;r.eachNode(function(e){var t=e.getLayout().angle;Math.abs(t)>=d?e.setLayout({angle:t*k,ratio:k},!0):e.setLayout({angle:d,ratio:d===0?1:t/d},!0)})}else r.eachNode(function(e){if(!O){var t=e.getLayout().angle;t-Math.min(t/E,1)*wd&&d>0){var n=O?1:Math.min(t/E,1),r=t-d,i=Math.min(r,Math.min(A,w*n));A-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else d>0&&e.setLayout({angle:d,ratio:t===0?1:d/t},!0)}});var j=_,ee=[];r.eachNode(function(e){var t=Math.max(e.getLayout().angle,d);e.setLayout({cx:o,cy:s,r0:l,r:c,startAngle:j,endAngle:j+t*h,clockwise:m},!0),ee[e.dataIndex]=j,j+=(t+u)*h}),r.eachEdge(function(e){var t=y?1:e.getValue(`value`),n=C*(S?t:1)*h,r=e.node1.dataIndex,i=ee[r]||0,a=i+Math.abs((e.node1.getLayout().ratio||1)*n)*h,c=[o+l*Math.cos(i),s+l*Math.sin(i)],u=[o+l*Math.cos(a),s+l*Math.sin(a)],d=e.node2.dataIndex,f=ee[d]||0,p=f+Math.abs((e.node2.getLayout().ratio||1)*n)*h,g=[o+l*Math.cos(f),s+l*Math.sin(f)],_=[o+l*Math.cos(p),s+l*Math.sin(p)];e.setLayout({s1:c,s2:u,sStartAngle:i,sEndAngle:a,t1:g,t2:_,tStartAngle:f,tEndAngle:p,cx:o,cy:s,r:l,value:t,clockwise:m}),ee[r]=a,ee[d]=p})}}}function eG(e){e.registerChartView(YW),e.registerSeriesModel(WW),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,ZW),e.registerProcessor(tI(`chord`))}var tG=function(){function e(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return e}(),nG=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`pointer`,n}return t.prototype.getDefaultShape=function(){return new tG},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}(id);function rG(e,t){var n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:J(n[0],t.getWidth()),cy:J(n[1],t.getHeight()),r:J(e.get(`radius`),a/2)}}function iG(e,t){var n=e==null?``:e+``;return t&&(B(t)?n=t.replace(`{value}`,n):z(t)&&(n=t(e))),n}var aG=function(e){D(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=rG(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`)?CF:Yp,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];Mu(m,!o),s=m[0],c=m[1];for(var h=c-s,g=s,_=[],v=0;d&&v=e&&(t===0?0:r[t-1][0])Math.PI/2&&(oe+=Math.PI)):ae===`tangential`?oe=-S-Math.PI/2:Re(ae)&&(oe=ae*Math.PI/180),oe===0?l.add(new Cd({style:Lh(_,{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 Cd({style:Lh(_,{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 om({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=J(r.get(`width`),i.r),o=J(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=J(c[0],i.r),u=J(c[1],i.r),d=r.get(`keepAspect`),f=s?WS(s,l-a/2,u-o,a,o,null,d):new nG({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`)?CF:Yp,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=ps(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);Mm(r,{rotation:-((isNaN(+n)?x[0]:ps(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){var i=C(t,a);Mm(i,{shape:{endAngle:ps(n,b,x,m.get(`clip`))}},e),l.add(i),Ld(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,jm(s,{rotation:-((isNaN(+r)?x[0]:ps(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);jm(v,{shape:{endAngle:ps(r,b,x,m.get(`clip`))}},e),l.add(v),Ld(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(ps(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 ud){var d=c.style;c.useStyle(N({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,Qf(c,t),Jf(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,Qf(m,t),Jf(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=WS(i,t.cx-r/2+J(a[0],t.r),t.cy-r/2+J(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 q,d=[],f=[],p=e.isAnimationEnabled(),m=e.get([`pointer`,`showAbove`]);o.diff(this._data).add(function(e){d[e]=new Cd({silent:!0}),f[e]=new Cd({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 q,g=r(ps(a,[c,l],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){var v=_.get(`offsetCenter`),y=i.cx+J(v[0],i.r),b=i.cy+J(v[1],i.r),x=d[t];x.attr({z2:m?0:2,style:Lh(_,{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+J(C[0],i.r),T=i.cy+J(C[1],i.r),E=J(S.get(`width`),i.r),D=J(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:Lh(S,{x:w,y:T,text:iG(a,k),width:isNaN(E)?null:E,height:isNaN(D)?null:D,align:`center`,verticalAlign:`middle`},{inheritColor:O})}),qh(x,{normal:S},a,function(e){return iG(e,k)}),p&&Jh(x,t,o,e,{getFormattedLabel:function(e,t,n,r,i,o){return iG(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}(Sx),oG=function(e){D(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 nI(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}(lx);function sG(e){e.registerChartView(aG),e.registerSeriesModel(oG)}var cG=`funnel`,lG=function(e){D(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 rI(L(this.getData,this),L(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.getInitialData=function(e,t){return nI(this,{coordDimensions:[`value`],encodeDefaulter:Ie(hv,this)})},t.prototype._defaultLabelLine=function(e){ec(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.`+cG,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}(lx),uG=[`itemStyle`,`opacity`],dG=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=r,a=new rm,o=new Cd;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(uG);c??=1,n||Lm(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,Mm(r,{style:{opacity:c}},i,t)):jm(r,{style:{opacity:c},shape:{points:o.points}},i,t),Qf(r,a),this._updateLabel(e,t),Jf(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;Fh(i,Ih(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 G(d[0][0],d[0][1]):null},jm(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),dA(n,fA(o),{stroke:l})},t}(tm),fG=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=cG,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 dG(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){Im(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=cG,t}(Sx);function pG(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-1&&(i=`left`),n&&De([`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}})}var hG=Qc(cG,gG);function gG(e,t){e.eachSeriesByType(cG,function(e){var n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=q_(e,t),o=W_(e.getBoxLayoutParams(),a.refContainer),s=_G(e),c=o.width,l=o.height,u=pG(n,i),d=o.x,f=o.y,p=s?[J(e.get(`minSize`),l),J(e.get(`maxSize`),l)]:[J(e.get(`minSize`),c),J(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=ps(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);break}return[[t,a],[t,a+i]]}var o=ps(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;break}return[[u,t],[u+o,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(var x=0;xFG)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!(this._mouseDownPoint||!RG(this,`mousemove`))){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}}};function RG(e,t){var n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}var zG=`parallel`,BG=zG,VG=function(e){D(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.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var t=this.option;e&&Ce(t,e,!0),this._initDimensions()},t.prototype.contains=function(e,t){var n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this},t.prototype.setAxisExpand=function(e){F([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];F(Me(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})},t.type=BG,t.dependencies=[`parallelAxis`],t.layoutMode=`box`,t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null},t}(tv),HG=function(e){D(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.type=i||`value`,o.axisIndex=a,o}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`},t}(Ik);function UG(e,t,n,r,i,a){e||=0;var o=Ds(n[1],-n[0]);if(i!=null&&(i=GG(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),r===`all`){var s=Math.abs(Ds(t[1],-t[0]));s=GG(s,[0,o]),i=a=GG(s,[i,a]),r=0}t[0]=GG(t[0],n),t[1]=GG(t[1],n);var c=WG(t,r);t[r]+=e;var l=i||0,u=n.slice();c.sign<0?u[0]=Ds(u[0],l):u[1]=Ds(u[1],-l),t[r]=GG(t[r],u);var d=WG(t,r);return i!=null&&(d.sign!==c.sign||d.spana&&(t[1-r]=Ds(t[r],d.sign*a)),t}function WG(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 GG(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var KG=function(){function e(e,t,n){this.type=zG,this._axesMap=U(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return e.prototype._init=function(e,t,n){var r=e.dimensions,i=e.parallelAxisIndex;F(r,function(e,n){var r=i[n],a=t.getComponent(`parallelAxis`,r),o=ED(a),s=this._axesMap.set(e,new HG(e,DD(a,o,!1),[0,0],o,r));s.onBand=HD(s.scale,a),s.inverse=a.get(`inverse`),a.axis=s,s.model=a,s.coordinateSystem=a.coordinateSystem=this},this)},e.prototype.update=function(e,t){F(this.dimensions,function(e){var t=this._axesMap.get(e);bO(t,1),MO(t)},this)},e.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength},e.prototype.getModel=function(){return this._model},e.prototype.resize=function(e,t){var n=q_(e,t).refContainer;this._rect=W_(e.getBoxLayoutParams(),n),this._layoutAxes()},e.prototype.getRect=function(){return this._rect},e.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=qG(e.get(`axisExpandWidth`),s),u=qG(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=qG(f[1]-f[0],s),f[1]=f[0]+p):(p=qG(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||os(c/2))-p/2],f[1]=f[0]+p);var m=(o-p)/(c-u);m<3&&(m=0);var h=[os(vs(f[0]/l,1))+1,ss(vs(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}},e.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){var t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),F(n,function(t,n){var a=(r.axisExpandable?YG:JG)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:ds/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=vn();Cn(u,u,l),Sn(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},e.prototype.getAxis=function(e){return this._axesMap.get(e)},e.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},e.prototype.eachActiveState=function(e,t,n,r){n??=0,r??=e.count();var i=this._axesMap,a=this.dimensions,o=[],s=[];F(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});for(var c=this.hasAxisBrushed(),l=n;li*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?UG(s,r,a,`all`):c=`none`;else{var f=r[1]-r[0];r=[rs(0,a[1]*o/f-f/2)],r[1]=ns(a[1],r[0]+f),r[0]=r[1]-f}return{axisExpandWindow:r,behavior:c}},e}();function qG(e,t){return ns(rs(e,t[0]),t[1])}function JG(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function YG(e,t){var n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e=0;n--)bs(t[n])},t.prototype.getActiveState=function(e){var t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){var n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(var r=0,i=t.length;riK}function CK(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function wK(e,t,n,r){var i=new q;return i.add(new vd({name:`main`,style:OK(n),silent:!0,draggable:!0,cursor:`move`,drift:Ie(NK,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:Ie(xK,t,{isEnd:!0})})),F(r,function(n){i.add(new vd({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Ie(NK,e,t,i,n),ondragend:Ie(xK,t,{isEnd:!0})}))}),i}function TK(e,t,n,r){var i=r.brushStyle.lineWidth||0,a=tK(i,aK),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;DK(e,t,`main`,o,s,m,h),r.transformable&&(DK(e,t,`w`,c,l,a,_),DK(e,t,`e`,f,l,a,_),DK(e,t,`n`,c,l,g,a),DK(e,t,`s`,c,p,g,a),DK(e,t,`nw`,c,l,a,a),DK(e,t,`ne`,f,l,a,a),DK(e,t,`sw`,c,p,a,a),DK(e,t,`se`,f,p,a,a))}function EK(e,t){var n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(OK(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),F([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){var i=t.childOfName(n.join(``)),a=n.length===1?jK(e,n[0]):MK(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?cK[a]+`-resize`:null})})}function DK(e,t,n,r,i,a,o){var s=t.childOfName(n);s&&s.setShape(LK(IK(e,t,[[r,i],[r+a,i+o]])))}function OK(e){return P({strokeNoScale:!0},e.brushStyle)}function kK(e,t,n,r){var i=[eK(e,n),eK(t,r)],a=[tK(e,n),tK(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function AK(e){return th(e.group)}function jK(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[rh({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],AK(e))]}function MK(e,t){var n=[jK(e,t[0]),jK(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function NK(e,t,n,r,i,a){var o=n.__brushOption,s=e.toRectRange(o.range),c=FK(t,i,a);F(r,function(e){var t=sK[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange(kK(s[0][0],s[1][0],s[0][1],s[1][1])),gK(t,n),xK(t,{isEnd:!1})}function PK(e,t,n,r){var i=t.__brushOption.range,a=FK(e,n,r);F(i,function(e){e[0]+=a[0],e[1]+=a[1]}),gK(e,t),xK(e,{isEnd:!1})}function FK(e,t,n){var r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function IK(e,t,n){var r=yK(e,t);return r&&r!==$G?r.clipPath(n,e._transform):M(n)}function LK(e){var t=eK(e[0][0],e[1][0]),n=eK(e[0][1],e[1][1]),r=tK(e[0][0],e[1][0]),i=tK(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function RK(e,t,n){if(!(!e._brushType||GK(e,t.offsetX,t.offsetY))){var r=e._zr,i=e._covers,a=vK(e,t,n);if(!e._dragging)for(var o=0;or.getWidth()||n<0||n>r.getHeight()}var KK={lineX:qK(0),lineY:qK(1),rect:{createCover:function(e,t){function n(e){return e}return wK({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){var t=CK(e);return kK(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){TK(e,t,n,r)},updateCommon:EK,contain:BK},polygon:{createCover:function(e,t){var n=new q;return n.add(new rm({name:`main`,style:OK(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new tm({name:`main`,draggable:!0,drift:Ie(PK,e,t),ondragend:Ie(xK,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:IK(e,t,n)})},updateCommon:EK,contain:BK}};function qK(e){return{createCover:function(t,n){return wK({toRectRange:function(t){var n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){var n=CK(t);return[eK(n[0][e],n[1][e]),tK(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){var a,o=yK(t,n);if(o!==$G&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var c=[r,a];e&&c.reverse(),TK(t,n,c,i)},updateCommon:EK,contain:BK}}function JK(e){return e=ZK(e),function(t){return sh(t,e)}}function YK(e,t){return e=ZK(e),function(n){var r=t??n,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function XK(e,t,n){var r=ZK(e);return function(e,i){return r.contain(i[0],i[1])&&!fR(e,t,n)}}function ZK(e){return K.create(e)}var QK=function(e){D(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){e.prototype.init.apply(this,arguments),(this._brushController=new dK(n.getZr())).on(`brush`,L(this._onBrush,this))},t.prototype.render=function(e,t,n,r){if(!$K(e,t,r)){this.axisModel=e,this.api=n,this.group.removeAll();var i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),e.get(`show`)){var a=tq(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=N({strokeContainThreshold:c},u),f=new xP(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),oh(i,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,t,n,r,i,a){var o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=K.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:JK(l),isTargetByCursor:XK(l,a,r),getLinearBrushOtherExtent:YK(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(eq(n))},t.prototype._onBrush=function(e){var t=e.areas,n=this.axisModel,r=n.axis,i=I(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})},t.prototype.dispose=function(){this._brushController.dispose()},t.type=`parallelAxis`,t}(vx);function $K(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function eq(e){var t=e.axis;return I(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function tq(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}var nq={type:`axisAreaSelect`,event:`axisAreaSelected`};function rq(e){e.registerAction(nq,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}var iq={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function aq(e){e.registerComponentView(IG),e.registerComponentModel(VG),e.registerCoordinateSystem(`parallel`,ZG),e.registerPreprocessor(MG),e.registerComponentModel(QG),e.registerComponentView(QK),II(e,`parallel`,QG,iq),rq(e)}function oq(e){MT(aq),e.registerChartView(bG),e.registerSeriesModel(DG),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,jG)}var sq=`sankey`,cq=function(e){D(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=0&&(a[i[o].depth]=new og(i[o],this,t));return DU(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 Hb(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}else{var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return Hb(`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.`+sq,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}(lx),lq=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}(),uq=function(e){D(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new lq},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(){kf(this)},t.prototype.downplay=function(){Af(this)},t}(id),dq=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=sq,t._mainGroup=new q,t}return t.prototype.init=function(e,t){this._controller=new pR(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),dB(e,n,this._controller,fB(i),null),r.eachEdge(function(t){var n=new uq,r=Y(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()),fq(n.style,u,t);var k=``+a.get(`value`),A=Ih(a,`edgeLabel`);Fh(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,qe(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var j=a.getModel(`emphasis`);Qf(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return fq(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var ee=j.get(`focus`);Jf(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 vd({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});Fh(f,Ih(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),Qf(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),Y(f).dataType=`node`;var p=u.get(`focus`);Jf(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(pq(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){qz(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=_B(e,t,n.x,n.y,n.width,n.height);qz(this.group,2,r,this._firstRender?null:e)},t.type=sq,t}(Sx);function fq(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`);B(r)&&B(i)&&(e.fill=new hm(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function pq(e,t,n){var r=new vd({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Mm(r,{shape:{width:e.width+20}},t,n),r}var mq=Qc(sq,hq);function hq(e,t){e.eachSeriesByType(sq,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=q_(e,t).refContainer,a=W_(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;_q(l),gq(l,u,n,r,o,s,Me(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function gq(e,t,n,r,i,a,o,s,c){vq(e,t,n,i,a,s,c),Cq(e,t,a,i,r,o,s),Iq(e,s)}function _q(e){F(e,function(e){var t=Pq(e.outEdges,Nq),n=Pq(e.inEdges,Nq),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function vq(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=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;vd-1?p:d-1;o&&o!==`left`&&bq(e,o,a,C),Sq(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function yq(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function bq(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Dq(s,c,o),Eq(s,i,n,r,o),Fq(s,c,o),Eq(s,i,n,r,o)}function wq(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Mc(e,function(e){return e.getLayout()[r]});return bs(i.keys),F(i.keys,function(e){n.push(i.buckets.get(e))}),n}function Tq(e,t,n,r,i,a){var o=1/0;F(e,function(e){var t=e.length,s=0;F(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(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 Dq(e,t,n){F(e.slice().reverse(),function(e){F(e,function(e){if(e.outEdges.length){var r=Pq(e.outEdges,Oq,n)/Pq(e.outEdges,Nq);if(isNaN(r)){var i=e.outEdges.length;r=i?Pq(e.outEdges,kq,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Mq(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Mq(e,n))*t;e.setLayout({y:o},!0)}}})})}function Oq(e,t){return Mq(e.node2,t)*e.getValue()}function kq(e,t){return Mq(e.node2,t)}function Aq(e,t){return Mq(e.node1,t)*e.getValue()}function jq(e,t){return Mq(e.node1,t)}function Mq(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Nq(e){return e.getValue()}function Pq(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),F(n,function(t){var n=new XH({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&&F(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function zq(e){e.registerChartView(dq),e.registerSeriesModel(cq),e.registerLayout(mq),e.registerVisual(Lq),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:Rd,subType:sq,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),mB(e,Rd,sq)}var Bq=function(){function e(){}return e.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},e.prototype.getInitialData=function(e,t){var n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||=o===`time`?`vertical`:`horizontal`,this._layout=c;var l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){var _=[];F(g,function(e,t){var n;R(e)?(n=e.slice(),e.unshift(t)):R(e.value)?(n=N({},e),n.value=n.value.slice(),e.value.unshift(t)):n=e,_.push(n)}),e.data=_}var v=this.defaultValueDimensions,y=[{name:d,type:zT(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:zT(h),dimsDef:v.slice()}];return nI(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Ie(mv,y,this)})},e.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis},e.prototype.getWhiskerBoxesLayout=function(){return this._layout},e}();function Vq(e,t){for(var n=t.ends.length,r=0,i=0;ih){var b=[_,y];r.push(b)}}}return{boxData:n,outliers:r}}var rJ={type:`echarts:boxplot`,transform:function(e){var t=e.upstream;t.sourceFormat!==`arrayRows`&&Ys(``);var n=nJ(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function iJ(e){e.registerSeriesModel(Uq),e.registerChartView(Wq),e.registerLayout(Zq),e.registerTransform(rJ),tJ(e)}var aJ=`candlestick`,oJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}],n}return t.prototype.getShadowDim=function(){return`open`},t.prototype.brushSelector=function(e,t,n){var r=t.getItemLayout(e);return r&&n.rect(r.brushRect)},t.type=`series.`+aJ,t.dependencies=[`xAxis`,`yAxis`,`grid`],t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},t}(lx);ke(oJ,Bq,!0);var sJ=[`itemStyle`,`borderColor`],cJ=[`itemStyle`,`borderColor0`],lJ=[`itemStyle`,`borderColorDoji`],uJ=[`itemStyle`,`color`],dJ=[`itemStyle`,`color0`];function fJ(e,t){return t.get(e>0?uJ:dJ)}function pJ(e,t){return t.get(e===0?lJ:e>0?sJ:cJ)}var mJ={seriesType:aJ,plan:yx(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var n;(n=e.next())!=null;){var r=t.getItemModel(n),i=t.getItemLayout(n).sign,a=r.getItemStyle();a.fill=fJ(i,r),a.stroke=pJ(i,r)||a.fill,N(t.ensureUniqueItemVisual(n,`style`),a)}}}}},hJ=[`color`,`borderColor`],gJ=function(e){D(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.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,t,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},t.prototype.eachRendered=function(e){yh(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){var t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea(),c=a&&vN(o,!1,e);this._data||r.removeAll();var l=SJ(e);t.diff(n).add(function(n){if(t.hasValue(n)){var o=t.getItemLayout(n),u=a?Vq(s,o):0;if(u===2)return;var d=yJ(o,n,l,!0);Mm(d,{shape:{points:o.ends}},e,n),yN(u===1,d,c),bJ(d,t,n,i),r.add(d),t.setItemGraphicEl(n,d)}}).update(function(o,u){var d=n.getItemGraphicEl(u);if(!t.hasValue(o)){r.remove(d);return}var f=t.getItemLayout(o),p=a?Vq(s,f):0;if(p===2){r.remove(d);return}d?(jm(d,{shape:{points:f.ends}},e,o),Lm(d)):d=yJ(f,o,l),bJ(d,t,o,i),yN(p===1,d,c),r.add(d),t.setItemGraphicEl(o,d)}).remove(function(e){var t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t},t.prototype._renderLarge=function(e){this._clear(),TJ(e,this.group);var t=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;yN(!!t,this.group,t)},t.prototype._incrementalRenderNormal=function(e,t){for(var n=t.getData(),r=n.getLayout(`isSimpleBox`),i=SJ(t),a;(a=e.next())!=null;){var o=yJ(n.getItemLayout(a),a,i);bJ(o,n,a,r),o.incremental=Xc(t),this.group.add(o),this._progressiveEls.push(o)}},t.prototype._incrementalRenderLarge=function(e,t){TJ(t,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),yN(!1,this.group,null),this._data=null},t.type=aJ,t}(Sx),_J=function(){function e(){}return e}(),vJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`normalCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new _J},t.prototype.buildPath=function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(id);function yJ(e,t,n,r){var i=e.ends;return new vJ({shape:{points:r?xJ(i,n,e):i},z2:100})}function bJ(e,t,n,r){var i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0;var a=i.getShallow(`cursor`);a&&e.attr(`cursor`,a),e.__simpleBox=r,Qf(e,i);var o=t.getItemLayout(n).sign;F(e.states,function(e,t){var n=i.getModel(t),r=fJ(o,n),a=pJ(o,n)||r,s=e.style||={};r&&(s.fill=r),a&&(s.stroke=a)});var s=i.getModel(`emphasis`);Jf(e,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}function xJ(e,t,n){return I(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}function SJ(e){return+(e.getWhiskerBoxesLayout()===`horizontal`)}var CJ=function(){function e(){}return e}(),wJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeCandlestickBox`,n}return t.prototype.getDefaultShape=function(){return new CJ},t.prototype.buildPath=function(e,t){for(var n=t.points,r=0;rh?x[a]:b[a],ends:w,brushRect:O(g,_,p)})}function E(e,n){var r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function D(e,t,n){var a=t.slice(),o=t.slice();a[i]=eh(a[i]+r/2,1,!1),o[i]=eh(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function O(e,t,n){var o=E(e,n),s=E(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function k(e){return e[i]=eh(e[i],1),e}}function m(n,r){for(var o=aN(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);(g=n.next())!=null;){var y=_.get(s,g),b=_.get(l,g),x=_.get(u,g),S=_.get(d,g),C=_.get(f,g);if(isNaN(y)||isNaN(S)||isNaN(C)){o[c++]=NaN,c+=3;continue}o[c++]=AJ(_,g,b,x,u,v),m[i]=y,m[a]=S,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=C,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN}r.setLayout(`largePoints`,o)}}};function AJ(e,t,n,r,i,a){return n>r?-1:n0?e.get(i,t-1)<=r?1:-1:1}function jJ(e,t){var n=Mk(e.getBaseAxis(),{fromStat:{key:QP(aJ)},min:1}).w,r=J(H(e.get(`barMaxWidth`),n),n),i=J(H(e.get(`barMinWidth`),1),n),a=e.get(`barWidth`);return a==null?rs(ns(n/2,r),i):J(a,n)}function MJ(e){OJ(e,function(){var t=QP(aJ);lO(e,{key:t,seriesType:aJ,getMetrics:eF}),wO(t,ZP(t))})}function NJ(e){e.registerChartView(gJ),e.registerSeriesModel(oJ),e.registerPreprocessor(DJ),e.registerVisual(mJ),e.registerLayout(kJ),MJ(e)}function PJ(e,t){var n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var FJ=function(e){D(t,e);function t(t,n){var r=e.call(this)||this,i=new KM(t,n),a=new q;return r.add(i),r.add(a),r.updateData(t,n),r}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1),a=0;a0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();var u=void 0;u=z(l)?l(n):l,r.__t>0&&(u=-a*r.__t),this._animateSymbol(r,a,u,o,s)}this._period=a,this._loop=o,this._roundTrip=s}},t.prototype._animateSymbol=function(e,t,n,r,i){if(t>0){e.__t=0;var a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}},t.prototype._getLineLength=function(e){return kt(e.__p1,e.__cp1)+kt(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},t.prototype.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},t.prototype._updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<=1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=Hr,c=Ur;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);var l=e.__t<=1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<=1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;ot);o++);o=Math.min(o-1,i-2)}var s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];var u=e.__t<=1?l[0]-c[0]:c[0]-l[0],d=e.__t<=1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},t}(BJ),UJ=function(){function e(){this.polyline=!1,this.curveness=0,this.segs=[]}return e}(),WJ=function(e){D(t,e);function t(t){var n=e.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.beforeBrush=function(e){e&&!e.contentRetained&&this.reset()},t.prototype.getDefaultStyle=function(){return{stroke:Z.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new UJ},t.prototype.buildPath=function(e,t){var n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i0){e.moveTo(n[i++],n[i++]);for(var o=1;o0){var d=(s+l)/2-(c-u)*r,f=(c+u)/2-(l-s)*r;e.quadraticCurveTo(d,f,l,u)}else e.lineTo(l,u)}this.incremental&&(this._off=i,this.notClear=!0)},t.prototype.findDataIndex=function(e,t){var n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline)for(var o=0,s=0;s0)for(var l=r[s++],u=r[s++],d=1;d0){if(Iu(l,u,(l+f)/2-(u-p)*i,(u+p)/2-(f-l)*i,f,p,a,e,t))return o}else if(Pu(l,u,f,p,a,e,t))return o;o++}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.segs,n=1/0,r=1/0,i=-1/0,a=-1/0,o=0;o0&&(a.dataIndex=n+e.__startIndex)})},e.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},e}(),KJ={seriesType:`lines`,plan:yx(),reset:function(e){var t=e.coordinateSystem;if(t){var n=e.get(`polyline`),r=e.pipelineContext.large;return{progress:function(i,a){var o=[];if(r){var s=void 0,c=i.end-i.start;if(n){for(var l=0,u=i.start;u0&&c&&s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)}),i.updateData(r);var l=e.get(`clip`,!0)&&vN(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,t,n){var r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData(),Xc(t)),this._finished=e.end===t.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,t,n){var r=e.getData(),i=this._lineDraw;if(!this._finished||!i||!i.updateLayout)return{update:!0};var a=KJ.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),i.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,t){var n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new GJ:new xW(i?r?HJ:VJ:r?BJ:bW),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get([`effect`,`show`])},t.prototype._clearLayer=function(e){var t=jh(e);t&&this._lastZlevel!=null&&t.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},t.prototype.dispose=function(e,t){this.remove(e,t)},t.type=`lines`,t}(Sx),JJ=typeof Uint32Array>`u`?Array:Uint32Array,YJ=typeof Float64Array>`u`?Array:Float64Array;function XJ(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=I(t,function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),we([t,e[0],e[1]])}))}var ZJ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath=`lineStyle`,n.visualDrawType=`stroke`,n}return t.prototype.init=function(t){t.data=t.data||[],XJ(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),e.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(t){if(XJ(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}e.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=at(this._flatCoords,t.flatCoords),this._flatCoordsOffset=at(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow(`coords`)},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1],i=0;i `)}return Hb(`nameValue`,{name:o,value:i,noValue:i==null||isNaN(i)})},t.prototype.preventIncremental=function(){return!!this.get([`effect`,`show`])},t.prototype.getProgressive=function(){return this.option.progressive??(this.option.large?1e4:this.get(`progressive`))},t.prototype.getProgressiveThreshold=function(){return this.option.progressiveThreshold??(this.option.large?2e4:this.get(`progressiveThreshold`))},t.prototype.getZLevelKey=function(){var e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``},t.type=`series.lines`,t.dependencies=[`grid`,`polar`,`geo`,`calendar`],t.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}},t}(lx);function QJ(e){return e instanceof Array||(e=[e,e]),e}var $J={seriesType:`lines`,reset:function(e){var t=QJ(e.get(`symbol`)),n=QJ(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){var n=e.getItemModel(t),r=QJ(n.getShallow(`symbol`,!0)),i=QJ(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function eY(e){e.registerChartView(qJ),e.registerSeriesModel(ZJ),e.registerLayout(KJ),e.registerVisual($J)}var tY=256,nY=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ae.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;p0){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||=ae.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(256*4)),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}();function rY(e,t,n){var r=e[1]-e[0];t=I(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){var r;for(r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var aY=function(e){D(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()):SN(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&&(SN(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){yh(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=xN(a,`cartesian2d`),s=xN(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Mk(f).w+.5,l=Mk(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=Ih(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;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new vd({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(Ge(ee.x))continue;D=new vd({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(Ge(ee.x)||Ge(ee.y))continue;D=new vd({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=Ih(ne)}D.shape.r=y;var ie=e.getRawValue(E),ae=`-`;ie&&ie[2]!=null&&(ae=ie[2]+``),Fh(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,Jf(D,S,C,w),D.incremental=Xc(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 nY;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`?iY(v,n.option.range):rY(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 ud({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(Sx),oY=function(e){D(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 wE(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=O_.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}(lx);function sY(e){e.registerChartView(aY),e.registerSeriesModel(oY)}var cY=[`itemStyle`,`borderWidth`],lY=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],uY=new Ap,dY=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=tF,t}return t.prototype.render=function(e,t,n){var r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:lY[+s],categoryDim:lY[1-s]};i.diff(a).add(function(e){if(i.hasValue(e)){var t=fY(i,e,CY(i,e),l),n=EY(i,l,t);i.setItemGraphicEl(e,n),r.add(n),MY(n,l,t)}}).update(function(e,t){var n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}var o=fY(i,e,CY(i,e),l),s=kY(i,o);n&&s!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?DY(n,l,o):n=EY(i,l,o,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=o,r.add(n),MY(n,l,o)}).remove(function(e){var t=a.getItemGraphicEl(e);t&&OY(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();var u=e.get(`clip`,!0)?vN(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group},t.prototype.remove=function(e,t){var n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){OY(r,Y(t).dataIndex,e,t)}):n.removeAll()},t.type=tF,t}(Sx);function fY(e,t,n,r){var i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};pY(n,a,i,r,d),hY(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),gY(n,d.symbolScale,c,r,d);var f=d.symbolSize;return _Y(n,f,i,a,o,KS(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function pY(e,t,n,r,i){var a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(R(o)){var d=[mY(s,o[0])-c,mY(s,o[1])-c];d[1]=0?1:-1:u>0?1:-1}function mY(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function hY(e,t,n,r,i,a,o,s,c,l){var u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m=R(p)?p.slice():p==null?[`100%`,`100%`]:[p,p];m[d.index]=J(m[d.index],f),m[u.index]=J(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;var h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function gY(e,t,n,r,i){var a=e.get(cY)||0;a&&(uY.attr({scaleX:t[0],scaleY:t[1],rotation:n}),uY.updateTransform(),a/=uY.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function _Y(e,t,n,r,i,a,o,s,c,l,u,d){var f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){var _=Math.abs(c),v=Ke(e.get(`symbolMargin`),`15%`)+``,y=!1;v.lastIndexOf(`!`)===v.length-1&&(y=!0,v=v.slice(0,v.length-1));var b=J(v,t[p.index]),x=Math.max(h+b*2,0),S=y?0:b*2,C=zs(r),w=C?r:NY((_+S)/x);b=(_-w*h)/2/(y?w:Math.max(w-1,1)),x=h+b*2,S=y?0:b*2,!C&&r!==`fixed`&&(w=l?NY((Math.abs(l)+S)/x):0),g=w*x-S,d.repeatTimes=w,d.symbolMargin=b}var T=g/2*m,E=d.pathPosition=[];E[f.index]=n[f.wh]/2,E[p.index]=o===`start`?T:o===`end`?c-T:c/2,a&&(E[0]+=a[0],E[1]+=a[1]);var D=d.bundlePosition=[];D[f.index]=n[f.xy],D[p.index]=n[p.xy];var O=d.barRectShape=N({},n);O[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(E[p.index]+T)),O[f.wh]=n[f.wh];var k=d.clipShape={};k[f.xy]=-n[f.xy],k[f.wh]=u.ecSize[f.wh],k[p.xy]=0,k[p.wh]=n[p.wh]}function vY(e){var t=e.symbolPatternSize,n=WS(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function yY(e,t,n,r){var i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for(AY(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bY(e,t,n,r){var i=e.__pictorialBundle,a=e.__pictorialMainPath;a?jY(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=vY(n),i.add(a),jY(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function xY(e,t,n){var r=N({},t.barRectShape),i=e.__pictorialBarRect;i?jY(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new vd({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function SY(e,t,n,r){if(n.symbolClip){var i=e.__pictorialClipPath,a=N({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)jm(i,{shape:a},s,c);else{a[o.wh]=0,i=new vd({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;var l={};l[o.wh]=n.clipShape[o.wh],zm[r?`updateProps`:`initProps`](i,{shape:l},s,c)}}}function CY(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=wY,n.isAnimationEnabled=TY,n}function wY(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function TY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function EY(e,t,n,r){var i=new q,a=new q;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?yY(i,t,n):bY(i,t,n),xY(i,n,r),SY(i,t,n,r),i.__pictorialShapeStr=kY(e,n),i.__pictorialSymbolMeta=n,i}function DY(e,t,n){var r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;jm(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?yY(e,t,n,!0):bY(e,t,n,!0),xY(e,n,!0),SY(e,t,n,!0)}function OY(e,t,n,r){var i=r.__pictorialBarRect;i&&i.removeTextContent();var a=[];AY(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),F(a,function(e){Pm(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function kY(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function AY(e,t,n){F(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function jY(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&zm[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function MY(e,t,n){var r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);AY(e,function(e){if(e instanceof ud){var t=e.style;e.useStyle(N({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);var r=e.ensureState(`emphasis`);r.style=o,f&&(r.scaleX=e.scaleX*1.1,r.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});var p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,Fh(m,Ih(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:WM(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),Jf(e,u,d,a.get(`disabled`))}function NY(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var PY=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n.defaultSymbol=`roundRect`,n}return t.prototype.getInitialData=function(t){return t.stack=null,e.prototype.getInitialData.apply(this,arguments)},t.type=`series.`+tF,t.dependencies=[`grid`],t.defaultOption=dg(bF.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Z.color.primary}}}),t}(bF);function FY(e){e.registerChartView(dY),e.registerSeriesModel(PY),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,hF(tF)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,gF(tF)),yF(e)}var IY=2,LY=`themeRiver`,RY=function(e){D(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 rI(L(this.getData,this),L(this.getRawData,this))},t.prototype.fixData=function(e){var t=e.length,n={},r=Mc(e,function(e){return n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2]}),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});for(var a=i.length,o=0;oa&&(a=s),r.push(s)}for(var l=0;la&&(a=d)}return{y0:i,max:a}}function GY(e){e.registerChartView(zY),e.registerSeriesModel(RY),e.registerLayout(VY),e.registerProcessor(tI(LY))}var KY=2,qY=4,JY=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this)||this;a.z2=KY,a.textConfig={inside:!0},Y(a).seriesIndex=n.seriesIndex;var o=new Cd({z2:qY,silent:t.getModel().get([`label`,`silent`])});return a.setTextContent(o),a.updateData(!0,t,n,r,i),a}return t.prototype.updateData=function(e,t,n,r,i){this.node=t,t.piece=this,n||=this._seriesModel,r||=this._ecModel;var a=this;Y(a).dataIndex=t.dataIndex;var o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=N({},c);l.label=null;var u=t.getVisual(`style`);u.lineJoin=`bevel`;var d=t.getVisual(`decal`);d&&(u.decal=NC(d,i)),N(l,OF(o.getModel(`itemStyle`),l,!0)),F(tf,function(e){var t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();var r=OF(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,Mm(a,{shape:{r:c.r}},n,t.dataIndex)):(jm(a,{shape:l},n),Lm(a)),a.useStyle(u),this._updateLabel(n);var f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;var p=s.get(`focus`),m=p===`relative`?at(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;Jf(this,m,s.get(`blurScope`),s.get(`disabled`))},t.prototype._updateLabel=function(e){var t=this,n=this.node.getModel(),r=n.getModel(`label`),i=this.node.getLayout(),a=i.endAngle-i.startAngle,o=(i.startAngle+i.endAngle)/2,s=Math.cos(o),c=Math.sin(o),l=this,u=l.getTextContent(),d=this.node.dataIndex,f=r.get(`minAngle`)/180*Math.PI;u.ignore=!(r.get(`show`)&&!(f!=null&&Math.abs(a)T&&!As(D-T)&&D0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new JY(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&=(c.remove(i.virtualPiece),null)}},t.prototype._initEvents=function(){var e=this;this.group.off(`click`),this.group.on(`click`,function(t){var n=!1;e.seriesModel.getViewRoot().eachNode(function(r){if(!n&&r.piece&&r.piece===t.target){var i=r.getModel().get(`nodeClick`);if(i===`rootToNode`)e._rootToNode(r);else if(i===`link`){var a=r.getModel(),o=a.get(`link`);o&&T_(o,a.get(`target`,!0)||`_blank`)}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:QY,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},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=YY,t}(Sx),rX=Qc(YY,iX);function iX(e){var t={};function n(e,n,r){if(e.depth===0)return Z.color.neutral50;for(var i=e;i&&i.depth>1;)i=i.parentNode;var a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&B(a)&&(a=vi(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(YY,function(e){var t=e.getData(),r=t.tree;r.eachNode(function(i){var a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||=n(i,e,r.root.height),N(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}var aX=Math.PI/180,oX=Qc(YY,sX);function sX(e,t){e.eachSeriesByType(YY,function(e){var n=e.get(`center`),r=e.get(`radius`);R(r)||(r=[0,r]),R(n)||(n=[n,n]);var i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=J(n[0],i),c=J(n[1],a),l=J(r[0],o/2),u=J(r[1],o/2),d=-e.get(`startAngle`)*aX,f=e.get(`minAngle`)*aX,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&cX(m,g);var _=0;F(m.children,function(e){!isNaN(e.getValue())&&_++});var v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(t){var r=n;if(t!==p){var i=t.getValue(),a=v===0&&w?y:i*y;ar[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){var i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:L(xX,e)}}}function CX(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function wX(e){var t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}var TX={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},EX=Pe(TX);je(io,function(e,t){return e[t]=1,e},{}),io.join(`, `);var DX=[``,`style`,`shape`,`extra`],OX=xc();function kX(e,t,n,r,i){var a=e+`Animation`,o=km(e,r,i)||{},s=OX(t).userDuring;return o.duration>0&&(o.during=s?L(zX,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),N(o,n[a]),o}function AX(e,t,n,r){r||={};var i=r.dataIndex,a=r.isInit,o=r.clearStyle,s=n.isAnimationEnabled(),c=OX(e),l=t.style;c.userDuring=t.during;var u={},d={};if(UX(e,t,d),e.type===`compound`)for(var f=e.shape.paths,p=t.shape.paths,m=0;m0&&e.animateFrom(g,_)}else FX(e,t,i||0,n,u);jX(e,t),l?e.dirty():e.markRedraw()}function jX(e,t){for(var n=OX(e).leaveToProps,r=0;r0&&e.animateFrom(i,a)}}function IX(e,t){W(t,`silent`)&&(e.silent=t.silent),W(t,`ignore`)&&(e.ignore=t.ignore),e instanceof Xl&&W(t,`invisible`)&&(e.invisible=t.invisible),e instanceof id&&W(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}var LX={},RX={setTransform:function(e,t){return LX.el[e]=t,this},getTransform:function(e){return LX.el[e]},setShape:function(e,t){var n=LX.el,r=n.shape||={};return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape:function(e){var t=LX.el.shape;if(t)return t[e]},setStyle:function(e,t){var n=LX.el,r=n.style;return r&&(r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle:function(e){var t=LX.el.style;if(t)return t[e]},setExtra:function(e,t){var n=LX.el.extra||(LX.el.extra={});return n[e]=t,this},getExtra:function(e){var t=LX.el.extra;if(t)return t[e]}};function zX(){var e=this,t=e.el;if(t){var n=OX(t).userDuring,r=e.userDuring;if(n!==r){e.el=e.userDuring=null;return}LX.el=t,r(RX)}}function BX(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]={}),NX(c))N(o,a);else for(var l=$s(c),u=0;u=0){!o&&(o=r[e]={});for(var p=Pe(a),u=0;u=0)){var f=e.getAnimationStyleProps(),p=f?f.style:null;if(p){!a&&(a=r.style={});for(var m=Pe(n),l=0;l=0?t.getStore().get(i,n):void 0}var a=t.get(r.name,n),o=r&&r.ordinalMeta;return o?o.categories[a]:a}function C(n,r){r??=u;var i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=y(r,ZX).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);var c={inheritColor:B(a)?a:Z.color.neutral99},l=b(r,ZX),d=Lh(l,null,c,!1,!0);d.text=l.getShallow(`show`)?H(e.getFormattedLabel(r,ZX),WM(t,r)):null;var f=Rh(l,c,!1);return E(n,s),s=EN(s,d,f),n&&T(s,n),s.legacy=!0,s}function w(n,r){r??=u;var i=y(r,XX).getItemStyle(),a=b(r,XX),o=Lh(a,null,null,!0,!0);o.text=a.getShallow(`show`)?qe(e.getFormattedLabel(r,XX),e.getFormattedLabel(r,ZX),WM(t,r)):null;var s=Rh(a,null,!0);return E(n,i),i=EN(i,o,s),n&&T(i,n),i.legacy=!0,i}function T(e,t){for(var n in t)W(t,n)&&(e[n]=t[n])}function E(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function D(e,n){if(n??=u,W(dX,e)){var r=t.getItemVisual(n,`style`);return r?r[dX[e]]:null}if(W(fX,e))return t.getItemVisual(n,e)}function O(e){if(o.type===`cartesian2d`)return dF(P({axis:o.getBaseAxis()},e))}function k(){return n.getCurrentSeriesIndices()}function A(e){return Gh(e,n)}}function _Z(e){var t={};return F(e.dimensions,function(n){var r=e.getDimensionInfo(n);if(!r.isExtraCoord){var i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function vZ(e,t,n,r,i,a,o){if(!r){a.remove(t);return}var s=yZ(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&Jf(s,r.focus,r.blurScope,r.emphasisDisabled),s}function yZ(e,t,n,r,i,a){var o=-1,s=t;t&&bZ(t,r,i)&&(o=De(a.childrenRef(),t),t=null);var c=!t,l=t;l?l.clearStates():(l=dZ(r),s&&lZ(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&=!1,r.tooltipDisabled&&(l.tooltipDisabled=!0),aZ.normal.cfg=aZ.normal.conOpt=aZ.emphasis.cfg=aZ.emphasis.conOpt=aZ.blur.cfg=aZ.blur.conOpt=aZ.select.cfg=aZ.select.conOpt=null,aZ.isLegacy=!1,SZ(l,n,r,i,c,aZ),xZ(l,n,r,i,c),fZ(e,l,n,r,aZ,i,c),W(r,`info`)&&(pX(l).info=r.info);for(var u=0;u=0?a.replaceAt(l,o):a.add(l),l}function bZ(e,t,n){var r=pX(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&NZ(a)&&MZ(a)!==r.customPathData||i===`image`&&W(o,`image`)&&o.image!==r.customImagePath}function xZ(e,t,n,r,i){var a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){var o=e.getClipPath();o&&bZ(o,a,r)&&(o=null),o||(o=dZ(a),e.setClipPath(o)),fZ(null,o,t,a,null,r,i)}}function SZ(e,t,n,r,i,a){if(!(e.isGroup||e.type===`compoundPath`)){CZ(n,null,a),CZ(n,XX,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){var u=e.getTextContent();if(o===!1)u&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},u?u.clearStates():(u=dZ(o),e.setTextContent(u)),fZ(null,u,t,o,null,r,i);for(var d=o&&o.style,f=0;f=u;p--)DZ(t,t.childAt(p),i)}}function DZ(e,t,n){t&&MX(t,pX(e).option,n)}function OZ(e){new FT(e.oldChildren,e.newChildren,kZ,kZ,e).add(AZ).update(AZ).remove(jZ).execute()}function kZ(e,t){return(e&&e.name)??iZ+t}function AZ(e,t){var n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];yZ(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function jZ(e){var t=this.context,n=t.oldChildren[e];n&&MX(n,pX(n).option,t.seriesModel)}function MZ(e){return e&&(e.pathData||e.d)}function NZ(e){return e&&(W(e,`pathData`)||W(e,`d`))}function PZ(e){e.registerChartView(uZ),e.registerSeriesModel(mX)}var FZ=xc(),IZ=M,LZ=L,RZ=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!r&&this._lastValue===i&&this._lastStatus===a)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new q,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=Ie(zZ,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UZ(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&&Mk(r).w>o)return!0;if(a){var s=pL(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=FZ(e).pointerEl=new zm[i.type](IZ(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FZ(e).labelEl=new Cd(IZ(t.label));e.add(i),VZ(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FZ(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=FZ(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VZ(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=lh(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){dn(e.event)},onmousedown:LZ(this._onHandleDragMove,this,0,0),drift:LZ(this._onHandleDragMove,this),ondragend:LZ(this._onHandleDragEnd,this)}),n.add(r)),UZ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);R(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Nx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zZ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HZ(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(HZ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HZ(r)),FZ(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),Px(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zZ(e,t,n,r){BZ(FZ(n).lastProp,r)||(FZ(n).lastProp=r,t?jm(n,r,e):(n.stopAnimation(),n.attr(r)))}function BZ(e,t){if(V(e)&&V(t)){var n=!0;return F(t,function(t,r){n&&=BZ(e[r],t)}),!!n}else return e===t}function VZ(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HZ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UZ(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 WZ(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 GZ(e,t,n,r,i){var a=qZ(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=h_(o.get(`padding`)||0),c=o.getFont(),l=ho(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),KZ(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:Lh(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KZ(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 qZ(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:MD(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};F(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):z(o)&&(a=o(s))}return a}function JZ(e,t,n){var r=vn();return Cn(r,r,n.rotation),Sn(r,r,n.position),nh([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YZ(e,t,n,r,i,a){var o=xP.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GZ(t,r,i,a,{position:JZ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XZ(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZZ(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QZ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function $Z(e,t,n){return Mk(e,{fromStat:{sers:I(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function eQ(e,t,n){return[rs(ns(t[0],t[1]),e-n/2),ns(e+n/2,rs(t[0],t[1]))]}var tQ=function(e){D(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=nQ(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WZ(r),f=rQ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YZ(t,e,HP(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=HP(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(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=nQ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ns(o[1],l[c]),l[c]=rs(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}(RZ);function nQ(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var rQ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],iQ(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],iQ(e))}}};function iQ(e){return e.dim===`x`?0:1}var aQ=function(e){D(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}(tv),oQ=xc(),sQ=F;function cQ(e,t,n){if(!k.node){var r=t.getZr();oQ(r).records||(oQ(r).records={}),lQ(r,t);var i=oQ(r).records[e]||(oQ(r).records[e]={});i.handler=n}}function lQ(e,t){if(oQ(e).initialized)return;oQ(e).initialized=!0,n(`click`,Ie(fQ,`click`)),n(`mousemove`,Ie(fQ,`mousemove`)),n(`mousewheel`,Ie(fQ,`mousewheel`)),n(`globalout`,dQ);function n(n,r){e.on(n,function(n){var i=pQ(t);sQ(oQ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),uQ(i.pendings,t)})}}function uQ(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 dQ(e,t,n){e.handler(`leave`,null,n)}function fQ(e,t,n,r){t.handler(e,n,r)}function pQ(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 mQ(e,t){if(!k.node){var n=t.getZr();(oQ(n).records||{})[e]&&(oQ(n).records[e]=null)}}var hQ=function(e){D(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`;cQ(`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){mQ(`axisPointer`,t)},t.prototype.dispose=function(e,t){mQ(`axisPointer`,t)},t.type=`axisPointer`,t}(vx);function gQ(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bc(a,e);if(o==null||o<0||R(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(I(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var _Q=xc();function vQ(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||L(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){OQ(i)&&(i=gQ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=OQ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||OQ(i),f={},p={},m={list:[],map:{}},h={showPointer:Ie(xQ,p),showTooltip:Ie(SQ,m)};F(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);F(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=EQ(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&yQ(e,o,h,!1,f)}})});var g={};return F(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&F(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,DQ(t),DQ(e)))),g[e.key]=a}})}),F(g,function(e,t){yQ(u[t],e,h,!0,f)}),CQ(p,u,f),wQ(m,i,e,o),TQ(u,o,n),f}}function yQ(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=bQ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&N(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function bQ(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return F(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(Us(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),F(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function xQ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function SQ(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=gL(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 CQ(e,t,n){var r=n.axesInfo=[];F(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 wQ(e,t,n,r){if(OQ(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function TQ(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=_Q(r)[i]||{},o=_Q(r)[i]={};F(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&F(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}F(a,function(e,t){!o[t]&&c.push(l(e))}),F(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 EQ(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 DQ(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 OQ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function kQ(e){vL.registerAxisPointerClass(`CartesianAxisPointer`,tQ),e.registerComponentModel(aQ),e.registerComponentView(hQ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!R(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=oL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},vQ)}function AQ(e){MT(kL),MT(kQ)}var jQ=function(e){D(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;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);var o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){var d=WZ(r),f=NQ[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}GZ(e,n,r,i,MQ(t,n,r,o,r.get([`label`,`margin`])))},t}(RZ);function MQ(e,t,n,r,i){var a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){var f=vn();Cn(f,f,s),Sn(f,f,[r.cx,r.cy]),l=nh([o,-i],f);var p=t.getModel(`axisLabel`).get(`rotate`)||0,m=xP.innerTextLayout(s,p*Math.PI/180,-1);u=m.textAlign,d=m.textVerticalAlign}else{var h=c[1];l=r.coordToPoint([h+i,o]);var g=r.cx,_=r.cy;u=Math.abs(l[0]-g)/h<.3?`center`:l[0]>g?`left`:`right`,d=Math.abs(l[1]-_)/h<.3?`middle`:l[1]>_?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}var NQ={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:XZ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){var s=Math.PI/180,c=$Z(e,a,o),l;if(e.dim===`angle`)l=QZ(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{var u=eQ(n,r,c),d=u[0],f=u[1];l=QZ(t.cx,t.cy,d,f,0,Math.PI*2)}return{type:`Sector`,shape:l}}},PQ=`polar`,FQ=PQ,IQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.findAxisModel=function(e){var t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t},t.type=PQ,t.dependencies=[`radiusAxis`,`angleAxis`],t.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`},t}(tv),LQ=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`polar`,Tc).models[0]},t.type=`polarAxis`,t}(tv);ke(LQ,UD);var RQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`angleAxis`,t}(LQ),zQ=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`radiusAxis`,t}(LQ),BQ=function(e){D(t,e);function t(t,n){return e.call(this,`radius`,t,n)||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t}(Ik);BQ.prototype.dataToRadius=Ik.prototype.dataToCoord,BQ.prototype.radiusToData=Ik.prototype.coordToData;var VQ=xc(),HQ=function(e){D(t,e);function t(t,n){return e.call(this,`angle`,t,n||[0,360])||this}return t.prototype.pointToData=function(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;var a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=ho(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),d=VQ(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u},t}(Ik);HQ.prototype.dataToAngle=Ik.prototype.dataToCoord,HQ.prototype.angleToData=Ik.prototype.coordToData;var UQ=[`radius`,`angle`],WQ=function(){function e(e){this.dimensions=UQ,this.type=PQ,this.cx=0,this.cy=0,this._radiusAxis=new BQ,this._angleAxis=new HQ,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}return e.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},e.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},e.prototype.getAxis=function(e){var t=`_`+e+`Axis`;return this[t]},e.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},e.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t},e.prototype.getAngleAxis=function(){return this._angleAxis},e.prototype.getRadiusAxis=function(){return this._radiusAxis},e.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},e.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()},e.prototype.getTooltipAxes=function(e){var t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},e.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n},e.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var c=Math.atan2(-n,t)/Math.PI*180,l=co;)c+=l*360;return[s,c]},e.prototype.coordToPoint=function(e,t){t||=[];var n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t},e.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}},e.prototype.convertToPixel=function(e,t,n){return GQ(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return GQ(t)===this?this.pointToData(n):null},e}();function GQ(e){var t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function KQ(e,t,n){var r=t.get(`center`),i=q_(t,n).refContainer;e.cx=J(r[0],i.width)+i.x,e.cy=J(r[1],i.height)+i.y;var a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:R(s)||(s=[0,s]);var c=[J(s[0],o),J(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function qQ(e,t){var n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(bO(r,1),bO(i,1),MO(r),MO(i),r.type===`category`&&!r.onBand){var a=r.getExtent(),o=360/r.scale.count();r.inverse?a[1]+=o:a[1]-=o,r.setExtent(a[0],a[1])}}function JQ(e){return e.mainType===`angleAxis`}function YQ(e,t){if(e.type=ED(t),e.scale=DD(t,e.type,!1),e.onBand=HD(e.scale,t),e.inverse=t.get(`inverse`),JQ(t)){e.inverse=e.inverse!==t.get(`clockwise`);var n=t.get(`startAngle`),r=t.get(`endAngle`)??n+(e.inverse?-360:360);e.setExtent(n,r)}t.axis=e,e.model=t}var XQ={dimensions:UQ,create:function(e,t){var n=[];return e.eachComponent(FQ,function(e,r){var i=new WQ(r+``);i.update=qQ;var a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);YQ(a,s),YQ(o,c),KQ(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){var t=e.coordinateSystem=e.getReferringComponents(FQ,Tc).models[0].coordinateSystem;t&&(sO(t.getRadiusAxis(),e,PQ),sO(t.getAngleAxis(),e,PQ))}}),n}},ZQ=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function QQ(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function $Q(e){return+!e.getRadiusAxis().inverse}function e$(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var t$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`PolarAxisPointer`,n}return t.prototype.render=function(e,t){if(this.group.removeAll(),e.get(`show`)){var n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];F(n.getViewLabels(),function(e){if(!e.tick.offInterval){e=M(e);var t=n.scale;e.coord=n.dataToCoord(VD(t,e.tick)),s.push(e)}}),e$(s),e$(a),F(ZQ,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&n$[t](this.group,e,r,a,o,i,s)},this)}},t.type=`angleAxis`,t}(vL),n$={axisLine:function(e,t,n,r,i,a){var o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=$Q(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new zm[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new Zp({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick:function(e,t,n,r,i,a){var o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[$Q(n)],l=I(r,function(e){return new om({shape:QQ(n,[c,c+s],e.coord)})});e.add(Xm(l,{style:P(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick:function(e,t,n,r,i,a){if(i.length){for(var o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[$Q(n)],u=[],d=0;dm?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){var v=s[d];V(v)&&v.textStyle&&(o=new og(v.textStyle,c,c.ecModel))}var y=new Cd({silent:xP.isLabelSilent(t),style:Lh(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(y),_h({el:y,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:function(){return y.isTruncated},value:r.rawLabel,tickIndex:i}}),u){var b=xP.makeAxisEventDataBase(t);b.targetType=`axisLabel`,b.value=r.rawLabel,Y(y).eventData=b}},this)},splitLine:function(e,t,n,r,i,a){var o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];for(var l=[],u=0;u=0?`p`:`n`,T=y;_&&(r[a][C]||(r[a][C]={p:y,n:y}),T=r[a][C][w]);var E=void 0,D=void 0,O=void 0,k=void 0;if(u.dim===`radius`){var A=u.dataToCoord(S)-y,j=e.dataToCoord(C);is(A)=k})}}function f$(e,t){var n=$P(t,PQ),r=Mk(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};$D(e,n,function(e){var t=c$(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};var n=J(e.get(`barWidth`),r),l=J(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=ns(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});var l={},u=J(o,r),d=J(s,1),f=(i-u)/(a+(a-1)*d);f=rs(f,0),F(c,function(e,t){var n=e.maxWidth;n&&n=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},e.prototype.pointToData=function(e,t,n){n||=[];var r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n},e.prototype.dataToPoint=function(e,t,n){var r=this.getAxis(),i=this.getRect();n||=[];var a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n},e.prototype.convertToPixel=function(e,t,n){return T$(t)===this?this.dataToPoint(n):null},e.prototype.convertFromPixel=function(e,t,n){return T$(t)===this?this.pointToData(n):null},e}();function T$(e){var t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function E$(e,t){var n=[];return e.eachComponent(jL,function(r,i){var a=new w$(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){var t=e.getReferringComponents(jL,Tc).models[0],n=e.coordinateSystem=t&&t.coordinateSystem;n&&sO(n.getAxis(),e,AL)}}),n}var D$={create:E$,dimensions:C$},O$=[`x`,`y`],k$=[`width`,`height`],A$=function(e){D(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.coordinateSystem,s=M$(a),c=N$(o,s),l=N$(o,1-s),u=o.dataToPoint(t)[0],d=r.get(`type`);if(d&&d!==`none`){var f=WZ(r),p=j$[d](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);p.style=f,e.graphicKey=p.type,e.pointer=p}YZ(t,e,v$(n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=v$(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JZ(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.coordinateSystem,o=M$(i),s=N$(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);var l=N$(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}},t}(RZ),j$={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XZ([t,r[0]],[t,r[1]],M$(e))}},shadow:function(e,t,n,r,i,a){var o=$Z(e,i,a),s=r[1]-r[0],c=eQ(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZZ([l,r[0]],[u-l,s],M$(e))}}};function M$(e){return+!e.isHorizontal()}function N$(e,t){var n=e.getRect();return[n[O$[t]],n[O$[t]]+n[k$[t]]]}var P$=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`single`,t}(vx);function F$(e){MT(kQ),vL.registerAxisPointerClass(`SingleAxisPointer`,A$),e.registerComponentView(P$),e.registerComponentView(b$),e.registerComponentModel(ML),II(e,`single`,ML,ML.defaultOption),e.registerCoordinateSystem(`single`,D$)}var I$=function(e){D(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=Q_(t);e.prototype.init.apply(this,arguments),L$(t,i)},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),L$(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}(tv);function L$(e,t){var n=e.cellSize,r=R(n)?n:e.cellSize=[n,n];r.length===1&&(r[1]=r[0]),Z_(e,t,{type:`box`,ignoreSize:I([0,1],function(e){return Y_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var R$=function(e){D(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 vd({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 rm({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 B(e)&&e?b_(e,t):z(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 Cd({z2:30,style:Lh(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||B(a))&&(a&&(t=Sg(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=i.start.time&&r.timeo.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/z$)-Math.floor(t[0].time/z$)+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&&tr.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){P_({targetModel:t,coordSysType:`calendar`,coordSysProvider:F_})}),r},e.dimensions=[`time`,`value`],e}();function V$(e){var t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function H$(e){e.registerComponentModel(I$),e.registerComponentView(R$),e.registerCoordinateSystem(`calendar`,B$)}var U$={level:1,leaf:2,nonLeaf:3},W$={none:0,all:1,body:2,corner:3};function G$(e,t,n){var r=t[X[n]].getCell(e);return!r&&Re(e)&&e<0&&(r=t[X[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function K$(e){var t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function q$(e,t,n,r,i){J$(e[0],t,i,n,r,0),J$(e[1],t,i,n,r,1)}function J$(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;var o=r[a],s=R(o)?o:[o],c=s.length,l=!!n;if(c>=1?(Y$(e,t,s,l,i,a,0),c>1&&Y$(e,t,s,l,i,a,c-1)):e[0]=e[1]=NaN,l){var u=-i[X[1-a]].getLocatorCount(a),d=i[X[a]].getLocatorCount(a)-1;n===W$.body?u=rs(0,u):n===W$.corner&&(d=ns(-1,d)),d=t[0]&&e[0]<=t[1]}function t1(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function n1(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function r1(e,t,n,r){var i=G$(t[r][0],n,r),a=G$(t[r][1],n,r);e[X[r]]=e[Vm[r]]=NaN,i&&a&&(e[X[r]]=i.xy,e[Vm[r]]=a.xy+a.wh-i.xy)}function i1(e,t,n,r){return e[X[t]]=n,e[X[1-t]]=r,e}function a1(e){return e&&(e.type===U$.leaf||e.type===U$.nonLeaf)?e:null}function o1(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var s1=function(){function e(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=c1(e);var n=t.get(`data`,!0),r=t.get(`length`,!0);if(n!=null&&!R(n)&&(n=[]),n)this._initByDimModelData(n);else if(r!=null){n=Array(r);for(var i=0;i=1,y=n[X[r]],b=a.getLocatorCount(r)-1,x=new Pc;for(o.resetLayoutIterator(x,r);x.next();)S(x.item);for(a.resetLayoutIterator(x,r);x.next();)S(x.item);function S(e){Ge(e.wh)&&(e.wh=_),e.xy=y,e.id[X[r]]===b&&!v&&(e.wh=n[X[r]]+n[Vm[r]]-e.xy),y+=e.wh}}function R1(e,t){for(var n=t[X[e]].resetCellIterator();n.next();){var r=n.item;B1(r.rect,e,r.id,r.span,t),B1(r.rect,1-e,r.id,r.span,t),r.type===U$.nonLeaf&&(r.xy=r.rect[X[e]],r.wh=r.rect[Vm[e]])}}function z1(e,t){e.travelExistingCells(function(e){var n=e.span;if(n){var r=e.spanRect,i=e.id;B1(r,0,i,n,t),B1(r,1,i,n,t)}})}function B1(e,t,n,r,i){e[Vm[t]]=0;var a=n[X[t]]<0?i[X[1-t]]:i[X[t]],o=a.getUnitLayoutInfo(t,n[X[t]]);if(e[X[t]]=o.xy,e[Vm[t]]=o.wh,r[X[t]]>1){var s=a.getUnitLayoutInfo(t,n[X[t]]+r[X[t]]-1);e[Vm[t]]=s.xy+s.wh-o.xy}}function V1(e,t,n){return H1(hs(e,n[Vm[t]]),n[Vm[t]])}function H1(e,t){return Math.max(Math.min(e,H(t,1/0)),0)}function U1(e){var t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}var W1={inBody:1,inCorner:2,outside:3},G1={x:null,y:null,point:[]};function K1(e,t,n,r,i){var a=n[X[t]],o=n[X[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[X[t]]=W1.outside;return}if(i===W$.body){c?(e[X[t]]=W1.inBody,d=ns(s.xy+s.wh,rs(c.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}else if(i===W$.corner){u?(e[X[t]]=W1.inCorner,d=ns(u.xy+u.wh,rs(l.xy,d)),e.point[t]=d):e[X[t]]=W1.outside;return}var f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(dm){if(!i){e[X[t]]=W1.outside;return}d=m}e.point[t]=d,e[X[t]]=f<=d&&d<=m?W1.inBody:p<=d&&d<=f?W1.inCorner:W1.outside}function q1(e,t,n,r){var i=1-n;if(e[X[n]]!==W1.outside)for(r[X[n]].resetCellIterator(I1);I1.next();){var a=I1.item;if(X1(e.point[n],a.rect,n)&&X1(e.point[i],a.rect,i)){t[n]=a.ordinal,t[i]=a.id[X[i]];return}}}function J1(e,t,n,r){if(e[X[n]]!==W1.outside){for((e[X[n]]===W1.inCorner?r[X[1-n]]:r[X[n]]).resetLayoutIterator(F1,n);F1.next();)if(Y1(e.point[n],F1.item)){t[n]=F1.item.id[X[n]];return}}}function Y1(e,t){return t.xy<=e&&e<=t.xy+t.wh}function X1(e,t,n){return t[X[n]]<=e&&e<=t[X[n]]+t[Vm[n]]}function Z1(e){e.registerComponentModel(g1),e.registerComponentView(C1),e.registerCoordinateSystem(`matrix`,N1)}function Q1(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 $1(e,t){var n;return F(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function e0(e,t,n){var r=N({},n),i=e[t],a=n.$action||`merge`;a===`merge`?i?(Ce(i,r,!0),Z_(i,r,{ignoreSize:!0}),$_(n,i),r0(n,i),r0(n,i,`shape`),r0(n,i,`style`),r0(n,i,`extra`),n.clipPath=i.clipPath):e[t]=r:a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}var t0=[`transition`,`enterFrom`,`leaveTo`],n0=t0.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function r0(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!(!e||!t))for(var r=n?t0:n0,i=0;i=0;c--){var l=n[c],u=pc(l.id,null),d=u==null?null:i.get(u);if(d){var f=d.parent,h=s0(f),g=f===r?{width:a,height:o}:{width:h.width,height:h.height},_={},v=J_(d,l,g,null,{hv:l.hv,boundingMode:l.bounding},_);if(!s0(d).isNew&&v){for(var y=l.transition,b={},x=0;x=0)?b[S]=C:d[S]=C}jm(d,b,e,0)}else d.attr(_)}}},t.prototype._clear=function(){var e=this,t=this._elMap;t.each(function(n){d0(n,s0(n).option,t,e._lastGraphicModel)}),this._elMap=U()},t.prototype.dispose=function(){this._clear()},t.type=`graphic`,t}(vx);function l0(e){var t=new(W(o0,e)?o0[e]:Km(e))({});return s0(t).type=e,t}function u0(e,t,n,r){var i=l0(n);return t.add(i),r.set(e,i),s0(i).id=e,s0(i).isNew=!0,i}function d0(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){d0(e,t,n,r)}),MX(e,t,r),n.removeKey(s0(e).id))}function f0(e,t,n,r){e.isGroup||F([[`cursor`,Xl.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],function(n){var r=n[0];W(t,r)?e[r]=H(t[r],n[1]):e[r]??(e[r]=n[1])}),F(Pe(t),function(n){if(n.indexOf(`on`)===0){var r=t[n];e[n]=z(r)?r:null}}),W(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function p0(e){return e=N({},e),F([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(L_),function(t){delete e[t]}),e}function m0(e,t,n){var r=Y(e).eventData;!e.silent&&!e.ignore&&!r&&(r=Y(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function h0(e){e.registerComponentModel(a0),e.registerComponentView(c0),e.registerPreprocessor(function(e){var t=e.graphic;R(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var g0=[`x`,`y`,`radius`,`angle`,`single`],_0=xc(),v0=[`cartesian2d`,`polar`,`singleAxis`];function y0(e){return De(v0,e.get(`coordinateSystem`))>=0}function b0(e){return e+`Axis`}function x0(e,t){var n=U(),r=[],i=U();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 S0(e){var t=e.ecModel,n={infoList:[],infoMap:U()};return e.eachTargetAxis(function(e,r){var i=t.getComponent(b0(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 C0(e){var t=_0(NS(e));return t.axisProxyMap||=U()}function w0(e){if(e)return C0(e.ecModel).get(e.uid)}function T0(e,t){C0(e.ecModel).set(e.uid,t)}function E0(e,t){var n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?w0(n.model):null}var D0=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}(),O0=function(e){D(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=k0(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)},t.prototype.mergeOption=function(e){var t=k0(e);Ce(this.option,e,!0),Ce(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;F([[`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=U();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 F(g0,function(n){var r=this.getReferringComponents(b0(n),Ec);if(r.specified){t=!0;var i=new D0;F(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 D0;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){var o=i.getReferringComponents(`grid`,Tc).models[0];o&&F(t,function(e){i.componentIndex!==e.componentIndex&&o===e.getReferringComponents(`grid`,Tc).models[0]&&a.add(e.componentIndex)})}}}r&&F(g0,function(t){if(r){var i=n.findComponents({mainType:b0(t),filter:function(e){return e.get(`type`,!0)===`category`}});if(i[0]){var a=new D0;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`);F([[`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(b0(t),n)},this),e},t.prototype.eachTargetAxis=function(e,t){this._targetAxisInfoMap.each(function(n,r){F(n.indexList,function(n){e.call(t,r,n)})})},t.prototype.getAxisProxy=function(e,t){return w0(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(b0(e),t)},t.prototype.setRawRange=function(e){var t=this.option,n=this.settledOption;F([[`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;F([`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 w0(e);for(var t,n=this._targetAxisInfoMap.keys(),r=0;ra[1];if(u&&!d&&!f)return!0;u&&(i=!0),d&&(t=!0),f&&(n=!0)}return i&&t&&n})}else F(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)}});F(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;F([`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=ps(i,[0,100],n,!0)-n[0]):i=ps(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)},e}(),P0={dirtyOnOverallProgress:!0,getTargetSeries:function(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(b0(r),i),n)})})}var n=[];t(function(t,r,i,a){if(!w0(i)){var o=new N0(t,r,a,e);n.push(o),T0(i,o)}});var r=U();return F(n,function(e){F(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=E0(e,i);a?n.push([i,a]):i.reset(e,null)}),F(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]})}})}};function F0(e){e.registerAction(`dataZoom`,function(e,t){F(x0(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var I0=Gc();function L0(e){I0(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,P0),F0(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function R0(e){e.registerComponentModel(A0),e.registerComponentView(M0),L0(e)}var z0=function(){function e(){}return e}(),B0={};function V0(e,t){B0[e]=t}function H0(e){return B0[e]}var U0=function(e){D(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=r.getTheme().get(`toolbox`),a=i?i.feature:null;a&&(this._themeFeatureOption=N({},a),i.feature={}),e.prototype.init.call(this,t,n,r),a&&(i.feature=a)},t.prototype.optionUpdated=function(){F(this.option.feature,function(e,t){var n=this._themeFeatureOption,r=H0(t);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&(Ce(e,n[t]),n[t]=null),Ce(e,r.defaultOption))},this)},t.type=`toolbox`,t.layoutMode={type:`box`,ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Z.color.border,borderRadius:0,borderWidth:0,padding:Z.size.m,itemSize:15,itemGap:Z.size.s,showTitle:!0,iconStyle:{borderColor:Z.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Z.color.accent70}},tooltip:{show:!1,position:`bottom`}},t}(tv);function W0(e,t){var n=h_(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new vd({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var G0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){var i=this.group;if(i.removeAll(),!e.get(`show`))return;var a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||=U(),l=[];F(s,function(e,t){l.push(t)}),new FT(this._featureNames||[],l).add(u).update(u).remove(Ie(u,null)).execute(),this._featureNames=Me(l,function(e){return c.hasKey(e)});function u(i,a){var o=i!=null&&a==null,u=i!=null&&a!=null,f=i==null,p=o||u?l[i]:l[a],m=s[p],h=o||u?new og(m,e,t):null,g=h&&h.get(`show`),_;if(o){if(!g)return;if(K0(p))_={onclick:h.option.onclick,featureName:p};else{var v=H0(p);if(!v)return;_=new v}c.set(p,_)}else _=c.get(p);if(f||!g){q0(_)&&_.dispose&&_.dispose(t,n),c.removeKey(p);return}r&&r.newTitle!=null&&r.featureName===p&&(m.title=r.newTitle),o&&(_.uid=cg(`toolbox-feature`)),_.model=h,_.ecModel=t,_.api=n,d(h,_,p),h.setIconStatus=function(e,t){var n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?kf:Af)(r[e])},q0(_)&&_.render&&_.render(h,t,n,r)}function d(r,s,c){var l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof z0&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;B(d)?(p={},p[c]=d):p=d,B(f)?(m={},m[c]=f):m=f;var h=r.iconPaths={};F(p,function(c,d){var f=lh(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());var p=f.ensureState(`emphasis`);p.style=u.getItemStyle();var g=new Cd({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:Gh({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),_h({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){var t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Z.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?kf:Af)(f),i.add(f),f.on(`click`,L(s.onclick,s,t,n,d)),h[d]=f})}var f=q_(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=W_(p,f,m);B_(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),J_(i,p,f,m),i.add(W0(i.getBoundingRect(),e)),o||i.eachChild(function(e){var t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||={},s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!z(c)&&t){var l=c.style||={},u=ho(t,Cd.makeFont(l)),d=e.x+i.x,f=e.y+i.y+a,p=!1;f+u.height>n.getHeight()&&(o.position=`top`,p=!0);var m=p?-5-u.height:a+10;d+u.width/2>n.getWidth()?(o.position=[`100%`,m],l.align=`right`):d-u.width/2<0&&(o.position=[0,m],l.align=`left`)}})},t.prototype.updateView=function(e,t,n,r){F(this._features,function(e){e&&e instanceof z0&&e.updateView&&e.updateView(e.model,t,n,r)})},t.prototype.dispose=function(e,t){F(this._features,function(n){n&&n instanceof z0&&n.dispose&&n.dispose(e,t)})},t.type=`toolbox`,t}(vx);function K0(e){return e.indexOf(`my`)===0}function q0(e){return e instanceof z0}var J0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){var n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`echarts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Z.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),s=k.browser;if(typeof MouseEvent==`function`&&(s.newEdge||!s.ie&&!s.edge)){var c=document.createElement(`a`);c.download=r+`.`+a,c.target=`_blank`,c.href=o;var l=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(l)}else if(window.navigator.msSaveOrOpenBlob||i){var u=o.split(`,`),d=u[0].indexOf(`base64`)>-1,f=i?decodeURIComponent(u[1]):u[1];d&&(f=window.atob(f));var p=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){for(var m=f.length,h=new Uint8Array(m);m--;)h[m]=f.charCodeAt(m);var g=new Blob([h]);window.navigator.msSaveOrOpenBlob(g,p)}else{var _=document.createElement(`iframe`);document.body.appendChild(_);var v=_.contentWindow,y=v.document;y.open(`image/svg+xml`,`replace`),y.write(f),y.close(),v.focus(),y.execCommand(`SaveAs`,!0,p),document.body.removeChild(_)}}else{var b=n.get(`lang`),x=``,S=window.open();S.document.write(x),S.document.title=r}},t.getDefaultOption=function(e){return{show:!0,icon:`M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0`,title:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`title`]),type:`png`,connectedBackgroundColor:Z.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}},t}(z0),Y0=`__ec_magicType_stack__`,X0=[[`line`,`bar`],[`stack`]],Z0=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`),n={};return F(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n},t.getDefaultOption=function(e){return{show:!0,type:[],icon:{line:`M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4`,bar:`M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7`,stack:`M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z`},title:e.getLocaleModel().get([`toolbox`,`magicType`,`title`]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,t,n){var r=this.model,i=r.get([`seriesIndex`,n]);if(Q0[n]){var a={series:[]};F(X0,function(e){De(e,n)>=0&&F(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){var t=e.subType,i=e.id,o=Q0[n](t,i,e,r);o&&(P(o,e.option),a.series.push(o));var s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){var c=s.getAxesByScale(`ordinal`)[0];if(c){var l=c.dim+`Axis`,u=e.getReferringComponents(l,Tc).models[0].componentIndex;a[l]=a[l]||[];for(var d=0;d<=u;d++)a[l][u]=a[l][u]||{};a[l][u].boundaryGap=n===`bar`}}});var o,s=n;n===`stack`&&(o=Ce({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}},t}(z0),Q0={line:function(e,t,n,r){if(e===`bar`)return Ce({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return Ce({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){var i=n.get(`stack`)===Y0;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),Ce({id:t,stack:i?``:Y0},r.get([`option`,`stack`])||{},!0)}};hT({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});var $0=Array(60).join(`-`),e2=` `;function t2(e){var t={},n=[],r=[];return e.eachRawSeries(function(e){var i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){var a=i.getBaseAxis();if(a.type===`category`){var o=qP(a);t[o]||(t[o]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function n2(e){var t=[];return F(e,function(e,n){var r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(I(e.series,function(e){return e.name})),o=[r.model.getCategories()];F(e.series,function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});for(var s=[a.join(e2)],c=0;c=0)return!0}var s2=RegExp(`[`+e2+`]+`,`g`);function c2(e){for(var t=e.split(/\n+/g),n=a2(t.shift()).split(s2),r=[],i=I(n,function(e){return{name:e,data:[]}}),a=0;a=0&&!n[i][r];i--);if(i<0){var a=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(a){var o=a.getPercentRange();n[0][r]={dataZoomId:r,start:o[0],end:o[1]}}}}),n.push(t)}function g2(e){var t=y2(e),n=t[t.length-1];t.length>1&&t.pop();var r={};return p2(n,function(e,n){for(var i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function _2(e){m2(e).snapshots=null}function v2(e){return y2(e).length}function y2(e){var t=m2(e);return t.snapshots||=[{}],t.snapshots}var b2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.onclick=function(e,t){_2(e),t.dispatchAction({type:`restore`,from:this.uid})},t.getDefaultOption=function(e){return{show:!0,icon:`M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5`,title:e.getLocaleModel().get([`toolbox`,`restore`,`title`])}},t}(z0);hT({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});var x2=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`],S2=function(){function e(e,t,n){var r=this;this._targetInfoList=[];var i=w2(t,e);F(T2,function(e,t){(!n||!n.include||De(n.include,t)>=0)&&e(i,r._targetInfoList)})}return e.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||=[]).push(t),!e.coordRange){e.coordRange=t;var r=O2[e.brushType](0,n,t);e.__rangeOffset={offset:A2[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e},e.prototype.matchOutputRanges=function(e,t,n){F(e,function(e){var r=this.findTargetInfo(e,t);r&&r!==!0&&F(r.coordSyses,function(r){n(e,O2[e.brushType](1,r,e.range,!0).values,r,t)})},this)},e.prototype.setInputRanges=function(e,t){F(e,function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;var r=O2[e.brushType](0,n.coordSys,e.coordRange),i=e.__rangeOffset;e.range=i?A2[e.brushType](r.values,i.offset,M2(r.xyMinMax,i.xyMinMax)):r.values}},this)},e.prototype.makePanelOpts=function(e,t){return I(this._targetInfoList,function(n){var r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:JK(r),isTargetByCursor:XK(r,e,n.coordSysModel),getLinearBrushOtherExtent:YK(r)}})},e.prototype.controlSeries=function(e,t,n){var r=this.findTargetInfo(e,n);return r===!0||r&&De(r.coordSyses,t.coordinateSystem)>=0},e.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,r=w2(t,e),i=0;ie[1]&&e.reverse(),e}function w2(e,t){return Cc(e,t,{includeMainTypes:x2})}var T2={grid:function(e,t){var n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=U(),o={},s={};!n&&!r&&!i||(F(n,function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),F(r,function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),F(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){var i=e.coordinateSystem,a=[];F(i.getCartesians(),function(e,t){(De(n,e.getAxis(`x`).model)>=0||De(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:D2.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){F(e.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:D2.geo})})}},E2=[function(e,t){var n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],D2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var e=this.coordSys.view,t=Sz(null,e);return Wn(t,t,bz(null,e)),t}},O2={lineX:Ie(k2,0),lineY:Ie(k2,1),rect:function(e,t,n,r){var i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[C2([i[0],a[0]]),C2([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){var i=[Ic(),Ic()];return{values:I(n,function(n){var a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function k2(e,t,n,r){var i=n.getAxis([`x`,`y`][e]),a=C2(I([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var A2={lineX:Ie(j2,0),lineY:Ie(j2,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return I(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function j2(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function M2(e,t){var n=N2(e),r=N2(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function N2(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var P2=F,F2=gc(`toolbox-dataZoom_`),I2={x:`width`,y:`height`},L2=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n,r){this._brushController||(this._brushController=new dK(n.getZr()),this._brushController.on(`brush`,L(this._onBrush,this)).mount()),V2(e,t,this,r,n),B2(e,t)},t.prototype.onclick=function(e,t,n){R2[n].call(this)},t.prototype.dispose=function(e,t){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var t=e.areas;if(!e.isEnd||!t.length)return;var n={},r=this.ecModel;this._brushController.updateCovers([]),new S2(z2(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type===`cartesian2d`){var r=n.master.getRect().clone(),a=e.brushType;a===`rect`?(i(`x`,n,r,t[0]),i(`y`,n,r,t[1])):i({lineX:`x`,lineY:`y`}[a],n,r,t)}}),h2(r,n),this._dispatchZoomAction(n);function i(e,t,i,o){var s=t.getAxis(e),c=s.model,l=a(e,c,r),u=l.findRepresentativeAxisProxy(c).getMinMaxSpan(),d=s.scale.getExtent();(u.minValueSpan!=null||u.maxValueSpan!=null)&&(o=UG(0,o.slice(),d,0,u.minValueSpan,u.maxValueSpan));var f=ws(d,i[I2[e]],.5);l&&(n[l.id]={dataZoomId:l.id,startValue:isFinite(f)?vs(o[0],f):o[0],endValue:isFinite(f)?vs(o[1],f):o[1]})}function a(e,t,n){var r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}},t.prototype._dispatchZoomAction=function(e){var t=[];P2(e,function(e,n){t.push(M(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})},t.getDefaultOption=function(e){return{show:!0,filterMode:`filter`,icon:{zoom:`M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1`,back:`M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26`},title:e.getLocaleModel().get([`toolbox`,`dataZoom`,`title`]),brushStyle:{borderWidth:0,color:Z.color.backgroundTint}}},t}(z0),R2={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(g2(this.ecModel))}};function z2(e){var t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function B2(e,t){e.setIconStatus(`back`,v2(t)>1?`emphasis`:`normal`)}function V2(e,t,n,r,i){var a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`?r.dataZoomSelectActive:!1),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);var o=new S2(z2(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}xv(`dataZoom`,function(e){var t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;var r=t.getModel(n),i=[],a=Cc(e,z2(r));P2(a.xAxisModels,function(e){return o(e,`xAxis`,`xAxisIndex`)}),P2(a.yAxisModels,function(e){return o(e,`yAxis`,`yAxisIndex`)});function o(e,t,n){var a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:F2+t+a};o[n]=a,i.push(o)}return i});function H2(e){e.registerComponentModel(U0),e.registerComponentView(G0),V0(`saveAsImage`,J0),V0(`magicType`,Z0),V0(`dataView`,d2),V0(`dataZoom`,L2),V0(`restore`,b2),MT(R0)}var U2=function(e){D(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}(tv);function W2(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function G2(e){if(k.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-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`
`}function t4(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?`,`:``)+(k.transformSupported?``+Z2+i:`,left`+i+`,top`+i)),X2+`:`+a}function n4(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!k.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=k.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Z2+`:`+o+`;`:[[`top`,0],[`left`,0],[K2,o]]}function r4(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=H(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),F([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function i4(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=nx(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(t4(a,n,r)),o&&i.push(`background-color:`+o),F([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=m_(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(r4(d)),f!=null&&i.push(`padding:`+h_(f).join(`px `)+`px`),i.join(`;`)+`;`}function a4(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Gt(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var o4=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,k.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&&(B(i)?document.querySelector(i):Ve(i)?i:z(i)&&i(e.getDom()));a4(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;sn(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=Y2(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=Q2+i4(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+n4(i[0],i[1],!0)+(`border-color:`+w_(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!W2(n)&&(o=e4(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,R(e)||(e=[e]);for(var s=0;s=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||k.node||!n.getDom())){var i=m4(r,n);this._ticket=``;var a=r.dataByCoordSys,o=y4(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=d4;c.x=r.x,c.y=r.y,c.update(),Y(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=gQ(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(m4(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&&p4([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(Y(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;SS(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Y(e).dataIndex==null?Y(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=L(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=p4([t.tooltipOption],r),o=this._renderMode,s=[],c=Hb(`section`,{blocks:[],noHeader:!0}),l=[],u=new rx;F(e,function(e){F(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=qZ(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=Hb(`section`,{header:f,noHeader:!Ze(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),F(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=MD(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,w_(m.color),o);var h=Qy(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=p4([a],r).get(`valueFormatter`);p.blocks.push(_?N({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=Jb(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,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=Y(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=p4([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 rx;h.marker=g.makeTooltipMarker(`item`,w_(h.color),d);var _=Qy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?Jb(y?N({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=Y(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=M(a),a.content=$t(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=p4(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new rx;this._showOrMove(d,function(){var n=M(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(B(u)){var p=e.ecModel.get(`useUTC`),m=R(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Jg(m.axisValue,d,p)),d=y_(d,n,!0)}else if(z(u)){var g=L(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`||R(t))return{color:r||i};if(!R(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),z(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),R(t))n=J(t[0],s),r=J(t[1],c);else if(V(t)){var p=t;p.width=l[0],p.height=l[1];var m=W_(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=_4(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=h4(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=v4(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=v4(d)?l[1]/2:d===`bottom`?l[1]:0),W2(e)){var h=g4(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&&F(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&F(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&&F(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&F(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){k.node||!t.getDom()||(Px(this,`_updatePosition`),this._tooltipContent.dispose(),mQ(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(vx);function p4(e,t,n){var r=t.ecModel,i;n?(i=new og(n,r,r),i=new og(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof og&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new og(o,i,r)))}return i}function m4(e,t){return e.dispatchAction||L(t.dispatchAction,t)}function h4(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 g4(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 _4(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 v4(e){return e===`center`||e===`middle`}function y4(e,t,n){var r=wc(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Dc(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=Y(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function b4(e){MT(kQ),e.registerComponentModel(U2),e.registerComponentView(f4),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},ct),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},ct)}var x4=[`rect`,`polygon`,`keep`,`clear`];function S4(e,t){var n=$s(e?e.brush:[]);if(n.length){var r=[];F(n,function(e){var t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});var i=e&&e.toolbox;R(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);var a=i.feature||={},o=a.brush||={},s=o.type||=[];s.push.apply(s,r),qc(s,function(e){return e+``},null),t&&!s.length&&s.push.apply(s,x4)}}var C4=F;function w4(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function T4(e,t,n){var r={};return C4(t,function(t){var a=r[t]=i();C4(e[t],function(e,r){if(XH.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new XH(i),r===`opacity`&&(i=M(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new XH(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function E4(e,t,n){var r;F(n,function(e){t.hasOwnProperty(e)&&w4(t[e])&&(r=!0)}),r&&F(n,function(n){t.hasOwnProperty(n)&&w4(t[n])?e[n]=M(t[n]):delete e[n]})}function D4(e,t,n,r,i,a){var o={};F(e,function(e){o[e]=XH.prepareVisualTypes(t[e])});var s;function c(e){return gS(n,s,e)}function l(e,t){vS(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;var d=n.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var f=r.call(i,e),p=t[f],m=o[f],h=0,g=m.length;ht[0][1]&&(t[0][1]=a[0]),a[1]t[1][1]&&(t[1][1]=a[1])}return t&&W4(t)}};function W4(e){return new K(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var G4=function(e){D(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){this.ecModel=e,this.api=t,this.model,(this._brushController=new dK(t.getZr())).on(`brush`,L(this._onBrush,this)).mount()},t.prototype.render=function(e,t,n,r){this.model=e,this._updateController(e,t,n,r)},t.prototype.updateTransform=function(e,t,n,r){I4(t),this._updateController(e,t,n,r)},t.prototype.updateVisual=function(e,t,n,r){this.updateTransform(e,t,n,r)},t.prototype.updateView=function(e,t,n,r){this._updateController(e,t,n,r)},t.prototype._updateController=function(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:M(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:M(n),$from:t})},t.type=`brush`,t}(vx),K4=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.areas=[],n.brushOption={},n}return t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&E4(n,e,[`inBrush`,`outOfBrush`]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=I(e,function(e){return q4(this.option,e)},this))},t.prototype.setBrushOption=function(e){this.brushOption=q4(this.option,e),this.brushType=this.brushOption.brushType},t.type=`brush`,t.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],t.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Z.color.backgroundTint,borderColor:Z.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Z.color.disabled},t}(tv);function q4(e,t){return Ce({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new og(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var J4=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`],Y4=function(e){D(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(e,t,n){var r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a||=!!e.areas.length}),this._brushType=r,this._brushMode=i,F(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})},t.prototype.updateView=function(e,t,n){this.render(e,t,n)},t.prototype.getIcons=function(){var e=this.model,t=e.get(`icon`,!0),n={};return F(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n},t.prototype.onclick=function(e,t,n){var r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r===n?!1:n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})},t.getDefaultOption=function(e){return{show:!0,type:J4.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}},t}(z0);function X4(e){e.registerComponentView(G4),e.registerComponentModel(K4),e.registerPreprocessor(S4),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,L4),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},ct),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},ct),V0(`brush`,Y4)}var Z4=function(e){D(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}(tv),Q4=function(e){D(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=H(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Cd({style:Lh(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Cd({style:Lh(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(){T_(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){T_(p,`_`+e.get(`subtarget`))}),Y(c).eventData=Y(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 _=W_(g,q_(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 vd({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}(vx);function $4(e){e.registerComponentModel(Z4),e.registerComponentView(Q4)}var e3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode=`box`,n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e??=this.option.currentIndex;var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],F(t,function(e,t){var n=pc(nc(e),``),a;V(e)?(a=M(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;var a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new lE([{name:`value`,type:a}],this)).initData(i,r)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get(`axisType`)===`category`)return this._names.slice()},t.type=`timeline`,t.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Z.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Z.color.secondary},data:[]},t}(tv),t3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline.slider`,t.defaultOption=dg(e3.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Z.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Z.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Z.color.tertiary},itemStyle:{color:Z.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Z.color.accent50,borderColor:Z.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Z.color.accent60},itemStyle:{color:Z.color.accent60,borderColor:Z.color.accent60},controlStyle:{color:Z.color.accent70,borderColor:Z.color.accent70}},progress:{lineStyle:{color:Z.color.accent30},itemStyle:{color:Z.color.accent40}},data:[]}),t}(e3);ke(t3,Zy.prototype);var n3=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`timeline`,t}(vx),r3=function(e){D(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.type=i||`value`,a}return t.prototype.getLabelModel=function(){return this.model.getModel(`label`)},t.prototype.isHorizontal=function(){return this.model.get(`orient`)===`horizontal`},t}(Ik),i3=Math.PI,a3=xc(),o3=function(e){D(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){this.api=t},t.prototype.render=function(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){var r=this._layout(e,n),i=this._createGroup(`_mainGroup`),a=this._createGroup(`_labelGroup`),o=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return Hb(`nameValue`,{noName:!0,value:o.scale.getLabel({value:e})})},F([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(t){this[`_render`+t](r,i,o,e)},this),this._renderAxisLabel(r,a,o,e),this._position(r,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,t){var n=e.get([`label`,`position`]),r=e.get(`orient`),i=s3(e,t),a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:i3/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*i3/180;var g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));var T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}},t.prototype._position=function(e,t){var n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){var a=vn(),o=i.x,s=i.y+i.height;Sn(a,a,[-o,-s]),Cn(a,a,-i3/2),Sn(a,a,[o,s]),i=i.clone(),i.applyTransform(a)}var c=g(i),l=g(n.getBoundingRect()),u=g(r.getBoundingRect()),d=[n.x,n.y],f=[r.x,r.y];f[0]=d[0]=c[0][0];var p=e.labelPosOpt;if(p==null||B(p)){var m=p===`+`?0:1;_(d,l,c,1,m),_(f,u,c,1,1-m)}else{var m=p>=0?0:1;_(d,l,c,1,m),f[1]=d[1]+p}n.setPosition(d),r.setPosition(f),n.rotation=r.rotation=e.rotation,h(n),h(r);function h(e){e.originX=c[0][0]-e.x,e.originY=c[1][0]-e.y}function g(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function _(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}},t.prototype._createAxis=function(e,t){var n=t.getData(),r=t.get(`axisType`)||t.get(`type`);r!==`category`&&r!==`time`&&(r=`value`);var i=DD(t,r,!1);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};var a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),PO(i,{fixMinMax:[!0,!0]});var o=new r3(`value`,i,e.axisExtent,r);return o.model=t,o},t.prototype._createGroup=function(e){var t=this[e]=new q;return this.group.add(t),t},t.prototype._renderAxisLine=function(e,t,n,r){var i=n.getExtent();if(r.get([`lineStyle`,`show`])){var a=new om({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:N({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);var o=this._progressLine=new om({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:P({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}},t.prototype._renderAxisTick=function(e,t,n,r){var i=this,a=r.getData(),o=n.scale.getTicks();this._tickSymbols=[],F(o,function(e){var o=n.dataToCoord(e.value),s=a.getItemModel(e.value),c=s.getModel(`itemStyle`),l=s.getModel([`emphasis`,`itemStyle`]),u=s.getModel([`progress`,`itemStyle`]),d=l3(s,c,t,{x:o,y:0,onclick:L(i._changeTimeline,i,e.value)});d.ensureState(`emphasis`).style=l.getItemStyle(),d.ensureState(`progress`).style=u.getItemStyle(),Kf(d);var f=Y(d);s.get(`tooltip`)?(f.dataIndex=e.value,f.dataModel=r):f.dataIndex=f.dataModel=null,i._tickSymbols.push(d)})},t.prototype._renderAxisLabel=function(e,t,n,r){var i=this;if(n.getLabelModel().get(`show`)){var a=r.getData(),o=n.getViewLabels();this._tickLabels=[],F(o,function(r){if(!r.tick.offInterval){var o=r.tick.value,s=a.getItemModel(o),c=s.getModel(`label`),l=s.getModel([`emphasis`,`label`]),u=s.getModel([`progress`,`label`]),d=new Cd({x:n.dataToCoord(o),y:0,rotation:e.labelRotation-e.rotation,onclick:L(i._changeTimeline,i,o),silent:!1,style:Lh(c,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});d.ensureState(`emphasis`).style=Lh(l),d.ensureState(`progress`).style=Lh(u),t.add(d),Kf(d),a3(d).dataIndex=o,i._tickLabels.push(d)}})}},t.prototype._renderControl=function(e,t,n,r){var i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,L(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,L(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,L(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(e){var u=yo(H(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=c3(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),Kf(f)}}},t.prototype._renderCurrentPointer=function(e,t,n,r){var i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate:function(e){e.draggable=!0,e.drift=L(s._handlePointerDrag,s),e.ondragend=L(s._handlePointerDragend,s),u3(e,s._progressLine,a,n,r,!0)},onUpdate:function(e){u3(e,s._progressLine,a,n,r)}};this._currentPointer=l3(o,o,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,t){var n=this._toAxisCoord(e)[0],r=this._axis,i=bs(r.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(s[o]=+s[o].toFixed(f)),[s,d]}var T3={min:Ie(w3,`min`),max:Ie(w3,`max`),average:Ie(w3,`average`),median:Ie(w3,`median`)};function E3(e,t){if(t){var n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!C3(t)&&!R(t.coord)&&R(i)){var a=D3(t,n,r,e);if(t=M(t),t.type&&T3[t.type]&&a.baseAxis&&a.valueAxis){var o=De(i,a.baseAxis.dim),s=De(i,a.valueAxis.dim),c=T3[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||!R(i)){t.coord=[];var l=e.getBaseAxis();if(l&&t.type&&T3[t.type]){var u=r.getOtherAxis(l);u&&(t.value=M3(n,n.mapDimension(u.dim),t.type))}}else for(var d=t.coord,f=0;f<2;f++)T3[d[f]]&&(d[f]=M3(n,n.mapDimension(i[f]),d[f]));return t}}function D3(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(O3(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 O3(e,t){var n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function k3(e,t){return e&&e.containData&&t.coord&&!S3(t)?e.containData(t.coord):!0}function A3(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!S3(t)&&!S3(n)?e.containZone(t.coord,n.coord):!0}function j3(e,t){return e?function(e,n,r,i){return nb(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return nb(e.value,t[i])}}function M3(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}else if(n===`median`)return e.getMedian(t);else return e.getDataExtent(t)[+(n===`max`)]}var N3=xc(),P3=function(e){D(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=U()},t.prototype.render=function(e,t,n){var r=this,i=this.markerGroupMap;i.each(function(e){N3(e).keep=!1}),t.eachSeries(function(e){var i=b3.getMarkerModelFromSeries(e,r.type);i&&r.renderSeries(e,i,t,n)}),i.each(function(e){!N3(e).keep&&r.group.remove(e.group)}),F3(t,i,this.type)},t.prototype.markKeep=function(e){N3(e).keep=!0},t.prototype.toggleBlurSeries=function(e,t){var n=this;F(e,function(e){var r=b3.getMarkerModelFromSeries(e,n.type);r&&r.getData().eachItemGraphicEl(function(e){e&&(t?jf(e):Mf(e))})})},t.type=`marker`,t}(vx);function F3(e,t,n){e.eachSeries(function(e){var r=b3.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){var a=wh(r),o=a.z,s=a.zlevel;Eh(i.group,o,s)}})}function I3(e,t,n){var r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){var s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=J(s.get(`x`),l)+d,h=J(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){var g=e.get(r.dimensions[0],n),_=e.get(r.dimensions[1],n);p=r.dataToPoint([g,_])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var L3=function(e){D(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=b3.getMarkerModelFromSeries(e,`markPoint`);t&&(I3(t.getData(),e,n),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 QM),l=R3(i,e,t);t.setData(l),I3(t.getData(),e,r),l.each(function(e){var n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(z(r)||z(i)||z(a)||z(s)){var u=t.getRawValue(e),d=t.getDataParams(e);z(r)&&(r=r(u,d)),z(i)&&(i=i(u,d)),z(a)&&(a=a(u,d)),z(s)&&(s=s(u,d))}var f=n.getModel(`itemStyle`).getItemStyle(),p=n.get(`z2`),m=_S(o,`color`);f.fill||=m,l.setItemVisual(e,{z2:H(p,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:f})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){Y(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markPoint`,t}(P3);function R3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=I(n.get(`data`),Ie(E3,t));e&&(a=Me(a,Ie(k3,e)));var o=j3(!!e,r);return i.initData(a,null,o),i}function z3(e){e.registerComponentModel(x3),e.registerComponentView(L3),e.registerPreprocessor(function(e){_3(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var B3=function(e){D(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}(b3),V3=xc(),H3=function(e,t,n,r){var i=e.getData(),a;if(R(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=Ke(r.yAxis,r.xAxis);else{var l=D3(r,i,t,e);s=l.valueAxis,c=M3(i,xE(i,l.valueDataDim),o)}var u=s.dim===`x`?0:1,d=1-u,f=M(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&&Re(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=[E3(e,a[0]),E3(e,a[1]),N({},a[2])];return h[2].type=h[2].type||null,Ce(h[2],h[0]),Ce(h[2],h[1]),h};function U3(e){return!isNaN(e)&&!isFinite(e)}function W3(e,t,n,r){var i=1-e,a=r.dimensions[e];return U3(t[i])&&U3(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function G3(e,t){if(e.type===`cartesian2d`){var n=t[0].coord,r=t[1].coord;if(n&&r&&(W3(1,n,r,e)||W3(0,n,r,e)))return!0}return k3(e,t[0])&&k3(e,t[1])}function K3(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(`x`),i.getWidth()),l=J(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(xN(a,`cartesian2d`)){var p=a.getAxis(`x`),m=a.getAxis(`y`),u=a.dimensions;U3(e.get(u[0],t))?s[0]=p.toGlobalCoord(p.getExtent()[+!n]):U3(e.get(u[1],t))&&(s[1]=m.toGlobalCoord(m.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var q3=function(e){D(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=b3.getMarkerModelFromSeries(e,`markLine`);if(t){var r=t.getData(),i=V3(t).from,a=V3(t).to;i.each(function(t){K3(i,t,!0,e,n),K3(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 xW);this.group.add(c.group);var l=J3(i,e,t),u=l.from,d=l.to,f=l.line;V3(t).from=u,V3(t).to=d,t.setData(f);var p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);R(p)||(p=[p,p]),R(m)||(m=[m,m]),R(h)||(h=[h,h]),R(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:H(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){Y(e).dataModel=t,e.traverse(function(e){Y(e).dataModel=t})});function _(t,n,i){var a=t.getItemModel(n);K3(t,n,i,e,r);var s=a.getModel(`itemStyle`).getItemStyle();s.fill??=_S(o,`color`),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:H(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:H(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:H(a.get(`symbolSize`),m[+!i]),symbol:H(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)},t.type=`markLine`,t}(P3);function J3(e,t,n){var r=e?I(e&&e.dimensions,function(e){var n=t.getData();return N(N({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}],i=new lE(r,n),a=new lE(r,n),o=new lE([],n),s=I(n.get(`data`),Ie(H3,t,e,n));e&&(s=Me(s,Ie(G3,e)));var c=j3(!!e,r);return i.initData(I(s,function(e){return e[0]}),null,c),a.initData(I(s,function(e){return e[1]}),null,c),o.initData(I(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Y3(e){e.registerComponentModel(B3),e.registerComponentView(q3),e.registerPreprocessor(function(e){_3(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var X3=function(e){D(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=`markArea`,t.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}},t}(b3),Z3=xc(),Q3=function(e,t,n,r){var i=r[0],a=r[1];if(!(!i||!a)){var o=E3(e,i),s=E3(e,a),c=o.coord,l=s.coord;c[0]=Ke(c[0],-1/0),c[1]=Ke(c[1],-1/0),l[0]=Ke(l[0],1/0),l[1]=Ke(l[1],1/0);var u=we([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u}};function $3(e){return!isNaN(e)&&!isFinite(e)}function e6(e,t,n,r){var i=1-e;return $3(t[i])&&$3(n[i])}function t6(e,t){var n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return xN(e,`cartesian2d`)?n&&r&&(e6(1,n,r,e)||e6(0,n,r,e))?!0:A3(e,i,a):k3(e,i)||k3(e,a)}function n6(e,t,n,r,i){var a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(n[0]),i.getWidth()),l=J(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){var u=e.getValues([`x0`,`y0`],t),d=e.getValues([`x1`,`y1`],t),f=a.clampData(u),p=a.clampData(d),m=[];n[0]===`x0`?m[0]=f[0]>p[0]?d[0]:u[0]:m[0]=f[0]>p[0]?u[0]:d[0],n[1]===`y0`?m[1]=f[1]>p[1]?d[1]:u[1]:m[1]=f[1]>p[1]?u[1]:d[1],s=r.getMarkerPosition(m,n,!0)}else{var h=e.get(n[0],t),g=e.get(n[1],t),_=[h,g];a.clampData&&a.clampData(_,_),s=a.dataToPoint(_,!0)}if(xN(a,`cartesian2d`)){var v=a.getAxis(`x`),y=a.getAxis(`y`),h=e.get(n[0],t),g=e.get(n[1],t);$3(h)?s[0]=v.toGlobalCoord(v.getExtent()[n[0]===`x0`?0:1]):$3(g)&&(s[1]=y.toGlobalCoord(y.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}var r6=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]],i6=function(e){D(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=b3.getMarkerModelFromSeries(e,`markArea`);if(t){var r=t.getData();r.each(function(t){var i=I(r6,function(i){return n6(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},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,{group:new q});this.group.add(c.group),this.markKeep(c);var l=a6(i,e,t);t.setData(l),l.each(function(t){var n=I(r6,function(n){return n6(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];bs(d),bs(f);var p=c[0]>d[1]||c[1]f[1]||u[1]=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}(tv),l6=Ie,u6=F,d6=q,f6=function(e){D(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 d6),this.group.add(this._selectorGroup=new d6),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=q_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=W_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=W_(P({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=W0(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=U(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),u6(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new d6;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,l6(h6,f,null,r,d)).on(`mouseover`,l6(g6,m.name,null,r,d)).on(`mouseout`,l6(_6,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Y(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`),_=hi(h.fill);_&&_[3]===0&&(_[3]=.2,h=N(N({},h),{fill:Ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,l6(h6,null,f,r,d)).on(`mouseover`,l6(g6,null,f,r,d)).on(`mouseout`,l6(_6,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Y(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};Y(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();u6(e,function(e){var r=e.type,i=new Cd({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Fh(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Kf(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=p6(c,r,o,s,d,m,u),y=new d6,b=r.getModel(`textStyle`);if(z(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(m6({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;B(w)&&w?T=w.replace(`{name}`,t??``):z(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Cd({style:Lh(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new vd({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&_h({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),Kf(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();B_(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){B_(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(vx);function p6(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),u6(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:NC(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 m6(e){var t=e.icon||`roundRect`,n=WS(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 h6(e,t,n,r){_6(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),g6(e,t,n,r)}function g6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function _6(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function v6(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),y6(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){F(i,function(t,n){e[t?`select`:`unSelect`](n)}),y6(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function y6(e,t){var n=t||{};return F(e.getData(),function(t){var r=t.get(`name`);if(!(r===` +`||r===``)){var i=e.isSelected(r);W(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function b6(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,Ie(v6,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,Ie(v6,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,Ie(v6,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,Ie(v6,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,Ie(v6,`unSelect`))}var x6=$c(S6);function S6(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=H(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 vd({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&&jm(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;F([`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`,B(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=D6[i],o=O6[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=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}(f6);function A6(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 j6(e){MT(C6),e.registerComponentModel(w6),e.registerComponentView(k6),A6(e)}function M6(e){MT(C6),MT(j6)}var N6=function(e){D(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=dg(O0.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(O0),P6=xc();function F6(e,t,n){P6(e).coordSysRecordMap.each(function(e){var r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function I6(e,t){for(var n=P6(e).coordSysRecordMap,r=n.keys(),i=0;ia[i+r]&&(r=n),o&&=t.get(`preventDefaultMouseMove`,!0),s=H(t.get(`cursorGrab`,!0),s),c=H(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 H6(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,function(e,t){var n=P6(t),r=n.coordSysRecordMap||=U();r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){F(S0(e).infoList,function(n){var i=n.model.uid,a=r.get(i)||r.set(i,R6(t,n.model));(a.dataZoomInfoMap||=U()).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){L6(r,e);return}var s=V6(a,e,t);n.enable(s.controlType,s.opt),Nx(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var U6=function(e){D(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`dataZoom.inside`,t}return t.prototype.render=function(t,n,r){if(e.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),F6(r,t,{pan:L(W6.pan,this),zoom:L(W6.zoom,this),scrollMove:L(W6.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),e.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){I6(this.api,this.dataZoomModel),this.range=null},t.type=`dataZoom.inside`,t}(j0),W6={zoom:function(e,t,n,r){var i=this.range,a=i.slice(),o=e.axisModels[0];if(o){var s=K6[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(UG(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:G6(function(e,t,n,r,i,a){var o=K6[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:G6(function(e,t,n,r,i,a){return K6[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function G6(e){return function(t,n,r,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(UG(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}var K6={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}};function q6(e){L0(e),e.registerComponentModel(N6),e.registerComponentView(U6),H6(e)}var J6=function(e){D(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=dg(O0.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}(O0),Y6=vd,X6=1,Z6=30,Q6=7,$6=`horizontal`,e8=`vertical`,t8=5,n8=[`line`,`bar`,`candlestick`,`scatter`],r8={easing:`cubicOut`,duration:100,delay:0},i8=function(e){D(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=L(this._onBrush,this),this._onBrushEnd=L(this._onBrushEnd,this)},t.prototype.render=function(t,n,r,i){if(e.prototype.render.apply(this,arguments),Nx(this,`_dispatchZoomAction`,t.get(`throttle`),`fixRate`),this._orient=t.getOrient(),t.get(`show`)===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!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(){Px(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 q;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`)?Q6:0,r=q_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===$6?{right:r.width-i.x-i.width,top:r.height-Z6-a-n,width:i.width,height:Z6}:{right:a,top:i.y,width:Z6,height:i.height},s=Q_(e.option);F([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});var c=W_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===e8&&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===$6&&!i?{scaleY:o?1:-1,scaleX:1}:n===$6&&i?{scaleY:o?1:-1,scaleX:-1}:n===e8&&!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 Y6({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));var i=new Y6({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:L(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);return}y=v?(+e-l[0])*_:y+g;var r=t==null||isNaN(t)||t===``,i=r?0:ps(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 q,r=new tm({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new rm({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){F(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(!n&&!(t!==!0&&De(n8,e.get(`type`))<0)){var o=r.getComponent(b0(i),a).axis,s=o8(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 Y6({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new Y6({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:X6,fill:Z.color.transparent}})),F([0,1],function(t){var a=o.get(`handleIcon`);!VS[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a);var s=WS(a,-1,0,2,2,null,!0);s.attr({cursor:s8(this._orient),draggable:!0,drift:L(this._onDragMove,this,t),ondragend:L(this._onDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1),z2:5});var c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=J(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(),Kf(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 Cd({silent:!0,invisible:!f,style:Lh(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=J(o.get(`moveHandleSize`),a[1]),p=t.moveHandle=new vd({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=WS(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 vd({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:L(this._onActualMoveZoneDrift,this),ondragstart:L(this._onActualMoveZoneDragStart,this),ondragend:L(this._onActualMoveZoneDragEnd,this),onmouseover:L(this._onOverDataInfoTriggerArea,this,!0),onmouseout:L(this._onOverDataInfoTriggerArea,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[ps(e[0],[0,100],t,!0),ps(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];UG(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:ps(a.minSpan,o,i,!0),a.maxSpan==null?null:ps(a.maxSpan,o,i,!0));var s=this._range,c=this._range=bs([ps(r[0],i,o,!0),ps(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=bs(n.slice()),i=this._size;F([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;ct[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 G(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();UG(0,a,r,0,o.minSpan==null?null:ps(o.minSpan,i,r,!0),o.maxSpan==null?null:ps(o.maxSpan,i,r,!0)),this._range=bs([ps(a[0],r,i,!0),ps(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(dn(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 Y6({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?r8:null,start:t[0],end:t[1]})},t.prototype._findCoordRect=function(){var e,t=S0(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}(j0);function a8(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)?``:KE(r)||WE(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?vs(o,a,!0):o+``;return z(i)?i(o,s):B(i)?i.replace(`{value}`,s):s}function o8(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function s8(e){return e===`vertical`?`ns-resize`:`ew-resize`}function c8(e){e.registerComponentModel(J6),e.registerComponentView(i8),L0(e)}function l8(e){MT(q6),MT(c8)}var u8={get:function(e,t,n){var r=M((d8[e]||{})[t]);return n&&R(r)?r[r.length-1]:r}},d8={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]}},f8=XH.mapVisual,p8=XH.eachVisual,m8=R,h8=F,g8=bs,_8=ps,v8=function(e){D(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&&E4(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=L(e,this),this.controllerVisuals=T4(this.option.controller,t,e),this.targetVisuals=T4(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 h8(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=Dc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return I(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){F(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||=[`<`,`>`],R(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(z(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return 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=g8([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=Ne(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||={};Ce(r,n),Ce(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){m8(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]={},h8(r,function(e,t){if(XH.isValidType(t)){var n=u8.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`;h8(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??=t&&M(t)||(a?i:[i]),c.symbolSize??=n&&M(n)||(a?s[0]:[s[0],s[0]]),c.symbol=f8(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;p8(l,function(e){e>u&&(u=e)}),c.symbolSize=f8(l,function(e){return _8(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}(tv),y8=[20,140],b8=function(e){D(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=y8[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=y8[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):R(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),F(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=bs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=x8(this,`outOfRange`,this.getExtent()),n=x8(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new q(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);D8([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=E8(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=nh(n.handleLabelPoints[l],th(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=E8(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=nh(c.indicatorLabelPoint,th(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||F8(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=yc(u,d);this._dispatchHighDown(`downplay`,T8(f[0],n)),this._dispatchHighDown(`highlight`,T8(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(SS(e.target,function(e){var n=Y(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function B8(e,t,n,r){for(var i=t.targetVisuals[r],a=XH.prepareVisualTypes(i),o={color:_S(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(L8,R8),F(z8,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(H8))}function K8(e){e.registerComponentModel(b8),e.registerComponentView(M8),G8(e)}var q8=function(e){D(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=[],J8[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=M(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=I(this._pieceList,function(e){return e=M(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=XH.listVisualTypes(),i=this.isCategory();F(t.pieces,function(e){F(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),F(n,function(e,n){var r=!1;F(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&F(this.stateList,function(e){(t[e]||(t[e]={}))[n]=u8.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,F(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;F(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=M(e)},t.prototype.getValueState=function(e){var t=XH.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){XH.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 F(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=dg(v8.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}(v8),J8={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`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function Y8(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var X8=function(e){D(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=Ke(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),F(o.viewPieceList,function(o){var s=o.piece,u=new q;u.onclick=L(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 Cd({style:Lh(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:H(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),B_(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:T8(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return w8(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 q,o=this.visualMapModel.textStyleModel;a.add(new Cd({style:Lh(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=I(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=WS(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=M(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,F(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}(S8);function Z8(e){e.registerComponentModel(q8),e.registerComponentView(X8),G8(e)}function Q8(e){MT(K8),MT(Z8)}var $8=function(){function e(e){this._thumbnailModel=e}return e.prototype.reset=function(e){this._renderVersion=e.getECUpdateCycleVersion()},e.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Th(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},e.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},e}(),e5=function(e){D(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.optionUpdated=function(e,t){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new $8(this);this._target=null,this.ecModel.eachSeries(function(e){IW(e,null)}),this.shouldShow()&&IW(this.getTarget().baseMapProvider,e)},t.prototype.shouldShow=function(){return this.getShallow(`show`,!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target},t.type=`thumbnail`,t.layoutMode=`box`,t.dependencies=[`series`,`geo`],t.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Z.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Z.color.neutral30,borderColor:Z.color.neutral40,opacity:.3},z:10},t}(tv),t5=function(e){D(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._api=n,this._model=e,this._coordSys||=new vz,!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();var r=this.group;r.removeAll();var i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill??=t.get(`backgroundColor`)||Z.color.neutral00;var o=q_(e,n).refContainer,s=W_(V_(e,!0),o),c=a.lineWidth||0,l=this._contentRect=mh(s.clone(),c/2,!0,!0),u=new q;r.add(u),u.setClipPath(new vd({shape:l.plain()}));var d=this._targetGroup=new q;u.add(d);var f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new vd({style:a,shape:f,silent:!1,cursor:`grab`}));var p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new vd({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),r5(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),r5(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),e){var i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,Az(n,a.x,a.y,a.width,a.height);var o=W_({left:`center`,top:`center`,aspect:a.width/a.height},r);jz(n,o.x,o.y,o.width,o.height),wz(i,n,0),i.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var t=Tn([],e.targetTrans),n=xn([],bz(null,this._coordSys),t);this._transThisToTarget=Tn([],n);var r=e.viewportRect;r=r?r.clone():new K(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);var i=this._windowRect,a=i.shape.r;i.setShape(P({r:a},r))}},t.prototype._resetRoamController=function(e){var t=this,n=this._api,r=this._roamController;if(r||=this._roamController=new pR(n.getZr()),!e||!this._isEnabled()){r.disable();return}r.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(e,n,r){return t._contentRect.contain(n,r)}}}),r.off(`pan`).off(`zoom`).on(`pan`,L(this._onPan,this)).on(`zoom`,L(this._onZoom,this))},t.prototype._onPan=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.oldX,e.oldY],t),r=Pt([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}},t.prototype._onZoom=function(e){var t=this._transThisToTarget;if(!(!this._isEnabled()||!t)){var n=Pt([],[e.originX,e.originY],t);this._api.dispatchAction(n5(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type=`thumbnail`,t}(vx);function n5(e,t){var n={type:e.mainType===`series`?e.subType+`Roam`:e.mainType+`Roam`};return n[e.mainType+`Id`]=e.id,N(n,t),n}function r5(e,t){var n=wh(e);Eh(t.group,n.z,n.zlevel)}function i5(e){e.registerComponentModel(e5),e.registerComponentView(t5)}var a5={label:{enabled:!0},decal:{show:!1}},o5=xc(),s5=xc(),c5=$c(l5);function l5(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=s5(e).scope||(s5(e).scope={}),i=M(a5);Ce(i.label,e.getLocaleModel().get(`aria`),!1),Ce(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=U();e.eachSeries(function(e){e.isColorBySeries()||(o5(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(z(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Ev(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=o5(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Ev(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?N(N({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=P(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`},p5=function(){function e(e){(this._condVal=B(e)?new RegExp(e):We(e)?e:null)??Ys(``)}return e.prototype.evaluate=function(e){var t=typeof e;return B(t)?this._condVal.test(e):Re(t)?this._condVal.test(e+``):!1},e}(),m5=function(){function e(){}return e.prototype.evaluate=function(){return this.value},e}(),h5=function(){function e(){}return e.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&r.push(i),i=[e,t]}function u(e,t,n,r){N5(e,n)&&N5(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){var s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=tw:D2&&r.push(i),r}function F5(e,t,n,r,i,a,o,s,c,l){if(N5(e,n)&&N5(t,r)&&N5(i,o)&&N5(a,s)){c.push(o,s);return}var u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;var h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y=0&&w=0){c.push(o,s);return}var T=[],E=[];zr(e,n,i,o,.5,T),zr(t,r,a,s,.5,E),F5(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),F5(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function I5(e,t){var n=P5(e),r=[];t||=1;for(var i=0;i0)for(var l=0;lMath.abs(l),d=L5([c,l],+!u,t),f=(u?s:l)/d.length,p=0;pi,o=L5([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length,f=0;f1?null:new G(p*c+e,p*l+t)}function H5(e,t,n){var r=new G;G.sub(r,n,t),r.normalize();var i=new G;return G.sub(i,e,t),i.dot(r)}function U5(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function W5(e,t,n){for(var r=e.length,i=[],a=0;ao?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),W5(t,l,u)}function K5(e,t,n,r){if(n===1)r.push(t);else{var i=Math.floor(n/2),a=e(t);K5(e,a[0],i,r),K5(e,a[1],n-i,r)}return r}function q5(e,t){for(var n=[],r=0;r0)for(var x=r/n,S=-r/2;S<=r/2;S+=x){for(var C=Math.sin(S),w=Math.cos(S),T=0,y=0;y0;l/=2){var u=0,d=0;(e&l)>0&&(u=1),(t&l)>0&&(d=1),s+=l*l*(3*u^d),d===0&&(u===1&&(e=l-1-e,t=l-1-t),c=e,e=t,t=c)}return s}function f7(e){var t=1/0,n=1/0,r=-1/0,i=-1/0;return I(I(e,function(e){var a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),function(a,o){return{cp:a,z:d7(a[0],a[1],t,n,r,i),path:e[o]}}).sort(function(e,t){return e.z-t.z}).map(function(e){return e.path})}function p7(e){return X5(e.path,e.count)}function m7(){return{fromIndividuals:[],toIndividuals:[],count:0}}function h7(e,t,n){var r=[];function i(e){for(var t=0;t=0;i--)if(!n[i].many.length){var c=n[s].many;if(c.length<=1)if(s)s=0;else return n;var a=c.length,l=Math.ceil(a/2);n[i].many=c.slice(l,a),n[s].many=c.slice(0,l),s++}return n}var y7={clone:function(e){for(var t=[],n=1-(1-e.path.style.opacity)**(1/e.count),r=0;r0))return;var s=r.getModel(`universalTransition`).get(`delay`),c=N({setToFinal:!0},o),l,u;_7(e)&&(l=e,u=t),_7(t)&&(l=t,u=e);function d(e,t,r,i,o){var l=e.many,u=e.one;if(l.length===1&&!o){var f=t?l[0]:u,p=t?u:l[0];if(i7(f))d({many:[f],one:p},!0,r,i,!0);else{var m=s?P({delay:s(r,i)},c):c;u7(f,p,m),a(f,p,f,p,m)}}else for(var h=P({dividePath:y7[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),g=t?h7(l,u,h):g7(u,l,h),_=g.fromIndividuals,v=g.toIndividuals,y=_.length,b=0;bt.length,p=l?v7(u,l):v7(f?t:e,[f?e:t]),m=0,h=0;hS7))for(var i=n.getIndices(),a=0;a0&&r.group.traverse(function(e){e instanceof id&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function L7(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function R7(e){return R(e)?e.sort().join(`,`):e}function z7(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function B7(e,t){var n=U(),r=U(),i=U();return F(e.oldSeries,function(t,n){var a=e.oldDataGroupIds[n],o=e.oldData[n],s=L7(t),c=R7(s);r.set(c,{dataGroupId:a,data:o}),R(s)&&F(s,function(e){i.set(e,{key:c,dataGroupId:a,data:o})})}),F(t.updatedSeries,function(e){if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){var t=e.get(`dataGroupId`),a=e.getData(),o=L7(e),s=R7(o),c=r.get(s);if(c)n.set(s,{oldSeries:[{dataGroupId:c.dataGroupId,divide:z7(c.data),data:c.data}],newSeries:[{dataGroupId:t,divide:z7(a),data:a}]});else if(R(o)){var l=[];F(o,function(e){var t=r.get(e);t.data&&l.push({dataGroupId:t.dataGroupId,divide:z7(t.data),data:t.data})}),l.length&&n.set(s,{oldSeries:l,newSeries:[{dataGroupId:t,data:a,divide:z7(a)}]})}else{var u=i.get(o);if(u){var d=n.get(u.key);d||(d={oldSeries:[{dataGroupId:u.dataGroupId,data:u.data,divide:z7(u.data)}],newSeries:[]},n.set(u.key,d)),d.newSeries.push({dataGroupId:t,data:a,divide:z7(a)})}}}}),n}function V7(e,t){for(var n=0;n=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:z7(t.oldData[n]),groupIdDim:e.dimension})}),F($s(e.to),function(e){var r=V7(n.updatedSeries,e);if(r>=0){var i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:z7(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&I7(i,a,r)}function U7(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){F($s(n.seriesTransition),function(e){F($s(e.to),function(e){for(var t=n.updatedSeries,r=0;ro.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=K7,r=q7,i=!0,a=0,o=0;oc?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}();function G7(e,t){return new W7(e,t)}var K7=0,q7=0;function J7(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()}};F(e.breaks,function(e){var i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);var o=Z7(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));F(e.breaks,function(e){var t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:rs(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal??=0})}function Y7(e,t,n,r,i,a){e!==`no`&&F(n,function(n){var o=Z7(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&&lt[0]&&n=0&&e<.99999}F(e,function(e){if(!(!e||e.start==null||e.end==null)&&!e.isExpanded){var a={breakOption:M(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(B(e.gap)){var s=Ze(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&&F([`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 F(r,function(e,t){a>e.vmin&&(r[t]=null),a=e.vmax}),{breaks:Me(r,function(e){return!!e})}}function $7(e,t){return e9(t)===e9(e)}function e9(e){return e.start+`_\0_`+e.end}function t9(e,t,n){var r=[];F(e,function(e,n){var i=t(e);i&&i.type===`vmin`&&r.push([n])}),F(e,function(n,i){var a=t(n);if(a&&a.type===`vmax`){var o=Ne(r,function(n){return $7(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption)});o&&o.push(i)}});var i=[];return F(r,function(t){t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function n9(e,t,n,r){if(t.break){var i=t.break.parsedBreak,a=Ne(n,function(e){return $7(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:M(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}}function r9(e,t,n,r,i){i.original=Q7(e,t,n);var a=i.transformed=Q7(e,t,n),o=i.lookup;a.breaks=I(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}})}var i9={vmin:`start`,vmax:`end`};function a9(e,t){return t&&(e||={},e.break={type:i9[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function o9(){Tg({createBreakScaleMapper:G7,pruneTicksByBreak:Y7,addBreaksToTicks:X7,parseAxisBreakOption:Q7,identifyAxisBreak:$7,serializeAxisBreakIdentifier:e9,retrieveAxisBreakPairs:t9,getTicksBreakOutwardTransform:n9,parseAxisBreakOptionInwardTransform:r9,makeAxisLabelFormatterParamBreak:a9})}var s9=xc();function c9(e,t){var n=Ne(e,function(e){return Eg().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption)});return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function l9(e){F(e,function(e){return e.shouldRemove=!0})}function u9(e){for(var t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function d9(e,t,n,r,i){var a=n.axis;if(a.scale.isBlank()||!Eg())return;var o=Eg().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 q({ignoreModelZ:!0}),y=a.isHorizontal(),b=s9(t).visualList||(s9(t).visualList=[]);l9(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]=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(Tn[1]&&n.reverse(),{coordPair:n,brkId:Eg().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=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 G,h=new G;G.scale(m,r,-s),G.scale(h,r,1-s),CA(n[0],m),CA(n[1],h)}function m9(e,t){var n={breaks:[]};return F(t.breaks,function(r){if(r){var i=Ne(e.get(`breaks`,!0),function(e){return Eg().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 h9(){QN({adjustBreakLabelPair:p9,buildAxisBreakLine:f9,rectCoordBuildBreakAxis:d9,updateModelAxisBreak:m9})}function g9(e){cP(e),o9(),h9()}function _9(){eL(v9)}function v9(e,t){F(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){var n=y9(e);if(n){var r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function y9(e){var t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;var r,i,a=n.getExtent();n instanceof tD?i=n.count():(r=n.getTicks(),i=r.length);var o=e.getLabelModel(),s=jD(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(var u=0;uIk,ChartView:()=>Sx,ComponentModel:()=>tv,ComponentView:()=>vx,List:()=>lE,Model:()=>og,PRIORITY:()=>ow,SeriesModel:()=>lx,color:()=>ti,connect:()=>rT,dataTool:()=>kT,dependencies:()=>HC,disConnect:()=>aT,disconnect:()=>iT,dispose:()=>oT,env:()=>k,extendChartView:()=>Hk,extendComponentModel:()=>zk,extendComponentView:()=>Bk,extendSeriesModel:()=>Vk,format:()=>sk,getCoordinateSystemDimensions:()=>_T,getInstanceByDom:()=>sT,getInstanceById:()=>cT,getMap:()=>ET,graphic:()=>ok,helper:()=>IO,init:()=>nT,innerDrawElementOnCanvas:()=>EC,matrix:()=>_n,number:()=>ik,parseGeoJSON:()=>rk,parseGeoJson:()=>rk,registerAction:()=>hT,registerCoordinateSystem:()=>gT,registerCustomSeries:()=>vT,registerLayout:()=>yT,registerLoading:()=>CT,registerLocale:()=>bg,registerMap:()=>TT,registerPostInit:()=>fT,registerPostUpdate:()=>pT,registerPreprocessor:()=>uT,registerProcessor:()=>dT,registerTheme:()=>lT,registerTransform:()=>DT,registerUpdateLifecycle:()=>mT,registerVisual:()=>bT,setCanvasCreator:()=>wT,setPlatformAPI:()=>oe,throttle:()=>Mx,time:()=>ak,use:()=>MT,util:()=>ck,vector:()=>dt,version:()=>VC,zrUtil:()=>se,zrender:()=>Ro});MT([HM]),MT([vM]),MT([YN,eI,CI,BL,oR,tV,XV,xU,HW,eG,sG,vG,oq,zq,iJ,NJ,zJ,eY,sY,FY,GY,uX,PZ]),MT(AQ),MT(_$),MT(YB),MT(F$),MT(aq),MT(H$),MT(Z1),MT(h0),MT(H2),MT(b4),MT(kQ),MT(X4),MT($4),MT(g3),MT(z3),MT(Y3),MT(o6),MT(M6),MT(l8),MT(q6),MT(c8),MT(Q8),MT(K8),MT(Z8),MT(i5),MT(d5),MT(O5),MT(j5),MT(U7),MT(BA),MT(g9),MT(_9),MT(VL);var x9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=1;e.default=function(){return`${t++}`}})),S9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){var r=this,i=[...arguments];clearTimeout(n),n=setTimeout(function(){e.apply(r,i)},t)}}})),C9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SizeSensorId=e.SensorTabIndex=e.SensorClassName=void 0,e.SizeSensorId=`size-sensor-id`,e.SensorClassName=`size-sensor-object`,e.SensorTabIndex=`-1`})),w9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=r(S9()),n=C9();function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=function(){getComputedStyle(e).position===`static`&&(e.style.position=`relative`);var t=document.createElement(`object`);return t.onload=function(){t.contentDocument.defaultView.addEventListener(`resize`,s),s()},t.style.display=`block`,t.style.position=`absolute`,t.style.top=`0`,t.style.left=`0`,t.style.height=`100%`,t.style.width=`100%`,t.style.overflow=`hidden`,t.style.pointerEvents=`none`,t.style.zIndex=`-1`,t.style.opacity=`0`,t.setAttribute(`class`,n.SensorClassName),t.setAttribute(`tabindex`,n.SensorTabIndex),t.type=`text/html`,e.appendChild(t),t.data=`about:blank`,t},s=(0,t.default)(function(){a.forEach(function(t){t(e)})}),c=function(e){i||=o(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.parentNode&&(i.contentDocument&&i.contentDocument.defaultView.removeEventListener(`resize`,s),i.parentNode.removeChild(i),e.removeAttribute(n.SizeSensorId),i=void 0,a=[],r&&r())};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),T9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=C9(),n=r(S9());function r(e){return e&&e.__esModule?e:{default:e}}e.createSensor=function(e,r){var i=void 0,a=[],o=(0,n.default)(function(){a.forEach(function(t){t(e)})}),s=function(){var t=new ResizeObserver(o);return t.observe(e),o(),t},c=function(e){i||=s(),a.indexOf(e)===-1&&a.push(e)},l=function(){i&&i.disconnect(),a=[],i=void 0,e.removeAttribute(t.SizeSensorId),r&&r()};return{element:e,bind:c,destroy:l,unbind:function(e){var t=a.indexOf(e);t!==-1&&a.splice(t,1),a.length===0&&i&&l()}}}})),E9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSensor=void 0;var t=w9(),n=T9();e.createSensor=typeof ResizeObserver<`u`?n.createSensor:t.createSensor})),D9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeSensor=e.getSensor=e.Sensors=void 0;var t=i(x9()),n=E9(),r=C9();function i(e){return e&&e.__esModule?e:{default:e}}var a=e.Sensors={};function o(e){e&&a[e]&&delete a[e]}e.getSensor=function(e){var i=e.getAttribute(r.SizeSensorId);if(i&&a[i])return a[i];var s=(0,t.default)();e.setAttribute(r.SizeSensorId,s);var c=(0,n.createSensor)(e,function(){return o(s)});return a[s]=c,c},e.removeSensor=function(e){var t=e.element.getAttribute(r.SizeSensorId);e.destroy(),o(t)}})),O9=x((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ver=e.clear=e.bind=void 0;var t=D9();e.bind=function(e,n){var r=(0,t.getSensor)(e);return r.bind(n),function(){r.unbind(n)}},e.clear=function(e){var n=(0,t.getSensor)(e);(0,t.removeSensor)(n)},e.ver=`1.0.3`}))();function k9(e,t){var n={};return t.forEach(function(t){n[t]=e[t]}),n}function A9(e){return typeof e==`function`}function j9(e){return typeof e==`string`}var M9=d(x(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))()),N9=function(e){i(t,e);function t(t){var n=e.call(this,t)||this;return n.echarts=b9,n}return t}(function(r){i(o,r);function o(e){var t=r.call(this,e)||this;return t.echarts=e.echarts,t.ele=null,t.isInitialResize=!0,t.eventHandlerRefs={},t}return o.prototype.componentDidMount=function(){this.renderNewEcharts()},o.prototype.componentDidUpdate=function(e){var t=this.props.shouldSetOption;if(!(A9(t)&&!t(e,this.props))){if(!(0,M9.default)(e.theme,this.props.theme)||!(0,M9.default)(e.opts,this.props.opts)){this.dispose(),this.renderNewEcharts();return}var n=this.getEchartsInstance();(0,M9.default)(e.onEvents,this.props.onEvents)||(this.unbindEvents(n),this.bindEvents(n,this.props.onEvents));var r=[`option`,`notMerge`,`replaceMerge`,`lazyUpdate`,`showLoading`,`loadingOption`];(0,M9.default)(k9(this.props,r),k9(e,r))||this.updateEChartsOption(),(!(0,M9.default)(e.style,this.props.style)||!(0,M9.default)(e.className,this.props.className))&&this.resize()}},o.prototype.componentWillUnmount=function(){this.dispose()},o.prototype.initEchartsInstance=function(){return n(this,void 0,void 0,function(){var e=this;return t(this,function(t){return[2,new Promise(function(t){e.echarts.init(e.ele,e.props.theme,e.props.opts),e.getEchartsInstance().on(`finished`,function(){var n=e.ele.clientWidth,r=e.ele.clientHeight;e.echarts.dispose(e.ele);var i=a({width:n,height:r},e.props.opts);t(e.echarts.init(e.ele,e.props.theme,i))})})]})})},o.prototype.getEchartsInstance=function(){return this.echarts.getInstanceByDom(this.ele)},o.prototype.dispose=function(){if(this.ele){try{(0,O9.clear)(this.ele)}catch(e){console.warn(e)}this.echarts.dispose(this.ele)}},o.prototype.renderNewEcharts=function(){return n(this,void 0,void 0,function(){var e,n,r,i,a,o,s=this;return t(this,function(t){switch(t.label){case 0:return e=this.props,n=e.onEvents,r=e.onChartReady,i=e.autoResize,a=i===void 0?!0:i,[4,this.initEchartsInstance()];case 1:return t.sent(),o=this.updateEChartsOption(),this.bindEvents(o,n||{}),A9(r)&&r(o),this.ele&&a&&(0,O9.bind)(this.ele,function(){s.resize()}),[2]}})})},o.prototype.bindEvents=function(e,t){var n=this,r=function(t,r){if(j9(t)&&A9(r)){var i=function(t){r(t,e)};e.on(t,i),n.eventHandlerRefs[t]=i}};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r(i,t[i])},o.prototype.unbindEvents=function(e){for(var t=0,n=Object.entries(this.eventHandlerRefs);t{let{token:e}=P9(),{t}=v(),n={xAxis:{type:`category`,show:!1,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`]},yAxis:{show:!1,type:`value`},series:[{data:[120,88,116,60,70],type:`bar`,itemStyle:{color:e.colorPrimary},barWidth:10}]},i={xAxis:{show:!1,type:`category`,data:[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`]},yAxis:{show:!1,type:`value`},series:[{data:[1,2,3,2,3,2,1],type:`line`,itemStyle:{color:e.colorPrimary}}]},a={title:{text:t(`dashboard.analysis.annualSales`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`axis`,axisPointer:{type:`cross`,label:{backgroundColor:e.colorPrimaryBg,color:e.colorPrimary}},borderWidth:0,backgroundColor:e.colorPrimaryBg,textStyle:{color:e.colorText}},legend:{data:[t(`dashboard.analysis.grossProfit`),t(`dashboard.analysis.netProfit`),t(`dashboard.analysis.totalExpense`)],textStyle:{color:e.colorText}},grid:{left:`3%`,right:`4%`,bottom:`3%`,containLabel:!0},xAxis:[{type:`category`,boundaryGap:!1,data:[t(`dashboard.analysis.january`),t(`dashboard.analysis.february`),t(`dashboard.analysis.march`),t(`dashboard.analysis.april`),t(`dashboard.analysis.may`),t(`dashboard.analysis.june`),t(`dashboard.analysis.july`),t(`dashboard.analysis.august`),t(`dashboard.analysis.september`),t(`dashboard.analysis.october`),t(`dashboard.analysis.november`),t(`dashboard.analysis.december`)]}],yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.colorBorder}}}],series:[{name:t(`dashboard.analysis.grossProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorPrimaryBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorPrimary},data:[30,36,42,33,21,26,29,35,42,32,28,26]},{name:t(`dashboard.analysis.netProfit`),type:`line`,stack:`Total`,areaStyle:{color:e.colorSuccessBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorSuccess},data:[32,16,18,30,15,19,22,17,24,19,30,31]},{name:t(`dashboard.analysis.totalExpense`),type:`line`,stack:`Total`,areaStyle:{color:e.colorWarningBorder},emphasis:{focus:`series`},itemStyle:{color:e.colorWarning},data:[36,24,36,36,39,56,24,23,21,12,16,19]}]},u={title:{text:t(`dashboard.analysis.accessFrom`),textStyle:{color:e.colorText,fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong}},tooltip:{trigger:`item`},legend:{bottom:`0%`,left:`center`,textStyle:{color:e.colorText}},series:[{name:t(`dashboard.analysis.accessFrom`),type:`pie`,radius:[`40%`,`70%`],avoidLabelOverlap:!1,itemStyle:{borderRadius:e.borderRadius,borderColor:e.colorBorder,borderWidth:2},label:{show:!1,position:`center`},emphasis:{label:{show:!0,fontSize:40,fontWeight:`bold`}},labelLine:{show:!1},data:[{value:1048,name:t(`dashboard.analysis.searchEngine`)},{value:735,name:t(`dashboard.analysis.direct`)},{value:580,name:t(`dashboard.analysis.email`)},{value:484,name:t(`dashboard.analysis.unionAds`)},{value:300,name:t(`dashboard.analysis.videoAds`)}]}]};return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(w,{gutter:[20,20],children:[(0,$.jsx)(f,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalRevenue`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥3,415.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:n})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(_,{}),`11.28%`]})]})]})}),(0,$.jsx)(f,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.totalExpenses`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`¥8,425.00`}),(0,$.jsx)(N9,{style:{width:120,height:80},option:i})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(h,{}),`15.33%`]})]})]})}),(0,$.jsx)(f,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.visitors`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`1,128`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(C,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorError},children:[(0,$.jsx)(_,{}),`32.60%`]})]})]})}),(0,$.jsx)(f,{xxl:6,lg:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{children:t(`dashboard.analysis.likes`)}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between pt-4 pb-2`,children:[(0,$.jsx)(`div`,{className:`text-4xl flex-0`,children:`668`}),(0,$.jsx)(`div`,{className:`text-4xl rounded-full flex items-center justify-center`,style:{height:80,width:80,background:e.colorPrimaryBg},children:(0,$.jsx)(m,{style:{color:e.colorPrimary}})})]}),(0,$.jsxs)(`div`,{children:[t(`dashboard.since.lastWeek`),` `,(0,$.jsxs)(`span`,{style:{color:e.colorSuccess},children:[(0,$.jsx)(h,{}),`9.60%`]})]})]})}),(0,$.jsx)(f,{xl:18,xs:24,children:(0,$.jsx)(s,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:a})})}),(0,$.jsx)(f,{xl:6,xs:24,children:(0,$.jsx)(s,{variant:`borderless`,children:(0,$.jsx)(N9,{style:{width:`100%`,height:460},option:u})})}),(0,$.jsx)(f,{xl:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between mb-5`,children:[(0,$.jsx)(`div`,{style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.salesRanking`)}),(0,$.jsx)(o.Group,{options:[{label:t(`dashboard.analysis.month`),value:`month`},{label:t(`dashboard.analysis.year`),value:`year`},{label:t(`dashboard.analysis.day`),value:`day`}],defaultValue:`day`,optionType:`button`,buttonStyle:`solid`})]}),(0,$.jsx)(r,{columns:[{title:t(`dashboard.analysis.article`),dataIndex:`name`,key:`name`,render:e=>(0,$.jsx)(`a`,{children:e})},{title:t(`dashboard.analysis.age`),dataIndex:`age`,key:`age`},{title:t(`dashboard.analysis.address`),dataIndex:`address`,key:`address`},{title:t(`dashboard.analysis.tags`),key:`tags`,dataIndex:`tags`,render:(e,{tags:t})=>(0,$.jsx)($.Fragment,{children:t.map(e=>{let t=e.length>5?`geekblue`:`green`;return e===`loser`&&(t=`volcano`),(0,$.jsx)(l,{color:t,children:e.toUpperCase()},e)})})},{title:t(`dashboard.analysis.action`),key:`action`,render:(e,n)=>(0,$.jsxs)(p,{size:`middle`,children:[(0,$.jsxs)(`a`,{children:[t(`dashboard.analysis.invite`),` `,n.name]}),(0,$.jsx)(`a`,{children:t(`dashboard.analysis.delete`)})]})}],dataSource:[{key:`1`,name:`John Brown`,age:32,address:`New York No. 1 Lake Park`,tags:[`nice`,`developer`]},{key:`2`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`3`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]},{key:`4`,name:`Jim Green`,age:42,address:`London No. 1 Lake Park`,tags:[`loser`]},{key:`5`,name:`Joe Black`,age:32,address:`Sydney No. 1 Lake Park`,tags:[`cool`,`teacher`]}],pagination:!1,scroll:{x:800}})]})}),(0,$.jsx)(f,{xl:12,xs:24,children:(0,$.jsxs)(s,{variant:`borderless`,children:[(0,$.jsx)(`div`,{className:`mb-5`,style:{fontSize:e.fontSizeLG,fontWeight:e.fontWeightStrong},children:t(`dashboard.analysis.userReviews`)}),(0,$.jsx)(c,{dataSource:[{title:`Ant Design Title 1`},{title:`Ant Design Title 2`},{title:`Ant Design Title 3`},{title:`Ant Design Title 4`},{title:`Ant Design Title 5`}],renderItem:(e,n)=>(0,$.jsx)(c.Item,{children:(0,$.jsx)(c.Item.Meta,{avatar:(0,$.jsx)(S,{src:`https://xsgames.co/randomusers/avatar.php?g=pixel&key=${n}`}),title:(0,$.jsx)(`a`,{href:`https://ant.design`,children:e.title}),description:t(`dashboard.analysis.reviewDescription`)})})})]})})]})})};export{F9 as default}; \ No newline at end of file diff --git a/public/assets/analysis-BO3IE-J4.js b/public/assets/analysis-BO3IE-J4.js deleted file mode 100644 index 2bd80c8..0000000 --- a/public/assets/analysis-BO3IE-J4.js +++ /dev/null @@ -1,40 +0,0 @@ -import{g as fk,R as vk,r as hk,u as ck,j as ut,a as dk,C as on,b as J_,c as Q_,d as pk,e as gk,S as yk,A as mk,t as _k}from"./index-B-sDl1ER.js";import{_ as WA,a as t1,b as e1,c as Sk,d as Mc}from"./tslib.es6-BaFViOhq.js";import{C as sn}from"./index-CO5DzGxy.js";import{R as xk}from"./index-CeRfFUxJ.js";import{F as bk}from"./Table-B11dzOaz.js";import{T as wk}from"./index-C9m5qSM4.js";import{L as Dc}from"./index-S1dQ7QE3.js";import"./index-DmtjhyJb.js";var ng=function(r,t){return ng=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])},ng(r,t)};function N(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ng(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Tk=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),Ck=(function(){function r(){this.browser=new Tk,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 r})(),Ct=new Ck;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Ct.wxa=!0,Ct.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Ct.worker=!0:!Ct.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Ct.node=!0,Ct.svgSupported=!0):Ak(navigator.userAgent,Ct);function Ak(r,t){var e=t.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(e.firefox=!0,e.version=a[1]),n&&(e.ie=!0,e.version=n[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var pm=12,UA="sans-serif",$a=pm+"px "+UA,Mk=20,Dk=100,Lk="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Ik(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){A(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function tE(r,t,e){for(var a=e?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),v=2*u,h=f.left,c=f.top;o.push(h,c),l=l&&i&&h===i[v]&&c===i[v+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=e?a1(s,o):a1(o,s))}function tM(r){return r.nodeName.toUpperCase()==="CANVAS"}var eE=/([&<>"'])/g,rE={"&":"&","<":"<",">":">",'"':""","'":"'"};function ze(r){return r==null?"":(r+"").replace(eE,function(t,e){return rE[e]})}var aE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ic=[],nE=Ct.browser.firefox&&+Ct.browser.version.split(".")[0]<39;function ug(r,t,e,a){return e=e||{},a?n1(r,t,e):nE&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):n1(r,t,e),e}function n1(r,t,e){if(Ct.domSupported&&r.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(tM(r)){var i=r.getBoundingClientRect();e.zrX=a-i.left,e.zrY=n-i.top;return}else if(lg(Ic,r,a,n)){e.zrX=Ic[0],e.zrY=Ic[1];return}}e.zrX=e.zrY=0}function bm(r){return r||window.event}function mr(r,t,e){if(t=bm(t),t.zrX!=null)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&ug(r,o,t,e)}else{ug(r,t,t,e);var i=iE(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&aE.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function iE(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var n=Math.abs(a!==0?a:e),i=a>0?-1:a<0?1:e>0?-1:1;return 3*n*i}function fg(r,t,e,a){r.addEventListener(t,e,a)}function oE(r,t,e,a){r.removeEventListener(t,e,a)}var qa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function i1(r){return r.which===2||r.which===3}var sE=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&a&&a.length>1){var i=o1(a)/o1(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=lE(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function me(){return[1,0,0,1,0,0]}function Iu(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Pu(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Fr(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Yr(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function rn(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),v=Math.cos(e);return r[0]=n*v+s*f,r[1]=-n*f+s*v,r[2]=i*v+l*f,r[3]=-i*f+v*l,r[4]=v*(o-a[0])+f*(u-a[1])+a[0],r[5]=v*(u-a[1])-f*(o-a[0])+a[1],r}function Zh(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function Dr(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}function eM(r){var t=me();return Pu(t,r),t}const uE=Object.freeze(Object.defineProperty({__proto__:null,clone:eM,copy:Pu,create:me,identity:Iu,invert:Dr,mul:Fr,rotate:rn,scale:Zh,translate:Yr},Symbol.toStringTag,{value:"Module"}));var st=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r})(),Ii=Math.min,Wo=Math.max,vg=Math.abs,s1=["x","y"],fE=["width","height"],$n=new st,qn=new st,jn=new st,Kn=new st,nr=rM(),xl=nr.minTv,hg=nr.maxTv,Bl=[0,0],lt=(function(){function r(t,e,a,n){r.set(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=Ii(t.x,this.x),a=Ii(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Wo(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Wo(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,n=t.height/e.height,i=me();return Yr(i,i,[-e.x,-e.y]),Zh(i,i,[a,n]),Yr(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&st.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(vE,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(hE,e.x,e.y,e.width,e.height));var s=!!a;nr.reset(n,s);var l=nr.touchThreshold,u=t.x+l,f=t.x+t.width-l,v=t.y+l,h=t.y+t.height-l,c=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>f||v>h||c>d||p>g)return!1;var y=!(f=t.x&&e<=t.x+t.width&&a>=t.y&&a<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,a){if(!a){t!==e&&r.copy(t,e);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];t.x=e.x*n+o,t.y=e.y*i+s,t.width=e.width*n,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}$n.x=jn.x=e.x,$n.y=Kn.y=e.y,qn.x=Kn.x=e.x+e.width,qn.y=jn.y=e.y+e.height,$n.transform(a),Kn.transform(a),qn.transform(a),jn.transform(a),t.x=Ii($n.x,qn.x,jn.x,Kn.x),t.y=Ii($n.y,qn.y,jn.y,Kn.y);var l=Wo($n.x,qn.x,jn.x,Kn.x),u=Wo($n.y,qn.y,jn.y,Kn.y);t.width=l-t.x,t.height=u-t.y},r})(),vE=new lt(0,0,0,0),hE=new lt(0,0,0,0);function l1(r,t,e,a,n,i,o,s){var l=vg(t-e),u=vg(a-r),f=Ii(l,u),v=s1[n],h=s1[1-n],c=fE[n];t=u||!nr.bidirectional)&&(xl[v]=-u,xl[h]=0,nr.useDir&&nr.calcDirMTV())))}function rM(){var r=0,t=new st,e=new st,a={minTv:new st,maxTv:new st,useDir:!1,dirMinTv:new st,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=Wo(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),e.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(n(f)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(a.bidirectional||t.dot(e)>0)&&e.len()=0;v--){var h=i[v];h!==n&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(Rc.copy(h.getBoundingRect()),h.transform&&Rc.applyTransform(h.transform),Rc.intersect(f)&&s.push(h))}if(s.length)for(var c=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function yE(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?aM:!0}return!1}function u1(r,t,e,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=yE(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==aM)){t.target=o;break}}}function iM(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}var oM=32,Fs=7;function mE(r){for(var t=0;r>=oM;)t|=r&1,r>>=1;return r+t}function f1(r,t,e,a){var n=t+1;if(n===e)return 1;if(a(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function _E(r,t,e){for(e--;t>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function kc(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,t[e+f])>0?o=f+1:l=f}return l}function Ec(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,t[e+f])<0?l=f:o=f+1}return l}function SE(r,t){var e=Fs,a,n,i=0,o=[];a=[],n=[];function s(c,d){a[i]=c,n[i]=d,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=Fs||w>=Fs);if(T)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[b+y]=r[x+y];r[S]=o[_];return}for(var w=e;;){var T=0,C=0,M=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){M=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){M=!0;break}while((T|C)=0;y--)r[b+y]=r[x+y];if(d===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(C=g-kc(r[m],o,0,g,g-1,t),C!==0){for(S-=C,_-=C,g-=C,b=S+1,x=_+1,y=0;y=Fs||C>=Fs);if(M)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),g===1){for(S-=d,m-=d,b=S+1,x=m+1,y=d-1;y>=0;y--)r[b+y]=r[x+y];r[S]=o[_]}else{if(g===0)throw new Error;for(x=S-(g-1),y=0;ys&&(l=s),v1(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),n-=i,e+=i}while(n!==0);o.forceMergeRuns()}}var ir=1,bl=2,Vo=4,h1=!1;function Oc(){h1||(h1=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function c1(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var xE=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=c1}return r.prototype.traverse=function(t,e){for(var a=0;a=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),Ov;Ov=Ct.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var zl={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-zl.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?zl.bounceIn(r*2)*.5:zl.bounceOut(r*2-1)*.5+.5}},qu=Math.pow,Dn=Math.sqrt,Nv=1e-8,sM=1e-4,d1=Dn(3),ju=1/3,oa=Hn(),br=Hn(),Ko=Hn();function xn(r){return r>-Nv&&rNv||r<-Nv}function ge(r,t,e,a,n){var i=1-n;return i*i*(i*r+3*n*t)+n*n*(n*a+3*i*e)}function p1(r,t,e,a,n){var i=1-n;return 3*(((t-r)*i+2*(e-t)*n)*i+(a-e)*n*n)}function Bv(r,t,e,a,n,i){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,v=s*l-9*o*u,h=l*l-3*s*u,c=0;if(xn(f)&&xn(v))if(xn(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[c++]=d)}else{var p=v*v-4*f*h;if(xn(p)){var g=v/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y)}else if(p>0){var m=Dn(p),_=f*s+1.5*o*(-v+m),S=f*s+1.5*o*(-v-m);_<0?_=-qu(-_,ju):_=qu(_,ju),S<0?S=-qu(-S,ju):S=qu(S,ju);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[c++]=d)}else{var x=(2*f*s-3*o*v)/(2*Dn(f*f*f)),b=Math.acos(x)/3,w=Dn(f),T=Math.cos(b),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+d1*Math.sin(b)))/(3*o),C=(-s+w*(T-d1*Math.sin(b)))/(3*o);d>=0&&d<=1&&(i[c++]=d),y>=0&&y<=1&&(i[c++]=y),C>=0&&C<=1&&(i[c++]=C)}}return c}function uM(r,t,e,a,n){var i=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if(xn(o)){if(lM(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(xn(f))n[0]=-i/(2*o);else if(f>0){var v=Dn(f),u=(-i+v)/(2*o),h=(-i-v)/(2*o);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function On(r,t,e,a,n,i){var o=(t-r)*n+r,s=(e-t)*n+t,l=(a-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,v=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=v,i[4]=v,i[5]=f,i[6]=l,i[7]=a}function fM(r,t,e,a,n,i,o,s,l,u,f){var v,h=.005,c=1/0,d,p,g,y;oa[0]=l,oa[1]=u;for(var m=0;m<1;m+=.05)br[0]=ge(r,e,n,o,m),br[1]=ge(t,a,i,s,m),g=Mn(oa,br),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(xn(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var v=Dn(f),u=(-o+v)/(2*i),h=(-o-v)/(2*i);u>=0&&u<=1&&(n[l++]=u),h>=0&&h<=1&&(n[l++]=h)}}return l}function vM(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function Kl(r,t,e,a,n){var i=(t-r)*a+r,o=(e-t)*a+t,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function hM(r,t,e,a,n,i,o,s,l){var u,f=.005,v=1/0;oa[0]=o,oa[1]=s;for(var h=0;h<1;h+=.05){br[0]=Te(r,e,n,h),br[1]=Te(t,a,i,h);var c=Mn(oa,br);c=0&&c=1?1:Bv(0,a,i,1,l,s)&&ge(0,n,o,1,s[0])}}}var AE=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Kt,this.ondestroy=t.ondestroy||Kt,this.onrestart=t.onrestart||Kt,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,n=t-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tt(t)?t:zl[t]||wm(t)},r})(),cM=(function(){function r(t){this.value=t}return r})(),ME=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new cM(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),as=(function(){function r(t){this._list=new ME,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,n=this._map,i=null;if(n[t]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new cM(e),s.key=t,a.insertEntry(s),n[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),g1={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Hr(r){return r=Math.round(r),r<0?0:r>255?255:r}function DE(r){return r=Math.round(r),r<0?0:r>360?360:r}function Jl(r){return r<0?0:r>1?1:r}function vv(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Hr(parseFloat(t)/100*255):Hr(parseInt(t,10))}function Ha(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Jl(parseFloat(t)/100):Jl(parseFloat(t))}function Nc(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function bn(r,t,e){return r+(t-r)*e}function yr(r,t,e,a,n){return r[0]=t,r[1]=e,r[2]=a,r[3]=n,r}function dg(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var dM=new as(20),Ku=null;function ho(r,t){Ku&&dg(Ku,t),Ku=dM.put(r,Ku||t.slice())}function Ve(r,t){if(r){t=t||[];var e=dM.get(r);if(e)return dg(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in g1)return dg(t,g1[a]),ho(r,t),t;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){yr(t,0,0,0,1);return}return yr(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),ho(r,t),t}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){yr(t,0,0,0,1);return}return yr(t,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),ho(r,t),t}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?yr(t,+u[0],+u[1],+u[2],1):yr(t,0,0,0,1);f=Ha(u.pop());case"rgb":if(u.length>=3)return yr(t,vv(u[0]),vv(u[1]),vv(u[2]),u.length===3?f:Ha(u[3])),ho(r,t),t;yr(t,0,0,0,1);return;case"hsla":if(u.length!==4){yr(t,0,0,0,1);return}return u[3]=Ha(u[3]),pg(u,t),ho(r,t),t;case"hsl":if(u.length!==3){yr(t,0,0,0,1);return}return pg(u,t),ho(r,t),t;default:return}}yr(t,0,0,0,1)}}function pg(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=Ha(r[1]),n=Ha(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return t=t||[],yr(t,Hr(Nc(o,i,e+1/3)*255),Hr(Nc(o,i,e)*255),Hr(Nc(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function LE(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,n=Math.min(t,e,a),i=Math.max(t,e,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-t)/6+o/2)/o,v=((i-e)/6+o/2)/o,h=((i-a)/6+o/2)/o;t===i?l=h-v:e===i?l=1/3+f-h:a===i&&(l=2/3+v-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function zv(r,t){var e=Ve(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return Cr(e,e.length===4?"rgba":"rgb")}}function IE(r){var t=Ve(r);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Vl(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=t[n],s=t[i],l=a-n;return e[0]=Hr(bn(o[0],s[0],l)),e[1]=Hr(bn(o[1],s[1],l)),e[2]=Hr(bn(o[2],s[2],l)),e[3]=Jl(bn(o[3],s[3],l)),e}}var PE=Vl;function Tm(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=Ve(t[n]),s=Ve(t[i]),l=a-n,u=Cr([Hr(bn(o[0],s[0],l)),Hr(bn(o[1],s[1],l)),Hr(bn(o[2],s[2],l)),Jl(bn(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}var RE=Tm;function Wa(r,t,e,a){var n=Ve(r);if(r)return n=LE(n),t!=null&&(n[0]=DE(tt(t)?t(n[0]):t)),e!=null&&(n[1]=Ha(tt(e)?e(n[1]):e)),a!=null&&(n[2]=Ha(tt(a)?a(n[2]):a)),Cr(pg(n),"rgba")}function Ql(r,t){var e=Ve(r);if(e&&t!=null)return e[3]=Jl(t),Cr(e,"rgba")}function Cr(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function tu(r,t){var e=Ve(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}function kE(){return Cr([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var y1=new as(100);function Vv(r){if(X(r)){var t=y1.get(r);return t||(t=zv(r,-.1),y1.put(r,t)),t}else if(Mu(r)){var e=G({},r);return e.colorStops=U(r.colorStops,function(a){return{offset:a.offset,color:zv(a.color,-.1)}}),e}return r}const EE=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Vl,fastMapToColor:PE,lerp:Tm,lift:zv,liftColor:Vv,lum:tu,mapToColor:RE,modifyAlpha:Ql,modifyHSL:Wa,parse:Ve,parseCssFloat:Ha,parseCssInt:vv,random:kE,stringify:Cr,toHex:IE},Symbol.toStringTag,{value:"Module"}));var Gv=Math.round;function eu(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Ve(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var m1=1e-4;function wn(r){return r-m1}function Ju(r){return Gv(r*1e3)/1e3}function gg(r){return Gv(r*1e4)/1e4}function OE(r){return"matrix("+Ju(r[0])+","+Ju(r[1])+","+Ju(r[2])+","+Ju(r[3])+","+gg(r[4])+","+gg(r[5])+")"}var NE={left:"start",right:"end",center:"middle",middle:"middle"};function BE(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function zE(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function VE(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function pM(r){return r&&!!r.image}function GE(r){return r&&!!r.svgElement}function Cm(r){return pM(r)||GE(r)}function gM(r){return r.type==="linear"}function yM(r){return r.type==="radial"}function mM(r){return r&&(r.type==="linear"||r.type==="radial")}function Xh(r){return"url(#"+r+")"}function _M(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function SM(r){var t=r.x||0,e=r.y||0,a=(r.rotation||0)*El,n=Q(r.scaleX,1),i=Q(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+Gv(o*El)+"deg, "+Gv(s*El)+"deg)"),l.join(" ")}var FE=(function(){return Ct.hasGlobalWindow&&tt(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})(),yg=Array.prototype.slice;function Ea(r,t,e){return(t-r)*e+r}function Bc(r,t,e,a){for(var n=t.length,i=0;ia?t:r,i=Math.min(e,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=S1,l=e;if(Pe(e)){var u=YE(e);s=u,(u===1&&!Dt(e[0])||u===2&&!Dt(e[0][0]))&&(o=!0)}else if(Dt(e)&&!Ie(e))s=tf;else if(X(e))if(!isNaN(+e))s=tf;else{var f=Ve(e);f&&(l=f,s=wl)}else if(Mu(e)){var v=G({},l);v.colorStops=U(e.colorStops,function(c){return{offset:c.offset,color:Ve(c.color)}}),gM(e)?s=mg:yM(e)&&(s=_g),l=v}i===0?this.valType=s:(s!==this.valType||s===S1)&&(o=!0),this.discrete=this.discrete||o;var h={time:t,value:l,rawValue:e,percent:0};return a&&(h.easing=a,h.easingFunc=tt(a)?a:zl[a]||wm(a)),n.push(h),h},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=ef(n),u=x1(n),f=0;f=0&&!(o[f].percent<=e);f--);f=h(f,s-2)}else{for(f=v;fe);f++);f=h(f-1,s-2)}d=o[f+1],c=o[f]}if(c&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-c.percent,y=g===0?1:h((e-c.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?Hs:t[l];if((ef(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?c.rawValue:d.rawValue;else if(ef(i))i===cv?Bc(m,c[n],d[n],y):HE(m,c[n],d[n],y);else if(x1(i)){var _=c[n],S=d[n],x=i===mg;t[l]={type:x?"linear":"radial",x:Ea(_.x,S.x,y),y:Ea(_.y,S.y,y),colorStops:U(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:Ea(w.offset,C.offset,y),color:hv(Bc([],w.color,C.color,y))}}),global:S.global},x?(t[l].x2=Ea(_.x2,S.x2,y),t[l].y2=Ea(_.y2,S.y2,y)):t[l].r=Ea(_.r,S.r,y)}else if(u)Bc(m,c[n],d[n],y),a||(t[l]=hv(m));else{var b=Ea(c[n],d[n],y);a?this._additiveValue=b:t[l]=b}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===tf?t[a]=t[a]+n:e===wl?(Ve(t[a],Hs),Qu(Hs,Hs,n,1),t[a]=hv(Hs)):e===cv?Qu(t[a],t[a],n,1):e===xM&&_1(t[a],t[a],n,1)},r})(),Am=(function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){Hh("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,At(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Gl(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Gl(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a0)){this._started=1;for(var e=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Uo(){return new Date().getTime()}var XE=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}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 a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,n=e.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=Uo()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(Ov(a),!e._paused&&e.update())}Ov(a)},t.prototype.start=function(){this._running||(this._time=Uo(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Uo(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Uo()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var n=new Am(e,a.loop);return this.addAnimator(n),n},t})(Pr),$E=300,zc=Ct.domSupported,Vc=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=U(r,function(n){var i=n.replace("mouse","pointer");return e.hasOwnProperty(i)?i:n});return{mouse:r,touch:t,pointer:a}})(),b1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},w1=!1;function Sg(r){var t=r.pointerType;return t==="pen"||t==="touch"}function qE(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Gc(r){r&&(r.zrByTouch=!0)}function jE(r,t){return mr(r.dom,new KE(r,t),!0)}function bM(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var KE=(function(){function r(t,e){this.stopPropagation=Kt,this.stopImmediatePropagation=Kt,this.preventDefault=Kt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Nr={mousedown:function(r){r=mr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=mr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=mr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=mr(this.dom,r);var t=r.toElement||r.relatedTarget;bM(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){w1=!0,r=mr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){w1||(r=mr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=mr(this.dom,r),Gc(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Nr.mousemove.call(this,r),Nr.mousedown.call(this,r)},touchmove:function(r){r=mr(this.dom,r),Gc(r),this.handler.processGesture(r,"change"),Nr.mousemove.call(this,r)},touchend:function(r){r=mr(this.dom,r),Gc(r),this.handler.processGesture(r,"end"),Nr.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<$E&&Nr.click.call(this,r)},pointerdown:function(r){Nr.mousedown.call(this,r)},pointermove:function(r){Sg(r)||Nr.mousemove.call(this,r)},pointerup:function(r){Nr.mouseup.call(this,r)},pointerout:function(r){Sg(r)||Nr.mouseout.call(this,r)}};A(["click","dblclick","contextmenu"],function(r){Nr[r]=function(t){t=mr(this.dom,t),this.trigger(r,t)}});var xg={pointermove:function(r){Sg(r)||xg.mousemove.call(this,r)},pointerup:function(r){xg.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function JE(r,t){var e=t.domHandlers;Ct.pointerEventsSupported?A(Vc.pointer,function(a){dv(t,a,function(n){e[a].call(r,n)})}):(Ct.touchEventsSupported&&A(Vc.touch,function(a){dv(t,a,function(n){e[a].call(r,n),qE(t)})}),A(Vc.mouse,function(a){dv(t,a,function(n){n=bm(n),t.touching||e[a].call(r,n)})}))}function QE(r,t){Ct.pointerEventsSupported?A(b1.pointer,e):Ct.touchEventsSupported||A(b1.mouse,e);function e(a){function n(i){i=bm(i),bM(r,i.target)||(i=jE(r,i),t.domHandlers[a].call(r,i))}dv(t,a,n,{capture:!0})}}function dv(r,t,e,a){r.mounted[t]=e,r.listenerOpts[t]=a,fg(r.domTarget,t,e,a)}function Fc(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&oE(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var T1=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),tO=(function(r){N(t,r);function t(e,a){var n=r.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=a,n._localHandlerScope=new T1(e,Nr),zc&&(n._globalHandlerScope=new T1(document,xg)),JE(n,n._localHandlerScope),n}return t.prototype.dispose=function(){Fc(this._localHandlerScope),zc&&Fc(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,zc&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var a=this._globalHandlerScope;e?QE(this,a):Fc(a)}},t})(Pr),wM=1;Ct.hasGlobalWindow&&(wM=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Fv=wM,bg=.4,wg="#333",Tg="#ccc",eO="#eee",C1=Iu,A1=5e-5;function Jn(r){return r>A1||r<-A1}var Qn=[],co=[],Hc=me(),Wc=Math.abs,Ga=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Jn(this.rotation)||Jn(this.x)||Jn(this.y)||Jn(this.scaleX-1)||Jn(this.scaleY-1)||Jn(this.skewX)||Jn(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&(C1(a),this.invTransform=null);return}a=a||me(),e?this.getLocalTransform(a):C1(a),t&&(e?Fr(a,t,a):Pu(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Qn);var a=Qn[0]<0?-1:1,n=Qn[1]<0?-1:1,i=((Qn[0]-a)*e+a)/Qn[0]||0,o=((Qn[1]-n)*e+n)/Qn[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||me(),Dr(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),i=Math.PI/2+n-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||me(),Fr(co,t.invTransform,e),e=co);var a=this.originX,n=this.originY;(a||n)&&(Hc[4]=a,Hc[5]=n,Fr(co,e,Hc),co[4]-=a,co[5]-=n,e=co),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],n=this.invTransform;return n&&Jt(a,a,n),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],n=this.transform;return n&&Jt(a,a,n),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&Wc(t[0]-1)>1e-10&&Wc(t[3]-1)>1e-10?Math.sqrt(Wc(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){Hv(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,n=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,v=t.y,h=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(a||n||s||l){var d=a+s,p=n+l;e[4]=-d*i-h*p*o,e[5]=-p*o-c*d*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=c*i,e[2]=h*o,u&&rn(e,e,u),e[4]+=a+f,e[5]+=n+v,e},r.initDefaultProps=(function(){var t=r.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})(),r})(),ya=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Hv(r,t){for(var e=0;e=M1)){r=r||$a;for(var t=[],e=+new Date,a=0;a<=127;a++)t[a]=tr.measureText(String.fromCharCode(a),r).width;var n=+new Date-e;return n>16?Uc=M1:n>2&&Uc++,t}}var Uc=0,M1=5;function TM(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=rO(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function ga(r,t){var e=r.strWidthCache,a=e.get(t);return a==null&&(a=tr.measureText(t,r.font).width,e.put(t,a)),a}function D1(r,t,e,a){var n=ga(pa(t),r),i=Ru(t),o=ns(0,n,e),s=Bi(0,i,a),l=new lt(o,s,n,i);return l}function $h(r,t,e,a){var n=((r||"")+"").split(` -`),i=n.length;if(i===1)return D1(n[0],t,e,a);for(var o=new lt(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function Wv(r,t,e){var a=t.position||"inside",n=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,f="left",v="top";if(a instanceof Array)l+=Zr(a[0],e.width),u+=Zr(a[1],e.height),f=null,v=null;else switch(a){case"left":l-=n,u+=s,f="right",v="middle";break;case"right":l+=n+o,u+=s,v="middle";break;case"top":l+=o/2,u-=n,f="center",v="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",v="middle";break;case"insideLeft":l+=n,u+=s,v="middle";break;case"insideRight":l+=o-n,u+=s,f="right",v="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",v="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,v="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",v="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=v,r}var Yc="__zr_normal__",Zc=ya.concat(["ignore"]),aO=Mr(ya,function(r,t){return r[t]=!0,r},{ignore:!1}),po={},nO=new lt(0,0,0,0),af=[],qh=(function(){function r(t){this.id=mm(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(e);var f=a.position!=null,v=a.autoOverflowArea,h=void 0;if((v||f)&&(h=nO,a.layoutRect?h.copy(a.layoutRect):h.copy(this.getBoundingRect()),n||h.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(po,a,h):Wv(po,a,h),i.x=po.x,i.y=po.y,o=po.align,s=po.verticalAlign;var c=a.origin;if(c&&a.rotation!=null){var d=void 0,p=void 0;c==="center"?(d=h.width*.5,p=h.height*.5):(d=Zr(c[0],h.width),p=Zr(c[1],h.height)),u=!0,i.originX=-i.x+d+(n?0:h.x),i.originY=-i.y+p+(n?0:h.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(v){var m=y.overflowRect=y.overflowRect||new lt(0,0,0,0);i.getLocalTransform(af),Dr(af,af),lt.copy(m,h),m.applyTransform(af)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,x=void 0,b=void 0;_&&this.canBeInsideText()?(S=a.insideFill,x=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(x==null||x==="auto")&&(x=this.getInsideTextStroke(S),b=!0)):(S=a.outsideFill,x=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(x==null||x==="auto")&&(x=this.getOutsideStroke(S),b=!0)),S=S||"#000",(S!==y.fill||x!==y.stroke||b!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=x,y.autoStroke=b,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=ir,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Tg:wg},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&Ve(e);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,Cr(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},G(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(it(t))for(var a=t,n=At(a),i=0;i0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(Yc,!1,t)},r.prototype.useState=function(t,e,a,n){var i=t===Yc,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(yt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){Hh("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!a&&!this.__inHover&&l&&l.duration>0,l);var v=this._textContent,h=this._textGuide;return v&&v.useState(t,e,a,f),h&&h.useState(t,e,a,f),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ir),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var n=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,h),g&&g.useStates(t,e,h),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ir)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var n=this.currentStates.slice(),i=yt(n,t),o=yt(n,e)>=0;i>=0?o?n.splice(i,1):n[i]=e:a&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,n=a.length,i=[],o=0;o0&&e.during&&i[0].during(function(d,p){e.during(p)});for(var h=0;h0||n.force&&!o.length){var T=void 0,C=void 0,M=void 0;if(s){C={},h&&(T={});for(var S=0;S<_;S++){var y=p[S];C[y]=e[y],h?T[y]=a[y]:e[y]=a[y]}}else if(h){M={};for(var S=0;S<_;S++){var y=p[S];M[y]=Gl(e[y]),oO(e,a,y)}}var x=new Am(e,!1,!1,v?Rt(d,function(I){return I.targetName===t}):null);x.targetName=t,n.scope&&(x.scope=n.scope),h&&T&&x.whenWithKeys(0,T,p),M&&x.whenWithKeys(0,M,p),x.whenWithKeys(u??500,s?C:a,p).delay(f||0),r.addAnimator(x,t),o.push(x)}}var rt=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}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 a=this._children,n=0;n=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var n=yt(this._children,e);return n>=0&&this.replaceAt(a,n),this},t.prototype.replaceAt=function(e,a){var n=this._children,i=n[a];if(e&&e!==this&&e.parent!==this&&e!==i){n[a]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,n=this._children,i=yt(n,e);return i<0?this:(n.splice(i,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}var Z=mO;function mO(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Uv(r,t,e)}function Uv(r,t,e){return X(r)?yO(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function ae(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),LM),r=(+r).toFixed(t),e?r:+r}function lr(r){return r.sort(function(t,e){return t-e}),r}function Vr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return IM(r)}function IM(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function Mm(r,t){var e=Math.log,a=Math.LN10,n=Math.floor(e(r[1]-r[0])/a),i=Math.round(e(ua(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function _O(r,t,e){if(!r[t])return 0;var a=PM(r,e);return a[t]||0}function PM(r,t){var e=Mr(r,function(c,d){return c+(isNaN(d)?0:d)},0);if(e===0)return[];for(var a=Math.pow(10,t),n=U(r,function(c){return(isNaN(c)?0:c)/e*a*100}),i=a*100,o=U(n,function(c){return Math.floor(c)}),s=Mr(o,function(c,d){return c+d},0),l=U(n,function(c,d){return c-o[d]});su&&(u=l[v],f=v);++o[f],l[f]=0,++s}return U(o,function(c){return c/a})}function SO(r,t){var e=Math.max(Vr(r),Vr(t)),a=r+t;return e>LM?a:ae(a,e)}var Mg=9007199254740991;function Dm(r){var t=Math.PI*2;return(r%t+t)%t}function is(r){return r>-L1&&r=10&&t++,t}function Lm(r,t){var e=jh(r),a=Math.pow(10,e),n=r/a,i;return t?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,e>=-20?+r.toFixed(e<0?-e:0):r}function gv(r,t){var e=(r.length-1)*t+1,a=Math.floor(e),n=+r[a-1],i=e-a;return i?n+i*(r[a]-n):n}function Dg(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r})();function qc(r){r.option=r.parentModel=r.ecModel=null}var GO=".",ti="___EC__COMPONENT__CONTAINER___",HM="___EC__EXTENDED_CLASS___";function fa(r){var t={main:"",sub:""};if(r){var e=r.split(GO);t.main=e[0]||"",t.sub=e[1]||""}return t}function FO(r){Re(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function HO(r){return!!(r&&r[HM])}function km(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return WO(a)?n=(function(i){N(o,i);function o(){return i.apply(this,arguments)||this}return o})(a):(n=function(){(e.$constructor||a).apply(this,arguments)},_m(n,this)),G(n.prototype,e),n[HM]=!0,n.extend=this.extend,n.superCall=ZO,n.superApply=XO,n.superClass=a,n}}function WO(r){return tt(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function WM(r,t){r.extend=t.extend}var UO=Math.round(Math.random()*10);function YO(r){var t=["__\0is_clz",UO++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function ZO(r,t){for(var e=[],a=2;a=0||i&&yt(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var $O=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],qO=Xi($O),jO=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return qO(this,t,e)},r})(),Ig=new as(50);function KO(r){if(typeof r=="string"){var t=Ig.get(r);return t&&t.image}else return r}function Em(r,t,e,a,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=Ig.get(r),o={hostEl:e,cb:a,cbPayload:n};return i?(t=i.image,!Jh(t)&&i.pending.push(o)):(t=tr.loadImage(r,k1,k1),t.__zrImageSrc=r,Ig.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function k1(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=ga(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function ZM(r,t,e){var a=e.containerWidth,n=e.contentWidth,i=e.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=ga(i,t);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?QO(t,n,i):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=ga(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function QO(r,t,e){for(var a=0,n=0,i=r.length;ng&&c){var _=Math.floor(g/h);d=d||y.length>_,y=y.slice(0,_),m=y.length*h}if(n&&f&&p!=null)for(var S=YM(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},b=0;bd&&Kc(i,o.substring(d,g),t,c),Kc(i,p[2],t,c,p[1]),d=jc.lastIndex}dv){var z=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,D,M),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&d+a.accumWidth>a.width&&(f=t.split(` -`),u=!0),a.accumWidth=d}else{var p=XM(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+c,v=p.linesWidths,f=p.lines}}f||(f=t.split(` -`));for(var g=pa(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var iN=Mr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function oN(r){return nN(r)?!!iN[r]:!0}function XM(r,t,e,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,v=pa(t),h=0;he:n+f+d>e){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=c,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=c,f=d)):p?(i.push(l),o.push(u),l=c,u=d):(i.push(c),o.push(d));continue}f+=d,p?(l+=c,u+=d):(l&&(s+=l,l="",u=0),s+=c)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function O1(r,t,e,a,n,i){if(r.baseX=e,r.baseY=a,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;lt.set(N1,ns(e,o,n),Bi(a,s,i),o,s),lt.intersect(t,N1,null,B1);var l=B1.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=ns(l.x,l.width,n,!0),r.baseY=Bi(l.y,l.height,i,!0)}}var N1=new lt(0,0,0,0),B1={outIntersectRect:{},clamp:!0};function Om(r){return r!=null?r+="":r=""}function sN(r){var t=Om(r.text),e=r.font,a=ga(pa(e),t),n=Ru(e);return Pg(r,a,n,null)}function Pg(r,t,e,a){var n=new lt(ns(r.x||0,t,r.textAlign),Bi(r.y||0,e,r.textBaseline),t,e),i=a??($M(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function $M(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Rg="__zr_style_"+Math.round(Math.random()*10),zi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Qh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};zi[Rg]=!0;var z1=["z","z2","invisible"],lN=["invisible"],Lr=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=At(e),n=0;n1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(nf[0]=ed(n)*e+r,nf[1]=td(n)*a+t,of[0]=ed(i)*e+r,of[1]=td(i)*a+t,u(s,nf,of),f(l,nf,of),n=n%ei,n<0&&(n=n+ei),i=i%ei,i<0&&(i=i+ei),n>i&&!o?i+=ei:nn&&(sf[0]=ed(c)*e+r,sf[1]=td(c)*a+t,u(s,sf,s),f(l,sf,l))}var Ut={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ri=[],ai=[],jr=[],ln=[],Kr=[],Jr=[],rd=Math.min,ad=Math.max,ni=Math.cos,ii=Math.sin,Aa=Math.abs,kg=Math.PI,gn=kg*2,nd=typeof Float32Array<"u",Ws=[];function id(r){var t=Math.round(r/kg*1e8)/1e8;return t%2*kg}function ec(r,t){var e=id(r[0]);e<0&&(e+=gn);var a=e-r[0],n=r[1];n+=a,!t&&n-e>=gn?n=e+gn:t&&e-n>=gn?n=e-gn:!t&&e>n?n=e+(gn-id(e-n)):t&&e0&&(this._ux=Aa(a/Fv/t)||0,this._uy=Aa(a/Fv/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ut.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=Aa(t-this._xi),n=Aa(e-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Ut.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){return this._drawPendingPt(),this.addData(Ut.C,t,e,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,n){return this._drawPendingPt(),this.addData(Ut.Q,t,e,a,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(t,e,a,n,i,o){this._drawPendingPt(),Ws[0]=n,Ws[1]=i,ec(Ws,o),n=Ws[0],i=Ws[1];var s=i-n;return this.addData(Ut.A,t,e,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,n,i,o),this._xi=ni(i)*a+t,this._yi=ii(i)*a+e,this},r.prototype.arcTo=function(t,e,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,n,i),this},r.prototype.rect=function(t,e,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,n),this.addData(Ut.R,t,e,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ut.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&nd&&(this.data=new Float32Array(e));for(var a=0;a0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var v=0;v0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){jr[0]=jr[1]=Kr[0]=Kr[1]=Number.MAX_VALUE,ln[0]=ln[1]=Jr[0]=Jr[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,n=0,i=0,o;for(o=0;oa||Aa(_)>n||h===e-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case Ut.C:{var S=t[h++],x=t[h++],g=t[h++],y=t[h++],b=t[h++],w=t[h++];p=bE(i,o,S,x,g,y,b,w,10),i=b,o=w;break}case Ut.Q:{var S=t[h++],x=t[h++],g=t[h++],y=t[h++];p=TE(i,o,S,x,g,y,10),i=g,o=y;break}case Ut.A:var T=t[h++],C=t[h++],M=t[h++],D=t[h++],I=t[h++],L=t[h++],P=L+I;h+=1,d&&(s=ni(I)*M+T,l=ii(I)*D+C),p=ad(M,D)*rd(gn,Math.abs(L)),i=ni(P)*M+T,o=ii(P)*D+C;break;case Ut.R:{s=i=t[h++],l=o=t[h++];var k=t[h++],R=t[h++];p=k*2+R*2;break}case Ut.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[v++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,v,h,c=e<1,d,p,g=0,y=0,m,_=0,S,x;if(!(c&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))t:for(var b=0;b0&&(t.lineTo(S,x),_=0),w){case Ut.M:s=u=a[b++],l=f=a[b++],t.moveTo(u,f);break;case Ut.L:{v=a[b++],h=a[b++];var C=Aa(v-u),M=Aa(h-f);if(C>n||M>i){if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(u*(1-I)+v*I,f*(1-I)+h*I);break t}g+=D}t.lineTo(v,h),u=v,f=h,_=0}else{var L=C*C+M*M;L>_&&(S=v,x=h,_=L)}break}case Ut.C:{var P=a[b++],k=a[b++],R=a[b++],O=a[b++],E=a[b++],z=a[b++];if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;On(u,P,R,E,I,ri),On(f,k,O,z,I,ai),t.bezierCurveTo(ri[1],ai[1],ri[2],ai[2],ri[3],ai[3]);break t}g+=D}t.bezierCurveTo(P,k,R,O,E,z),u=E,f=z;break}case Ut.Q:{var P=a[b++],k=a[b++],R=a[b++],O=a[b++];if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;Kl(u,P,R,I,ri),Kl(f,k,O,I,ai),t.quadraticCurveTo(ri[1],ai[1],ri[2],ai[2]);break t}g+=D}t.quadraticCurveTo(P,k,R,O),u=R,f=O;break}case Ut.A:var V=a[b++],F=a[b++],H=a[b++],Y=a[b++],j=a[b++],vt=a[b++],Pt=a[b++],Bt=!a[b++],ht=H>Y?H:Y,at=Aa(H-Y)>.001,gt=j+vt,J=!1;if(c){var D=d[y++];g+D>m&&(gt=j+vt*(m-g)/D,J=!0),g+=D}if(at&&t.ellipse?t.ellipse(V,F,H,Y,Pt,j,gt,Bt):t.arc(V,F,ht,j,gt,Bt),J)break t;T&&(s=ni(j)*H+V,l=ii(j)*Y+F),u=ni(gt)*H+V,f=ii(gt)*Y+F;break;case Ut.R:s=u=a[b],l=f=a[b+1],v=a[b++],h=a[b++];var ct=a[b++],Vt=a[b++];if(c){var D=d[y++];if(g+D>m){var Lt=m-g;t.moveTo(v,h),t.lineTo(v+rd(Lt,ct),h),Lt-=ct,Lt>0&&t.lineTo(v+ct,h+rd(Lt,Vt)),Lt-=Vt,Lt>0&&t.lineTo(v+ad(ct-Lt,0),h+Vt),Lt-=ct,Lt>0&&t.lineTo(v,h+ad(Vt-Lt,0));break t}g+=D}t.rect(v,h,ct,Vt);break;case Ut.Z:if(c){var D=d[y++];if(g+D>m){var I=(m-g)/D;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=D}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Ut,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function mn(r,t,e,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>a+s||or+s&&i>e+s||it+v&&f>a+v&&f>i+v&&f>s+v||fr+v&&u>e+v&&u>n+v&&u>o+v||ut+u&&l>a+u&&l>i+u||lr+u&&s>e+u&&s>n+u||se||f+un&&(n+=Us);var h=Math.atan2(l,s);return h<0&&(h+=Us),h>=a&&h<=n||h+Us>=a&&h+Us<=n}function Oa(r,t,e,a,n,i){if(i>t&&i>a||in?s:0}var un=_a.CMD,oi=Math.PI*2,pN=1e-4;function gN(r,t){return Math.abs(r-t)t&&u>a&&u>i&&u>s||u1&&yN(),c=ge(t,a,i,s,Sr[0]),h>1&&(d=ge(t,a,i,s,Sr[1]))),h===2?gt&&s>a&&s>i||s=0&&u<=1){for(var f=0,v=Te(t,a,i,u),h=0;he||s<-e)return 0;var l=Math.sqrt(e*e-s*s);He[0]=-l,He[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=oi-1e-4){a=0,n=oi;var f=i?1:-1;return o>=He[0]+r&&o<=He[1]+r?f:0}if(a>n){var v=a;a=n,n=v}a<0&&(a+=oi,n+=oi);for(var h=0,c=0;c<2;c++){var d=He[c];if(d+r>o){var p=Math.atan2(s,d),f=i?1:-1;p<0&&(p=oi+p),(p>=a&&p<=n||p+oi>=a&&p+oi<=n)&&(p>Math.PI/2&&p1&&(e||(s+=Oa(l,u,f,v,a,n))),g&&(l=i[d],u=i[d+1],f=l,v=u),p){case un.M:f=i[d++],v=i[d++],l=f,u=v;break;case un.L:if(e){if(mn(l,u,i[d],i[d+1],t,a,n))return!0}else s+=Oa(l,u,i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case un.C:if(e){if(cN(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=mN(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case un.Q:if(e){if(qM(l,u,i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=_N(l,u,i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case un.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],x=i[d++],b=i[d++];d+=1;var w=!!(1-i[d++]);h=Math.cos(x)*_+y,c=Math.sin(x)*S+m,g?(f=h,v=c):s+=Oa(l,u,h,c,a,n);var T=(a-y)*S/_+y;if(e){if(dN(y,m,S,x,x+b,w,t,T,n))return!0}else s+=SN(y,m,S,x,x+b,w,T,n);l=Math.cos(x+b)*_+y,u=Math.sin(x+b)*S+m;break;case un.R:f=l=i[d++],v=u=i[d++];var C=i[d++],M=i[d++];if(h=f+C,c=v+M,e){if(mn(f,v,h,v,t,a,n)||mn(h,v,h,c,t,a,n)||mn(h,c,f,c,t,a,n)||mn(f,c,f,v,t,a,n))return!0}else s+=Oa(h,v,h,c,a,n),s+=Oa(f,c,f,v,a,n);break;case un.Z:if(e){if(mn(l,u,f,v,t,a,n))return!0}else s+=Oa(l,u,f,v,a,n);l=f,u=v;break}}return!e&&!gN(u,v)&&(s+=Oa(l,u,f,v,a,n)||0),s!==0}function xN(r,t,e){return jM(r,0,!1,t,e)}function bN(r,t,e,a){return jM(r,t,!0,e,a)}var Yv=nt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},zi),wN={style:nt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Qh.style)},od=ya.concat(["invisible","culling","z","z2","zlevel","parent"]),Tt=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?wg:a>.2?eO:Tg}else if(e)return Tg}return wg},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(X(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=tu(e,0)0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Vo)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect(),o=this.style;if(e=n[0],a=n[1],i.contain(e,a)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),bN(s,l/u,e,a)))return!0}if(this.hasFill())return xN(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Vo,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=a:G(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Vo)},t.prototype.createStyle=function(e){return Lu(Yv,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=G({},this.shape))},t.prototype._applyStateObj=function(e,a,n,i,o,s){r.prototype._applyStateObj.call(this,e,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=G({},n.shape),G(u,a.shape)):(u=G({},i?this.shape:n.shape),G(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=G({},this.shape);for(var f={},v=At(u),h=0;hn&&(v=s+l,s*=n/v,l*=n/v),u+f>n&&(v=u+f,u*=n/v,f*=n/v),l+u>i&&(v=l+u,l*=i/v,u*=i/v),s+f>i&&(v=s+f,s*=i/v,f*=i/v),r.moveTo(e+s,a),r.lineTo(e+n-l,a),l!==0&&r.arc(e+n-l,a+l,l,-Math.PI/2,0),r.lineTo(e+n,a+i-u),u!==0&&r.arc(e+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(e+f,a+i),f!==0&&r.arc(e+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5)}var Yo=Math.round;function rc(r,t,e){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(Yo(a*2)===Yo(n*2)&&(r.x1=r.x2=fr(a,s,!0)),Yo(i*2)===Yo(o*2)&&(r.y1=r.y2=fr(i,s,!0))),r}}function KM(r,t,e){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=fr(a,s,!0),r.y=fr(n,s,!0),r.width=Math.max(fr(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(fr(n+o,s,!1)-r.y,o===0?0:1)),r}}function fr(r,t,e){if(!t)return r;var a=Yo(r*2);return(a+Yo(t))%2===0?a/2:(a+(e?1:-1))/2}var LN=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),IN={},St=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new LN},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=KM(IN,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?DN(e,a):e.rect(n,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(Tt);St.prototype.type="rect";var W1={fill:"#000"},U1=2,Qr={},PN={style:nt({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},Qh.style)},Mt=(function(r){N(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=W1,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=0;I=0&&(P=b[L],P.align==="right");)this._placeToken(P,e,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(f-(D-g)-(m-I)-C)/2;M<=L;)P=b[M],this._placeToken(P,e,T,y,D+P.width/2,"center",_),D+=P.width,M++;y+=T}},t.prototype._placeToken=function(e,a,n,i,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,v=i+n/2;f==="top"?v=i+e.height/2:f==="bottom"&&(v=i+n-e.height/2);var h=!e.isLineHolder&&sd(u);h&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,v-e.height/2,e.width,e.height);var c=!!u.backgroundColor,d=e.textPadding;d&&(o=j1(o,s,d),v-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(os),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,x=q1("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=$1("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=U1,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=v,w&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||$a,g.opacity=Qe(u.opacity,a.opacity,1),Z1(g,u),b&&(g.lineWidth=Qe(u.lineWidth,a.lineWidth,_),g.lineDash=Q(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),x&&(g.fill=x),p.setBoundingRect(Pg(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,a,n,i,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,v=l&&l.image,h=l&&!v,c=e.borderRadius,d=this,p,g;if(h||e.lineHeight||u&&f){p=this._getOrCreateChild(St),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=c,p.dirtyShape()}if(h){var m=p.style;m.fill=l||null,m.fillOpacity=Q(e.fillOpacity,1)}else if(v){g=this._getOrCreateChild(xe),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=Q(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=Qe(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return QM(e)&&(a=[e.fontStyle,e.fontWeight,JM(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&sr(a)||e.textFont||e.font},t})(Lr),RN={left:!0,right:1,center:1},kN={top:1,bottom:1,middle:1},Y1=["fontStyle","fontWeight","fontSize","fontFamily"];function JM(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?pm+"px":r+"px"}function Z1(r,t){for(var e=0;e=0,i=!1;if(r instanceof Tt){var o=tD(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(go(s)||go(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=G({},a),u=G({},u),u.fill=s):!go(u.fill)&&go(s)?(i=!0,a=G({},a),u=G({},u),u.fill=Vv(s)):!go(u.stroke)&&go(l)&&(i||(a=G({},a),u=G({},u)),u.stroke=Vv(l)),a.style=u}}if(a&&a.z2==null){i||(a=G({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??bs)}return a}function GN(r,t,e){if(e&&e.z2==null){e=G({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??ON)}return e}function FN(r,t,e){var a=yt(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:zN(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=G({},e),o=G({opacity:a?n:i.opacity*.1},o),e.style=o),e}function ld(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return VN(this,r,t,e);if(r==="blur")return FN(this,r,e);if(r==="select")return GN(this,r,e)}return e}function $i(r){r.stateProxy=ld;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=ld),e&&(e.stateProxy=ld)}function eS(r,t){!sD(r,t)&&!r.__highByOuter&&an(r,eD)}function rS(r,t){!sD(r,t)&&!r.__highByOuter&&an(r,rD)}function ja(r,t){r.__highByOuter|=1<<(t||0),an(r,eD)}function Ka(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&an(r,rD)}function nD(r){an(r,Vm)}function Gm(r){an(r,aD)}function iD(r){an(r,NN)}function oD(r){an(r,BN)}function sD(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function lD(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=Nm(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){aD(u)}),s&&e.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Ng(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,f){for(var v=0;v0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function In(r,t,e){Ri(r,!0),an(r,$i),zg(r,t,e)}function XN(r){Ri(r,!1)}function $t(r,t,e,a){a?XN(r):In(r,t,e)}function zg(r,t,e){var a=ft(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var nS=["emphasis","blur","select"],$N={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function he(r,t,e,a){e=e||"itemStyle";for(var n=0;n1&&(o*=ud(d),s*=ud(d));var p=(n===i?-1:1)*ud((o*o*(s*s)-o*o*(c*c)-s*s*(h*h))/(o*o*(c*c)+s*s*(h*h)))||0,g=p*o*c/s,y=p*-s*h/o,m=(r+e)/2+uf(v)*g-lf(v)*y,_=(t+a)/2+lf(v)*g+uf(v)*y,S=lS([1,0],[(h-g)/o,(c-y)/s]),x=[(h-g)/o,(c-y)/s],b=[(-1*h-g)/o,(-1*c-y)/s],w=lS(x,b);if(Gg(x,b)<=-1&&(w=Ys),Gg(x,b)>=1&&(w=0),w<0){var T=Math.round(w/Ys*1e6)/1e6;w=Ys*2+T%2*Ys}f.addData(u,m,_,o,s,S,w,v,i)}var tB=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,eB=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function rB(r){var t=new _a;if(!r)return t;var e=0,a=0,n=e,i=a,o,s=_a.CMD,l=r.match(tB);if(!l)return t;for(var u=0;uP*P+k*k&&(T=M,C=D),{cx:T,cy:C,x0:-f,y0:-v,x1:T*(n/x-1),y1:C*(n/x-1)}}function uB(r){var t;if(W(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function fB(r,t){var e,a=Tl(t.r,0),n=Tl(t.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,v=t.cy,h=!!t.clockwise,c=fS(u-l),d=c>fd&&c%fd;if(d>Or&&(c=d),!(a>Or))r.moveTo(f,v);else if(c>fd-Or)r.moveTo(f+a*mo(l),v+a*si(l)),r.arc(f,v,a,l,u,!h),n>Or&&(r.moveTo(f+n*mo(u),v+n*si(u)),r.arc(f,v,n,u,l,h));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0,w=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,L=void 0,P=void 0,k=a*mo(l),R=a*si(l),O=n*mo(u),E=n*si(u),z=c>Or;if(z){var V=t.cornerRadius;V&&(e=uB(V),p=e[0],g=e[1],y=e[2],m=e[3]);var F=fS(a-n)/2;if(_=ta(F,y),S=ta(F,m),x=ta(F,p),b=ta(F,g),C=w=Tl(_,S),M=T=Tl(x,b),(w>Or||T>Or)&&(D=a*mo(u),I=a*si(u),L=n*mo(l),P=n*si(l),cOr){var at=ta(y,C),gt=ta(m,C),J=ff(L,P,k,R,a,at,h),ct=ff(D,I,O,E,a,gt,h);r.moveTo(f+J.cx+J.x0,v+J.cy+J.y0),C0&&r.arc(f+J.cx,v+J.cy,at,Oe(J.y0,J.x0),Oe(J.y1,J.x1),!h),r.arc(f,v,a,Oe(J.cy+J.y1,J.cx+J.x1),Oe(ct.cy+ct.y1,ct.cx+ct.x1),!h),gt>0&&r.arc(f+ct.cx,v+ct.cy,gt,Oe(ct.y1,ct.x1),Oe(ct.y0,ct.x0),!h))}else r.moveTo(f+k,v+R),r.arc(f,v,a,l,u,!h);if(!(n>Or)||!z)r.lineTo(f+O,v+E);else if(M>Or){var at=ta(p,M),gt=ta(g,M),J=ff(O,E,D,I,n,-gt,h),ct=ff(k,R,L,P,n,-at,h);r.lineTo(f+J.cx+J.x0,v+J.cy+J.y0),M0&&r.arc(f+J.cx,v+J.cy,gt,Oe(J.y0,J.x0),Oe(J.y1,J.x1),!h),r.arc(f,v,n,Oe(J.cy+J.y1,J.cx+J.x1),Oe(ct.cy+ct.y1,ct.cx+ct.x1),h),at>0&&r.arc(f+ct.cx,v+ct.cy,at,Oe(ct.y1,ct.x1),Oe(ct.y0,ct.x0),!h))}else r.lineTo(f+O,v+E),r.arc(f,v,n,u,l,h)}r.closePath()}}}var vB=(function(){function r(){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 r})(),ke=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new vB},t.prototype.buildPath=function(e,a){fB(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(Tt);ke.prototype.type="sector";var hB=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),ws=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new hB},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.PI*2;e.moveTo(n+a.r,i),e.arc(n,i,a.r,0,o,!1),e.moveTo(n+a.r0,i),e.arc(n,i,a.r0,0,o,!0)},t})(Tt);ws.prototype.type="ring";function cB(r,t,e,a){var n=[],i=[],o=[],s=[],l,u,f,v;if(a){f=[1/0,1/0],v=[-1/0,-1/0];for(var h=0,c=r.length;h=2){if(a){var i=cB(n,a,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,v=n.length;sui[1]){if(i=!1,we.negativeSize||a)return i;var l=vf(ui[0]-li[1]),u=vf(li[0]-ui[1]);vd(l,u)>cf.len()&&(l=u||!we.bidirectional)&&(st.scale(hf,s,-u*n),we.useDir&&we.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var n=this._axes[t],i=this._origin,o=e[0].dot(n)+i[t],s=o,l=o,u=1;u0){var v=f.duration,h=f.delay,c=f.easing,d={duration:v,delay:h||0,easing:c,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function It(r,t,e,a,n,i){Um("update",r,t,e,a,n,i)}function Zt(r,t,e,a,n,i){Um("enter",r,t,e,a,n,i)}function Qo(r){if(!r.__zr)return!0;for(var t=0;tua(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function cS(r){return!r.isGroup}function CB(r){return r.shape!=null}function Bu(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){cS(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return CB(o)&&(s.shape=et(o.shape)),s}var i=a(r);t.traverse(function(o){if(cS(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),It(o,l,e,ft(o).dataIndex)}}})}function Xm(r,t){return U(r,function(e){var a=e[0];a=re(a,t.x),a=vr(a,t.x+t.width);var n=e[1];return n=re(n,t.y),n=vr(n,t.y+t.height),[a,n]})}function wD(r,t){var e=re(r.x,t.x),a=vr(r.x+r.width,t.x+t.width),n=re(r.y,t.y),i=vr(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function As(r,t,e){var a=G({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),nt(n,e),new xe(a)):ss(r.replace("path://",""),a,e,"center")}function Cl(r,t,e,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=hd(c,d,f,v)/h;return!(g<0||g>1)}function hd(r,t,e,a){return r*a-e*t}function AB(r){return r<=1e-6&&r>=-1e-6}function qi(r,t,e,a,n){return t==null||(Dt(t)?qt[0]=qt[1]=qt[2]=qt[3]=t:(qt[0]=t[0],qt[1]=t[1],qt[2]=t[2],qt[3]=t[3]),a&&(qt[0]=re(0,qt[0]),qt[1]=re(0,qt[1]),qt[2]=re(0,qt[2]),qt[3]=re(0,qt[3])),e&&(qt[0]=-qt[0],qt[1]=-qt[1],qt[2]=-qt[2],qt[3]=-qt[3]),dS(r,qt,"x","width",3,1,n&&n[0]||0),dS(r,qt,"y","height",0,2,n&&n[1]||0)),r}var qt=[0,0,0,0];function dS(r,t,e,a,n,i,o){var s=t[i]+t[n],l=r[a];r[a]+=s,o=re(0,vr(o,l)),r[a]=0?-t[n]:t[i]>=0?l+t[i]:ua(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function nn(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=X(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(At(l),function(f){q(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:nt({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Hg(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Wn(r,t){if(r)if(W(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function oc(r,t,e){AD(r,t,e,-1/0)}function AD(r,t,e,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Un(r,t){return mt(mt({},r,!0),t,!0)}const zB={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:". "}}}},VB={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:""}}}};var jv="ZH",Km="EN",ts=Km,_v={},Jm={},RD=Ct.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ts).toUpperCase();return r.indexOf(jv)>-1?jv:ts})():ts;function Qm(r,t){r=r.toUpperCase(),Jm[r]=new wt(t),_v[r]=t}function GB(r){if(X(r)){var t=_v[r.toUpperCase()]||{};return r===jv||r===Km?et(t):mt(et(t),et(_v[ts]),!1)}else return mt(et(r),et(_v[ts]),!1)}function Ug(r){return Jm[r]}function FB(){return Jm[ts]}Qm(Km,zB);Qm(jv,VB);var Yg=null;function HB(r){Yg||(Yg=r)}function se(){return Yg}var t0=1e3,e0=t0*60,Wl=e0*60,Tr=Wl*24,_S=Tr*365,WB={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})/},Sv={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},UB="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",pf="{yyyy}-{MM}-{dd}",SS={year:"{yyyy}",month:"{yyyy}-{MM}",day:pf,hour:pf+" "+Sv.hour,minute:pf+" "+Sv.minute,second:pf+" "+Sv.second,millisecond:UB},ar=["year","month","day","hour","minute","second","millisecond"],YB=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ZB(r){return!X(r)&&!tt(r)?XB(r):r}function XB(r){r=r||{};var t={},e=!0;return A(ar,function(a){e&&(e=r[a]==null)}),A(ar,function(a,n){var i=r[a];t[a]={};for(var o=null,s=n;s>=0;s--){var l=ar[s],u=it(i)&&!W(i)?i[l]:i,f=void 0;W(u)?(f=u.slice(),o=f[0]||""):X(u)?(o=u,f=[o]):(o==null?o=Sv[a]:WB[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[a][l]=f}}),t}function We(r,t){return r+="","0000".substr(0,t-r.length)+r}function Ul(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function $B(r){return r===Ul(r)}function qB(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function zu(r,t,e,a){var n=wa(r),i=n[kD(e)](),o=n[r0(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[a0(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[n0(e)](),v=(f-1)%12+1,h=n[i0(e)](),c=n[o0(e)](),d=n[s0(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof wt?a:Ug(a||RD)||FB(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),x=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,We(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,We(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,We(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,x[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,We(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,We(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,We(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,We(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,We(d,3)).replace(/{S}/g,d+"")}function jB(r,t,e,a,n){var i=null;if(X(e))i=e;else if(tt(e)){var o={time:r.time,level:r.time.level},s=se();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=Xo(r.value,n);i=e[f][f][0]}}return zu(new Date(r.value),i,n,a)}function Xo(r,t){var e=wa(r),a=e[r0(t)]()+1,n=e[a0(t)](),i=e[n0(t)](),o=e[i0(t)](),s=e[o0(t)](),l=e[s0(t)](),u=l===0,f=u&&s===0,v=f&&o===0,h=v&&i===0,c=h&&n===1,d=c&&a===1;return d?"year":c?"month":h?"day":v?"hour":f?"minute":u?"second":"millisecond"}function Kv(r,t,e){switch(t){case"year":r[ED(e)](0);case"month":r[OD(e)](1);case"day":r[ND(e)](0);case"hour":r[BD(e)](0);case"minute":r[zD(e)](0);case"second":r[VD(e)](0)}return r}function kD(r){return r?"getUTCFullYear":"getFullYear"}function r0(r){return r?"getUTCMonth":"getMonth"}function a0(r){return r?"getUTCDate":"getDate"}function n0(r){return r?"getUTCHours":"getHours"}function i0(r){return r?"getUTCMinutes":"getMinutes"}function o0(r){return r?"getUTCSeconds":"getSeconds"}function s0(r){return r?"getUTCMilliseconds":"getMilliseconds"}function KB(r){return r?"setUTCFullYear":"setFullYear"}function ED(r){return r?"setUTCMonth":"setMonth"}function OD(r){return r?"setUTCDate":"setDate"}function ND(r){return r?"setUTCHours":"setHours"}function BD(r){return r?"setUTCMinutes":"setMinutes"}function zD(r){return r?"setUTCSeconds":"setSeconds"}function VD(r){return r?"setUTCMilliseconds":"setMilliseconds"}function JB(r,t,e,a,n,i,o,s){var l=new Mt({style:{text:r,font:t,align:e,verticalAlign:a,padding:n,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function l0(r){if(!Im(r))return X(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function u0(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ls=Du;function Zg(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&sr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?wa(r):r;if(isNaN(+l)){if(s)return"-"}else return zu(l,a,e)}if(t==="ordinal")return Pv(r)?n(r):Dt(r)&&i(r)?r+"":"-";var u=ma(r);return i(u)?l0(u):Pv(r)?n(r):typeof r=="boolean"?r+"":"-"}var xS=["a","b","c","d","e","f","g"],pd=function(r,t){return"{"+r+(t??"")+"}"};function f0(r,t,e){W(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i':'';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function tz(r,t,e){(r==="week"||r==="month"||r==="quarter"||r==="half-year"||r==="year")&&(r=`MM-dd -yyyy`);var a=wa(t),n=e?"getUTC":"get",i=a[n+"FullYear"](),o=a[n+"Month"]()+1,s=a[n+"Date"](),l=a[n+"Hours"](),u=a[n+"Minutes"](),f=a[n+"Seconds"](),v=a[n+"Milliseconds"]();return r=r.replace("MM",We(o,2)).replace("M",o).replace("yyyy",i).replace("yy",We(i%100+"",2)).replace("dd",We(s,2)).replace("d",s).replace("hh",We(l,2)).replace("h",l).replace("mm",We(u,2)).replace("m",u).replace("ss",We(f,2)).replace("s",f).replace("SSS",We(v,3)),r}function ez(r){return r&&r.charAt(0).toUpperCase()+r.substr(1)}function Ki(r,t){return t=t||"transparent",X(r)?r:it(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Jv(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var xv={},gd={},Is=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=a(xv),this._normalMasterList=a(gd);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){A(this._normalMasterList,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){xv[t]=e;return}gd[t]=e},r.get=function(t){return gd[t]||xv[t]},r})();function rz(r){return!!xv[r]}var Xg={coord:1,coord2:2};function az(r){FD.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var FD=K();function nz(r){var t=r.getShallow("coord",!0),e=Xg.coord;if(t==null){var a=FD.get(r.type);a&&a.getCoord2&&(e=Xg.coord2,t=a.getCoord2(r))}return{coord:t,from:e}}var sa={none:0,dataCoordSys:1,boxCoordSys:2};function HD(r,t){var e=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=sa.none;if(e){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=sa.dataCoordSys,i||(n=sa.none)):a==="box"&&(n=sa.boxCoordSys,!i&&!rz(e)&&(n=sa.none))}return{coordSysType:e,kind:n}}function Vu(r){var t=r.targetModel,e=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=HD(t),o=i.kind,s=i.coordSysType;if(n&&o!==sa.dataCoordSys&&(o=sa.dataCoordSys,s=e),o===sa.none||s!==e)return!1;var l=a(e,t);return l?(o===sa.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var WD=function(r,t){var e=t.getReferringComponents(r,jt).models[0];return e&&e.coordinateSystem},bv=A,UD=["left","right","top","bottom","width","height"],ki=[["width","left","right"],["height","top","bottom"]];function v0(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),v=t.childAt(u+1),h=v&&v.getBoundingRect(),c,d;if(r==="horizontal"){var p=f.width+(h?-h.x+f.x:0);c=i+p,c>a||l.newline?(i=0,c=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);d=o+g,d>n||l.newline?(i+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=c+e:o=d+e)})}var Gi=v0;pt(v0,"vertical");pt(v0,"horizontal");function YD(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function iz(r,t){var e=de(r,t,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(e.type===Al.point)i=e.refPoint,n=Xt(a,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=W(o)?o:[o,o];n=Xt(a,e.refContainer),i=e.boxCoordFrom===Xg.coord2?e.refPoint:[Z(s[0],n.width)+n.x,Z(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function ZD(r,t){var e=iz(r,t),a=e.viewRect,n=e.center,i=r.get("radius");W(i)||(i=[0,i]);var o=Z(a.width,t.getWidth()),s=Z(a.height,t.getHeight()),l=Math.min(o,s),u=Z(i[0],l/2),f=Z(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function Xt(r,t,e){e=Ls(e||0);var a=t.width,n=t.height,i=Z(r.left,a),o=Z(r.top,n),s=Z(r.right,a),l=Z(r.bottom,n),u=Z(r.width,a),f=Z(r.height,n),v=e[2]+e[0],h=e[1]+e[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-h-i),isNaN(f)&&(f=n-l-v-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(i)&&(i=a-s-u-h),isNaN(o)&&(o=n-l-f-v),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-v;break}i=i||0,o=o||0,isNaN(u)&&(u=a-h-i-(s||0)),isNaN(f)&&(f=n-v-o-(l||0));var d=new lt((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}function XD(r,t,e){var a=r.getShallow("preserveAspect",!0);if(!a)return t;var n=t.width/t.height;if(Math.abs(Math.atan(e)-Math.atan(n))<1e-9)return t;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=a==="cover";return n>e&&!l||n=p)return v;for(var g=0;g=0;l--)s=mt(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return xs(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){return YD(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})(wt);WM(xt,wt);Kh(xt);NB(xt);BB(xt,lz);function lz(r){var t=[];return A(xt.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return fa(e).main}),r!=="dataset"&&yt(t,"dataset")<=0&&t.unshift("dataset"),t}var B={color:{},darkColor:{},size:{}},te=B.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)"};G(te,{primary:te.neutral80,secondary:te.neutral70,tertiary:te.neutral60,quaternary:te.neutral50,disabled:te.neutral20,border:te.neutral30,borderTint:te.neutral20,borderShade:te.neutral40,background:te.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:te.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:te.neutral70,axisLineTint:te.neutral40,axisTick:te.neutral70,axisTickMinor:te.neutral60,axisLabel:te.neutral70,axisSplitLine:te.neutral15,axisMinorSplitLine:te.neutral05});for(var fi in te)if(te.hasOwnProperty(fi)){var bS=te[fi];fi==="theme"?B.darkColor.theme=te.theme.slice():fi==="highlight"?B.darkColor.highlight="rgba(255,231,130,0.4)":fi.indexOf("accent")===0?B.darkColor[fi]=Wa(bS,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):B.darkColor[fi]=Wa(bS,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}B.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var qD="";typeof navigator<"u"&&(qD=navigator.platform||"");var _o="rgba(0, 0, 0, 0.2)",jD=B.color.theme[0],uz=Wa(jD,null,null,.9);const fz={darkMode:"auto",colorBy:"series",color:B.color.theme,gradientColor:[uz,jD],aria:{decal:{decals:[{color:_o,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:_o,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:_o,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:_o,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:_o,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:_o,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:qD.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};var KD=K(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),hr="original",Me="arrayRows",cr="objectRows",$r="keyedColumns",Rn="typedArray",JD="unknown",Ur="column",io="row",De={Must:1,Might:2,Not:3},QD=bt();function vz(r){QD(r).datasetMap=K()}function tL(r,t,e){var a={},n=c0(t);if(!n||!r)return a;var i=[],o=[],s=t.ecModel,l=QD(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,v;r=r.slice(),A(r,function(p,g){var y=it(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,v=d(y)),a[y.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:v,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=h.valueWayDim;c(a[y],_,m),c(o,_,m),h.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,0,m);else{var _=h.categoryWayDim;c(a[y],_,m),c(o,_,m),h.categoryWayDim+=m}});function c(p,g,y){for(var m=0;mt)return r[a];return r[e-1]}function aL(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?e:gz(a,o);if(f=f||e,!(!f||!f.length)){var v=f[l];return n&&(u[n]=v),s.paletteIdx=(l+1)%f.length,v}}function yz(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var gf,Zs,TS,CS="\0_ec_inner",mz=1,p0=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new wt(i),this._locale=new wt(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=DS(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,DS(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?TS(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=K(),u=a&&a.replaceMergeMainTypeMap;vz(this),A(e,function(v,h){v!=null&&(xt.hasClass(h)?h&&(s.push(h),l.set(h,!0)):n[h]=n[h]==null?et(v):mt(n[h],v,!0))}),u&&u.each(function(v,h){xt.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),xt.topologicalTravel(s,xt.getAllClassMainTypes(),f,this);function f(v){var h=dz(this,v,Ht(e[v])),c=i.get(v),d=c?u&&u.get(v)?"replaceMerge":"normalMerge":"replaceAll",p=zM(c,h,d);kO(p,v,xt),n[v]=null,i.set(v,null),o.set(v,0);var g=[],y=[],m=0,_;A(p,function(S,x){var b=S.existing,w=S.newOption;if(!w)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var T=v==="series",C=xt.getClass(v,S.keyInfo.subType,!T);if(!C)return;if(v==="tooltip"){if(_)return;_=!0}if(b&&b.constructor===C)b.name=S.keyInfo.name,b.mergeOption(w,this),b.optionUpdated(w,!1);else{var M=G({componentIndex:x},S.keyInfo);b=new C(w,this,this,M),G(b,M),S.brandNew&&(b.__requireNewView=!0),b.init(w,this,this),b.optionUpdated(null,!0)}}b?(g.push(b.option),y.push(b),m++):(g.push(void 0),y.push(void 0))},this),n[v]=g,i.set(v,y),o.set(v,m),v==="series"&&gf(this)}this._seriesIndices||gf(this)},t.prototype.getOption=function(){var e=et(this.option);return A(e,function(a,n){if(xt.hasClass(n)){for(var i=Ht(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!ru(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[CS],e},t.prototype.setTheme=function(e){this._theme=new wt(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,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function Mz(r,t){return r.join(",")===t.join(",")}var Er=A,lu=it,LS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function yd(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=LS.length;e0?e[o-1].seriesModel:null)}),Nz(e)}})}function Nz(r){A(r,function(t,e){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,v){var h=o.get(t.stackedDimension,v);if(isNaN(h))return n;var c,d;s?d=o.getRawIndex(v):c=o.get(t.stackedByDimension,v);for(var p=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,c)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&h>=0&&m>0||l==="samesign"&&h<=0&&m<0){h=SO(h,m),p=m;break}}}return a[0]=h,a[1]=p,a})})}var uc=(function(){function r(t){this.data=t.data||(t.sourceFormat===$r?{}:[]),this.sourceFormat=t.sourceFormat||JD,this.seriesLayoutBy=t.seriesLayoutBy||Ur,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;ap&&(p=_)}c[0]=d,c[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};NS=(t={},t[Me+"_"+Ur]={pure:!0,appendData:i},t[Me+"_"+io]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[cr]={pure:!0,appendData:i},t[$r]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var f=s[u]||(s[u]=[]),v=0;v<(l||[]).length;v++)f.push(l[v])})}},t[hr]={appendData:i},t[Rn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return us(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r})();function GS(r){var t,e;return it(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function Yl(r){return new Uz(r)}var Uz=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var v;(this._dirty||i==="reset")&&(this._dirty=!1,v=this._doReset(a)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!a&&(v||c1&&a>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},Zz=(function(){function r(t,e){if(!Dt(e)){var a="";Et(a)}this._opFn=dL[t],this._rvalFloat=ma(e)}return r.prototype.evaluate=function(t){return Dt(t)?this._opFn(t,this._rvalFloat):this._opFn(ma(t),this._rvalFloat)},r})(),pL=(function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=Dt(t)?t:ma(t),n=Dt(e)?e:ma(e),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=X(t),l=X(e);s&&(a=l?t:0),l&&(n=s?e:0)}return an?-this._resultLT:0},r})(),Xz=(function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=ma(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var a=typeof t;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(e=ma(t)===this._rvalFloat)}return this._isEQ?e:!e},r})();function $z(r,t){return r==="eq"||r==="ne"?new Xz(r==="eq",t):q(dL,r)?new Zz(r,t):null}var qz=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return kn(t,e)},r})();function jz(r,t){var e=new qz,a=r.data,n=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Ur&&Et(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";q(l,y)&&Et(_),l[y]=m}});else for(var f=0;f65535?nV:iV}function xo(){return[1/0,-1/0]}function oV(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function WS(r,t,e,a,n){var i=mL[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=U(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&at)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i=v&&m<=h||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=c[n[0]],_=c[n[1]],S=t[n[1]][0],x=t[n[1]][1],y=0;y=v&&m<=h||isNaN(m))&&(b>=S&&b<=x||isNaN(b))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y=v&&m<=h||isNaN(m))&&(l[u++]=w)}else for(var y=0;yt[M][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,v,h,c=new(So(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var d=1;df&&(f=v,h=S)}D>0&&Ds&&(p=s-f);for(var g=0;gd&&(d=m,c=f+g)}var _=this.getRawIndex(v),S=this.getRawIndex(c);vf-d&&(l=f-d,s.length=l);for(var p=0;pv[1]&&(v[1]=y),h[c++]=m}return i._count=c,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();il&&(l=v)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,a,n,i){return kn(e[i],this._dimensions[i])}Sd={arrayRows:t,objectRows:function(e,a,n,i){return kn(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return kn(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}})(),r})(),_L=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if(mf(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Ze(s)?Rn:hr,i=[];var v=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},c=Q(v.seriesLayoutBy,h.seriesLayoutBy)||null,d=Q(v.sourceHeader,h.sourceHeader),p=Q(v.dimensions,h.dimensions),g=c!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;n=g?[jg(s,{seriesLayoutBy:c,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[jg(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&YS(i)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var f=u.getSource(n||0),v="";n!=null&&!f&&YS(v),s.push(f),l.push(u._getVersionSign())}),a?o=rV(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[Bz(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return A(r.blocks,function(n){var i=wL(n);i>=t&&(t=i+ +(a&&(!i||Jg(n)&&!n.noHeader)))}),t}return 0}function fV(r,t,e,a){var n=t.noHeader,i=hV(wL(t)),o=[],s=t.blocks||[];Re(!s||W(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(q(u,l)){var f=new pL(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=t.valueFormatter,m=bL(p)(y?G(G({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var v=r.renderMode==="richText"?o.join(i.richText):Qg(a,o.join(""),n?e:i.html);if(n)return v;var h=Zg(t.header,"ordinal",r.useUTC),c=xL(a,r.renderMode).nameStyle,d=SL(a);return r.renderMode==="richText"?TL(r,h,c)+i.richText+v:Qg(a,'
'+ze(h)+"
"+v,e)}function vV(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=W(S)?S:[S],U(S,function(x,b){return Zg(x,W(c)?c[b]:c,u)})};if(!(i&&o)){var v=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||B.color.secondary,n),h=i?"":Zg(l,"ordinal",u),c=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!i,g=!s&&i,y=xL(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":v)+(i?"":TL(r,h,m))+(o?"":pV(r,d,p,g,_)):Qg(a,(s?"":v)+(i?"":cV(h,!s,m))+(o?"":dV(d,p,g,_)),e)}}function ZS(r,t,e,a,n,i){if(r){var o=bL(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function hV(r){return{html:lV[r],richText:uV[r]}}function Qg(r,t,e){var a='
',n="margin: "+e+"px 0 0",i=SL(r);return'
'+t+a+"
"}function cV(r,t,e){var a=t?"margin-left:2px":"";return''+ze(r)+""}function dV(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=W(r)?r:[r],''+U(r,function(o){return ze(o)}).join("  ")+""}function TL(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function pV(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(t)?t.join(" "):t,i)}function CL(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return Ki(a)}function AL(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var xd=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=kM()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=GD({color:e,type:t,renderMode:a,markerId:n});return X(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};W(e)?A(e,function(i){return G(a,i)}):G(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r})();function ML(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=W(s),u=CL(t,e),f,v,h,c;if(o>1||l&&!o){var d=gV(s,t,e,i,u);f=d.inlineValues,v=d.inlineValueTypes,h=d.blocks,c=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);c=f=us(n,e,i[0]),v=p.type}else c=f=l?s[0]:s;var g=Pm(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return ue("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ue("nameValue",{markerType:"item",markerColor:u,name:_,noName:!sr(_),value:f,valueType:v,dataIndex:e})].concat(h||[])})}function gV(r,t,e,a,n){var i=t.getData(),o=Mr(r,function(v,h,c){var d=i.getDimensionInfo(c);return v=v||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?A(a,function(v){f(us(i,e,v),v)}):A(r,f);function f(v,h){var c=i.getDimensionInfo(h);!c||c.otherDims.tooltip===!1||(o?u.push(ue("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:v,valueType:c.type})):(s.push(v),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var fn=bt();function _f(r,t){return r.getName(t)||r.getId(t)}var wv="__universalTransitionEnabled",zt=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Yl({count:mV,reset:_V}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=fn(this).sourceManager=new _L(this);i.prepareSource();var o=this.getInitialData(e,n);$S(o,this),this.dataTask.context.data=o,fn(this).dataBeforeProcessed=o,XS(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=su(this),i=n?no(e):{},o=this.subType;xt.hasClass(o)&&(o+="Series"),mt(e,a.getTheme().get(this.subType)),mt(e,this.getDefaultOption()),Yi(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Sa(e,i,n)},t.prototype.mergeOption=function(e,a){e=mt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=su(this);n&&Sa(this.option,e,n);var i=fn(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);$S(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,fn(this).dataBeforeProcessed=o,XS(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Ze(e))for(var a=["show"],n=0;n=0&&h<0)&&(v=m,h=y,c=0),y===h&&(f[c++]=p))}),f.length=c,f},t.prototype.formatTooltip=function(e,a,n){return ML({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ct.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=d0.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},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,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[_f(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[wv])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){it(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,a)}},t.registerClass=function(e){return xt.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})(xt);Qt(zt,fc);Qt(zt,d0);WM(zt,xt);function XS(r){var t=r.name;Pm(r)||(r.name=yV(r)||t)}function yV(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return A(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function mV(r){return r.model.getRawData().count()}function _V(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),SV}function SV(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function $S(r,t){A(rs(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,pt(xV,t))})}function xV(r,t){var e=ty(r);return e&&e.setOutputEnd((t||this).count()),t}function ty(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}var Wt=(function(){function r(){this.group=new rt,this.uid=Ds("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();km(Wt);Kh(Wt);function Ps(){var r=bt();return function(t){var e=r(t),a=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var DL=bt(),bV=Ps(),Nt=(function(){function r(){this.group=new rt,this.uid=Ds("viewChart"),this.renderTask=Yl({plan:wV,reset:TV}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.highlight=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&jS(i,n,"emphasis")},r.prototype.downplay=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&jS(i,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateLayout=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateVisual=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.eachRendered=function(t){Wn(this.group,t)},r.markUpdateMethod=function(t,e){DL(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function qS(r,t,e){r&&nu(r)&&(t==="emphasis"?ja:Ka)(r,e)}function jS(r,t,e){var a=Zi(r,t),n=t&&t.highlightKey!=null?jN(t.highlightKey):null;a!=null?A(Ht(a),function(i){qS(r.getItemGraphicEl(i),e,n)}):r.eachItemGraphicEl(function(i){qS(i,e,n)})}km(Nt);Kh(Nt);function wV(r){return bV(r.model)}function TV(r){var t=r.model,e=r.ecModel,a=r.api,n=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=n&&DL(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,n),CV[l]}var CV={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Qv="\0__throttleOriginMethod",KS="\0__throttleRate",JS="\0__throttleType";function hc(r,t,e){var a,n=0,i=0,o=null,s,l,u,f;t=t||0;function v(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var c=[],d=0;d=0?v():o=setTimeout(v,-s),n=a};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(c){f=c},h}function Rs(r,t,e,a){var n=r[t];if(n){var i=n[Qv]||n,o=n[JS],s=n[KS];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=hc(i,e,a==="debounce"),n[Qv]=i,n[JS]=a,n[KS]=e}return n}}function uu(r,t){var e=r[t];e&&e[Qv]&&(e.clear&&e.clear(),r[t]=e[Qv])}var QS=bt(),tx={itemStyle:Xi(PD,!0),lineStyle:Xi(ID,!0)},AV={lineStyle:"stroke",itemStyle:"fill"};function LL(r,t){var e=r.visualStyleMapper||tx[t];return e||(console.warn("Unknown style type '"+t+"'."),tx.itemStyle)}function IL(r,t){var e=r.visualDrawType||AV[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var MV={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=LL(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=IL(r,a),u=o[l],f=tt(u)?u:null,v=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||v){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||tt(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||tt(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(c,d){var p=r.getDataParams(d),g=G({},o);g[l]=f(p),c.setItemVisual(d,"style",g)}}}},$s=new wt,DV={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=LL(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){$s.option=l[a];var u=n($s),f=o.ensureUniqueItemVisual(s,"style");G(f,u),$s.option.decal&&(o.setItemVisual(s,"decal",$s.option.decal),$s.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},LV={performRawSeries:!0,overallReset:function(r){var t=K();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),QS(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),n={},i=e.getData(),o=QS(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=IL(e,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],v=i.getItemVisual(f,"colorFromPalette");if(v){var h=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",d=a.count();h[l]=e.getColorFromPalette(c,o,d)}})}})}},Sf=Math.PI;function IV(r,t){t=t||{},nt(t,{text:"loading",textColor:B.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:B.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new rt,a=new St({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new Mt({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new St({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new Ou({shape:{startAngle:-Sf/2,endAngle:-Sf/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:Sf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Sf*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var PL=(function(){function r(t,e,a,n){this._stageTaskMap=K(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&i>=a.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=K();t.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";Re(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),v=f.seriesTaskMap,h=f.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&h.dirty(),o.updatePayload(h,a);var p=o.getPerformArgs(h,n.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else v&&v.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=K(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(v){var h=v.uid,c=s.set(h,o&&o.get(h)||Yl({plan:OV,reset:NV,count:zV}));c.context={model:v,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(v,c)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||Yl({reset:PV});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=K(),u=t.seriesType,f=t.getTargetSeries,v=!0,h=!1,c="";Re(!t.createOnAllSeries,c),u?a.eachRawSeriesByType(u,d):f?f(a,n).each(d):(v=!1,A(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(h=!0,Yl({reset:RV,onDirty:EV})));y.context={model:p,overallProgress:v},y.agent=o,y.__block=v,i._pipe(p,y)}h&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return tt(t)&&(t={overallReset:t,seriesType:VV(t)}),t.uid=Ds("stageHandler"),e&&(t.visualType=e),t},r})();function PV(r){r.overallReset(r.ecModel,r.api,r.payload)}function RV(r){return r.overallProgress&&kV}function kV(){this.agent.dirty(),this.getDownstream().dirty()}function EV(){this.agent&&this.agent.dirty()}function OV(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function NV(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Ht(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?U(t,function(e,a){return RL(a)}):BV}var BV=RL(0);function RL(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i0&&c===u.length-h.length){var d=u.slice(0,c);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function f(v,h,c,d){return v[c]==null||h[d||c]===v[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),ey=["symbol","symbolSize","symbolRotate","symbolOffset"],rx=ey.concat(["symbolKeepAspect"]),HV={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&Oi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function ry(r,t,e){for(var a=t.type==="radial"?a5(r,t,e):r5(r,t,e),n=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:Dt(r)?[r]:W(r)?r:null}function x0(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&i5(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=U(e,function(i){return i/n}),a/=n)}return[e,a]}var o5=new _a(!0);function rh(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function ax(r){return typeof r=="string"&&r!=="none"}function ah(r){var t=r.fill;return t!=null&&t!=="none"}function nx(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function ix(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function ay(r,t,e){var a=Em(t.image,t.__image,e);if(Jh(a)){var n=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*El),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function s5(r,t,e,a){var n,i=rh(e),o=ah(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||o5,v=t.__dirty;if(!a){var h=e.fill,c=e.stroke,d=o&&!!h.colorStops,p=i&&!!c.colorStops,g=o&&!!h.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,x=void 0,b=void 0;(d||p)&&(b=t.getBoundingRect()),d&&(m=v?ry(r,h,b):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=v?ry(r,c,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=v||!t.__canvasFillPattern?ay(r,h,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(x=v||!t.__canvasStrokePattern?ay(r,c,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(x?r.strokeStyle=x:i=!1)}var w=t.getGlobalScale();f.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(n=x0(t),T=n[0],C=n[1]);var M=!0;(u||v&Vo)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),t.buildPath(f,t.shape,a),f.toStatic(),t.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(e.strokeFirst?(i&&ix(r,e),o&&nx(r,e)):(o&&nx(r,e),i&&ix(r,e))),T&&r.setLineDash([])}function l5(r,t,e){var a=t.__image=Em(e.image,t.__image,t,t.onload);if(!(!a||!Jh(a))){var n=e.x||0,i=e.y||0,o=t.getWidth(),s=t.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(a,u,f,e.sWidth,e.sHeight,n,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,v=o-u,h=s-f;r.drawImage(a,u,f,v,h,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function u5(r,t,e){var a,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||$a,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=x0(t),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(rh(e)&&r.strokeText(n,e.x,e.y),ah(e)&&r.fillText(n,e.x,e.y)):(ah(e)&&r.fillText(n,e.x,e.y),rh(e)&&r.strokeText(n,e.x,e.y)),i&&r.setLineDash([])}}var ox=["shadowBlur","shadowOffsetX","shadowOffsetY"],sx=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function zL(r,t,e,a,n){var i=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){Je(r,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?zi.opacity:o}(a||t.blend!==e.blend)&&(i||(Je(r,n),i=!0),r.globalCompositeOperation=t.blend||zi.blend);for(var s=0;s0&&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,a,n){if(!this[fe]){if(this._disposed){this.id;return}var i,o,s;if(it(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[fe]=!0,Co(this),!this._model||a){var l=new wz(this._api),u=this._theme,f=this._model=new p0;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},sy);var v={seriesTransition:s,optionChanged:!0};if(n)this[be]={silent:i,updateParams:v},this[fe]=!1,this.getZr().wakeUp();else{try{pi(this),Da.update.call(this,null,v)}catch(h){throw this[be]=null,this[fe]=!1,h}this._ssr||this._zr.flush(),this[be]=null,this[fe]=!1,wo.call(this,i),To.call(this,i)}}},t.prototype.setTheme=function(e,a){if(!this[fe]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[be]&&(i==null&&(i=this[be].silent),o=this[be].updateParams,this[be]=null),this[fe]=!0,Co(this);try{this._updateTheme(e),n.setTheme(this._theme),pi(this),Da.update.call(this,{type:"setTheme"},o)}catch(s){throw this[fe]=!1,s}this[fe]=!1,wo.call(this,i),To.call(this,i)}}},t.prototype._updateTheme=function(e){X(e)&&(e=a2[e]),e&&(e=et(e),e&&oL(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||Ct.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,a=e.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;A(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(sh[n]){var l=s,u=s,f=-s,v=-s,h=[],c=e&&e.pixelRatio||this.getDevicePixelRatio();A(Fi,function(_,S){if(_.group===n){var x=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(et(e)),b=_.getDom().getBoundingClientRect();l=i(b.left,l),u=i(b.top,u),f=o(b.right,f),v=o(b.bottom,v),h.push({dom:x,left:b.left,top:b.top})}}),l*=c,u*=c,f*=c,v*=c;var d=f-l,p=v-u,g=tr.createCanvas(),y=Cg(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return A(h,function(_){var S=_.left-l,x=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new St({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),A(h,function(_){var S=new xe({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a,n){return Tf(this,"convertToPixel",e,a,n)},t.prototype.convertToLayout=function(e,a,n){return Tf(this,"convertToLayout",e,a,n)},t.prototype.convertFromPixel=function(e,a,n){return Tf(this,"convertFromPixel",e,a,n)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=Jo(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var v=this._chartsMap[u.__viewId];v&&v.containPoint&&(i=i||v.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=Jo(n,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?S0(s,l,a):Gu(s,a)},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;A(O5,function(n){var i=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&Ei(l,function(p){var g=ft(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=G({},g.eventData),!0},!0),u){var v=u.componentType,h=u.componentIndex;(v==="markLine"||v==="markPoint"||v==="markArea")&&(v="series",h=u.seriesIndex);var c=v&&h!=null&&s.getComponent(v,h),d=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:c,view:d},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)});var a=this._messageCenter;A(iy,function(n,i){a.on(i,function(o){e.trigger(i,o)})}),UV(a,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&GM(this.getDom(),C0,"");var a=this,n=a._api,i=a._model;A(a._componentsViews,function(o){o.dispose(i,n)}),A(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Fi[a.id]},t.prototype.resize=function(e){if(!this[fe]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[be]&&(i==null&&(i=this[be].silent),n=!0,this[be]=null),this[fe]=!0,Co(this);try{n&&pi(this),Da.update.call(this,{type:"resize",animation:G({duration:0},e&&e.animation)})}catch(o){throw this[fe]=!1,o}this[fe]=!1,wo.call(this,i),To.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(it(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!ly[e]){var n=ly[e](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=G({},e);return a.type=ny[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(it(a)||(a={silent:!!a}),!!ih[e.type]&&this._model){if(this[fe]){this._pendingActions.push(e);return}var n=a.silent;Md.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&Ct.browser.weChat&&this._throttledZrFlush(),wo.call(this,n),To.call(this,n)}},t.prototype.updateLabelLayout=function(){Br.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){pi=function(v){var h=v._scheduler;h.restorePipelines(v._model),h.prepareStageTasks(),Cd(v,!0),Cd(v,!1),h.plan()},Cd=function(v,h){for(var c=v._model,d=v._scheduler,p=h?v._componentsViews:v._chartsViews,g=h?v._componentsMap:v._chartsMap,y=v._zr,m=v._api,_=0;_h.get("hoverLayerThreshold")&&!Ct.node&&!Ct.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=v._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(v,h){var c=v.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=c)})}function l(v,h){if(!v.preventAutoZ){var c=ji(v);h.eachRendered(function(d){return oc(d,c.z,c.zlevel),!0})}}function u(v,h){h.eachRendered(function(c){if(!Qo(c)){var d=c.getTextContent(),p=c.getTextGuideLine();c.stateTransition&&(c.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),c.hasState()?(c.prevStates=c.currentStates,c.clearStates()):c.prevStates&&(c.prevStates=null)}})}function f(v,h){var c=v.getModel("stateAnimation"),d=v.isAnimationEnabled(),p=c.get("duration"),g=p>0?{duration:p,delay:c.get("delay"),easing:c.get("easing")}:null;h.eachRendered(function(y){if(y.states&&y.states.emphasis){if(Qo(y))return;if(y instanceof Tt&&KN(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}Sx=function(v){return new((function(h){N(c,h);function c(){return h!==null&&h.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return v._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return v._model.getComponent(p.mainType,p.index);d=d.parent}},c.prototype.enterEmphasis=function(d,p){ja(d,p),dr(v)},c.prototype.leaveEmphasis=function(d,p){Ka(d,p),dr(v)},c.prototype.enterBlur=function(d){nD(d),dr(v)},c.prototype.leaveBlur=function(d){Gm(d),dr(v)},c.prototype.enterSelect=function(d){iD(d),dr(v)},c.prototype.leaveSelect=function(d){oD(d),dr(v)},c.prototype.getModel=function(){return v.getModel()},c.prototype.getViewOfComponentModel=function(d){return v.getViewOfComponentModel(d)},c.prototype.getViewOfSeriesModel=function(d){return v.getViewOfSeriesModel(d)},c.prototype.getMainProcessVersion=function(){return v[bf]},c})(nL))(v)},r2=function(v){function h(c,d){for(var p=0;p=0)){bx.push(e);var i=PL.wrapStageHandler(e,n);i.__prio=t,i.__raw=e,r.push(i)}}function P0(r,t){ly[r]=t}function Y5(r){YA({createCanvas:r})}function u2(r,t,e){var a=UL("registerMap");a&&a(r,t,e)}function Z5(r){var t=UL("getMap");return t&&t(r)}var f2=eV;Yn(w0,MV);Yn(cc,DV);Yn(cc,LV);Yn(w0,HV);Yn(cc,WV);Yn(qL,y5);D0(oL);L0(T5,Oz);P0("default",IV);qr({type:Vi,event:Vi,update:Vi},Kt);qr({type:yv,event:yv,update:yv},Kt);qr({type:Zv,event:zm,update:Zv,action:Kt,refineEvent:R0,publishNonRefinedEvent:!0});qr({type:Og,event:zm,update:Og,action:Kt,refineEvent:R0,publishNonRefinedEvent:!0});qr({type:Xv,event:zm,update:Xv,action:Kt,refineEvent:R0,publishNonRefinedEvent:!0});function R0(r,t,e,a){return{eventContent:{selected:ZN(e),isFromClick:t.isFromClick||!1}}}M0("default",{});M0("dark",OL);var X5={},Tx=[],$5={registerPreprocessor:D0,registerProcessor:L0,registerPostInit:i2,registerPostUpdate:o2,registerUpdateLifecycle:dc,registerAction:qr,registerCoordinateSystem:s2,registerLayout:l2,registerVisual:Yn,registerTransform:f2,registerLoading:P0,registerMap:u2,registerImpl:m5,PRIORITY:jL,ComponentModel:xt,ComponentView:Wt,SeriesModel:zt,ChartView:Nt,registerComponentModel:function(r){xt.registerClass(r)},registerComponentView:function(r){Wt.registerClass(r)},registerSeriesModel:function(r){zt.registerClass(r)},registerChartView:function(r){Nt.registerClass(r)},registerCustomSeries:function(r,t){ZL(r,t)},registerSubTypeDefaulter:function(r,t){xt.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){AM(r,t)}};function _t(r){if(W(r)){A(r,function(t){_t(t)});return}yt(Tx,r)>=0||(Tx.push(r),tt(r)&&(r={install:r}),r.install($5))}function js(r){return r==null?0:r.length||1}function Cx(r){return r}var Ja=(function(){function r(t,e,a,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=a||Cx,this._newKeyGetter=n||Cx,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(v===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(v===1&&h===1)this._update&&this._update(f,u),n[l]=null;else if(v>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(v>1)for(var c=0;c1)for(var s=0;s30}var Ks=it,vn=U,tG=typeof Int32Array>"u"?Array:Int32Array,eG="e\0\0",Ax=-1,rG=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],aG=["_approximateExtent"],Mx,Af,Js,Qs,Id,tl,Pd,Ge=(function(){function r(t,e){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 a,n=!1;h2(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=e)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===hr;if(l&&!n.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),W(i)?i=i.slice():Ks(i)&&(i=G({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,Ks(e)?G(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Ks(t)?G(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?G(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Eg(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:vn(this.dimensions,this._getDimInfo,this),this.hostModel)),Id(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];tt(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(Uh(arguments)))})},r.internalField=(function(){Mx=function(t){var e=t._invertedIndicesMap;A(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new tG(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[e]=l}}})(),r})();function nG(r,t){return Es(r,t).dimensions}function Es(r,t){g0(r)||(r=y0(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=K(),i=[],o=oG(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&p2(o),l=a===r.dimensionsDefine,u=l?d2(r):c2(a),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var v=K(f),h=new yL(o),c=0;c0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function oG(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return A(t,function(i){var o;it(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function sG(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var lG=(function(){function r(t){this.coordSysDims=[],this.axisMap=K(),this.categoryAxisMap=K(),this.coordSysName=t}return r})();function uG(r){var t=r.get("coordinateSystem"),e=new lG(t),a=fG[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var fG={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",jt).models[0],i=r.getReferringComponents("yAxis",jt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),Ao(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),Ao(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",jt).models[0];t.coordSysDims=["single"],e.set("single",n),Ao(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",jt).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Ao(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),Ao(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Ao(u)&&(a.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,a){var n=r.getReferringComponents("matrix",jt).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",i),e.set("y",o),a.set("x",i),a.set("y",o)}};function Ao(r){return r.get("type")==="category"}function g2(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;vG(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,v,h;if(A(i,function(m,_){X(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){v="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,d=f.type,p=0;A(i,function(m){m.coordDim===c&&p++});var g={name:v,coordDim:c,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),y.storeDimIndex=s.ensureCalculationDimension(v,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:v}}function vG(r){return!h2(r.schema)}function Qa(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function k0(r,t){return Qa(r,t)?r.getCalculationInfo("stackResultDimension"):t}function hG(r,t){var e=r.get("coordinateSystem"),a=Is.get(e),n;return t&&t.coordSysDims&&(n=U(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=lh(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function cG(r,t,e){var a,n;return e&&A(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function Ca(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;r?(i=!0,n=y0(r)):(n=a.getSource(),i=n.sourceFormat===hr);var o=uG(t),s=hG(t,o),l=e.useEncodeDefaulter,u=tt(l)?l:l?pt(tL,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},v=Es(n,f),h=cG(v.dimensions,e.createInvertedIndices,o),c=i?null:a.getSharedDataStore(v),d=g2(t,{schema:v,store:c}),p=new Ge(v,t);p.setCalculationInfo(d);var g=h!=null&&dG(n)?function(y,m,_,S){return S===h?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(i?n:c,null,g),p}function dG(r){if(r.sourceFormat===hr){var t=pG(r.data||[]);return!W(Ss(t))}}function pG(r){for(var t=0;tn&&(o=i.interval=n);var s=i.intervalPrecision=hu(o),l=i.niceTickExtent=[ae(Math.ceil(r[0]/o)*o,s),ae(Math.floor(r[1]/o)*o,s)];return yG(l,r),i}function Rd(r){var t=Math.pow(10,jh(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,ae(e*t)}function hu(r){return Vr(r)+2}function Dx(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function yG(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Dx(r,0,t),Dx(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function E0(r,t){return r>=t[0]&&r<=t[1]}var mG=(function(){function r(){this.normalize=Lx,this.scale=Ix}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=$(t.normalize,t),this.scale=$(t.scale,t)):(this.normalize=Lx,this.scale=Ix)},r})();function Lx(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Ix(r,t){return r*(t[1]-t[0])+t[0]}function fy(r,t,e){var a=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/a,Math.log(e?t[1]:Math.max(0,t[1]))/a]}var Zn=(function(){function r(t){this._calculator=new mG,this._setting=t||{},this._extent=[1/0,-1/0];var e=se();e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(t){var e=se();e&&this._innerSetBreak(e.parseAxisBreakOption(t,$(this.parse,this)))},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Kh(Zn);var _G=0,cu=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++_G,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,a=e.data,n=a&&U(a,SG);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!X(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=K(this.categories))},r})();function SG(r){return it(r)&&r.value!=null?r.value:r+""}var vs=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new cu({})),W(n)&&(n=new cu({categories:U(n,function(i){return it(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:X(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return E0(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(Zn);Zn.registerClass(vs);var hn=ae,tn=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return E0(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=hu(e)},t.prototype.getTicks=function(e){e=e||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=se(),l=[];if(!a)return l;if(e.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]=0&&(v=hn(v+h*a,o))}if(l.length>0&&v===l[l.length-1].value)break;if(l.length>u)return[]}var c=l.length?l[l.length-1].value:i[1];return n[1]>c&&(e.expandToNicedExtent?l.push({value:hn(c+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(e.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),e.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&d0&&(i=i===null?s:Math.min(i,s))}e[a]=i}}return e}function S2(r){var t=wG(r),e=[];return A(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],f=Math.abs(o[1]-o[0]),v=i.scale.getExtent(),h=Math.abs(v[1]-v[0]);s=u?f/h*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var d=Z(a.get("barWidth"),s),p=Z(a.get("barMaxWidth"),s),g=Z(a.get("barMinWidth")||(C2(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:O0(i),stackId:m2(a)})}),x2(e)}function x2(r){var t={};A(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var v=a.barMaxWidth;v&&(l[u].maxWidth=v);var h=a.barMinWidth;h&&(l[u].minWidth=h);var c=a.barGap;c!=null&&(s.gap=c);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=At(i).length;s=Math.max(35-l*4,15)+"%"}var u=Z(s,o),f=Z(a.gap,1),v=a.remainedWidth,h=a.autoWidthCount,c=(v-u)/(h+(h-1)*f);c=Math.max(c,0),A(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,v-=S+f*S,h--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,v-=S+f*S,h--)}}),c=(v-u)/(h+(h-1)*f),c=Math.max(c,0);var d=0,p;A(i,function(y,m){y.width||(y.width=c),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;A(i,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),e}function TG(r,t,e){if(r&&t){var a=r[O0(t)];return a}}function b2(r,t){var e=_2(r,t),a=S2(e);A(e,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=m2(n),u=a[O0(s)][l],f=u.offset,v=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:v})})}function w2(r){return{seriesType:r,plan:Ps(),reset:function(t){if(T2(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),v=Qa(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),c=CG(n,i),d=C2(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var x=_.count,b=d&&va(x*3),w=d&&l&&va(x*3),T=d&&va(x),C=a.master.getRect(),M=h?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(v?g:o,D),k=I.get(s,D),R=c,O=void 0;v&&(O=+P-I.get(o,D));var E=void 0,z=void 0,V=void 0,F=void 0;if(h){var H=a.dataToPoint([P,k]);if(v){var Y=a.dataToPoint([O,k]);R=Y[0]}E=R,z=H[1]+m,V=H[0]-R,F=y,Math.abs(V)0?e:1:e))}var AG=function(r,t,e,a){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var o=Mf.length,s=Math.min(AG(Mf,this._approxInterval,0,o),o-1);this._interval=Mf[s][1],this._intervalPrecision=hu(this._interval),this._minLevelUnit=Mf[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return Dt(e)?e:+wa(e)},t.prototype.contain=function(e){return E0(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t})(tn),Mf=[["second",t0],["minute",e0],["hour",Wl],["quarter-day",Wl*6],["half-day",Wl*12],["day",Tr*1.2],["half-week",Tr*3.5],["week",Tr*7],["month",Tr*31],["quarter",Tr*95],["half-year",_S/2],["year",_S]];function A2(r,t,e,a){return Kv(new Date(t),r,a).getTime()===Kv(new Date(e),r,a).getTime()}function MG(r,t){return r/=Tr,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function DG(r){var t=30*Tr;return r/=t,r>6?6:r>3?3:r>2?2:1}function LG(r){return r/=Wl,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Px(r,t){return r/=t?e0:t0,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function IG(r){return Lm(r,!0)}function PG(r,t,e){var a=Math.max(0,yt(ar,t)-1);return Kv(new Date(r),ar[a],e).getTime()}function RG(r,t){var e=new Date(0);e[r](1);var a=e.getTime();e[r](1+t);var n=e.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function kG(r,t,e,a,n,i){var o=1e4,s=YB,l=0;function u(L,P,k,R,O,E,z){for(var V=RG(O,L),F=P,H=new Date(F);Fo));)if(H[O](H[R]()+L),F=H.getTime(),i){var Y=i.calcNiceTickMultiple(F,V);Y>0&&(H[O](H[R]()+Y*L),F=H.getTime())}z.push({value:F,notAdd:!0})}function f(L,P,k){var R=[],O=!P.length;if(!A2(Ul(L),a[0],a[1],e)){O&&(P=[{value:PG(a[0],L,e)},{value:a[1]}]);for(var E=0;E=a[0]&&z<=a[1]&&u(F,z,V,H,Y,j,R),L==="year"&&k.length>1&&E===0&&k.unshift({value:k[0].value-F})}}for(var E=0;E=a[0]&&S<=a[1]&&c++)}var x=n/t;if(c>x*1.5&&d>x/1.5||(v.push(m),c>x||r===s[p]))break}h=[]}}}for(var b=Rt(U(v,function(L){return Rt(L,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=b.length-1,p=0;p0;)i*=10;var s=[hy(OG(a[0]/i)*i),hy(EG(a[1]/i)*i)];this._interval=i,this._intervalPrecision=hu(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Lf(e)/Lf(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Lf(e)/Lf(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Df(this.base,e)},t.prototype.setBreaksFromOption=function(e){var a=se();if(a){var n=a.logarithmicParseBreaksFromOption(e,this.base,$(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t})(tn);function If(r,t){return hy(r,Vr(t))}Zn.registerClass(M2);var NG=(function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,c=this._determinedMax;return h!=null&&(s=h,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:v}},r.prototype.modifyDataMinMax=function(t,e){this[zG[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=BG[t];this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),BG={min:"_determinedMin",max:"_determinedMax"},zG={min:"_dataMin",max:"_dataMax"};function D2(r,t,e){var a=r.rawExtentInfo;return a||(a=new NG(r,t,e),r.rawExtentInfo=a,a)}function Pf(r,t){return t==null?null:Ie(t)?NaN:r.parse(t)}function L2(r,t){var e=r.type,a=D2(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&e==="time"){var s=_2("bar",o),l=!1;if(A(s,function(v){l=l||v.getBaseAxis()===t.axis}),l){var u=S2(s),f=VG(n,i,t,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function VG(r,t,e,a){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=TG(a,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;A(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,v=1-(s+l)/i,h=f/v-f;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function Ji(r,t){var e=t,a=L2(r,e),n=a.extent,i=e.get("splitNumber");r instanceof M2&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(P2(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Fu(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new vs({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new N0({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Zn.getClass(t)||tn)}}function GG(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function Os(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=ZB(t);return function(n,i){return r.scale.getFormattedLabel(n,i,e)}}else{if(X(t))return function(n){var i=r.scale.getLabel(n),o=t.replace("{value}",i??"");return o};if(tt(t)){if(r.type==="category")return function(n,i){return t(uh(r,n),n.value-r.scale.getExtent()[0],null)};var a=se();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(uh(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function uh(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function B0(r){var t=r.get("interval");return t??"auto"}function I2(r){return r.type==="category"&&B0(r.getLabelModel())===0}function fh(r,t){var e={};return A(r.mapDimensionsAll(t),function(a){e[k0(r,a)]=!0}),At(e)}function FG(r,t,e){t&&A(fh(t,e),function(a){var n=t.getApproximateExtent(a);n[0]r[1]&&(r[1]=n[1])})}function hs(r){return r==="middle"||r==="center"}function du(r){return r.getShallow("show")}function P2(r){var t=r.get("breaks",!0);if(t!=null)return!se()||!HG(r.axis)?void 0:t}function HG(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Ns=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})();function WG(r){return Ca(null,r)}var UG={isDimensionStacked:Qa,enableDataStack:g2,getStackedDimension:k0};function YG(r,t){var e=t;t instanceof wt||(e=new wt(t));var a=Fu(e);return a.setExtent(r[0],r[1]),Ji(a,e),a}function ZG(r){Qt(r,Ns)}function XG(r,t){return t=t||{},Ft(r,null,null,t.state!=="normal")}const $G=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:nG,createList:WG,createScale:YG,createSymbol:ie,createTextStyle:XG,dataStack:UG,enableHoverEmphasis:In,getECData:ft,getLayoutRect:Xt,mixinAxisModelCommonMethods:ZG},Symbol.toStringTag,{value:"Module"}));var qG=1e-8;function Rx(r,t){return Math.abs(r-t)n&&(a=o,n=l)}if(a)return KG(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?kx(s.exterior,n,i,e):A(s.points,function(l){kx(l,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new lt(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(e[0],e[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/e,l/e])}return a}function cy(r,t){return r=QG(r),U(Rt(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,n=e.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Ex(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new Ex(l[0],l.slice(1)))});break;case"LineString":i.push(new Ox([n.coordinates]));break;case"MultiLineString":i.push(new Ox(n.coordinates))}var s=new k2(a[t||"name"],i,a.cp);return s.properties=a,s})}const t3=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Mg,asc:lr,getPercentWithPrecision:_O,getPixelPrecision:Mm,getPrecision:Vr,getPrecisionSafe:IM,isNumeric:Im,isRadianAroundZero:is,linearMap:kt,nice:Lm,numericToNumber:ma,parseDate:wa,parsePercent:Z,quantile:gv,quantity:RM,quantityExponent:jh,reformIntervals:Dg,remRadian:Dm,round:ae},Symbol.toStringTag,{value:"Module"})),e3=Object.freeze(Object.defineProperty({__proto__:null,format:zu,parse:wa,roundTime:Kv},Symbol.toStringTag,{value:"Module"})),r3=Object.freeze(Object.defineProperty({__proto__:null,Arc:Ou,BezierCurve:Ts,BoundingRect:lt,Circle:Ta,CompoundPath:Nu,Ellipse:Eu,Group:rt,Image:xe,IncrementalDisplayable:mD,Line:ne,LinearGradient:ro,Polygon:Ee,Polyline:Ae,RadialGradient:Wm,Rect:St,Ring:ws,Sector:ke,Text:Mt,clipPointsByRect:Xm,clipRectByRect:wD,createIcon:As,extendPath:xD,extendShape:SD,getShapeClass:iu,getTransform:Pn,initProps:Zt,makeImage:Ym,makePath:ss,mergePath:or,registerShape:Rr,resizePath:Zm,updateProps:It},Symbol.toStringTag,{value:"Module"})),a3=Object.freeze(Object.defineProperty({__proto__:null,addCommas:l0,capitalFirst:ez,encodeHTML:ze,formatTime:tz,formatTpl:f0,getTextRect:JB,getTooltipMarker:GD,normalizeCssArray:Ls,toCamelCase:u0,truncateText:JO},Symbol.toStringTag,{value:"Module"})),n3=Object.freeze(Object.defineProperty({__proto__:null,bind:$,clone:et,curry:pt,defaults:nt,each:A,extend:G,filter:Rt,indexOf:yt,inherits:_m,isArray:W,isFunction:tt,isObject:it,isString:X,map:U,merge:mt,reduce:Mr},Symbol.toStringTag,{value:"Module"}));var i3=bt(),Zl=bt(),Xr={estimate:1,determine:2};function vh(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function O2(r,t){var e=U(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function o3(r,t){var e=r.getLabelModel().get("customValues");if(e){var a=Os(r),n=r.scale.getExtent(),i=O2(r,e),o=Rt(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:U(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?l3(r,t):f3(r)}function s3(r,t,e){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=O2(r,a);return{ticks:Rt(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?u3(r,t):{ticks:U(r.scale.getTicks(e),function(o){return o.value})}}function l3(r,t){var e=r.getLabelModel(),a=N2(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:a}function N2(r,t,e){var a=h3(r),n=B0(t),i=e.kind===Xr.estimate;if(!i){var o=z2(a,n);if(o)return o}var s,l;tt(n)?s=F2(r,n):(l=n==="auto"?c3(r,e):n,s=G2(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return dy(a,n,u),!0}):dy(a,n,u),u}function u3(r,t){var e=v3(r),a=B0(t),n=z2(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),tt(a))i=F2(r,a,!0);else if(a==="auto"){var s=N2(r,r.getLabelModel(),vh(Xr.determine));o=s.labelCategoryInterval,i=U(s.labels,function(l){return l.tickValue})}else o=a,i=G2(r,o,!0);return dy(e,a,{ticks:i,tickCategoryInterval:o})}function f3(r){var t=r.scale.getTicks(),e=Os(r);return{labels:U(t,function(a,n){return{formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var v3=B2("axisTick"),h3=B2("axisLabel");function B2(r){return function(e){return Zl(e)[r]||(Zl(e)[r]={list:[]})}}function z2(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var v=s[0],h=r.dataToCoord(v+1)-r.dataToCoord(v),c=Math.abs(h*Math.cos(i)),d=Math.abs(h*Math.sin(i)),p=0,g=0;v<=s[1];v+=u){var y=0,m=0,_=$h(n({value:v}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var S=p/c,x=g/d;isNaN(S)&&(S=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(S,x)));if(e===Xr.estimate)return t.out.noPxChangeTryDetermine.push($(p3,null,r,b,l)),b;var w=V2(r,b,l);return w??b}function p3(r,t,e){return V2(r,t,e)==null}function V2(r,t,e){var a=i3(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=e,a.lastAutoInterval=t,a.axisExtent0=n[0],a.axisExtent1=n[1]}function g3(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function G2(r,t,e){var a=Os(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var v=I2(r),h=o.get("showMinLabel")||v,c=o.get("showMaxLabel")||v;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);c&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function F2(r,t,e){var a=r.scale,n=Os(r),i=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var Nx=[0,1],kr=(function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Mm(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),Bx(a,n.count())),kt(t,Nx,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),Bx(a,n.count()));var i=kt(t,a,Nx,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=s3(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=a.ticks,i=U(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return y3(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=U(a,function(i){return U(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||vh(Xr.determine),o3(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(t){return t=t||vh(Xr.determine),d3(this,t)},r})();function Bx(r,t){var e=r[1]-r[0],a=t,n=e/a/2;r[0]+=n,r[1]-=n}function y3(r,t,e,a){var n=t.length;if(!r.onBand||e||!n)return;var i=r.getExtent(),o,s;if(n===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(c){c.coord-=u/2,c.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var v=i[0]>i[1];h(t[0].coord,i[0])&&(a?t[0].coord=i[0]:t.shift()),a&&h(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),h(i[1],o.coord)&&(a?o.coord=i[1]:t.pop()),a&&h(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function h(c,d){return c=ae(c),d=ae(d),v?c>d:cn&&(n+=el);var c=Math.atan2(s,o);if(c<0&&(c+=el),c>=a&&c<=n||c+el>=a&&c+el<=n)return l[0]=f,l[1]=v,u-e;var d=e*Math.cos(a)+r,p=e*Math.sin(a)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function hh(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,f=e-r,v=a-t,h=Math.sqrt(f*f+v*v);f/=h,v/=h;var c=l*f+u*v,d=c/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*f,g=o[1]=t+d*v;return Math.sqrt((p-n)*(p-n)+(g-i)*(g-i))}function H2(r,t,e,a,n,i,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var zr=[];function C3(r,t,e){var a=H2(t.x,t.y,t.width,t.height,r.x,r.y,zr);return e.set(zr[0],zr[1]),a}function A3(r,t,e){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=t.data,v=r.x,h=r.y,c=0;c0){t=t/180*Math.PI,Gr.fromArray(r[0]),Yt.fromArray(r[1]),ee.fromArray(r[2]),st.sub(ha,Gr,Yt),st.sub(la,ee,Yt);var e=ha.len(),a=la.len();if(!(e<.001||a<.001)){ha.scale(1/e),la.scale(1/a);var n=ha.dot(la),i=Math.cos(t);if(i1&&st.copy(Ue,ee),Ue.toArray(r[1])}}}}function M3(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,Gr.fromArray(r[0]),Yt.fromArray(r[1]),ee.fromArray(r[2]),st.sub(ha,Yt,Gr),st.sub(la,ee,Yt);var a=ha.len(),n=la.len();if(!(a<.001||n<.001)){ha.scale(1/a),la.scale(1/n);var i=ha.dot(t),o=Math.cos(e);if(i=l)st.copy(Ue,ee);else{Ue.scaleAndAdd(la,s/Math.tan(Math.PI/2-f));var v=ee.x!==Yt.x?(Ue.x-Yt.x)/(ee.x-Yt.x):(Ue.y-Yt.y)/(ee.y-Yt.y);if(isNaN(v))return;v<0?st.copy(Ue,Yt):v>1&&st.copy(Ue,ee)}Ue.toArray(r[1])}}}}function Od(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function D3(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=Ba(a[0],a[1]),i=Ba(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*e,s=Nl([],a[1],a[0],o/n),l=Nl([],a[1],a[2],o/i),u=Nl([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0){S(M*C,0,i);var D=M+w;D<0&&x(-D*C,1)}else x(-w*C,1)}}function S(w,T,C){w!==0&&(f=!0);for(var M=T;M0)for(var D=0;D0;D--){var k=C[D-1]*P;S(-k,D,i)}}}function b(w){var T=w<0?-1:1;w=Math.abs(w);for(var C=Math.ceil(w/(i-1)),M=0;M0?S(C,0,M+1):S(-C,i-M-1,i),w-=C,w<=0)return}return f}function P3(r){for(var t=0;t=0&&a.attr(i.oldLayoutSelect),yt(h,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),It(a,u,e,l)}else if(a.attr(u),!Ms(a).valueAnimation){var v=Q(a.style.opacity,1);a.style.opacity=0,Zt(a,{style:{opacity:v}},e,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};Rf(c,u,kf),Rf(c,a.states.select,kf)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Rf(d,u,kf),Rf(d,a.states.emphasis,kf)}LD(a,l,f,e,e)}if(n&&!n.ignore&&!n.invisible){var i=E3(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),It(n,{shape:p},e)):(n.setShape(p),n.style.strokePercent=0,Zt(n,{style:{strokePercent:1}},e)),i.oldLayout=p}},r})(),zd=bt();function N3(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var n=zd(e).labelManager;n||(n=zd(e).labelManager=new O3),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var n=zd(e).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Vd=Math.sin,Gd=Math.cos,$2=Math.PI,yi=Math.PI*2,B3=180/$2,q2=(function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){this._add("C",t,e,a,n,i,o)},r.prototype.quadraticCurveTo=function(t,e,a,n){this._add("Q",t,e,a,n)},r.prototype.arc=function(t,e,a,n,i,o){this.ellipse(t,e,a,a,0,n,i,o)},r.prototype.ellipse=function(t,e,a,n,i,o,s,l){var u=s-o,f=!l,v=Math.abs(u),h=wn(v-yi)||(f?u>=yi:-u>=yi),c=u>0?u%yi:u%yi+yi,d=!1;h?d=!0:wn(v)?d=!1:d=c>=$2==!!f;var p=t+a*Gd(o),g=e+n*Vd(o);this._start&&this._add("M",p,g);var y=Math.round(i*B3);if(h){var m=1/this._p,_=(f?1:-1)*(yi-m);this._add("A",a,n,y,1,+f,t+a*Gd(o+_),e+n*Vd(o+_)),m>.01&&this._add("A",a,n,y,0,+f,p,g)}else{var S=t+a*Gd(s),x=e+n*Vd(s);this._add("A",a,n,y,+d,+f,S,x)}},r.prototype.rect=function(t,e,a,n){this._add("M",t,e),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(t,e,a,n,i,o,s,l,u){for(var f=[],v=this._p,h=1;h"}function Z3(r){return""}function F0(r,t){t=t||{};var e=t.newline?` -`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return Y3(o,s)+(o!=="style"?ze(l):l||"")+(i?""+e+U(i,function(u){return a(u)}).join(e)+e:"")+Z3(o)}return a(r)}function X3(r,t,e){e=e||{};var a=e.newline?` -`:"",n=" {"+a,i=a+"}",o=U(At(r),function(l){return l+n+U(At(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=U(At(t),function(l){return"@keyframes "+l+n+U(At(t[l]),function(u){return u+n+U(At(t[l][u]),function(f){var v=t[l][u][f];return f==="d"&&(v='path("'+v+'")'),f+":"+v+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function _y(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Wx(r,t,e,a){return ye("svg","root",{width:r,height:t,xmlns:j2,"xmlns:xlink":K2,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+t:!1},e)}var $3=0;function Q2(){return $3++}var Ux={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"},Si="transform-origin";function q3(r,t,e){var a=G({},r.shape);G(a,t),r.buildPath(e,a);var n=new q2;return n.reset(_M(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function j3(r,t){var e=t.originX,a=t.originY;(e||a)&&(r[Si]=e+"px "+a+"px")}var K3={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function tI(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function J3(r,t,e){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=_y(e.zrId);u.animation=!0,gc(l,{},u,!0);var f=u.cssAnims,v=u.cssNodes,h=At(f),c=h.length;if(c){o=h[c-1];var d=f[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in v){var m=v[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=tI(n,e);return i.replace(o,s)}}function Yx(r){return X(r)?Ux[r]?"cubic-bezier("+Ux[r]+")":wm(r)?r:"":""}function gc(r,t,e,a){var n=r.animators,i=n.length,o=[];if(r instanceof Nu){var s=J3(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Bt=tI(w,e);return Bt+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+Q2();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function Q3(r,t,e){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};Zx(a,t,e)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=Vv(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),Zx(a,t,e)}}function Zx(r,t,e,a){var n=JSON.stringify(r),i=e.cssStyleCache[n];i||(i=e.zrId+"-cls-"+Q2(),e.cssStyleCache[n]=i,e.cssNodes["."+i+":hover"]=r),t.class=t.class?t.class+" "+i:i}var pu=Math.round;function eI(r){return r&&X(r.src)}function rI(r){return r&&tt(r.toDataURL)}function H0(r,t,e,a){H3(function(n,i){var o=n==="fill"||n==="stroke";o&&mM(i)?nI(t,r,n,a):o&&Cm(i)?iI(e,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),oF(e,r,a)}function W0(r,t){var e=MM(t);e&&(e.each(function(a,n){a!=null&&(r[(Hx+n).toLowerCase()]=a+"")}),t.isSilent()&&(r[Hx+"silent"]="true"))}function Xx(r){return wn(r[0]-1)&&wn(r[1])&&wn(r[2])&&wn(r[3]-1)}function tF(r){return wn(r[4])&&wn(r[5])}function U0(r,t,e){if(t&&!(tF(t)&&Xx(t))){var a=1e4;r.transform=Xx(t)?"translate("+pu(t[4]*a)/a+" "+pu(t[5]*a)/a+")":OE(t)}}function $x(r,t,e){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Re(h,g),Re(c,g)}else if(h==null||c==null){var y=function(M,D){if(M){var I=M.elm,L=h||D.width,P=c||D.height;M.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),M.attrs.width=L,M.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=Em(d,null,r,function(M){l||y(b,M),y(v,M)});m&&m.width&&m.height&&(h=h||m.width,c=c||m.height)}v=ye("image","img",{href:d,width:h,height:c}),o.width=h,o.height=c}else n.svgElement&&(v=et(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(v){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var x=SM(n);x&&(o.patternTransform=x);var b=ye("pattern","",o,[v]),w=F0(b),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,b=a.defs[C]=ye("pattern",C,o,[v])),t[e]=Xh(C)}}function sF(r,t,e){var a=e.clipPathCache,n=e.defs,i=a[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=ye("clipPath",i,o,[aI(r,e)])}t["clip-path"]=Xh(i)}function Kx(r){return document.createTextNode(r)}function Mi(r,t,e){r.insertBefore(t,e)}function Jx(r,t){r.removeChild(t)}function Qx(r,t){r.appendChild(t)}function oI(r){return r.parentNode}function sI(r){return r.nextSibling}function Fd(r,t){r.textContent=t}var tb=58,lF=120,uF=ye("","");function Sy(r){return r===void 0}function ia(r){return r!==void 0}function fF(r,t,e){for(var a={},n=t;n<=e;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function Dl(r,t){var e=r.key===t.key,a=r.tag===t.tag;return a&&e}function gu(r){var t,e=r.children,a=r.tag;if(ia(a)){var n=r.elm=J2(a);if(Y0(uF,r),W(e))for(t=0;ti?(d=e[l+1]==null?null:e[l+1].elm,lI(r,d,e,n,l)):gh(r,t,a,i))}function Go(r,t){var e=t.elm=r.elm,a=r.children,n=t.children;r!==t&&(Y0(r,t),Sy(t.text)?ia(a)&&ia(n)?a!==n&&vF(e,a,n):ia(n)?(ia(r.text)&&Fd(e,""),lI(e,null,n,0,n.length-1)):ia(a)?gh(e,a,0,a.length-1):ia(r.text)&&Fd(e,""):r.text!==t.text&&(ia(a)&&gh(e,a,0,a.length-1),Fd(e,t.text)))}function hF(r,t){if(Dl(r,t))Go(r,t);else{var e=r.elm,a=oI(e);gu(t),a!==null&&(Mi(a,t.elm,sI(e)),gh(a,[r],0,0))}return t}var cF=0,dF=(function(){function r(t,e,a){if(this.type="svg",this.refreshHover=eb(),this.configLayer=eb(),this.storage=e,this._opts=a=G({},a),this.root=t,this._id="zr"+cF++,this._oldVNode=Wx(a.width,a.height),t&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=J2("svg");Y0(null,this._oldVNode),n.appendChild(i),t.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",hF(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return jx(t,_y(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=_y(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=pF(a,n,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=ye("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=U(At(i.defs),function(h){return i.defs[h]});if(u.length&&o.push(ye("defs","defs",{},u)),t.animation){var f=X3(i.cssNodes,i.cssAnims,{newline:!0});if(f){var v=ye("style","stl",{},[],f);o.push(v)}}return Wx(a,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},F0(this.renderToVNode({animation:Q(t.cssAnimation,!0),emphasis:Q(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,a){for(var n=t.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(h&&l&&h[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var y=p+1;y=s)}}for(var v=this.__startIndex;v15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=c.dpr,D=0;D0&&t>n[0]){for(l=0;lt);l++);s=a[n[l]]}if(n.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,n=0;n0?Ef:0),this._needsManuallyCompositing),f.__builtin__||Hh("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),i=f),n.__dirty&ir&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(v,h){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,A(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?mt(a[t],e,!0):a[t]=e;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill=B.color.neutral00,u.style.lineWidth=2),a},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},t})(zt);function cs(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=us(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(t[i])}return a.join(" ")}var Hu=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o,s){this.removeAll();var l=ie(e,-1,-1,2,2,null,s);l.attr({z2:Q(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=wF,this._symbolType=e,this.add(l)},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(){ja(this.childAt(0))},t.prototype.downplay=function(){Ka(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=t.getSymbolZ2(e,a),f=o!==this._symbolType,v=i&&i.disableAnimation;if(f){var h=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,u,h)}else{var c=this.childAt(0);c.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};v?c.attr(d):It(c,d,s,a),Ir(c)}if(this._updateCommon(e,a,l,n,i),f){var c=this.childAt(0);if(!v){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,Zt(c,d,s,a)}}v&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,f,v,h,c,d,p,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,v=i.selectItemStyle,h=i.focus,c=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),v=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),c=_.get("blurScope"),d=_.get("disabled"),p=ce(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var x=oo(e.getItemVisual(a,"symbolOffset"),n);x&&(s.x=x[0],s.y=x[1]),y&&s.attr("cursor",y);var b=e.getItemVisual(a,"style"),w=b.fill;if(s instanceof xe){var T=s.style;s.useStyle(G({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},b))}else s.__isEmptyBrush?s.useStyle(G({},b)):s.useStyle(b),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;Se(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:b.opacity});function I(k){return D?e.getName(k):cs(e,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=v,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),$t(this,h,c,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=ft(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Nn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Nn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return ks(e.getItemVisual(a,"symbolSize"))},t.getSymbolZ2=function(e,a){return e.getItemVisual(a,"z2")},t})(rt);function wF(r,t){this.parent.drift(r,t)}function Wd(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function nb(r){return r!=null&&!it(r)&&(r={isIgnore:r}),r||{}}function ib(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:ce(t),cursorStyle:t.get("cursor")}}var Wu=(function(){function r(t){this.group=new rt,this._SymbolCtor=t||Hu}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=nb(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=ib(t),u={disableAnimation:s},f=e.getSymbolPoint||function(v){return t.getItemLayout(v)};i||a.removeAll(),t.diff(i).add(function(v){var h=f(v);if(Wd(t,h,v,e)){var c=new o(t,v,l,u);c.setPosition(h),t.setItemGraphicEl(v,c),a.add(c)}}).update(function(v,h){var c=i.getItemGraphicEl(h),d=f(v);if(!Wd(t,d,v,e)){a.remove(c);return}var p=t.getItemVisual(v,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==p)a.remove(c),c=new o(t,v,l,u),c.setPosition(d);else{c.updateData(t,v,l,u);var y={x:d[0],y:d[1]};s?c.attr(y):It(c,y,n)}a.add(c),t.setItemGraphicEl(v,c)}).remove(function(v){var h=i.getItemGraphicEl(v);h&&h.fadeOut(function(){a.remove(h)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,n){var i=t._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ib(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=nb(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=a[0]:a[1]<0&&(e=a[1]),e}function vI(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function CF(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function AF(r,t,e,a,n,i,o,s){for(var l=CF(r,t),u=[],f=[],v=[],h=[],c=[],d=[],p=[],g=fI(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||p<0)break;if(Hi(y,m)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](y,m),v=y,h=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var x=p+i,b=t[x*2],w=t[x*2+1];b===y&&w===m&&g=a||Hi(b,w))c=y,d=m;else{M=b-u,D=w-f;var P=y-u,k=b-y,R=m-f,O=w-m,E=void 0,z=void 0;if(s==="x"){E=Math.abs(P),z=Math.abs(k);var V=M>0?1:-1;c=y-V*E*o,d=m,I=y+V*z*o,L=m}else if(s==="y"){E=Math.abs(R),z=Math.abs(O);var F=D>0?1:-1;c=y,d=m-F*E*o,I=y,L=m+F*z*o}else E=Math.sqrt(P*P+R*R),z=Math.sqrt(k*k+O*O),C=z/(z+E),c=y-M*o*(1-C),d=m-D*o*(1-C),I=y+M*o*C,L=m+D*o*C,I=cn(I,dn(b,y)),L=cn(L,dn(w,m)),I=dn(I,cn(b,y)),L=dn(L,cn(w,m)),M=I-y,D=L-m,c=y-M*E/z,d=m-D*E/z,c=cn(c,dn(u,y)),d=cn(d,dn(f,m)),c=dn(c,cn(u,y)),d=dn(d,cn(f,m)),M=y-c,D=m-d,I=y+M*z/E,L=m+D*z/E}r.bezierCurveTo(v,h,c,d,y,m),v=I,h=L}else r.lineTo(y,m)}u=y,f=m,p+=i}return g}var hI=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),MF=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new hI},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Hi(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(c-s)*_+s;return u?[e,S]:[S,e]}s=c,l=d;break;case o.C:c=i[v++],d=i[v++],p=i[v++],g=i[v++],y=i[v++],m=i[v++];var x=u?Bv(s,c,p,y,e,f):Bv(l,d,g,m,e,f);if(x>0)for(var b=0;b=0){var S=u?ge(l,d,g,m,w):ge(s,c,p,y,w);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t})(Tt),DF=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(hI),cI=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new DF},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Hi(n[s*2-2],n[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function PF(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=t.getAxis(n),u=U(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,v=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),v.reverse());var h=IF(u,n==="x"?e.getWidth():e.getHeight()),c=h.length;if(!c&&f)return u[0].coord<0?v[1]?v[1]:u[f-1].color:v[0]?v[0]:u[0].color;var d=10,p=h[0].coord-d,g=h[c-1].coord+d,y=g-p;if(y<.001)return"transparent";A(h,function(_){_.offset=(_.coord-p)/y}),h.push({offset:c?h[c-1].offset:.5,color:v[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:v[0]||"transparent"});var m=new ro(0,0,0,0,h,!0);return m[n]=p,m[n+"2"]=g,m}}}function RF(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&kF(i,t))){var o=t.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function kF(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function EF(r,t){return isNaN(r)||isNaN(t)}function OF(r){for(var t=r.length/2;t>0&&EF(r[t*2-2],r[t*2-1]);t--);return t-1}function fb(r,t){return[r[t*2],r[t*2+1]]}function NF(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function gI(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=d.getState("emphasis").style;z.lineWidth=+d.style.lineWidth+1}ft(d).seriesIndex=e.seriesIndex,$t(d,R,O,E);var V=ub(e.get("smooth")),F=e.get("smoothMonotone");if(d.setShape({smooth:V,smoothMonotone:F,connectNulls:w}),p){var H=s.getCalculationInfo("stackedOnSeries"),Y=0;p.useStyle(nt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(Y=ub(H.get("smooth"))),p.setShape({smooth:V,stackedOnSmooth:Y,smoothMonotone:F,connectNulls:w}),he(p,e,"areaStyle"),ft(p).seriesIndex=e.seriesIndex,$t(p,R,O,E)}var j=this._changePolyState;s.eachItemGraphicEl(function(vt){vt&&(vt.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=s,this._coordSys=i,this._stackedOnPoints=x,this._points=f,this._step=M,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,a){ft(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=Zi(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],v=l[s*2+1];if(isNaN(f)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,v))return;var h=e.get("zlevel")||0,c=e.get("z")||0;u=new Hu(o,s),u.x=f,u.y=v,u.setZ(h,c);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=c,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Nt.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=Zi(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Nt.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;$v(this._polyline,e),a&&$v(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new MF({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new cI({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");tt(f)&&(f=f(null));var v=u.get("animationDelay")||0,h=tt(v)?v(null):v;e.eachItemGraphicEl(function(c,d){var p=c;if(p){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,x=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-x[1]/180*Math.PI):(y=S.r0,m=S.r,_=x[0])}else{var b=n;i?(y=b.x,m=b.x+b.width,_=c.x):(y=b.y+b.height,m=b.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=tt(v)?v(d):f*w+h,C=p.getSymbolPath(),M=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(gI(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Mt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=OF(l);f>=0&&(Se(s,ce(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(v,h,c){return c!=null?uI(o,c):cs(o,v)},enableTextSetter:!0},BF(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var v=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,x=(y?p:0)*(m?-1:1),b=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=NF(v,S,w),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!c){var I=fb(v,C[0]);u.attr({x:I[0]+x,y:I[1]+b}),o&&(D=h.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+x,y:I[1]+b});var L=h.getRawValue(C[0]),P=h.getRawValue(C[1]);o&&(D=FM(n,d,L,P,T.t))}i.lastFrameIndex=C[0]}else{var k=e===1||i.lastFrameIndex>0?C[0]:0,I=fb(v,k);o&&(D=h.getRawValue(k)),u.attr({x:I[0]+x,y:I[1]+b})}if(o){var R=Ms(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,v=e.hostModel,h=AF(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=h.current,d=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(d=pn(h.stackedOnCurrent,h.current,n,o,l),c=pn(h.current,null,n,o,l),g=pn(h.stackedOnNext,h.next,n,o,l),p=pn(h.next,null,n,o,l)),lb(c,p)>3e3||f&&lb(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=c;var y={shape:{points:p}};h.current!==c&&(y.shape.__points=h.next),u.stopAnimation(),It(u,y,v),f&&(f.setShape({points:c,stackedOnPoints:d}),f.stopAnimation(),It(f,{shape:{stackedOnPoints:g}},v),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=h.status,S=0;S<_.length;S++){var x=_[S].cmd;if(x==="="){var b=e.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),v=a.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(v||1),c=Math.round(s/h);if(isFinite(c)&&c>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/c));var d=void 0;X(i)?d=VF[i]:tt(i)&&(d=i),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/c,d,GF))}}}}}function FF(r){r.registerChartView(zF),r.registerSeriesModel(bF),r.registerLayout(Yu("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,yI("line"))}var yu=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(n)A(i.getAxes(),function(h,c){if(h.type==="category"&&a!=null){var d=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[c]=h.toGlobalCoord(h.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,x=0;xg){_=(b+m)/2;break}x===1&&(S=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[c]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),v=i.getBaseAxis().isHorizontal()?0:1;s[v]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t})(zt);zt.registerClass(yu);var HF=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Ca(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Un(yu.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:B.color.primary,borderWidth:2}},realtimeSort:!1}),t})(yu),WF=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),yh=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new WF},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,v=a.endAngle,h=a.clockwise,c=Math.PI*2,d=h?v-fMath.PI/2&&fs)return!0;s=v}return!1},t.prototype._isOrderDifferentInView=function(e,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Ua(i,e,ft(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(Nt),vb={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Yd(t.x,r.x),s=Zd(t.x+t.width,n),l=Yd(t.y,r.y),u=Zd(t.y+t.height,i),f=sn?s:o,t.y=v&&l>i?u:l,t.width=f?0:s-o,t.height=v?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),f||v},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Zd(t.r,r.r),i=Yd(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},hb={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new St({shape:G({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,v=n?"height":"width";f[v]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?yh:ke,f=new u({shape:a,z2:1});f.name="item";var v=mI(n);if(f.calculateTextPosition=UF(v,{isRoundCap:u===yh}),i){var h=f.shape,c=n?"r":"endAngle",d={};h[c]=n?a.r0:a.startAngle,d[c]=a[c],(s?It:Zt)(f,{shape:d},i)}return f}};function $F(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function cb(r,t,e,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?It:Zt)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?It:Zt)(e,{shape:u},f,n)}function db(r,t){for(var e=0;e0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function KF(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function mI(r){return(function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}})(r)}function gb(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,v=ca(a.getModel("itemStyle"),f,!0);G(f,v),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=a.getShallow("cursor");h&&r.attr("cursor",h);var c=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=ce(a);Se(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:cs(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var p=r.getTextContent();if(s&&p){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,YF(r,g==="outside"?c:g,mI(o),a.get(["label","rotate"]))}DD(p,d,i.getRawValue(e),function(m){return uI(t,m)});var y=a.getModel(["emphasis"]);$t(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),he(r,a),KF(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function JF(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var QF=(function(){function r(){}return r})(),yb=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new QF},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function tH(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,v=i.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function _I(r,t,e){if(Bn(e,"cartesian2d")){var a=t,n=e.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=e.getArea(),i=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function eH(r,t,e){var a=r.type==="polar"?ke:St;return new a({shape:_I(t,e,r),silent:!0,z2:0})}function rH(r){r.registerChartView(XF),r.registerSeriesModel(HF),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,pt(b2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,w2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,yI("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var Sb=Math.PI*2,zf=Math.PI/180;function aH(r,t,e){t.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=ZD(a,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,v=o.viewRect,h=-a.get("startAngle")*zf,c=a.get("endAngle"),d=a.get("padAngle")*zf;c=c==="auto"?h-Sb:-c*zf;var p=a.get("minAngle")*zf,g=p+d,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),x=a.get("roseType"),b=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[h,c],M=T*d/2;ec(C,!S),h=C[0],c=C[1];var D=SI(a);D.startAngle=h,D.endAngle=c,D.clockwise=S,D.cx=s,D.cy=l,D.r=u,D.r0=f;var I=Math.abs(c-h),L=I,P=0,k=h;if(n.setLayout({viewRect:v,r:u}),n.each(i,function(O,E){var z;if(isNaN(O)){n.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:x?NaN:u});return}x!=="area"?z=m===0&&b?_:O*_:z=I/y,zz?(F=k+T*z/2,H=F):(F=k+M,H=V-M),n.setItemLayout(E,{angle:z,startAngle:F,endAngle:H,clockwise:S,cx:s,cy:l,r0:f,r:x?kt(O,w,[f,u]):u}),k=V}),Le?y:g,x=Math.abs(_.label.y-e);if(x>=S.maxY){var b=_.label.x-t-_.len2*n,w=a+_.len,T=Math.abs(b)r.unconstrainedWidth?null:h:null;a.setStyle("width",c)}bI(i,a)}}}function bI(r,t){bb.rect=r,Z2(bb,t,oH)}var oH={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},bb={};function Xd(r){return r.position==="center"}function sH(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*nH,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,v=s.y,h=s.height;function c(b){b.ignore=!0}function d(b){if(!b.ignore)return!0;for(var w in b.states)if(b.states[w].ignore===!1)return!0;return!1}t.each(function(b){var w=t.getItemGraphicEl(b),T=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),D=t.getItemModel(b),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),k=I.get("alignTo"),R=Z(I.get("edgeDistance"),u),O=I.get("bleedMargin");O==null&&(O=Math.min(u,h)>200?10:2);var E=D.getModel("labelLine"),z=E.get("length");z=Z(z,u);var V=E.get("length2");if(V=Z(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":H>0?"left":"right"}var Ot=Math.PI,Gt=0,pe=I.get("rotate");if(Dt(pe))Gt=pe*(Ot/180);else if(L==="center")Gt=0;else if(pe==="radial"||pe===!0){var er=H<0?-F+Ot:-F;Gt=er}else if(pe==="tangential"&&L!=="outside"&&L!=="outer"){var $e=Math.atan2(H,Y);$e<0&&($e=Ot*2+$e);var Xn=Y>0;Xn&&($e=Ot+$e),Gt=$e-Ot}if(i=!!Gt,C.x=j,C.y=vt,C.rotation=Gt,C.setStyle({verticalAlign:"middle"}),ht){C.setStyle({align:Bt});var Ac=C.states.select;Ac&&(Ac.x+=C.x,Ac.y+=C.y)}else{var fo=new lt(0,0,0,0);bI(fo,C),e.push({label:C,labelLine:M,position:L,len:z,len2:V,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new st(H,Y),linePoints:Pt,textAlign:Bt,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:O,rect:fo,unconstrainedWidth:fo.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:ht})}}),!i&&r.get("avoidLabelOverlap")&&iH(e,a,n,l,u,h,f,v);for(var p=0;p0){for(var f=o.getItemLayout(0),v=1;isNaN(f&&f.startAngle)&&v=i.r0}},t.type="pie",t})(Nt);function zs(r,t,e){t=W(t)&&{coordDimensions:t}||G({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=Es(a,t).dimensions,i=new Ge(n,r);return i.initData(a,e),i}var Vs=(function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r})(),fH=bt(),wI=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Vs($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return zs(this,{coordDimensions:["value"],encodeDefaulter:pt(h0,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=fH(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=PM(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Yi(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.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})(zt);az({fullType:wI.type,getCoord2:function(r){return r.getShallow("center")}});function vH(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(Dt(o)&&!isNaN(o)&&o<0)})}}}function hH(r){r.registerChartView(uH),r.registerSeriesModel(wI),BL("pie",r.registerAction),r.registerLayout(pt(aH,"pie")),r.registerProcessor(Bs("pie")),r.registerProcessor(vH("pie"))}var cH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return Ca(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.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:B.color.primary}},universalTransition:{divideShape:"clone"}},t})(zt),TI=4,dH=(function(){function r(){}return r})(),pH=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new dH},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var f=u*2,v=i[f]-s/2,h=i[f+1]-l/2;if(e>=v&&a>=h&&e<=v+s&&a<=h+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,v=-1/0,h=0;h=0&&(u.dataIndex=v+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),yH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Yu("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new gH:new Wu,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(Nt),CI={left:0,right:0,top:0,bottom:0},mh=["25%","25%"],mH=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,a){var n=no(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Sa(e.outerBounds,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Sa(this.option.outerBounds,e.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:CI,outerBoundsContain:"all",outerBoundsClampWidth:mh[0],outerBoundsClampHeight:mh[1],backgroundColor:B.color.transparent,borderWidth:1,borderColor:B.color.neutral30},t})(xt),by=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",jt).models[0]},t.type="cartesian2dAxis",t})(xt);Qt(by,Ns);var AI={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:B.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:B.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:B.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[B.color.backgroundTint,B.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:B.color.neutral00,borderColor:B.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},_H=mt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},AI),Z0=mt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:B.color.axisMinorSplitLine,width:1}}},AI),SH=mt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Z0),xH=nt({logBase:10},Z0);const MI={category:_H,value:Z0,time:SH,log:xH};var bH={value:1,category:1,time:1,log:1},wy=null;function wH(r){wy||(wy=r)}function Zu(){return wy}function ds(r,t,e,a){A(bH,function(n,i){var o=mt(mt({},MI[i],!0),a,!0),s=(function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,v){var h=su(this),c=h?no(f):{},d=v.getTheme();mt(f,d.get(i+"Axis")),mt(f,this.getDefaultOption()),f.type=wb(f),h&&Sa(f,c,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=cu.createByAxisModel(this))},u.prototype.getCategories=function(f){var v=this.option;if(v.type==="category")return f?v.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var v=Zu();return v?v.updateModelAxisBreak(this,f):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",wb)}function wb(r){return r.type||(r.data?"category":"value")}var TH=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return U(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Rt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),Ty=["x","y"];function Tb(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var CH=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Ty,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!Tb(e)||!Tb(a))){var n=e.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,v=(s[1]-o[1])/u,h=o[0]-n[0]*f,c=o[1]-i[0]*v,d=this._transform=[f,0,0,v,h,c];this._invTransform=Dr([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.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,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new lt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Jt(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},t.prototype.pointToData=function(e,a,n){if(n=n||[],this._invTransform)return Jt(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new lt(i,o,s,l)},t})(TH),DI=(function(r){N(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(kr),yc="expandAxisBreak",LI="collapseAxisBreak",II="toggleAxisBreak",X0="axisbreakchanged",AH={type:yc,event:X0,update:"update",refineEvent:$0},MH={type:LI,event:X0,update:"update",refineEvent:$0},DH={type:II,event:X0,update:"update",refineEvent:$0};function $0(r,t,e,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function LH(r){r.registerAction(AH,t),r.registerAction(MH,t),r.registerAction(DH,t);function t(e,a){var n=[],i=Jo(a,e);function o(s,l){A(i[s],function(u){var f=u.updateAxisBreaks(e);A(f.breaks,function(v){var h;n.push(nt((h={},h[l]=u.componentIndex,h),v))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var Tn=Math.PI,IH=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],PH=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ps=bt(),PI=bt(),RI=(function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,a=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[a]||(i[a]={ready:{}})},r})();function RH(r,t,e,a){var n=e.axis,i=t.ensureRecord(e),o=[],s,l=q0(r.axisName)&&hs(r.nameLocation);A(a,function(d){var p=xa(d);if(!(!p||p.label.ignore)){o.push(p);var g=i.transGroup;l&&(g.transform?Dr(rl,g.transform):Iu(rl),p.transform&&Fr(rl,rl,p.transform),lt.copy(Vf,p.localRect),Vf.applyTransform(rl),s?s.union(Vf):lt.copy(s=new lt(0,0,0,0),Vf))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var v=n.getExtent(),h=Math.min(v[0],v[1]),c=Math.max(v[0],v[1])-h;s.union(new lt(h,0,c,1))}i.stOccupiedRect=s,i.labelInfoList=o}var rl=me(),Vf=new lt(0,0,0,0),kI=function(r,t,e,a,n,i){if(hs(r.nameLocation)){var o=i.stOccupiedRect;o&&EI(I3({},o,i.transGroup.transform),a,n)}else OI(i.labelInfoList,i.dirVec,a,n)};function EI(r,t,e){var a=new st;pc(r,t,a,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&py(t,a)}function OI(r,t,e,a){for(var n=st.dot(a,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):is(n-Tn)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),kH=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],EH={axisLine:function(r,t,e,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,f=[l[0],0],v=[l[1],0],h=f[0]>v[0];u&&(Jt(f,f,u),Jt(v,v,u));var c=G({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:c};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())Zu().buildAxisBreakLine(a,n,i,d);else{var p=new ne(G({shape:{x1:f[0],y1:f[1],x2:v[0],y2:v[1]}},d));ls(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);X(g)&&(g=[g,g]),(X(y)||Dt(y))&&(y=[y,y]);var m=oo(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];A([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-v[0])*(f[0]-v[0])+(f[1]-v[1])*(f[1]-v[1]))}],function(x,b){if(g[b]!=="none"&&g[b]!=null){var w=ie(g[b],-_/2,-S/2,_,S,c.stroke,!0),T=x.r+x.offset,C=h?v:f;w.attr({rotation:x.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,t,e,a,n,i,o,s){var l=Ab(t,n,s);l&&Cb(r,t,e,a,n,i,o,Xr.estimate)},axisTickLabelDetermine:function(r,t,e,a,n,i,o,s){var l=Ab(t,n,s);l&&Cb(r,t,e,a,n,i,o,Xr.determine);var u=zH(r,n,i,a);BH(r,t.labelLayoutList,u),VH(r,n,i,a,r.tickDirection)},axisName:function(r,t,e,a,n,i,o,s){var l=e.ensureRecord(a);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(q0(u)){var f=r.nameLocation,v=r.nameDirection,h=a.getModel("nameTextStyle"),c=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new st(0,0),y=new st(0,0);f==="start"?(g.x=d[0]-p*c,y.x=-p):f==="end"?(g.x=d[1]+p*c,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+v*c,y.y=v);var m=me();y.transform(rn(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*Tn/180);var S,x;hs(f)?S=Ye.innerTextLayout(r.rotation,_??r.rotation,v):(S=OH(r.rotation,f,_||0,d),x=r.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(S.rotation)),!isFinite(x)&&(x=null)));var b=h.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,C=Ce(r.raw.nameTruncateMaxWidth,w.maxWidth,x),M=s.nameMarginLevel||0,D=new Mt({x:g.x,y:g.y,rotation:S.rotation,silent:Ye.isLabelSilent(a),style:Ft(h,{text:u,font:b,overflow:"truncate",width:C,ellipsis:T,fill:h.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:h.get("align")||S.textAlign,verticalAlign:h.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(nn({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var I=Ye.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,ft(D).eventData=I}i.add(D),D.updateTransform(),t.nameEl=D;var L=l.nameLayout=xa({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:hs(f)?IH[M]:PH[M]});if(l.nameLocation=f,n.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(a);e.resolveAxisNameOverlap(r,e,a,L,y,P)}}}};function Cb(r,t,e,a,n,i,o,s){BI(t)||GH(r,t,n,s,a,o);var l=t.labelLayoutList;FH(r,a,l,i),UH(a,r.rotation,l);var u=r.optionHideOverlap;NH(a,l,u),u&&X2(Rt(l,function(f){return f&&!f.label.ignore})),RH(r,e,a,l)}function OH(r,t,e,a){var n=Dm(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return is(n-Tn/2)?(o=l?"bottom":"top",i="center"):is(n-Tn*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nTn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function NH(r,t,e){if(I2(r.axis))return;function a(s,l,u){var f=xa(t[l]),v=xa(t[u]);if(!(!f||!v)){if(s===!1||f.suggestIgnore){Ll(f.label);return}if(v.suggestIgnore){Ll(v.label);return}var h=.1;if(!e){var c=[0,0,0,0];f=gy({marginForce:c},f),v=gy({marginForce:c},v)}pc(f,v,null,{touchThreshold:h})&&Ll(s?v.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;a(n,0,1),a(i,o-1,o-2)}function BH(r,t,e){r.showMinorTicks||A(t,function(a){if(a&&a.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)c=Rd(c),d=u[1]-c*o;else{var g=r.getTicks().length-1;g>o&&(c=Rd(c));var y=c*o;p=Math.ceil(u[1]/c)*c,d=ae(p-y),d<0&&u[0]>=0?(d=0,p=ae(y)):p>0&&u[1]<=0&&(p=0,d=-ae(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+c*m,p+c*_),a.setInterval.call(r,c),(m||_)&&a.setNiceExtent.call(r,d+c,p-c)}var Db=[[3,1],[0,2]],$H=(function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Ty,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=At(o),u=l.length;if(u){for(var f=[],v=u-1;v>=0;v--){var h=+l[v],c=o[h],d=c.model,p=c.scale;uy(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(c):(Ji(p,d),uy(p)&&(s=c))}f.length&&(s||(s=f.pop(),Ji(s.scale,s.model)),A(f,function(g){zI(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};A(a.x,function(o){Lb(a,"y",o,i)}),A(a.y,function(o){Lb(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=de(t,e),i=this._rect=Xt(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(Ay(o,i),!a){var u=KH(i,s,o,l,e),f=void 0;if(l)My?(My(this._axesList,i),Ay(o,i)):f=Rb(i.clone(),"axisLabel",null,i,o,u,n);else{var v=JH(t,i,n),h=v.outerBoundsRect,c=v.parsedOuterBoundsContain,d=v.outerBoundsClamp;h&&(f=Rb(h,c,d,i,o,u,n))}VI(i,o,Xr.determine,null,f,n)}A(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}it(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n0})==null;return qi(a,s,!0,!0,e),Ay(n,a),l;function u(h){A(n[dt[h]],function(c){if(du(c.model)){var d=i.ensureRecord(c.model),p=d.labelInfoList;if(p)for(var g=0;g0&&!Ie(c)&&c>1e-4&&(h/=c),h}}function KH(r,t,e,a,n){var i=new RI(QH);return A(e,function(o){return A(o,function(s){if(du(s.model)){var l=!a;s.axisBuilder=ZH(r,t,s.model,n,i,l)}})}),i}function VI(r,t,e,a,n,i){var o=e===Xr.determine;A(t,function(u){return A(u,function(f){du(f.model)&&(XH(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[dt[1-u]]=r[le[u]]<=i.refContainer[le[u]]*.5?0:1-u===1?2:1}A(t,function(u,f){return A(u,function(v){du(v.model)&&((a==="all"||o)&&v.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&v.axisBuilder.build({axisLine:!0}))})})}function JH(r,t,e){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=t.clone():(n==null||n==="auto")&&(a=Xt(r.get("outerBounds",!0)||CI,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||yt(["all","axisLabel"],i)<0?o="all":o=i;var s=[Uv(Q(r.get("outerBoundsClampWidth",!0),mh[0]),t.width),Uv(Q(r.get("outerBoundsClampHeight",!0),mh[1]),t.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var QH=function(r,t,e,a,n,i){var o=e.axis.dim==="x"?"y":"x";kI(r,t,e,a,n,i),hs(r.nameLocation)||A(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&OI(s.labelInfoList,s.dirVec,a,n)})};function t4(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return e4(e,r,t),e.seriesInvolved&&a4(e,r),e}function e4(r,t,e){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=mu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,v=f.getModel("tooltip",a);if(A(s.getAxes(),pt(p,!1,null)),s.getTooltipAxes&&a&&v.get("show")){var h=v.get("trigger")==="axis",c=v.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(v.get(["axisPointer","axis"]));(h||c)&&A(d.baseAxes,pt(p,c?"cross":!0,h)),c&&A(d.otherAxes,pt(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!Dy(_))){y==null&&(y=_.get("triggerTooltip")),_=g?r4(m,v,n,t,g,y):_;var x=_.get("snap"),b=_.get("triggerEmphasis"),w=mu(m.model),T=y||x||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:b,involveSeries:T,snap:x,useHandle:Dy(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var M=n4(i,m);if(M!=null){var D=o[M]||(o[M]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=i[M].mapper,C.linkGroup=D}}}})}function r4(r,t,e,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(h){l[h]=et(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var v=l.lineStyle=o.get("crossStyle");v&&nt(u,v.textStyle)}}return r.model.getModel("axisPointer",new wt(l,e,a))}function a4(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[mu(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function n4(r,t){for(var e=t.model,a=t.dim,n=0;n=0||r===t}function i4(r){var t=j0(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=Dy(e);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var h4=bt();function Ob(r,t,e,a){if(r instanceof DI){var n=r.scale.type;if(n!=="category"&&n!=="ordinal")return e}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?YI(e,o,u,a):c4(r,t,e,a,o,l):e}function YI(r,t,e,a){if(e===null)return r+(Math.random()-.5)*t;var n=e-a*2,i=Math.min(Math.max(0,t),n);return r+(Math.random()-.5)*i}function c4(r,t,e,a,n,i){var o=h4(r);o.items||(o.items=[]);var s=o.items,l=Nb(s,t,e,a,n,i,1),u=Nb(s,t,e,a,n,i,-1),f=Math.abs(l-e)n/2||v&&h>v/2-a?YI(e,n,v,a):(s.push({fixedCoord:t,floatCoord:f,r:a}),f)}function Nb(r,t,e,a,n,i,o){for(var s=e,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=nt({color:d.color},l));var g=mt(et(d),{boundaryGap:e,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:v,nameTextStyle:p,triggerEvent:h},!1);if(X(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else tt(f)&&(g.name=f(g.name,g));var m=new wt(g,null,this.ecModel);return Qt(m,Ns.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:B.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:mt({lineStyle:{color:B.color.neutral20}},al.axisLine),axisLabel:Gf(al.axisLabel,!1),axisTick:Gf(al.axisTick,!1),splitLine:Gf(al.splitLine,!0),splitArea:Gf(al.splitArea,!0),indicator:[]},t})(xt),b4=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,a){var n=e.coordinateSystem,i=n.getIndicatorAxes(),o=U(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Ye(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});A(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),v=s.get("show"),h=l.get("color"),c=u.get("color"),d=W(h)?h:[h],p=W(c)?c:[c],g=[],y=[];function m(k,R,O){var E=O%R.length;return k[E]=k[E]||[],E}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,x=a.cy,b=0;b<_.length;b++){if(f){var w=m(g,d,b);g[w].push(new Ta({shape:{cx:S,cy:x,r:_[b].coord}}))}if(v&&b<_.length-1){var w=m(y,p,b);y[w].push(new ws({shape:{cx:S,cy:x,r0:_[b].coord,r:_[b+1].coord}}))}}else for(var T,C=U(n,function(k,R){var O=k.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),U(O,function(E){return a.coordToPoint(E.coord,R)})}),M=[],b=0;b<=T;b++){for(var D=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var v=Math.abs(i),h=(i>0?1:-1)*(v>3?.4:v>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(Vb(this._zr,"globalPan")||nl(e))){var a=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,a,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(qa(i.event),i.__ecRoamConsumed=!0,Gb(e,a,n,i,o))},t})(Pr);function nl(r){return r.__ecRoamConsumed}var I4=bt();function mc(r){var t=I4(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function il(r,t,e,a){for(var n=mc(r),i=n.roam,o=i[t]=i[t]||[],s=0;s=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(v=KI(f,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var c=n;n=new rt,n.add(c),c.scaleX=c.scaleY=v.scale,c.x=v.x,c.y=v.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new St({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:v,named:i}},r.prototype._parseNode=function(t,e,a,n,i,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var f=jd[s];if(f&&q(jd,s)){l=f.call(this,t,e);var v=t.getAttribute("name");if(v){var h={name:v,namedFrom:null,svgNodeTagLower:s,el:l};a.push(h),s==="g"&&(u=h)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});e.add(l)}}var c=Ub[s];if(c&&q(Ub,s)){var d=c.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=t.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(t,e){var a=new os({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});pr(e,a),rr(t,a,this._defsUsePending,!1,!1),E4(a,e);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,e.add(a),a},r.internalField=(function(){jd={g:function(t,e){var a=new rt;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new St;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Ta;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new ne;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new Eu;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Xb(a));var i=new Ee({shape:{points:n||[]},silent:!0});return pr(e,i),rr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var a=t.getAttribute("points"),n;a&&(n=Xb(a));var i=new Ae({shape:{points:n||[]},silent:!0});return pr(e,i),rr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var a=new xe;return pr(e,a),rr(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new rt;return pr(e,s),rr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),n=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new rt;return pr(e,s),rr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",n=cD(a);return pr(e,n),rr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),r})(),Ub={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new ro(t,e,a,n);return Yb(r,i),Zb(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new Wm(t,e,a);return Yb(r,n),Zb(r,n),n}};function Yb(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function Zb(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};jI(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=Ve(o),u=l&&l[3];u&&(l[3]*=Ha(s),o=Cr(l,"rgba"))}t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function pr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),nt(t.__inheritedStyle,r.__inheritedStyle))}function Xb(r){for(var t=Sc(r),e=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=Sc(o);switch(n=n||me(),s){case"translate":Yr(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Zh(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":rn(n,n,-parseFloat(l[0])*Kd,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Kd);Fr(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Kd);Fr(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}t.setLocalTransform(n)}}var qb=/([^\s:;]+)\s*:\s*([^:;]+)/g;function jI(r,t,e){var a=r.getAttribute("style");if(a){qb.lastIndex=0;for(var n;(n=qb.exec(a))!=null;){var i=n[1],o=q(Sh,i)?Sh[i]:null;o&&(t[o]=n[2]);var s=q(xh,i)?xh[i]:null;s&&(e[s]=n[2])}}}function G4(r,t,e){for(var a=0;a0,m={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(t,g,e,a),this._updateMapSelectHandler(t,u,a,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=K(),a=K(),n=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function f(c,d){return d&&(c=d(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function v(c){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(h=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Se(t,ce(a),{labelFetcher:h,labelDataIndex:v,defaultText:e},c);var d=t.getTextContent();if(d&&(JI(d).ignore=d.ignore,t.textConfig&&o)){var p=t.getBoundingRect().clone();t.textConfig.layoutRect=p,t.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function tw(r,t,e,a,n,i){r.data?r.data.setItemGraphicEl(i,t):ft(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:a&&a.option||{}}}function ew(r,t,e,a,n){r.data||nn({el:t,componentModel:n,itemName:e,itemTooltipOption:a.get("tooltip")})}function rw(r,t,e,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return $t(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&qN(t,n,e),o}function aw(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=B.color.neutral00,n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:B.color.tertiary},itemStyle:{borderWidth:.5,borderColor:B.color.border,areaColor:B.color.background},emphasis:{label:{show:!0,color:B.color.primary},itemStyle:{areaColor:B.color.highlight}},select:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},nameProperty:"name"},t})(zt);function oW(r,t){var e={};return A(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);e[o]=e[o]||[],isNaN(n)||e[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=e[i].length,f=0;f1?(_.width=m,_.height=m/p):(_.height=m,_.width=m*p),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=p,_=Xt(S,d),_=XD(r,_,p)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function fW(r,t){A(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var vW=(function(){function r(){this.dimensions=tP}return r.prototype.create=function(t,e){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Py(l+s,l,G({nameMap:o.get("nameMap"),api:e,ecModel:t},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=sw,u.resize(o,e)}),t.eachSeries(function(o){Vu({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",jt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=U(o,function(f){return f.get("nameMap")}),u=new Py(s,s,G({nameMap:Wh(l),api:e,ecModel:t},n(o[0])));u.zoomLimit=Ce.apply(null,U(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=sw,u.resize(o[0],e),A(o,function(f){f.coordinateSystem=u,fW(u,f)})}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=K(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},e.push(s)}}function yW(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){_W(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=SW(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function mW(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function lw(r){return arguments.length?r:wW}function Il(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function _W(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function SW(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],s=t,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,v=s.hierNode.modifier;s=Jd(s),i=Qd(i),s&&i;){n=Jd(n),o=Qd(o),n.hierNode.ancestor=r;var h=s.hierNode.prelim+v-i.hierNode.prelim-u+a(s,i);h>0&&(bW(xW(s,r,e),r,h),u+=h,l+=h),v+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!Jd(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=v-l),i&&!Qd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,e=r)}return e}function Jd(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function Qd(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function xW(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function bW(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function wW(r,t){return r.parentNode===t.parentNode?1:2}var TW=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),CW=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new TW},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,v=1-f,h=Z(a.forkPosition,1),c=[];c[f]=o[f],c[v]=o[v]+(l[v]-o[v])*h,e.moveTo(o[0],o[1]),e.lineTo(c[0],c[1]),e.moveTo(s[0],s[1]),c[f]=s[f],e.lineTo(c[0],c[1]),c[f]=l[f],e.lineTo(c[0],c[1]),e.lineTo(l[0],l[1]);for(var d=1;dm.x,x||(S=S-Math.PI));var w=x?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?rs(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(ft(e).focus=L),MW(n,o,f,e,d,c,p,a),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===ku||$v(e.__edge,P)}})}function MW(r,t,e,a,n,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),f=r.get("layout"),v=r.getOrient(),h=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=a.__edge=new Ts({shape:Ry(f,v,h,n,n)})),It(p,{shape:Ry(f,v,h,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,n=r.targetNode;if(X(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function oP(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function n_(r,t){var e=oP(r);return yt(e,t)>=0}function xc(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var NW=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new wt(n,this,this.ecModel),o=a_.createTree(a,this,s);function s(v){v.wrapMethod("getItemModel",function(h,c){var d=o.getNodeByDataIndex(c);return d&&d.children.length&&d.isExpand||(h.parentModel=i),h})}var l=0;o.eachNode("preorder",function(v){v.depth>l&&(l=v.depth)});var u=e.expandAndCollapse,f=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(v){var h=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=h&&h.collapsed!=null?!h.collapsed:v.depth<=f}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ue("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=xc(n,this),a.collapsed=!n.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:B.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t})(zt);function BW(r,t,e){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)e.push(n[i])}}function zW(r,t){r.eachSeriesByType("tree",function(e){VW(e,t)})}function VW(r,t){var e=de(r,t).refContainer,a=Xt(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=lw(function(S,x){return(S.parentNode===x.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=lw());var l=r.getData().tree.root,u=l.children[0];if(u){gW(l),BW(u,yW,s),l.hierNode.modifier=-u.hierNode.prelim,ll(u,mW);var f=u,v=u,h=u;ll(u,function(S){var x=S.getLayout().x;xv.getLayout().x&&(v=S),S.depth>h.depth&&(h=S)});var c=f===v?1:s(f,v)/2,d=c-f.getLayout().x,p=0,g=0,y=0,m=0;if(n==="radial")p=i/(v.getLayout().x+c+d),g=o/(h.depth-1||1),ll(u,function(S){y=(S.getLayout().x+d)*p,m=(S.depth-1)*g;var x=Il(y,m);S.setLayout({x:x.x,y:x.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(v.getLayout().x+c+d),p=i/(h.depth-1||1),ll(u,function(S){m=(S.getLayout().x+d)*g,y=_==="LR"?(S.depth-1)*p:i-(S.depth-1)*p,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(p=i/(v.getLayout().x+c+d),g=o/(h.depth-1||1),ll(u,function(S){y=(S.getLayout().x+d)*p,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function GW(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");G(s,o)})})}function FW(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=n.coordinateSystem,o=_c(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function HW(r){r.registerChartView(AW),r.registerSeriesModel(NW),r.registerLayout(zW),r.registerVisual(GW),FW(r)}var cw=["treemapZoomToNode","treemapRender","treemapMove"];function WW(r){for(var t=0;t1;)i=i.parentNode;var o=qg(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var UW=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};lP(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new wt({itemStyle:o},this,a);i=e.levels=YW(i,a);var l=U(i||[],function(v){return new wt(v,s,a)},this),u=a_.createTree(n,this,f);function f(v){v.wrapMethod("getItemModel",function(h,c){var d=u.getNodeByDataIndex(c),p=d?l[d.depth]:null;return h.parentModel=p||s,h})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return ue("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=xc(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},G(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=K(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.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 a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){sP(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:B.size.l,top:B.size.xxxl,right:B.size.l,bottom:B.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,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:B.size.m,emptyItemWidth:25,itemStyle:{color:B.color.backgroundShade,textStyle:{color:B.color.secondary}},emphasis:{itemStyle:{color:B.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:B.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:B.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})(zt);function lP(r){var t=0;A(r.children,function(a){lP(a);var n=a.value;W(n)&&(n=n[0]),t+=n});var e=r.value;W(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),W(r.value)?r.value[0]=e:r.value=e}function YW(r,t){var e=Ht(t.get("color")),a=Ht(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;A(r,function(s){var l=new wt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}var ZW=8,dw=8,tp=5,XW=(function(){function r(t){this.group=new rt,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),v=de(t,e).refContainer,h={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},c={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=Xt(h,v);this._prepare(a,c,u),this._renderContent(t,c,d,s,l,u,f,n),lc(o,h,v)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=ve(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+ZW*2,e.emptyItemWidth);e.totalWidth+=s+dw,e.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(t,e,a,n,i,o,s,l){for(var u=0,f=e.emptyItemWidth,v=t.get(["breadcrumb","height"]),h=e.totalWidth,c=e.renderList,d=i.getModel("itemStyle").getItemStyle(),p=c.length-1;p>=0;p--){var g=c[p],y=g.node,m=g.width,_=g.text;h>a.width&&(h-=m-f,m=f,_=null);var S=new Ee({shape:{points:$W(u,0,m,v,p===c.length-1,p===0)},style:nt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Mt({style:Ft(o,{text:_})}),textConfig:{position:"inside"},z2:bs*1e4,onclick:pt(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Ft(s,{text:_}),S.ensureState("emphasis").style=d,$t(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),qW(S,t,y),u+=m+dw}},r.prototype.remove=function(){this.group.removeAll()},r})();function $W(r,t,e,a,n,i){var o=[[n?r:r-tp,t],[r+e,t],[r+e,t+a],[n?r:r-tp,t+a]];return!i&&o.splice(2,0,[r+e+tp,t+a/2]),!n&&o.push([r,t+a/2]),o}function qW(r,t,e){ft(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&xc(e,t)}}var jW=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;ngw||Math.abs(e.dy)>gw)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.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 a=e.originX,n=e.originY,i=e.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new lt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var v=f.zoom=f.zoom||1;if(v*=i,u){var h=u.min||0,c=u.max||1/0;v=Math.max(Math.min(c,v),h)}var d=v/f.zoom;f.zoom=v;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=me();Yr(g,g,[-a,-n]),Zh(g,g,[d,d]),Yr(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},t.prototype._initEvents=function(e){var a=this;e.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&Jv(u,f)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new XW(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(n_(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ul(),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,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(e,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},t.type="treemap",t})(Nt);function ul(){return{nodeGroup:[],background:[],content:[]}}function rU(r,t,e,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),v=r.getData(),h=o.getModel();if(v.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,d=f.height,p=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,x=_&&_.length,b=h.getModel("itemStyle"),w=h.getModel(["emphasis","itemStyle"]),T=h.getModel(["blur","itemStyle"]),C=h.getModel(["select","itemStyle"]),M=b.get("borderRadius")||0,D=vt("nodeGroup",ky);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),bh(D).nodeWidth=c,bh(D).nodeHeight=d,f.isAboveViewRoot)return D;var I=vt("background",pw,u,QW);I&&V(D,I,x&&f.upperLabelHeight);var L=h.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),R=L.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(x)nu(D)&&Ri(D,!1),I&&(Ri(I,!R),v.setItemGraphicEl(o.dataIndex,I),zg(I,O,k));else{var E=vt("content",pw,u,tU);E&&F(D,E),I.disableMorphing=!0,I&&nu(I)&&Ri(I,!1),Ri(D,!R),v.setItemGraphicEl(o.dataIndex,D);var z=h.getShallow("cursor");z&&E.attr("cursor",z),zg(D,O,k)}return D;function V(ht,at,gt){var J=ft(at);if(J.dataIndex=o.dataIndex,J.seriesIndex=r.seriesIndex,at.setShape({x:0,y:0,width:c,height:d,r:M}),g)H(at);else{at.invisible=!1;var ct=o.getVisual("style"),Vt=ct.stroke,Lt=_w(b);Lt.fill=Vt;var Ot=bi(w);Ot.fill=w.get("borderColor");var Gt=bi(T);Gt.fill=T.get("borderColor");var pe=bi(C);if(pe.fill=C.get("borderColor"),gt){var er=c-2*p;Y(at,Vt,ct.opacity,{x:p,y:0,width:er,height:S})}else at.removeTextContent();at.setStyle(Lt),at.ensureState("emphasis").style=Ot,at.ensureState("blur").style=Gt,at.ensureState("select").style=pe,$i(at)}ht.add(at)}function F(ht,at){var gt=ft(at);gt.dataIndex=o.dataIndex,gt.seriesIndex=r.seriesIndex;var J=Math.max(c-2*p,0),ct=Math.max(d-2*p,0);if(at.culling=!0,at.setShape({x:p,y:p,width:J,height:ct,r:M}),g)H(at);else{at.invisible=!1;var Vt=o.getVisual("style"),Lt=Vt.fill,Ot=_w(b);Ot.fill=Lt,Ot.decal=Vt.decal;var Gt=bi(w),pe=bi(T),er=bi(C);Y(at,Lt,Vt.opacity,null),at.setStyle(Ot),at.ensureState("emphasis").style=Gt,at.ensureState("blur").style=pe,at.ensureState("select").style=er,$i(at)}ht.add(at)}function H(ht){!ht.invisible&&i.push(ht)}function Y(ht,at,gt,J){var ct=h.getModel(J?mw:yw),Vt=ve(h.get("name"),null),Lt=ct.getShallow("show");Se(ht,ce(h,J?mw:yw),{defaultText:Lt?Vt:null,inheritColor:at,defaultOpacity:gt,labelFetcher:r,labelDataIndex:o.dataIndex});var Ot=ht.getTextContent();if(Ot){var Gt=Ot.style,pe=Du(Gt.padding||0);J&&(ht.setTextConfig({layoutRect:J}),Ot.disableLabelLayout=!0),Ot.beforeUpdate=function(){var $e=Math.max((J?J.width:ht.shape.width)-pe[1]-pe[3],0),Xn=Math.max((J?J.height:ht.shape.height)-pe[0]-pe[2],0);(Gt.width!==$e||Gt.height!==Xn)&&Ot.setStyle({width:$e,height:Xn})},Gt.truncateMinChar=2,Gt.lineOverflow="truncate",j(Gt,J,f);var er=Ot.getState("emphasis");j(er?er.style:null,J,f)}}function j(ht,at,gt){var J=ht?ht.text:null;if(!at&>.isLeafRoot&&J!=null){var ct=r.get("drillDownIcon",!0);ht.text=ct?ct+" "+J:J}}function vt(ht,at,gt,J){var ct=m!=null&&e[ht][m],Vt=n[ht];return ct?(e[ht][m]=null,Pt(Vt,ct)):g||(ct=new at,ct instanceof Lr&&(ct.z2=aU(gt,J)),Bt(Vt,ct)),t[ht][y]=ct}function Pt(ht,at){var gt=ht[y]={};at instanceof ky?(gt.oldX=at.x,gt.oldY=at.y):gt.oldShape=G({},at.shape)}function Bt(ht,at){var gt=ht[y]={},J=o.parentNode,ct=at instanceof rt;if(J&&(!a||a.direction==="drillDown")){var Vt=0,Lt=0,Ot=n.background[J.getRawIndex()];!a&&Ot&&Ot.oldShape&&(Vt=Ot.oldShape.width,Lt=Ot.oldShape.height),ct?(gt.oldX=0,gt.oldY=Lt):gt.oldShape={x:Vt,y:Lt,width:0,height:0}}gt.fadein=!ct}}function aU(r,t){return r*JW+t}var Su=A,nU=it,wh=-1,_e=(function(){function r(t){var e=t.mappingMethod,a=t.type,n=this.option=et(t);this.type=a,this.mappingMethod=e,this._normalizeData=sU[e];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(ep(n),iU(n)):e==="category"?n.categories?oU(n):ep(n,!0):(Re(e!=="linear"||n.dataExtent),ep(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return $(this._normalizeData,this)},r.listVisualTypes=function(){return At(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){it(t)?A(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var n,i=W(t)?[]:it(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},a;return t&&Su(r.visualHandlers,function(n,i){t.hasOwnProperty(i)&&(e[i]=t[i],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(W(t))t=t.slice();else if(nU(t)){var e=[];Su(t,function(a,n){e.push(n)}),t=e}else return[];return t.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var n,i=1/0,o=0,s=e.length;o=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function ep(r,t){var e=r.visual,a=[];it(e)?Su(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),uP(r,a)}function Hf(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:Ey([0,1])}}function Sw(r){var t=this.option.visual;return t[Math.round(kt(r,[0,1],[0,t.length-1],!0))]||{}}function fl(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function Pl(r){var t=this.option.visual;return t[this.option.loop&&r!==wh?r%t.length:r]}function wi(){return this.option.visual[0]}function Ey(r){return{linear:function(t){return kt(t,r,this.option.visual,!0)},category:Pl,piecewise:function(t,e){var a=Oy.call(this,e);return a==null&&(a=kt(t,r,this.option.visual,!0)),a},fixed:wi}}function Oy(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=_e.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function uP(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=U(t,function(e){var a=Ve(e);return a||[0,0,0,1]})),t}var sU={linear:function(r){return kt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=_e.findPieceIndex(r,t,!0);if(e!=null)return kt(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??wh},fixed:Kt};function Wf(r,t,e){return r?t<=e:t=e.length||p===e[p.depth]){var y=cU(n,l,p,g,d,a);vP(p,y,e,a)}})}}}function fU(r,t,e){var a=G({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function xw(r){var t=rp(r,"color");if(t){var e=rp(r,"colorAlpha"),a=rp(r,"colorSaturation");return a&&(t=Wa(t,null,null,a)),e&&(t=Ql(t,e)),t}}function vU(r,t){return t!=null?Wa(t,null,null,r):null}function rp(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function hU(r,t,e,a,n,i){if(!(!i||!i.length)){var o=ap(t,"color")||n.color!=null&&n.color!=="none"&&(ap(t,"colorAlpha")||ap(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=t.get("colorMappingBy"),v={type:o.name,dataExtent:u,visual:o.range};v.type==="color"&&(f==="index"||f==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var h=new _e(v);return fP(h).drColorMappingBy=f,h}}}function ap(r,t){var e=r.get(t);return W(e)&&e.length?{name:t,range:e}:null}function cU(r,t,e,a,n,i){var o=G({},t);if(n){var s=n.type,l=s==="color"&&fP(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var xu=Math.max,Th=Math.min,bw=Ce,i_=A,hP=["itemStyle","borderWidth"],dU=["itemStyle","gapWidth"],pU=["upperLabel","show"],gU=["upperLabel","height"];const yU={seriesType:"treemap",reset:function(r,t,e,a){var n=r.option,i=de(r,e).refContainer,o=Xt(r.getBoxLayoutParams(),i),s=n.size||[],l=Z(bw(o.width,s[0]),i.width),u=Z(bw(o.height,s[1]),i.height),f=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],h=_u(a,v,r),c=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=oP(d);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?wU(r,h,d,l,u):c?[c.width,c.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),cP(d,m,!1,0),_=d.getLayout(),i_(p,function(x,b){var w=(p[b+1]||d).getValue();x.setLayout(G({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(TU(o,c,h),!0),r.setLayoutInfo(o),dP(S,new lt(-o.x,-o.y,e.getWidth(),e.getHeight()),p,d,0)}};function cP(r,t,e,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(hP),u=s.get(dU)/2,f=pP(s),v=Math.max(l,f),h=l-u,c=v-u;r.setLayout({borderWidth:l,upperHeight:v,upperLabelHeight:f},!0),n=xu(n-2*h,0),i=xu(i-h-c,0);var d=n*i,p=mU(r,s,d,t,e,a);if(p.length){var g={x:h,y:c,width:n,height:i},y=Th(n,i),m=1/0,_=[];_.area=0;for(var S=0,x=p.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function bU(r,t,e){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=t*t*e;return l?xu(u*a/l,l/(u*n)):1/0}function ww(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],f=t?r.area/t:0;(n||f>e[l[o]])&&(f=e[l[o]]);for(var v=0,h=r.length;vMg&&(u=Mg),i=s}ua&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(x[0]=-x[0],x[1]=-x[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);v[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*y+f[0],i.y=-h[1]*m+f[1],d=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,d=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=b[0],i.y=b[1]+C,d="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+v[0],i.y=v[1]+C,d=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},t})(rt),f_=(function(){function r(t){this.group=new rt,this._LineCtor=t||u_}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=t,i||n.removeAll();var o=Lw(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Lw(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!FU(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function Lw(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ce(t)}}function Iw(r){return isNaN(r[0])||isNaN(r[1])}function lp(r){return r&&!Iw(r[0])&&!Iw(r[1])}var up=[],fp=[],vp=[],Lo=Te,hp=Mn,Pw=Math.abs;function Rw(r,t,e){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=e*e,u=.1,f=.1;f<=.9;f+=.1){up[0]=Lo(a[0],n[0],i[0],f),up[1]=Lo(a[1],n[1],i[1],f);var v=Pw(hp(up,t)-l);v=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function cp(r,t){var e=[],a=Kl,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),v=s.getVisual("toSymbol");u.__original||(u.__original=[da(u[0]),da(u[1])],u[2]&&u.__original.push(da(u[2])));var h=u.__original;if(u[2]!=null){if(Ne(n[0],h[0]),Ne(n[1],h[2]),Ne(n[2],h[1]),f&&f!=="none"){var c=kl(s.node1),d=Rw(n,h[0],c*t);a(n[0][0],n[1][0],n[2][0],d,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],d,e),n[0][1]=e[3],n[1][1]=e[4]}if(v&&v!=="none"){var c=kl(s.node2),d=Rw(n,h[1],c*t);a(n[0][0],n[1][0],n[2][0],d,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],d,e),n[1][1]=e[1],n[2][1]=e[2]}Ne(u[0],n[0]),Ne(u[1],n[2]),Ne(u[2],n[1])}else{if(Ne(i[0],h[0]),Ne(i[1],h[1]),Sn(o,i[1],i[0]),eo(o,o),f&&f!=="none"){var c=kl(s.node1);Rv(i[0],i[0],o,c*t)}if(v&&v!=="none"){var c=kl(s.node2);Rv(i[1],i[1],o,-c*t)}Ne(u[0],i[0]),Ne(u[1],i[1])}})}var bP=bt();function HU(r){if(r)return bP(r).bridge}function kw(r,t){r&&(bP(r).bridge=t)}function Ew(r){return r.type==="view"}var WU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var n=new Wu,i=new f_,o=this.group,s=new rt;this._controller=new lo(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=e.coordinateSystem,s=!1;this._model=e,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,f=this._lineDraw;if(Ew(o)){var v={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(v):It(this._mainGroup,v,e)}cp(e.getGraph(),Rl(e));var h=e.getData();u.updateData(h);var c=e.getEdgeData();f.updateData(c),this._updateNodeAndLinkScale(),this._updateController(null,e,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,p=e.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,n,p));var g=e.get("layout");h.graph.eachNode(function(S){var x=S.dataIndex,b=S.getGraphicEl(),w=S.getModel();if(b){b.off("drag").off("dragend");var T=w.get("draggable");T&&b.on("drag",function(M){switch(g){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,n,p),d.setFixed(x),h.setItemLayout(x,[b.x,b.y]);break;case"circular":h.setItemLayout(x,[b.x,b.y]),S.setLayout({fixed:!0},!0),l_(e,"symbolSize",S,[M.offsetX,M.offsetY]),i.updateLayout(e);break;default:h.setItemLayout(x,[b.x,b.y]),s_(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){d&&d.setUnfixed(x)}),b.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(ft(b).focus=S.getAdjacentDataIndices())}}),h.graph.eachEdge(function(S){var x=S.getGraphicEl(),b=S.getModel().get(["emphasis","focus"]);x&&b==="adjacency"&&(ft(x).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=h.getLayout("cx"),_=h.getLayout("cy");h.graph.eachNode(function(S){_P(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function s(){e.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(e,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!Ew(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!e||e.contain(u,f)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(e,a,n){this._active&&(J0(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,a,n){this._active&&(Q0(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),cp(e.getGraph(),Rl(e)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=Rl(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(cp(e.getGraph(),Rl(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,a=e.coordinateSystem;if(a.type==="view"){var n=HU(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new rt,l=n.group.children(),u=i.group.children(),f=new rt,v=new rt;s.add(v),s.add(f);for(var h=0;h=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof Ti||(e=this._nodesMap[Io(e)]),!!e){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&!t.hasKey(d)&&(t.set(d,!0),o.push(c.node1))}for(l=0;l=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r})(),wP=(function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=K(),e=K();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!t.hasKey(v)&&(t.set(v,!0),a.push(f.node1))}for(i=0;i=0&&!t.hasKey(p)&&(t.set(p,!0),n.push(d.node2))}return{edge:t.keys(),node:e.keys()}},r})();function TP(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}Qt(Ti,TP("hostGraph","data"));Qt(wP,TP("hostGraph","edgeData"));function v_(r,t,e,a,n){for(var i=new UU(a),o=0;o "+h)),u++)}var c=e.get("coordinateSystem"),d;if(c==="cartesian2d"||c==="polar"||c==="matrix")d=Ca(r,e);else{var p=Is.get(c),g=p?p.dimensions||[]:[];yt(g,"value")<0&&g.concat(["value"]);var y=Es(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new Ge(y,e),d.initData(r)}var m=new Ge(["value"],e);return m.initData(l,s),n&&n(d,m),nP({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var YU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Vs(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Yi(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&n){PU(this);var s=v_(i,n,this,!0,l);return A(s.edges,function(u){RU(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var v=wt.prototype.getModel;function h(d,p){var g=v.call(this,d,p);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=c,d.getModel=h,d});function c(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(e,n),s=i.graph.getEdgeByIndex(e),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ue("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var v=ML({series:this,dataIndex:e,multipleSeries:a});return v},t.prototype._updateCategoriesData=function(){var e=U(this.option.categories||[],function(n){return n.value!=null?n:G({value:0},n)}),a=new Ge(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:B.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},t})(zt);function ZU(r){r.registerChartView(WU),r.registerSeriesModel(YU),r.registerProcessor(AU),r.registerVisual(MU),r.registerVisual(DU),r.registerLayout(kU),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,OU),r.registerLayout(BU),r.registerCoordinateSystem("graphView",{dimensions:uo.dimensions,create:VU}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Kt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Kt),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",query:t},function(n){var i=a.getViewOfSeriesModel(n);i&&(t.dx!=null&&t.dy!=null&&i.updateViewOnPan(n,a,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&i.updateViewOnZoom(n,a,t));var o=n.coordinateSystem,s=_c(o,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var Ow=(function(r){N(t,r);function t(e,a,n){var i=r.call(this)||this;ft(i).dataType="node",i.z2=2;var o=new Mt;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,s=e.graph.getNodeByIndex(a),l=e.hostModel,u=s.getModel(),f=u.getModel("emphasis"),v=e.getItemLayout(a),h=G(ca(u.getModel("itemStyle"),v,!0),v),c=this;if(isNaN(h.startAngle)){c.setShape(h);return}i?c.setShape(h):It(c,{shape:h},l,a);var d=G(ca(u.getModel("itemStyle"),v,!0),v);o.setShape(d),o.useStyle(e.getItemVisual(a,"style")),he(o,u),this._updateLabel(l,u,s),e.setItemGraphicEl(a,c),he(c,u,"itemStyle");var p=f.get("focus");$t(this,p==="adjacency"?s.getAdjacentDataIndices():p,f.get("blurScope"),f.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=a.getModel("label");i.ignore=!f.get("show");var v=ce(a),h=n.getVisual("style");Se(i,v,{labelFetcher:{getFormattedLabel:function(m,_,S,x,b,w){return e.getFormattedLabel(m,_,"node",x,Qe(b,v.normal&&v.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:h.fill,defaultOpacity:h.opacity,defaultOutsidePosition:"startArc"});var c=f.get("position")||"outside",d=f.get("distance")||0,p;c==="outside"?p=o.r+d:p=(o.r+o.r0)/2,this.textConfig={inside:c!=="outside"};var g=c!=="outside"?f.get("align")||"center":l>0?"left":"right",y=c!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},t})(ke),XU=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;return ft(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var s=e.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),f=l.node1.getModel(),v=a.getItemModel(l.dataIndex),h=v.getModel("lineStyle"),c=v.getModel("emphasis"),d=c.get("focus"),p=G(ca(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){g.setShape(p);return}o?(g.setShape(p),Nw(g,l,e,h)):(Ir(g),Nw(g,l,e,h),It(g,{shape:p},s,n)),$t(this,d==="adjacency"?l.getAdjacentDataIndices():d,c.get("blurScope"),c.get("disabled")),he(g,v,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},t})(Tt);function Nw(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(X(l)&&X(u)){var f=r.shape,v=(f.s1[0]+f.s2[0])/2,h=(f.s1[1]+f.s2[1])/2,c=(f.t1[0]+f.t2[0])/2,d=(f.t1[1]+f.t2[1])/2;o.fill=new ro(v,h,c,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var $U=Math.PI/180,qU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group,l=-e.get("startAngle")*$U;if(i.diff(o).add(function(f){var v=i.getItemLayout(f);if(v){var h=new Ow(i,f,l);ft(h).dataIndex=f,s.add(h)}}).update(function(f,v){var h=o.getItemGraphicEl(v),c=i.getItemLayout(f);if(!c){h&&Ua(h,e,v);return}h?h.updateData(i,f,l):h=new Ow(i,f,l),s.add(h)}).remove(function(f){var v=o.getItemGraphicEl(f);v&&Ua(v,e,f)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=Z(u[0],n.getWidth()),this.group.originY=Z(u[1],n.getHeight()),Zt(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,l)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new XU(n,i,l,a);ft(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,i,l,a),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Ua(u,e,l)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type="chord",t})(Nt),jU=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new Vs($(this.getData,this),$(this.getRawData,this))},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[];if(i&&n){var o=v_(i,n,this,!0,s);return o.data}function s(l,u){var f=wt.prototype.getModel;function v(c,d){var p=f.call(this,c,d);return p.resolveParentPath=h,p}u.wrapMethod("getItemModel",function(c){return c.resolveParentPath=h,c.getModel=v,c});function h(c){if(c&&(c[0]==="label"||c[1]==="label")){var d=c.slice();return c[0]==="label"?d[0]="edgeLabel":c[1]==="label"&&(d[1]="edgeLabel"),d}return c}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){var i=this.getDataParams(e,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ue("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return ue("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t})(zt),dp=Math.PI/180;function KU(r,t){r.eachSeriesByType("chord",function(e){JU(e,t)})}function JU(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=ZD(r,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,v=Math.max((r.get("padAngle")||0)*dp,0),h=Math.max((r.get("minAngle")||0)*dp,0),c=-r.get("startAngle")*dp,d=c+Math.PI*2,p=r.get("clockwise"),g=p?1:-1,y=[c,d];ec(y,!p);var m=y[0],_=y[1],S=_-m,x=e.getSum("value")===0&&n.getSum("value")===0,b=[],w=0;a.eachEdge(function(E){var z=x?1:E.getValue("value");x&&(z>0||h)&&(w+=2);var V=E.node1.dataIndex,F=E.node2.dataIndex;b[V]=(b[V]||0)+z,b[F]=(b[F]||0)+z});var T=0;if(a.eachNode(function(E){var z=E.getValue("value");isNaN(z)||(b[E.dataIndex]=Math.max(z,b[E.dataIndex]||0)),!x&&(b[E.dataIndex]>0||h)&&w++,T+=b[E.dataIndex]||0}),!(w===0||T===0)){v*w>=Math.abs(S)&&(v=Math.max(0,(Math.abs(S)-h*w)/w)),(v+h)*w>=Math.abs(S)&&(h=(Math.abs(S)-v*w)/w);var C=(S-v*w*g)/T,M=0,D=0,I=0;a.eachNode(function(E){var z=b[E.dataIndex]||0,V=C*(T?z:1)*g;Math.abs(V)D){var P=M/D;a.eachNode(function(E){var z=E.getLayout().angle;Math.abs(z)>=h?E.setLayout({angle:z*P,ratio:P},!0):E.setLayout({angle:h,ratio:h===0?1:z/h},!0)})}else a.eachNode(function(E){if(!L){var z=E.getLayout().angle,V=Math.min(z/I,1),F=V*M;z-Fh&&h>0){var V=L?1:Math.min(z/I,1),F=z-h,H=Math.min(F,Math.min(k,M*V));k-=H,E.setLayout({angle:z-H,ratio:(z-H)/z},!0)}else h>0&&E.setLayout({angle:h,ratio:z===0?1:h/z},!0)}});var R=m,O=[];a.eachNode(function(E){var z=Math.max(E.getLayout().angle,h);E.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:R,endAngle:R+z*g,clockwise:p},!0),O[E.dataIndex]=R,R+=(z+v)*g}),a.eachEdge(function(E){var z=x?1:E.getValue("value"),V=C*(T?z:1)*g,F=E.node1.dataIndex,H=O[F]||0,Y=Math.abs((E.node1.getLayout().ratio||1)*V),j=H+Y*g,vt=[s+f*Math.cos(H),l+f*Math.sin(H)],Pt=[s+f*Math.cos(j),l+f*Math.sin(j)],Bt=E.node2.dataIndex,ht=O[Bt]||0,at=Math.abs((E.node2.getLayout().ratio||1)*V),gt=ht+at*g,J=[s+f*Math.cos(ht),l+f*Math.sin(ht)],ct=[s+f*Math.cos(gt),l+f*Math.sin(gt)];E.setLayout({s1:vt,s2:Pt,sStartAngle:H,sEndAngle:j,t1:J,t2:ct,tStartAngle:ht,tEndAngle:gt,cx:s,cy:l,r:f,value:z,clockwise:p}),O[F]=j,O[Bt]=gt})}}}function QU(r){r.registerChartView(qU),r.registerSeriesModel(jU),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,KU),r.registerProcessor(Bs("chord"))}var t8=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),e8=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new t8},t.prototype.buildPath=function(e,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,f),e.lineTo(a.x+n(l)*s,a.y+i(l)*s),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(l)*s,a.y-i(l)*s),e.lineTo(u,f)},t})(Tt);function r8(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=Z(e[0],t.getWidth()),s=Z(e[1],t.getHeight()),l=Z(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Yf(r,t){var e=r==null?"":r+"";return t&&(X(t)?e=t.replace("{value}",e):tt(t)&&(e=t(r))),e}var a8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=r8(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,f=-e.get("endAngle")/180*Math.PI,v=e.getModel("axisLine"),h=v.get("roundCap"),c=h?yh:ke,d=v.get("show"),p=v.getModel("lineStyle"),g=p.get("width"),y=[u,f];ec(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],x=0;d&&x=C&&(M===0?0:i[M-1][0])Math.PI/2&&(j+=Math.PI)):Y==="tangential"?j=-T-Math.PI/2:Dt(Y)&&(j=Y*Math.PI/180),j===0?v.add(new Mt({style:Ft(_,{text:z,x:F,y:H,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):v.add(new Mt({style:Ft(_,{text:z,x:F,y:H,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:F,originY:H,rotation:j}))}if(m.get("show")&&R!==S){var O=m.get("distance");O=O?O+f:f;for(var vt=0;vt<=x;vt++){P=Math.cos(T),k=Math.sin(T);var Pt=new ne({shape:{x1:P*(d-O)+h,y1:k*(d-O)+c,x2:P*(d-w-O)+h,y2:k*(d-w-O)+c},silent:!0,style:I});I.stroke==="auto"&&Pt.setStyle({stroke:i((R+vt/x)/S)}),v.add(Pt),T+=M}T-=M}else T+=C}},t.prototype._renderPointer=function(e,a,n,i,o,s,l,u,f){var v=this.group,h=this._data,c=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),x=+e.get("max"),b=[S,x],w=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),P=Z(L.get("width"),o.r),k=Z(L.get("length"),o.r),R=e.get(["pointer","icon"]),O=L.get("offsetCenter"),E=Z(O[0],o.r),z=Z(O[1],o.r),V=L.get("keepAspect"),F;return R?F=ie(R,E-P/2,z-k,P,k,null,V):F=new e8({shape:{angle:-Math.PI/2,width:P,r:k,x:E,y:z}}),F.rotation=-(D+Math.PI/2),F.x=o.cx,F.y=o.cy,F}function C(M,D){var I=g.get("roundCap"),L=I?yh:ke,P=g.get("overlap"),k=P?g.get("width"):f/m.count(),R=P?o.r-k:o.r-(M+1)*k,O=P?o.r:o.r-M*k,E=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:O}});return P&&(E.z2=kt(m.get(_,M),[S,x],[100,0],!0)),E}(y||p)&&(m.diff(h).add(function(M){var D=m.get(_,M);if(p){var I=T(M,s);Zt(I,{rotation:-((isNaN(+D)?w[0]:kt(D,b,w,!0))+Math.PI/2)},e),v.add(I),m.setItemGraphicEl(M,I)}if(y){var L=C(M,s),P=g.get("clip");Zt(L,{shape:{endAngle:kt(D,b,w,P)}},e),v.add(L),Eg(e.seriesIndex,m.dataType,M,L),d[M]=L}}).update(function(M,D){var I=m.get(_,M);if(p){var L=h.getItemGraphicEl(D),P=L?L.rotation:s,k=T(M,P);k.rotation=P,It(k,{rotation:-((isNaN(+I)?w[0]:kt(I,b,w,!0))+Math.PI/2)},e),v.add(k),m.setItemGraphicEl(M,k)}if(y){var R=c[D],O=R?R.shape.endAngle:s,E=C(M,O),z=g.get("clip");It(E,{shape:{endAngle:kt(I,b,w,z)}},e),v.add(E),Eg(e.seriesIndex,m.dataType,M,E),d[M]=E}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),k=I.get("disabled");if(p){var R=m.getItemGraphicEl(M),O=m.getItemVisual(M,"style"),E=O.fill;if(R instanceof xe){var z=R.style;R.useStyle(G({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},O))}else R.useStyle(O),R.type!=="pointer"&&R.setColor(E);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(kt(m.get(_,M),b,[0,1],!0))),R.z2EmphasisLift=0,he(R,D),$t(R,L,P,k)}if(y){var V=d[M];V.useStyle(m.getItemVisual(M,"style")),V.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,he(V,D),$t(V,L,P,k)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,a){var n=e.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=ie(s,a.cx-o/2+Z(l[0],a.r),a.cy-o/2+Z(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),f=+e.get("min"),v=+e.get("max"),h=new rt,c=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Mt({silent:!0}),d[y]=new Mt({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new rt,x=i(kt(_,[f,v],[0,1],!0)),b=m.getModel("title");if(b.get("show")){var w=b.get("offsetCenter"),T=o.cx+Z(w[0],o.r),C=o.cy+Z(w[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Ft(b,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:x})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+Z(I[0],o.r),P=o.cy+Z(I[1],o.r),k=Z(D.get("width"),o.r),R=Z(D.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:x,M=d[y],E=D.get("formatter");M.attr({z2:g?0:2,style:Ft(D,{x:L,y:P,text:Yf(_,E),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:O})}),DD(M,{normal:D},_,function(V){return Yf(V,E)}),p&&LD(M,y,l,e,{getFormattedLabel:function(V,F,H,Y,j,vt){return Yf(vt?vt.interpolatedValue:_,E)}}),S.add(M)}h.add(S)}),this.group.add(h),this._titleEls=c,this._detailEls=d},t.type="gauge",t})(Nt),n8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return zs(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,B.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:B.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:B.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:B.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:B.color.neutral00,borderWidth:0,borderColor:B.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:B.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:B.color.transparent,borderWidth:0,borderColor:B.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:B.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t})(zt);function i8(r){r.registerChartView(a8),r.registerSeriesModel(n8)}var o8=["itemStyle","opacity"],s8=(function(r){N(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new Ae,s=new Mt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(o8);f=f??1,n||Ir(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Zt(i,{style:{opacity:f}},o,a)):It(i,{style:{opacity:f},shape:{points:l.points}},o,a),he(i,s),this._updateLabel(e,a),$t(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),f=u.label,v=e.getItemVisual(a,"style"),h=v.fill;Se(o,ce(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:v.opacity,defaultText:e.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var c=l.getModel("label"),d=c.get("color"),p=d==="inherit"?h:null;n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var g=f.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new st(g[0][0],g[0][1]):null},It(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),z0(n,V0(l),{stroke:h})},t})(Ee),l8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new s8(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Ua(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t})(Nt),u8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Vs($(this.getData,this),$(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return zs(this,{coordDimensions:["value"],encodeDefaulter:pt(h0,this)})},t.prototype._defaultLabelLine=function(e){Yi(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",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:B.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},t})(zt);function f8(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),n=[],i=t==="ascending",o=0,s=r.count();oA8)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!gp(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function gp(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var L8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&mt(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=Rt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t})(xt),I8=(function(r){N(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t})(kr);function zn(r,t,e,a,n,i){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Po(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=Po(s,[0,o]),n=i=Po(s,[n,i]),a=0}t[0]=Po(t[0],e),t[1]=Po(t[1],e);var l=yp(t,a);t[a]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[a]=Po(t[a],f);var v;return v=yp(t,a),n!=null&&(v.sign!==l.sign||v.spani&&(t[1-a]=t[a]+v.sign*i),t}function yp(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Po(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var mp=A,AP=Math.min,MP=Math.max,Vw=Math.floor,P8=Math.ceil,Gw=ae,R8=Math.PI,k8=(function(){function r(t,e,a){this.type="parallel",this._axesMap=K(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;mp(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),f=this._axesMap.set(o,new I8(o,Fu(u),[0,0],u.get("type"),l)),v=f.type==="category";f.onBand=v&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();mp(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),Ji(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var a=de(t,e).refContainer;this._rect=Xt(t.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,f=Zf(t.get("axisExpandWidth"),l),v=Zf(t.get("axisExpandCount")||0,[0,u]),h=t.get("axisExpandable")&&u>3&&u>v&&v>1&&f>0&&s>0,c=t.get("axisExpandWindow"),d;if(c)d=Zf(c[1]-c[0],l),c[1]=c[0]+d;else{d=Zf(f*(v-1),l);var p=t.get("axisExpandCenter")||Vw(u/2);c=[f*p-d/2],c[1]=c[0]+d}var g=(s-d)/(u-v);g<3&&(g=0);var y=[Vw(Gw(c[0]/f,1))+1,P8(Gw(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),mp(a,function(o,s){var l=(n.axisExpandable?O8:E8)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:R8/2,vertical:0},v=[u[i].x+t.x,u[i].y+t.y],h=f[i],c=me();rn(c,c,h),Yr(c,c,v),this._axesLayout[o]={position:v,rotation:h,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-v[0])?(u="jump",l=s-i*(1-v[2])):(l=s-i*v[1])>=0&&(l=s-i*(1-v[1]))<=0&&(l=0),l*=e.axisExpandWidth/f,l?zn(l,n,o,"all"):u="none";else{var c=n[1]-n[0],d=o[1]*s/c;n=[MP(0,d-c/2)],n[1]=AP(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r})();function Zf(r,t){return AP(MP(r,t[0]),t[1])}function E8(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function O8(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)lr(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;iG8}function kP(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function EP(r,t,e,a){var n=new rt;return n.add(new St({name:"main",style:g_(e),silent:!0,draggable:!0,cursor:"move",drift:pt(Ww,r,t,n,["n","s","w","e"]),ondragend:pt(to,t,{isEnd:!0})})),A(a,function(i){n.add(new St({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:pt(Ww,r,t,n,i),ondragend:pt(to,t,{isEnd:!0})}))}),n}function OP(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=gs(n,F8),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,f=e[0][1],v=e[1][1],h=f-i+n/2,c=v-i+n/2,d=f-o,p=v-s,g=d+n,y=p+n;Ia(r,t,"main",o,s,d,p),a.transformable&&(Ia(r,t,"w",l,u,i,y),Ia(r,t,"e",h,u,i,y),Ia(r,t,"n",l,u,g,i),Ia(r,t,"s",l,c,g,i),Ia(r,t,"nw",l,u,i,i),Ia(r,t,"ne",h,u,i,i),Ia(r,t,"sw",l,c,i,i),Ia(r,t,"se",h,c,i,i))}function Fy(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(g_(e)),n.attr({silent:!a,cursor:a?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?Hy(r,i[0]):X8(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?W8[s]+"-resize":null})})}function Ia(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(q8(y_(r,t,[[a,n],[a+i,n+o]])))}function g_(r){return nt({strokeNoScale:!0},r.brushStyle)}function NP(r,t,e,a){var n=[wu(r,e),wu(t,a)],i=[gs(r,e),gs(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function Z8(r){return Pn(r.group)}function Hy(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=ic(e[t],Z8(r));return a[n]}function X8(r,t){var e=[Hy(r,t[0]),Hy(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Ww(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=BP(t,n,i);A(a,function(u){var f=H8[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(NP(s[0][0],s[1][0],s[0][1],s[1][1])),c_(t,e),to(t,{isEnd:!1})}function $8(r,t,e,a){var n=t.__brushOption.range,i=BP(r,e,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),c_(r,t),to(r,{isEnd:!1})}function BP(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function y_(r,t,e){var a=RP(r,t);return a&&a!==Qi?a.clipPath(e,r._transform):et(e)}function q8(r){var t=wu(r[0][0],r[1][0]),e=wu(r[0][1],r[1][1]),a=gs(r[0][0],r[1][0]),n=gs(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function j8(r,t,e){if(!(!r._brushType||J8(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=p_(r,t,e);if(!r._dragging)for(var o=0;oa.getWidth()||e<0||e>a.getHeight()}var wc={lineX:Zw(0),lineY:Zw(1),rect:{createCover:function(r,t){function e(a){return a}return EP({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=kP(r);return NP(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){OP(r,t,e,a)},updateCommon:Fy,contain:Uy},polygon:{createCover:function(r,t){var e=new rt;return e.add(new Ae({name:"main",style:g_(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new Ee({name:"main",draggable:!0,drift:pt($8,r,t),ondragend:pt(to,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:y_(r,t,e)})},updateCommon:Fy,contain:Uy}};function Zw(r){return{createCover:function(t,e){return EP({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=kP(t),a=wu(e[0][r],e[1][r]),n=gs(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=RP(t,e);if(o!==Qi&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),OP(t,e,l,n)},updateCommon:Fy,contain:Uy}}function VP(r){return r=m_(r),function(t){return Xm(t,r)}}function GP(r,t){return r=m_(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function FP(r,t,e){var a=m_(r);return function(n,i){return a.contain(i[0],i[1])&&!ZI(n,t,e)}}function m_(r){return lt.create(r)}var Q8=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new h_(a.getZr())).on("brush",$(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!t6(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new rt,this.group.add(this._axisGroup),!!e.get("show")){var s=r6(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),f=u.width,v=e.axis.dim,h=l.getAxisLayout(v),c=G({strokeContainThreshold:f},h),d=new Ye(e,n,c);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(c,u,e,s,f,n),Bu(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),v=lt.create({x:l[0],y:-o/2,width:u,height:o});v.x-=f,v.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:VP(v),isTargetByCursor:FP(v,s,i),getLinearBrushOtherExtent:GP(v,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(e6(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=U(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t})(Wt);function t6(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function e6(r){var t=r.axis;return U(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function r6(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}var a6={type:"axisAreaSelect",event:"axisAreaSelected"};function n6(r){r.registerAction(a6,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var i6={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function HP(r){r.registerComponentView(M8),r.registerComponentModel(L8),r.registerCoordinateSystem("parallel",B8),r.registerPreprocessor(w8),r.registerComponentModel(Vy),r.registerComponentView(Q8),ds(r,"parallel",Vy,i6),n6(r)}function o6(r){_t(HP),r.registerChartView(p8),r.registerSeriesModel(m8),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,b8)}var s6=(function(){function r(){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 r})(),l6=(function(r){N(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new s6},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){ja(this)},t.prototype.downplay=function(){Ka(this)},t})(Tt),u6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new rt,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,a){this._controller=new lo(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,f=l.height,v=e.getData(),h=e.getData("edge"),c=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,n),XI(e,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var p=new l6,g=ft(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),x=d.node1.getModel(),b=x.get("localX"),w=x.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),M=C.get("localX"),D=C.get("localY"),I=d.getLayout(),L,P,k,R,O,E,z,V;p.shape.extent=Math.max(1,I.dy),p.shape.orient=c,c==="vertical"?(L=(b!=null?b*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,k=(M!=null?M*u:T.x)+I.ty,R=D!=null?D*f:T.y,O=L,E=P*(1-_)+R*_,z=k,V=P*_+R*(1-_)):(L=(b!=null?b*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,k=M!=null?M*u:T.x,R=(D!=null?D*f:T.y)+I.ty,O=L*(1-_)+k*_,E=P,z=L*_+k*(1-_),V=R),p.setShape({x1:L,y1:P,x2:k,y2:R,cpx1:O,cpy1:E,cpx2:z,cpy2:V}),p.useStyle(m.getItemStyle()),Xw(p.style,c,d);var F=""+y.get("value"),H=ce(y,"edgeLabel");Se(p,H,{labelFetcher:{getFormattedLabel:function(vt,Pt,Bt,ht,at,gt){return e.getFormattedLabel(vt,Pt,"edge",ht,Qe(at,H.normal&&H.normal.get("formatter"),F),gt)}},labelDataIndex:d.dataIndex,defaultText:F}),p.setTextConfig({position:"inside"});var Y=y.getModel("emphasis");he(p,y,"lineStyle",function(vt){var Pt=vt.getItemStyle();return Xw(Pt,c,d),Pt}),s.add(p),h.setItemGraphicEl(d.dataIndex,p);var j=Y.get("focus");$t(p,j==="adjacency"?d.getAdjacentDataIndices():j==="trajectory"?d.getTrajectoryDataIndices():j,Y.get("blurScope"),Y.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,x=new St({shape:{x:y!=null?y*u:p.x,y:m!=null?m*f:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Se(x,ce(g),{labelFetcher:{getFormattedLabel:function(w,T){return e.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),x.disableLabelAnimation=!0,x.setStyle("fill",d.getVisual("color")),x.setStyle("decal",d.getVisual("style").decal),he(x,g),s.add(x),v.setItemGraphicEl(d.dataIndex,x),ft(x).dataType="node";var b=_.get("focus");$t(x,b==="adjacency"?d.getAdjacentDataIndices():b==="trajectory"?d.getTrajectoryDataIndices():b,_.get("blurScope"),_.get("disabled"))}),v.eachItemGraphicEl(function(d,p){var g=v.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:v.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(f6(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=n.width,o=n.height,s=e.coordinateSystem=new uo(null,{api:a,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t})(Nt);function Xw(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");X(a)&&X(n)&&(r.fill=new ro(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function f6(r,t,e){var a=new St({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Zt(a,{shape:{width:r.width+20}},t,e),a}var v6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new wt(o[l],this,a));var u=v_(i,n,this,!0,f);return u.data;function f(v,h){v.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(c.parentModel=m)}return c}),h.wrapMethod("getItemModel",function(c,d){var p=c.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(c.parentModel=_)}return c})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ue("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(e),v=f.getLayout().value,h=this.getDataParams(e,n).data.name;return ue("nameValue",{name:h!=null?h+"":null,value:v,noValue:i(v)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.type="series.sankey",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:B.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:B.color.primary}},animationEasing:"linear",animationDuration:1e3},t})(zt);function h6(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=de(e,t).refContainer,o=Xt(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),f=u.nodes,v=u.edges;d6(f);var h=Rt(f,function(g){return g.getLayout().value===0}),c=h.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");c6(f,v,a,n,s,l,c,d,p)})}function c6(r,t,e,a,n,i,o,s,l){p6(r,t,e,n,i,s,l),_6(r,t,i,n,a,o,s),D6(r,s)}function d6(r){A(r,function(t){var e=En(t.outEdges,Ch),a=En(t.inEdges,Ch),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function p6(r,t,e,a,n,i,o){for(var s=[],l=[],u=[],f=[],v=0,h=0;h=0;y&&g.depth>c&&(c=g.depth),p.setLayout({depth:y?g.depth:v},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;mv-1?c:v-1;o&&o!=="left"&&g6(r,o,i,w);var T=i==="vertical"?(n-e)/w:(a-e)/w;m6(r,T,i)}function WP(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function g6(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,b6(s,l,o),_p(s,n,e,a,o),M6(s,l,o),_p(s,n,e,a,o)}function S6(r,t){var e=[],a=t==="vertical"?"y":"x",n=Lg(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),A(n.keys,function(i){e.push(n.buckets.get(i))}),e}function x6(r,t,e,a,n,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(v){u+=v.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(e-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[h]+t;var d=n==="vertical"?a:e;if(u=f-t-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=v-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[h]+t-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function b6(r,t,e){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=En(n.outEdges,w6,e)/En(n.outEdges,Ch);if(isNaN(i)){var o=n.outEdges.length;i=o?En(n.outEdges,T6,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-Vn(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Vn(n,e))*t;n.setLayout({y:l},!0)}}})})}function w6(r,t){return Vn(r.node2,t)*r.getValue()}function T6(r,t){return Vn(r.node2,t)}function C6(r,t){return Vn(r.node1,t)*r.getValue()}function A6(r,t){return Vn(r.node1,t)}function Vn(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Ch(r){return r.getValue()}function En(r,t,e){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new _e({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function I6(r){r.registerChartView(u6),r.registerSeriesModel(v6),r.registerLayout(h6),r.registerVisual(L6),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){var i=n.coordinateSystem,o=_c(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var UP=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,v=this._baseAxisDim=u[f],h=u[1-f],c=[n,i],d=c[f].get("type"),p=c[1-f].get("type"),g=t.data;if(g&&l){var y=[];A(g,function(S,x){var b;W(S)?(b=S.slice(),S.unshift(x)):W(S.value)?(b=G({},S),b.value=b.value.slice(),S.value.unshift(x)):b=S,y.push(b)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:v,type:lh(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:lh(p),dimsDef:m.slice()}];return zs(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:pt(tL,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),YP=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:B.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:B.color.shadow}},animationDuration:800},t})(zt);Qt(YP,UP,!0);var P6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),v=$w(f,i,u,l,!0);i.setItemGraphicEl(u,v),o.add(v)}}).update(function(u,f){var v=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(v);return}var h=i.getItemLayout(u);v?(Ir(v),ZP(h,v,i,u)):v=$w(h,i,u,l),o.add(v),i.setItemGraphicEl(u,v)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},t.prototype.remove=function(e){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},t.type="boxplot",t})(Nt),R6=(function(){function r(){}return r})(),k6=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new R6},t.prototype.buildPath=function(e,a){var n=a.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();ip){var S=[y,_];a.push(S)}}}return{boxData:e,outliers:a}}var G6={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==Me){var a="";Et(a)}var n=V6(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function F6(r){r.registerSeriesModel(YP),r.registerChartView(P6),r.registerLayout(O6),r.registerTransform(G6)}var H6=["itemStyle","borderColor"],W6=["itemStyle","borderColor0"],U6=["itemStyle","borderColorDoji"],Y6=["itemStyle","color"],Z6=["itemStyle","color0"];function __(r,t){return t.get(r>0?Y6:Z6)}function S_(r,t){return t.get(r===0?U6:r>0?H6:W6)}var X6={seriesType:"candlestick",plan:Ps(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=__(s,o),l.stroke=S_(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");G(u,l)}}}}}},$6=["color","borderColor"],q6=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Wn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var v=a.getItemLayout(f);if(s&&qw(u,v))return;var h=Sp(v,f,!0);Zt(h,{shape:{points:v.ends}},e,f),xp(h,a,f,o),i.add(h),a.setItemGraphicEl(f,h)}}).update(function(f,v){var h=n.getItemGraphicEl(v);if(!a.hasValue(f)){i.remove(h);return}var c=a.getItemLayout(f);if(s&&qw(u,c)){i.remove(h);return}h?(It(h,{shape:{points:c.ends}},e,f),Ir(h)):h=Sp(c),xp(h,a,f,o),i.add(h),a.setItemGraphicEl(f,h)}).remove(function(f){var v=n.getItemGraphicEl(f);v&&i.remove(v)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),jw(e,this.group);var a=e.get("clip",!0)?Uu(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=n.getItemLayout(o),l=Sp(s);xp(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){jw(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(Nt),j6=(function(){function r(){}return r})(),K6=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new j6},t.prototype.buildPath=function(e,a){var n=a.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t})(Tt);function Sp(r,t,e){var a=r.ends;return new K6({shape:{points:e?J6(a,r):a},z2:100})}function qw(r,t){for(var e=!0,a=0;ax?D[i]:M[i],ends:P,brushRect:z(b,w,_)})}function O(F,H){var Y=[];return Y[n]=H,Y[i]=F,isNaN(H)||isNaN(F)?[NaN,NaN]:t.dataToPoint(Y)}function E(F,H,Y){var j=H.slice(),vt=H.slice();j[n]=mv(j[n]+a/2,1,!1),vt[n]=mv(vt[n]-a/2,1,!0),Y?F.push(j,vt):F.push(vt,j)}function z(F,H,Y){var j=O(F,Y),vt=O(H,Y);return j[n]-=a/2,vt[n]-=a/2,{x:j[0],y:j[1],width:a,height:vt[1]-j[1]}}function V(F){return F[n]=mv(F[n],1),F}}function d(p,g){for(var y=va(p.count*4),m=0,_,S=[],x=[],b,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(b=p.next())!=null;){var C=w.get(s,b),M=w.get(u,b),D=w.get(f,b),I=w.get(v,b),L=w.get(h,b);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=Kw(w,b,M,D,f,T),S[n]=C,S[i]=I,_=t.dataToPoint(S,null,x),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=t.dataToPoint(S,null,x),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function Kw(r,t,e,a,n,i){var o;return e>a?o=-1:e0?r.get(n,t-1)<=a?1:-1:1,o}function rY(r,t){var e=r.getBaseAxis(),a,n=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),i=Z(Q(r.get("barMaxWidth"),n),n),o=Z(Q(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?Z(s,n):Math.max(Math.min(n/2,i),o)}function aY(r){r.registerChartView(q6),r.registerSeriesModel(XP),r.registerPreprocessor(tY),r.registerVisual(X6),r.registerLayout(eY)}function Jw(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var nY=(function(r){N(t,r);function t(e,a){var n=r.call(this)||this,i=new Hu(e,a),o=new rt;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var h=void 0;tt(v)?h=v(n):h=v,i.__t>0&&(h=-s*i.__t),this._animateSymbol(i,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var s=this,l=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});i||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return Ba(e.__p1,e.__cp1)+Ba(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Te,f=cg;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var v=e.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),h=e.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(h,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),v=n[l],h=n[l+1];e.x=v[0]*(1-f)+f*h[0],e.y=v[1]*(1-f)+f*h[1];var c=e.__t<1?h[0]-v[0]:v[0]-h[0],d=e.__t<1?h[1]-v[1]:v[1]-h[1];e.rotation=-Math.atan2(d,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t})($P),uY=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),fY=(function(r){N(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new uY},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var l=1;l0){var c=(u+v)/2-(f-h)*i,d=(f+h)/2-(v-u)*i;e.quadraticCurveTo(c,d,v,h)}else e.lineTo(v,h)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var v=i[u++],h=i[u++],c=1;c0){var g=(v+d)/2-(h-p)*o,y=(h+p)/2-(d-v)*o;if(qM(v,h,g,y,d,p,s,e,a))return l}else if(mn(v,h,d,p,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),jP={seriesType:"lines",plan:Ps(),reset:function(r){var t=r.coordinateSystem;if(t){var e=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(e){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var v=e.get("clip",!0)&&Uu(e.coordinateSystem,!1,e);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=jP.reset(e,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new vY:new f_(o?i?lY:qP:i?$P:u_),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t})(Nt),cY=typeof Uint32Array>"u"?Array:Uint32Array,dY=typeof Float64Array>"u"?Array:Float64Array;function Qw(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=U(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),Wh([n,e[0],e[1]])}))}var pY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],Qw(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(Qw(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=rs(this._flatCoords,a.flatCoords),this._flatCoordsOffset=rs(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},t})(zt);function Xf(r){return r instanceof Array||(r=[r,r]),r}var gY={seriesType:"lines",reset:function(r){var t=Xf(r.get("symbol")),e=Xf(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var s=i.getItemModel(o),l=Xf(s.getShallow("symbol",!0)),u=Xf(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};function yY(r){r.registerChartView(hY),r.registerSeriesModel(pY),r.registerLayout(jP),r.registerVisual(gY)}var mY=256,_Y=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=tr.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,v=this.canvas,h=v.getContext("2d"),c=t.length;v.width=e,v.height=a;for(var d=0;d0){var I=o(_)?l:u;_>0&&(_=_*M+T),x[b++]=I[D],x[b++]=I[D+1],x[b++]=I[D+2],x[b++]=I[D+3]*_*256}else b+=4}return h.putImageData(S,0,0),v},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=tr.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=B.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r})();function SY(r,t,e){var a=r[1]-r[0];t=U(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=t[0]&&a<=t[1]}}function tT(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var bY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):tT(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(tT(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Wn(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var s=e.coordinateSystem,l=Bn(s,"cartesian2d"),u=Bn(s,"matrix"),f,v,h,c;if(l){var d=s.getAxis("x"),p=s.getAxis("y");f=d.getBandWidth()+.5,v=p.getBandWidth()+.5,h=d.scale.getExtent(),c=p.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),x=e.get(["itemStyle","borderRadius"]),b=ce(e),w=e.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),M=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=n;Ih[1]||Rc[1])continue;var O=s.dataToPoint([k,R]);L=new St({shape:{x:O[0]-f/2,y:O[1]-v/2,width:f,height:v},style:P})}else if(u){var E=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(Ie(E.x))continue;L=new St({z2:1,shape:E,style:P})}else{if(isNaN(y.get(D[1],I)))continue;var z=s.dataToLayout([y.get(D[0],I)]),E=z.contentRect||z.rect;if(Ie(E.x)||Ie(E.y))continue;L=new St({z2:1,shape:E,style:P})}if(y.hasItemOption){var V=y.getItemModel(I),F=V.getModel("emphasis");m=F.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),x=V.get(["itemStyle","borderRadius"]),T=F.get("focus"),C=F.get("blurScope"),M=F.get("disabled"),b=ce(V)}L.shape.r=x;var H=e.getRawValue(I),Y="-";H&&H[2]!=null&&(Y=H[2]+""),Se(L,b,{labelFetcher:e,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:Y}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=S,$t(L,T,C,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new _Y;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=e.getViewRect().clone(),v=e.getRoamTransform();f.applyTransform(v);var h=Math.max(f.x,0),c=Math.max(f.y,0),d=Math.min(f.width+f.x,i.getWidth()),p=Math.min(f.height+f.y,i.getHeight()),g=d-h,y=p-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var M=e.dataToPoint([w,T]);return M[0]-=h,M[1]-=c,M.push(C),M}),S=n.getExtent(),x=n.type==="visualMap.continuous"?xY(S,n.option.range):SY(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},x);var b=new xe({style:{width:g,height:y,x:h,y:c,image:u.canvas},silent:!0});this.group.add(b)},t.type="heatmap",t})(Nt),wY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return Ca(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Is.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:B.color.primary}}},t})(zt);function TY(r){r.registerChartView(bY),r.registerSeriesModel(wY)}var CY=["itemStyle","borderWidth"],eT=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Tp=new Ta,AY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),v=l.master.getRect(),h={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:f,valueDim:eT[+f],categoryDim:eT[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=aT(o,d),g=rT(o,d,p,h),y=nT(o,h,g);o.setItemGraphicEl(d,y),i.add(y),oT(y,h,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var y=aT(o,d),m=rT(o,d,y,h),_=rR(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?kY(g,h,m):g=nT(o,h,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,i.add(g),oT(g,h,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&iT(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var c=e.get("clip",!0)?Uu(e.coordinateSystem,!1,e):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){iT(i,ft(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t})(Nt);function rT(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,v=e.isAnimationEnabled(),h={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:v?e:null,hoverScale:v&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};MY(e,i,n,a,h),DY(r,t,n,i,o,h.boundingLength,h.pxSign,f,a,h),LY(e,h.symbolScale,u,a,h);var c=h.symbolSize,d=oo(e.get("symbolOffset"),c);return IY(e,c,n,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,a,h),h}function MY(r,t,e,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(W(o)){var v=[Cp(s,o[0])-l,Cp(s,o[1])-l];v[1]=0?1:-1:f>0?1:-1}function Cp(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function DY(r,t,e,a,n,i,o,s,l,u){var f=l.valueDim,v=l.categoryDim,h=Math.abs(e[v.wh]),c=r.getItemVisual(t,"symbolSize"),d;W(c)?d=c.slice():c==null?d=["100%","100%"]:d=[c,c],d[v.index]=Z(d[v.index],h),d[f.index]=Z(d[f.index],a?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function LY(r,t,e,a,n){var i=r.get(CY)||0;i&&(Tp.attr({scaleX:t[0],scaleY:t[1],rotation:e}),Tp.updateTransform(),i/=Tp.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function IY(r,t,e,a,n,i,o,s,l,u,f,v){var h=f.categoryDim,c=f.valueDim,d=v.pxSign,p=Math.max(t[c.index]+s,0),g=p;if(a){var y=Math.abs(l),m=Ce(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=Z(m,t[c.index]),x=Math.max(p+S*2,0),b=_?0:S*2,w=Im(a),T=w?a:sT((y+b)/x),C=y-T*p;S=C/2/(_?T:Math.max(T-1,1)),x=p+S*2,b=_?0:S*2,!w&&a!=="fixed"&&(T=u?sT((Math.abs(u)+b)/x):0),g=T*x-b,v.repeatTimes=T,v.symbolMargin=S}var M=d*(g/2),D=v.pathPosition=[];D[h.index]=e[h.wh]/2,D[c.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var I=v.bundlePosition=[];I[h.index]=e[h.xy],I[c.index]=e[c.xy];var L=v.barRectShape=G({},e);L[c.wh]=d*Math.max(Math.abs(e[c.wh]),Math.abs(D[c.index]+M)),L[h.wh]=e[h.wh];var P=v.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=f.ecSize[h.wh],P[c.xy]=0,P[c.wh]=e[c.wh]}function KP(r){var t=r.symbolPatternSize,e=ie(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function JP(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,v=i[t.valueDim.index]+o+e.symbolMargin*2;for(x_(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-p),g[l.index]=v*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function QP(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?es(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=KP(e),n.add(i),es(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function tR(r,t,e){var a=G({},t.barRectShape),n=r.__pictorialBarRect;n?es(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new St({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function eR(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=G({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)It(n,{shape:i},s,l);else{i[o.wh]=0,n=new St({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],ao[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function aT(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=PY,e.isAnimationEnabled=RY,e}function PY(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function RY(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function nT(r,t,e,a){var n=new rt,i=new rt;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?JP(n,t,e):QP(n,t,e),tR(n,e,a),eR(n,t,e,a),n.__pictorialShapeStr=rR(r,e),n.__pictorialSymbolMeta=e,n}function kY(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;It(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?JP(r,t,e,!0):QP(r,t,e,!0),tR(r,e,!0),eR(r,t,e,!0)}function iT(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];x_(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),A(i,function(o){Nn(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function rR(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function x_(r,t,e){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function es(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&ao[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function oT(r,t,e){var a=e.dataIndex,n=e.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),v=i.get("blurScope"),h=i.get("scale");x_(r,function(p){if(p instanceof xe){var g=p.style;p.useStyle(G({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var y=p.ensureState("emphasis");y.style=o,h&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var c=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Se(d,ce(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:cs(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:c}),$t(r,f,v,i.get("disabled"))}function sT(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var EY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Un(yu.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:B.color.primary}}}),t})(yu);function OY(r){r.registerChartView(AY),r.registerSeriesModel(EY),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,pt(b2,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,w2("pictorialBar"))}var NY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,v=u.boundaryGap;s.x=0,s.y=f.y+v[0];function h(g){return g.name}var c=new Ja(this._layersSeries||[],l,h,h),d=[];c.add($(p,this,"add")).update($(p,this,"update")).remove($(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],x=[],b,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=v)}return{y0:n,max:i}}function FY(r){r.registerChartView(NY),r.registerSeriesModel(zY),r.registerLayout(VY),r.registerProcessor(Bs("themeRiver"))}var HY=2,WY=4,uT=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=HY,o.textConfig={inside:!0},ft(o).seriesIndex=a.seriesIndex;var s=new Mt({z2:WY,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;ft(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),v=G({},f);v.label=null;var h=a.getVisual("style");h.lineJoin="bevel";var c=a.getVisual("decal");c&&(h.decal=fs(c,o));var d=ca(l.getModel("itemStyle"),v,!0);G(v,d),A(Xe,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var x=ca(S,v);x&&(_.shape=x)}),e?(s.setShape(v),s.shape.r=f.r0,Zt(s,{shape:{r:f.r}},n,a.dataIndex)):(It(s,{shape:v},n),Ir(s)),s.useStyle(h),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?rs(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;$t(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),v=this,h=v.getTextContent(),c=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)P&&!is(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,a,n):(o.virtualPiece=new uT(m,e,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";Jv(u,f)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Yy,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="sunburst",t})(Nt),XY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};aR(n);var i=this._levelModels=U(e.levels||[],function(l){return new wt(l,this,a)},this),o=a_.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var v=o.getNodeByDataIndex(f),h=i[v.depth];return h&&(u.parentModel=h),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=xc(n,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){sP(this)},t.type="series.sunburst",t.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},t})(zt);function aR(r){var t=0;A(r.children,function(a){aR(a);var n=a.value;W(n)&&(n=n[0]),t+=n});var e=r.value;W(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),W(r.value)?r.value[0]=e:r.value=e}var vT=Math.PI/180;function $Y(r,t,e){t.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");W(i)||(i=[0,i]),W(n)||(n=[n,n]);var o=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=Z(n[0],o),f=Z(n[1],s),v=Z(i[0],l/2),h=Z(i[1],l/2),c=-a.get("startAngle")*vT,d=a.get("minAngle")*vT,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&nR(g,m);var _=0;A(g.children,function(R){!isNaN(R.getValue())&&_++});var S=g.getValue(),x=Math.PI/(S||_)*2,b=g.depth>0,w=g.height-(b?-1:1),T=(h-v)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=C?1:-1,I=function(R,O){if(R){var E=O;if(R!==p){var z=R.getValue(),V=S===0&&M?x:z*x;V1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&X(s)&&(s=zv(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");G(u,l)})})}function KY(r){r.registerChartView(ZY),r.registerSeriesModel(XY),r.registerLayout(pt($Y,"sunburst")),r.registerProcessor(pt(Bs,"sunburst")),r.registerVisual(jY),YY(r)}var hT={color:"fill",borderColor:"stroke"},JY={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Ya=bt(),QY=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return Ca(null,this)},t.prototype.getDataParams=function(e,a,n){var i=r.prototype.getDataParams.call(this,e,a);return n&&(i.info=Ya(n).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t})(zt);function t7(r,t){return t=t||[0,0],U(["x","y"],function(e,a){var n=this.getAxis(e),i=t[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function e7(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:$(t7,r)}}}function r7(r,t){return t=t||[0,0],U([0,1],function(e){var a=t[e],n=r[e]/2,i=[],o=[];return i[e]=a-n,o[e]=a+n,i[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(o)[e])},this)}function a7(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:$(r7,r)}}}function n7(r,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-n)-e.dataToCoord(a+n))}function i7(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:$(n7,r)}}}function o7(r,t){return t=t||[0,0],U(["Radius","Angle"],function(e,a){var n="get"+e+"Axis",i=this[n](),o=t[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function s7(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),a=t.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:$(o7,r)}}}function l7(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function u7(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}function iR(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||q(r,"text")))}function oR(r,t,e){var a=r,n,i,o;if(t==="text")o=a;else{o={},q(a,"text")&&(o.text=a.text),q(a,"rich")&&(o.rich=a.rich),q(a,"textFill")&&(o.fill=a.textFill),q(a,"textStroke")&&(o.stroke=a.textStroke),q(a,"fontFamily")&&(o.fontFamily=a.fontFamily),q(a,"fontSize")&&(o.fontSize=a.fontSize),q(a,"fontStyle")&&(o.fontStyle=a.fontStyle),q(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=q(a,"textPosition");e?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),q(a,"textPosition")&&(n.position=a.textPosition),q(a,"textOffset")&&(n.offset=a.textOffset),q(a,"textRotation")&&(n.rotation=a.textRotation),q(a,"textDistance")&&(n.distance=a.textDistance)}return cT(o,r),A(o.rich,function(l){cT(l,l)}),{textConfig:n,textContent:i}}function cT(r,t){t&&(t.font=t.textFont||t.font,q(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),q(t,"textAlign")&&(r.align=t.textAlign),q(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),q(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),q(t,"textWidth")&&(r.width=t.textWidth),q(t,"textHeight")&&(r.height=t.textHeight),q(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),q(t,"textPadding")&&(r.padding=t.textPadding),q(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),q(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),q(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),q(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),q(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),q(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),q(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function dT(r,t,e){var a=r;a.textPosition=a.textPosition||e.position||"inside",e.offset!=null&&(a.textOffset=e.offset),e.rotation!=null&&(a.textRotation=e.rotation),e.distance!=null&&(a.textDistance=e.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||B.color.neutral99;pT(a,t);var o=a.textFill==null;return n?o&&(a.textFill=e.insideFill||B.color.neutral00,!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||B.color.neutral00),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,A(t.rich,function(s){pT(s,s)}),a}function pT(r,t){t&&(q(t,"fill")&&(r.textFill=t.fill),q(t,"stroke")&&(r.textStroke=t.fill),q(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),q(t,"font")&&(r.font=t.font),q(t,"fontStyle")&&(r.fontStyle=t.fontStyle),q(t,"fontWeight")&&(r.fontWeight=t.fontWeight),q(t,"fontSize")&&(r.fontSize=t.fontSize),q(t,"fontFamily")&&(r.fontFamily=t.fontFamily),q(t,"align")&&(r.textAlign=t.align),q(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),q(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),q(t,"width")&&(r.textWidth=t.width),q(t,"height")&&(r.textHeight=t.height),q(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),q(t,"padding")&&(r.textPadding=t.padding),q(t,"borderColor")&&(r.textBorderColor=t.borderColor),q(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),q(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),q(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),q(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),q(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),q(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),q(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),q(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),q(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),q(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var sR={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},gT=At(sR);Mr(ya,function(r,t){return r[t]=1,r},{});ya.join(", ");var Ah=["","style","shape","extra"],ys=bt();function b_(r,t,e,a,n){var i=r+"Animation",o=Cs(r,a,n)||{},s=ys(t).userDuring;return o.duration>0&&(o.during=s?$(d7,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),G(o,e[i]),o}function Av(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=ys(r),u=t.style;l.userDuring=t.during;var f={},v={};if(g7(r,t,v),r.type==="compound")for(var h=r.shape.paths,c=t.shape.paths,d=0;d0&&r.animateFrom(g,y)}else v7(r,t,n||0,e,f);lR(r,t),u?r.dirty():r.markRedraw()}function lR(r,t){for(var e=ys(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function h7(r,t){q(t,"silent")&&(r.silent=t.silent),q(t,"ignore")&&(r.ignore=t.ignore),r instanceof Lr&&q(t,"invisible")&&(r.invisible=t.invisible),r instanceof Tt&&q(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var aa={},c7={setTransform:function(r,t){return aa.el[r]=t,this},getTransform:function(r){return aa.el[r]},setShape:function(r,t){var e=aa.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=aa.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=aa.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=aa.el.style;if(t)return t[r]},setExtra:function(r,t){var e=aa.el.extra||(aa.el.extra={});return e[r]=t,this},getExtra:function(r){var t=aa.el.extra;if(t)return t[r]}};function d7(){var r=this,t=r.el;if(t){var e=ys(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}aa.el=t,a(c7)}}function yT(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),Wi(l))G(o,i);else for(var u=Ht(l),f=0;f=0){!o&&(o=a[r]={});for(var c=At(i),f=0;f=0)){var h=r.getAnimationStyleProps(),c=h?h.style:null;if(c){!i&&(i=a.style={});for(var d=At(e),u=0;u=0?t.getStore().get(E,R):void 0}var z=t.get(O.name,R),V=O&&O.ordinalMeta;return V?V.categories[z]:z}function w(k,R){R==null&&(R=f);var O=t.getItemVisual(R,"style"),E=O&&O.fill,z=O&&O.opacity,V=_(R,Cn).getItemStyle();E!=null&&(V.fill=E),z!=null&&(V.opacity=z);var F={inheritColor:X(E)?E:B.color.neutral99},H=S(R,Cn),Y=Ft(H,null,F,!1,!0);Y.text=H.getShallow("show")?Q(r.getFormattedLabel(R,Cn),cs(t,R)):null;var j=qv(H,F,!1);return M(k,V),V=dT(V,Y,j),k&&C(V,k),V.legacy=!0,V}function T(k,R){R==null&&(R=f);var O=_(R,Za).getItemStyle(),E=S(R,Za),z=Ft(E,null,null,!0,!0);z.text=E.getShallow("show")?Qe(r.getFormattedLabel(R,Za),r.getFormattedLabel(R,Cn),cs(t,R)):null;var V=qv(E,null,!0);return M(k,O),O=dT(O,z,V),k&&C(O,k),O.legacy=!0,O}function C(k,R){for(var O in R)q(R,O)&&(k[O]=R[O])}function M(k,R){k&&(k.textFill&&(R.textFill=k.textFill),k.textPosition&&(R.textPosition=k.textPosition))}function D(k,R){if(R==null&&(R=f),q(hT,k)){var O=t.getItemVisual(R,"style");return O?O[hT[k]]:null}if(q(JY,k))return t.getItemVisual(R,k)}function I(k){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return bG(nt({axis:R},k))}}function L(){return e.getCurrentSeriesIndices()}function P(k){return jm(k,e)}}function M7(r){var t={};return A(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function Ip(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var s=M_(r,t,e,a,n,i);return s&&o.setItemGraphicEl(e,s),s&&$t(s,a.focus,a.blurScope,a.emphasisDisabled),s}function M_(r,t,e,a,n,i){var o=-1,s=t;t&&hR(t,a,n)&&(o=yt(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=C_(a),s&&w7(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),gr.normal.cfg=gr.normal.conOpt=gr.emphasis.cfg=gr.emphasis.conOpt=gr.blur.cfg=gr.blur.conOpt=gr.select.cfg=gr.select.conOpt=null,gr.isLegacy=!1,L7(u,e,a,n,l,gr),D7(u,e,a,n,l),A_(r,u,e,a,gr,n,l),q(a,"info")&&(Ya(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function hR(r,t,e){var a=Ya(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&E7(i)&&cR(i)!==a.customPathData||n==="image"&&q(o,"image")&&o.image!==a.customImagePath}function D7(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&hR(o,i,a)&&(o=null),o||(o=C_(i),r.setClipPath(o)),A_(null,o,t,i,null,a,n)}}function L7(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){_T(e,null,i),_T(e,Za,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=C_(o),r.setTextContent(f)),A_(null,f,t,o,null,a,n);for(var v=o&&o.style,h=0;h=f;c--){var d=t.childAt(c);P7(t,d,n)}}}function P7(r,t,e){t&&Tc(t,Ya(r).option,e)}function R7(r){new Ja(r.oldChildren,r.newChildren,ST,ST,r).add(xT).update(xT).remove(k7).execute()}function ST(r,t){var e=r&&r.name;return e??x7+t}function xT(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;M_(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function k7(r){var t=this.context,e=t.oldChildren[r];e&&Tc(e,Ya(e).option,t.seriesModel)}function cR(r){return r&&(r.pathData||r.d)}function E7(r){return r&&(q(r,"pathData")||q(r,"d"))}function O7(r){r.registerChartView(T7),r.registerSeriesModel(QY)}var Di=bt(),bT=et,Pp=$,L_=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,n){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var v=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new rt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var h=pt(wT,e,v);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}CT(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),n=t.axis,i=n.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=j0(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=Di(t).pointerEl=new ao[i.type](bT(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=Di(t).labelEl=new Mt(bT(e.label));t.add(i),TT(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=Di(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=Di(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),TT(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=As(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){qa(u.event)},onmousedown:Pp(this._onHandleDragMove,this,0,0),drift:Pp(this._onHandleDragMove,this),ondragend:Pp(this._onHandleDragEnd,this)}),a.add(n)),CT(n,e,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");W(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Rs(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){wT(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Rp(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(Rp(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Rp(n)),Di(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),uu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r})();function wT(r,t,e,a){dR(Di(e).lastProp,a)||(Di(e).lastProp=a,t?It(e,a,r):(e.stopAnimation(),e.attr(a)))}function dR(r,t){if(it(r)&&it(t)){var e=!0;return A(t,function(a,n){e=e&&dR(r[n],a)}),!!e}else return r===t}function TT(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Rp(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function CT(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}function I_(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function pR(r,t,e,a,n){var i=e.get("value"),o=gR(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Ls(s.get("padding")||0),u=s.getFont(),f=$h(o,u),v=n.position,h=f.width+l[1]+l[3],c=f.height+l[0]+l[2],d=n.align;d==="right"&&(v[0]-=h),d==="center"&&(v[0]-=h/2);var p=n.verticalAlign;p==="bottom"&&(v[1]-=c),p==="middle"&&(v[1]-=c/2),N7(v,h,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:v[0],y:v[1],style:Ft(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function N7(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function gR(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:uh(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,v=u&&u.getDataParams(f);v&&s.seriesData.push(v)}),X(o)?i=o.replace("{value}",i):tt(o)&&(i=o(s))}return i}function P_(r,t,e){var a=me();return rn(a,a,e.rotation),Yr(a,a,e.position),Wr([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function yR(r,t,e,a,n,i){var o=Ye.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),pR(t,a,n,i,{position:P_(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function R_(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function mR(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function AT(r,t,e,a,n,i){return{cx:r,cy:t,r0:e,r:a,startAngle:n,endAngle:i,clockwise:!0}}var B7=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=MT(l,s).getOtherAxis(s).getGlobalExtent(),v=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var h=I_(i),c=z7[u](s,v,f);c.style=h,e.graphicKey=c.type,e.pointer=c}var d=_h(l.getRect(),n);yR(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=_h(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=P_(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=MT(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,v=[e.x,e.y];v[f]+=a[f],v[f]=Math.min(l[1],v[f]),v[f]=Math.max(l[0],v[f]);var h=(u[1]+u[0])/2,c=[h,h];c[f]=v[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:e.rotation,cursorPoint:c,tooltipOption:d[f]}},t})(L_);function MT(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var z7={line:function(r,t,e){var a=R_([t,e[0]],[t,e[1]],DT(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:mR([t-a/2,e[0]],[a,n],DT(r))}}};function DT(r){return r.dim==="x"?0:1}var V7=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}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:B.color.border,width:1,type:"dashed"},shadowStyle:{color:B.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:B.color.neutral00,padding:[5,7,5,7],backgroundColor:B.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:B.color.accent40,throttle:40}},t})(xt),Fa=bt(),G7=A;function _R(r,t,e){if(!Ct.node){var a=t.getZr();Fa(a).records||(Fa(a).records={}),F7(a,t);var n=Fa(a).records[r]||(Fa(a).records[r]={});n.handler=e}}function F7(r,t){if(Fa(r).initialized)return;Fa(r).initialized=!0,e("click",pt(LT,"click")),e("mousemove",pt(LT,"mousemove")),e("globalout",W7);function e(a,n){r.on(a,function(i){var o=U7(t);G7(Fa(r).records,function(s){s&&n(s,i,o.dispatchAction)}),H7(o.pendings,t)})}}function H7(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function W7(r,t,e){r.handler("leave",null,e)}function LT(r,t,e,a){t.handler(r,e,a)}function U7(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function $y(r,t){if(!Ct.node){var e=t.getZr(),a=(Fa(e).records||{})[r];a&&(Fa(e).records[r]=null)}}var Y7=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";_R("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,a){$y("axisPointer",a)},t.prototype.dispose=function(e,a){$y("axisPointer",a)},t.type="axisPointer",t})(Wt);function SR(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Zi(i,r);if(o==null||o<0||W(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),v=f.dim,h=u.dim,c=v==="x"||v==="radius"?1:0,d=i.mapDimension(h),p=[];p[c]=i.get(d,o),p[1-c]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(U(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var IT=bt();function Z7(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||$(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Mv(n)&&(n=SR({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Mv(n),u=i.axesInfo,f=s.axesInfo,v=a==="leave"||Mv(n),h={},c={},d={list:[],map:{}},p={showPointer:pt($7,c),showTooltip:pt(q7,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,x){var b=S.axis,w=Q7(u,S);if(!v&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=b.pointToData(n)),T!=null&&PT(S,T,p,!1,h)}})});var g={};return A(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&A(_.axesInfo,function(S,x){var b=c[x];if(S!==y&&b){var w=b.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,RT(S),RT(y)))),g[y.key]=w}})}),A(g,function(y,m){PT(f[m],y,p,!0,h)}),j7(c,f,h),K7(d,n,r,o),J7(f,o,e),h}}function PT(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=X7(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&G(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function X7(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),v,h;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,e);h=c.dataIndices,v=c.nestestValue}else{if(h=l.indicesOfNearest(a,f[0],r,e.type==="category"?.5:null),!h.length)return;v=l.getData().get(f[0],h[0])}if(!(v==null||!isFinite(v))){var d=r-v,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=v,i.length=0),A(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function $7(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function q7(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=mu(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function j7(r,t,e){var a=e.axesInfo=[];A(t,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function K7(r,t,e,a){if(Mv(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function J7(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=IT(a)[n]||{},o=IT(a)[n]={};A(r,function(u,f){var v=u.axisPointerModel.option;v.status==="show"&&u.triggerEmphasis&&A(v.seriesDataIndices,function(h){var c=h.seriesIndex+" | "+h.dataIndex;o[c]=h})});var s=[],l=[];A(i,function(u,f){!o[f]&&l.push(u)}),A(o,function(u,f){!i[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function Q7(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function RT(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function Mv(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Xu(r){so.registerAxisPointerClass("CartesianAxisPointer",B7),r.registerComponentModel(V7),r.registerComponentView(Y7),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!W(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=t4(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Z7)}function t9(r){_t(UI),_t(Xu)}var e9=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),v=s.dataToCoord(a),h=i.get("type");if(h&&h!=="none"){var c=I_(i),d=a9[h](s,l,v,f);d.style=c,e.graphicKey=d.type,e.pointer=d}var p=i.get(["label","margin"]),g=r9(a,n,i,l,p);pR(e,n,i,o,g)},t})(L_);function r9(r,t,e,a,n){var i=t.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,v;if(i.dim==="radius"){var h=me();rn(h,h,s),Yr(h,h,[a.cx,a.cy]),u=Wr([o,-n],h);var c=t.getModel("axisLabel").get("rotate")||0,d=Ye.innerTextLayout(s,c*Math.PI/180,-1);f=d.textAlign,v=d.textVerticalAlign}else{var p=l[1];u=a.coordToPoint([p+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",v=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:v}}var a9={line:function(r,t,e,a){return r.dim==="angle"?{type:"Line",shape:R_(t.coordToPoint([a[0],e]),t.coordToPoint([a[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:AT(t.cx,t.cy,a[0],a[1],(-e-n/2)*i,(-e+n/2)*i)}:{type:"Sector",shape:AT(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}},n9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,n=this.ecModel;return n.eachComponent(e,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t})(xt),k_=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",jt).models[0]},t.type="polarAxis",t})(xt);Qt(k_,Ns);var i9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t})(k_),o9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t})(k_),E_=(function(r){N(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t})(kr);E_.prototype.dataToRadius=kr.prototype.dataToCoord;E_.prototype.radiusToData=kr.prototype.coordToData;var s9=bt(),O_=(function(r){N(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),f=$h(s==null?"":s+"",a.getFont(),"center","top"),v=Math.max(f.height,7),h=v/u;isNaN(h)&&(h=1/0);var c=Math.max(0,Math.floor(h)),d=s9(e.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-c)<=1&&Math.abs(g-o)<=1&&p>c?c=p:(d.lastTickCount=o,d.lastAutoInterval=c),c},t})(kr);O_.prototype.dataToAngle=kr.prototype.dataToCoord;O_.prototype.angleToData=kr.prototype.coordToData;var xR=["radius","angle"],l9=(function(){function r(t){this.dimensions=xR,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new E_,this._angleAxis=new O_,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===t&&e.push(a),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e,a){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],a)},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.pointToCoord(t);return a[0]=this._radiusAxis.radiusToData(n[0],e),a[1]=this._angleAxis.angleToData(n[1],e),a},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(t,e){e=e||[];var a=t[0],n=t[1]/180*Math.PI;return e[0]=Math.cos(n)*a+this.cx,e[1]=-Math.sin(n)*a+this.cy,e},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,v=u*u+f*f,h=this.r,c=this.r0;return h!==c&&v-o<=h*h&&v+o>=c*c},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(t,e,a){var n=kT(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=kT(e);return n===this?this.pointToData(a):null},r})();function kT(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function u9(r,t,e){var a=t.get("center"),n=de(t,e).refContainer;r.cx=Z(a[0],n.width)+n.x,r.cy=Z(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:W(s)||(s=[0,s]);var l=[Z(s[0],o),Z(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function f9(r,t){var e=this,a=e.getAngleAxis(),n=e.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();A(fh(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(fh(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),Ji(a.scale,a.model),Ji(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function v9(r){return r.mainType==="angleAxis"}function ET(r,t){var e;if(r.type=t.get("type"),r.scale=Fu(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),v9(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,n)}t.axis=r,r.model=t}var h9={dimensions:xR,create:function(r,t){var e=[];return r.eachComponent("polar",function(a,n){var i=new l9(n+"");i.update=f9;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");ET(o,l),ET(s,u),u9(i,a,t),e.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",jt).models[0];a.coordinateSystem=n.coordinateSystem}}),e}},c9=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function $f(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function qf(r){var t=r.getRadiusAxis();return t.inverse?0:1}function OT(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var d9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=U(n.getViewLabels(),function(f){f=et(f);var v=n.scale,h=v.type==="ordinal"?v.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(h),f});OT(u),OT(s),A(c9,function(f){e.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&p9[f](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t})(so),p9={axisLine:function(r,t,e,a,n,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=qf(e),v=f?0:1,h,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[v]===0?h=new ao[c]({shape:{cx:e.cx,cy:e.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new ws({shape:{cx:e.cx,cy:e.cy,r:i[f],r0:i[v]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,t,e,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[qf(e)],u=U(a,function(f){return new ne({shape:$f(e,[l,l+s],f.coord)})});r.add(or(u,{style:nt(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[qf(e)],f=[],v=0;vy?"left":"right",S=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var x=s[d];it(x)&&x.textStyle&&(c=new wt(x.textStyle,l,l.ecModel))}var b=new Mt({silent:Ye.isLabelSilent(t),style:Ft(c,{x:g[0],y:g[1],fill:c.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:_,verticalAlign:S})});if(r.add(b),nn({el:b,componentModel:t,itemName:v.formattedLabel,formatterParamsExtra:{isTruncated:function(){return b.isTruncated},value:v.rawLabel,tickIndex:h}}),f){var w=Ye.makeAxisEventDataBase(t);w.targetType="axisLabel",w.value=v.rawLabel,ft(b).eventData=w}},this)},splitLine:function(r,t,e,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],v=0;v=0?"p":"n",k=C;x&&(a[f][L]||(a[f][L]={p:C,n:C}),k=a[f][L][P]);var R=void 0,O=void 0,E=void 0,z=void 0;if(d.dim==="radius"){var V=d.dataToCoord(I)-C,F=l.dataToCoord(L);Math.abs(V)=z})}}})}function x9(r){var t={};A(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=wR(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),v=t[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=v.stacks;t[l]=v;var c=bR(a);h[c]||v.autoWidthCount++,h[c]=h[c]||{width:0,maxWidth:0};var d=Z(a.get("barWidth"),f),p=Z(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");d&&!h[c].width&&(d=Math.min(v.remainedWidth,d),h[c].width=d,v.remainedWidth-=d),p&&(h[c].maxWidth=p),g!=null&&(v.gap=g),y!=null&&(v.categoryGap=y)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=Z(a.categoryGap,o),l=Z(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,v=(u-s)/(f+(f-1)*l);v=Math.max(v,0),A(i,function(p,g){var y=p.maxWidth;y&&y=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(t[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(t,e,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+t)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(t,e,a){var n=NT(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=NT(e);return n===this?this.pointToData(a):null},r})();function NT(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function P9(r,t){var e=[];return r.eachComponent("singleAxis",function(a,n){var i=new I9(a,r,t);i.name="single_"+n,i.resize(a,t),a.coordinateSystem=i,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",jt).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),e}var R9={create:P9,dimensions:TR},BT=["x","y"],k9=["width","height"],E9=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=kp(l,1-Lh(s)),f=l.dataToPoint(a)[0],v=i.get("type");if(v&&v!=="none"){var h=I_(i),c=O9[v](s,f,u);c.style=h,e.graphicKey=c.type,e.pointer=c}var d=qy(n);yR(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=qy(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=P_(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Lh(o),u=kp(s,l),f=[e.x,e.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var v=kp(s,1-l),h=(v[1]+v[0])/2,c=[h,h];return c[l]=f[l],{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},t})(L_),O9={line:function(r,t,e){var a=R_([t,e[0]],[t,e[1]],Lh(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=r.getBandWidth(),n=e[1]-e[0];return{type:"Rect",shape:mR([t-a/2,e[0]],[a,n],Lh(r))}}};function Lh(r){return r.isHorizontal()?0:1}function kp(r,t){var e=r.getRect();return[e[BT[t]],e[BT[t]]+e[k9[t]]]}var N9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t})(Wt);function B9(r){_t(Xu),so.registerAxisPointerClass("SingleAxisPointer",E9),r.registerComponentView(N9),r.registerComponentView(M9),r.registerComponentModel(Dv),ds(r,"single",Dv,Dv.defaultOption),r.registerCoordinateSystem("single",R9)}var z9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=no(e);r.prototype.init.apply(this,arguments),zT(e,i)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),zT(this.option,e)},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:B.color.axisLine,width:1,type:"solid"}},itemStyle:{color:B.color.neutral00,borderWidth:1,borderColor:B.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:B.size.s,color:B.color.secondary},monthLabel:{show:!0,position:"start",margin:B.size.s,align:"center",formatter:null,color:B.color.secondary},yearLabel:{show:!0,position:null,margin:B.size.xl,formatter:null,color:B.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t})(xt);function zT(r,t){var e=r.cellSize,a;W(e)?a=e:a=r.cellSize=[e,e],a.length===1&&(a[1]=a[0]);var n=U([0,1],function(i){return oz(t,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});Sa(r,t,{type:"box",ignoreSize:n})}var V9=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(e,s,i),this._renderLines(e,s,l,i),this._renderYearText(e,s,l,i),this._renderMonthText(e,u,l,i),this._renderWeekText(e,u,s,l,i)},t.prototype._renderDayRect=function(e,a,n){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,v=new St({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(v)}},t.prototype._renderLines=function(e,a,n,i){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=a.start,h=0;v.time<=a.end.time;h++){d(v.formatedDate),h===0&&(v=s.getDateInfo(a.start.y+"-"+a.start.m));var c=v.date;c.setMonth(c.getMonth()+1),v=s.getDateInfo(c)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToCalendarLayout([p],!1).tl);var g=o._getLinePointsOfOneWeek(e,p,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},t.prototype._getEdgesPoints=function(e,a,n){var i=[e[0].slice(),e[e.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},t.prototype._drawSplitline=function(e,a,n){var i=new Ae({z2:20,shape:{points:e},style:a});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,a,n){for(var i=e.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,a){return X(e)&&e?QB(e,a):tt(e)?e(a):a.nameMap},t.prototype._yearTextPositionControl=function(e,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,a,n,i){var o=e.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,v=(u[0][1]+u[1][1])/2,h=n==="horizontal"?0:1,c={top:[f,u[h][1]],bottom:[f,u[1-h][1]],left:[u[1-h][0],v],right:[u[h][0],v]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var p=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new Mt({z2:30,style:Ft(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,c[l],n,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,a,n,i,o){var s="left",l="top",u=e[0],f=e[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,n,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),v=[this._tlpoints,this._blpoints];(!s||X(s))&&(s&&(a=Ug(s)||a),s=a.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,c=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",p=o.get("silent"),g=0;g=i.start.time&&n.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var n=Math.floor(e[1].time/Ep)-Math.floor(e[0].time/Ep)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+e[0].day+6)/7),v=a?-f+1:f-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:f,nthWeek:v,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var n=this._getRangeInfo(a);if(t>n.weeks||t===0&&en.lweek)return null;var i=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(n){var i=new r(n,t,e);a.push(i),n.coordinateSystem=i}),t.eachComponent(function(n,i){Vu({targetModel:i,coordSysType:"calendar",coordSysProvider:WD})}),a},r.dimensions=["time","value"],r})();function Op(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}function F9(r){r.registerComponentModel(z9),r.registerComponentView(V9),r.registerCoordinateSystem("calendar",G9)}var Na={level:1,leaf:2,nonLeaf:3},Xa={none:0,all:1,body:2,corner:3};function jy(r,t,e){var a=t[dt[e]].getCell(r);return!a&&Dt(r)&&r<0&&(a=t[dt[1-e]].getUnitLayoutInfo(e,Math.round(r))),a}function CR(r){var t=r||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function AR(r,t,e,a,n){VT(r[0],t,n,e,a,0),VT(r[1],t,n,e,a,1)}function VT(r,t,e,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=W(o)?o:[o],l=s.length,u=!!e;if(l>=1?(GT(r,t,s,u,n,i,0),l>1&>(r,t,s,u,n,i,l-1)):r[0]=r[1]=NaN,u){var f=-n[dt[1-i]].getLocatorCount(i),v=n[dt[i]].getLocatorCount(i)-1;e===Xa.body?f=re(0,f):e===Xa.corner&&(v=vr(-1,v)),v=t[0]&&r[0]<=t[1]}function WT(r,t){r.id.set(t[0][0],t[1][0]),r.span.set(t[0][1]-r.id.x+1,t[1][1]-r.id.y+1)}function U9(r,t){r[0][0]=t[0][0],r[0][1]=t[0][1],r[1][0]=t[1][0],r[1][1]=t[1][1]}function UT(r,t,e,a){var n=jy(t[a][0],e,a),i=jy(t[a][1],e,a);r[dt[a]]=r[le[a]]=NaN,n&&i&&(r[dt[a]]=n.xy,r[le[a]]=i.xy+i.wh-n.xy)}function vl(r,t,e,a){return r[dt[t]]=e,r[dt[1-t]]=a,r}function Y9(r){return r&&(r.type===Na.leaf||r.type===Na.nonLeaf)?r:null}function Ih(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var YT=(function(){function r(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=e,this._uniqueValueGen=Z9(t);var a=e.get("data",!0);a!=null&&!W(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(t){var e=this,a=e._cells,n=e._levels,i=[],o=0;e._leavesCount=s(t,0,0),l();return;function s(u,f,v){var h=0;return u&&A(u,function(c,d){var p;X(c)?p={value:c}:it(c)?(p=c,c.value!=null&&!X(c.value)&&(p={value:null})):p={value:null};var g={type:Na.nonLeaf,ordinal:NaN,level:v,firstLeafLocator:f,id:new st,span:vl(new st,e.dimIdx,1,1),option:p,xy:NaN,wh:NaN,dim:e,rect:Ih()};o++,(i[f]||(i[f]=[])).push(g),n[v]||(n[v]={type:Na.level,xy:NaN,wh:NaN,option:null,id:new st,dim:e});var y=s(p.children,f,v+1),m=Math.max(1,y);g.span[dt[e.dimIdx]]=m,h+=m,f+=m}),h}function l(){for(var u=[];a.length=1,_=e[dt[a]],S=i.getLocatorCount(a)-1,x=new Ln;for(o.resetLayoutIterator(x,a);x.next();)b(x.item);for(i.resetLayoutIterator(x,a);x.next();)b(x.item);function b(w){Ie(w.wh)&&(w.wh=y),w.xy=_,w.id[dt[a]]===S&&!m&&(w.wh=e[dt[a]]+e[le[a]]-w.xy),_+=w.wh}}function JT(r,t){for(var e=t[dt[r]].resetCellIterator();e.next();){var a=e.item;Ph(a.rect,r,a.id,a.span,t),Ph(a.rect,1-r,a.id,a.span,t),a.type===Na.nonLeaf&&(a.xy=a.rect[dt[r]],a.wh=a.rect[le[r]])}}function QT(r,t){r.travelExistingCells(function(e){var a=e.span;if(a){var n=e.spanRect,i=e.id;Ph(n,0,i,a,t),Ph(n,1,i,a,t)}})}function Ph(r,t,e,a,n){r[le[t]]=0;var i=e[dt[t]],o=i<0?n[dt[1-t]]:n[dt[t]],s=o.getUnitLayoutInfo(t,e[dt[t]]);if(r[dt[t]]=s.xy,r[le[t]]=s.wh,a[dt[t]]>1){var l=o.getUnitLayoutInfo(t,e[dt[t]]+a[dt[t]]-1);r[le[t]]=l.xy+l.wh-s.xy}}function iZ(r,t,e){var a=Uv(r,e[le[t]]);return Jy(a,e[le[t]])}function Jy(r,t){return Math.max(Math.min(r,Q(t,1/0)),0)}function zp(r){var t=r.matrixModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}var Le={inBody:1,inCorner:2,outside:3},ea={x:null,y:null,point:[]};function tC(r,t,e,a,n){var i=e[dt[t]],o=e[dt[1-t]],s=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),l=i.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),f=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,v=r.point[t]=a[t];if(!l&&!f){r[dt[t]]=Le.outside;return}if(n===Xa.body){l?(r[dt[t]]=Le.inBody,v=vr(s.xy+s.wh,re(l.xy,v)),r.point[t]=v):r[dt[t]]=Le.outside;return}else if(n===Xa.corner){f?(r[dt[t]]=Le.inCorner,v=vr(f.xy+f.wh,re(u.xy,v)),r.point[t]=v):r[dt[t]]=Le.outside;return}var h=l?l.xy:f?f.xy+f.wh:NaN,c=u?u.xy:h,d=s?s.xy+s.wh:h;if(vd){if(!n){r[dt[t]]=Le.outside;return}v=d}r.point[t]=v,r[dt[t]]=h<=v&&v<=d?Le.inBody:c<=v&&v<=h?Le.inCorner:Le.outside}function eC(r,t,e,a){var n=1-e;if(r[dt[e]]!==Le.outside)for(a[dt[e]].resetCellIterator(Bp);Bp.next();){var i=Bp.item;if(aC(r.point[e],i.rect,e)&&aC(r.point[n],i.rect,n)){t[e]=i.ordinal,t[n]=i.id[dt[n]];return}}}function rC(r,t,e,a){if(r[dt[e]]!==Le.outside){var n=r[dt[e]]===Le.inCorner?a[dt[1-e]]:a[dt[e]];for(n.resetLayoutIterator(tv,e);tv.next();)if(oZ(r.point[e],tv.item)){t[e]=tv.item.id[dt[e]];return}}}function oZ(r,t){return t.xy<=r&&r<=t.xy+t.wh}function aC(r,t,e){return t[dt[e]]<=r&&r<=t[dt[e]]+t[le[e]]}function sZ(r){r.registerComponentModel(j9),r.registerComponentView(eZ),r.registerCoordinateSystem("matrix",nZ)}function lZ(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function nC(r,t){var e;return A(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function uZ(r,t,e){var a=G({},e),n=r[t],i=e.$action||"merge";i==="merge"?n?(mt(n,a,!0),Sa(n,a,{ignoreSize:!0}),$D(e,n),ev(e,n),ev(e,n,"shape"),ev(e,n,"style"),ev(e,n,"extra"),e.clipPath=n.clipPath):r[t]=a:i==="replace"?r[t]=a:i==="remove"&&n&&(r[t]=null)}var DR=["transition","enterFrom","leaveTo"],fZ=DR.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function ev(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?DR:fZ,n=0;n=0;f--){var v=n[f],h=ve(v.id,null),c=h!=null?o.get(h):null;if(c){var d=c.parent,y=xr(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=lc(c,v,m,null,{hv:v.hv,boundingMode:v.bounding},_);if(!xr(c).isNew&&S){for(var x=v.transition,b={},w=0;w=0)?b[T]=C:c[T]=C}It(c,b,e,0)}else c.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(n){Lv(n,xr(n).option,a,e._lastGraphicModel)}),this._elMap=K()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t})(Wt);function Qy(r){var t=q(iC,r)?iC[r]:iu(r),e=new t({});return xr(e).type=r,e}function oC(r,t,e,a){var n=Qy(e);return t.add(n),a.set(r,n),xr(n).id=r,xr(n).isNew=!0,n}function Lv(r,t,e,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){Lv(i,t,e,a)}),Tc(r,t,a),e.removeKey(xr(r).id))}function sC(r,t,e,a){r.isGroup||A([["cursor",Lr.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(n){var i=n[0];q(t,i)?r[i]=Q(t[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(At(t),function(n){if(n.indexOf("on")===0){var i=t[n];r[n]=tt(i)?i:null}}),q(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function dZ(r){return r=G({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(UD),function(t){delete r[t]}),r}function pZ(r,t,e){var a=ft(r).eventData;!r.silent&&!r.ignore&&!a&&(a=ft(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function gZ(r){r.registerComponentModel(hZ),r.registerComponentView(cZ),r.registerPreprocessor(function(t){var e=t.graphic;W(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var lC=["x","y","radius","angle","single"],yZ=["cartesian2d","polar","singleAxis"];function mZ(r){var t=r.get("coordinateSystem");return yt(yZ,t)>=0}function An(r){return r+"Axis"}function _Z(r,t){var e=K(),a=[],n=K();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var v=!1;return f.eachTargetAxis(function(h,c){var d=e.get(h);d&&d[c]&&(v=!0)}),v}function u(f){f.eachTargetAxis(function(v,h){(e.get(v)||e.set(v,[]))[h]=!0})}return a}function LR(r){var t=r.ecModel,e={infoList:[],infoMap:K()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(An(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var Vp=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),Tu=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=uC(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=uC(e);mt(this.option,e,!0),mt(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=K(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return A(lC,function(n){var i=this.getReferringComponents(An(n),BO);if(i.specified){a=!0;var o=new Vp;A(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var v=u[0];if(v){var h=new Vp;if(h.add(v.componentIndex),e.set(f,h),i=!1,f==="x"||f==="y"){var c=v.getReferringComponents("grid",jt).models[0];c&&A(u,function(d){v.componentIndex!==d.componentIndex&&c===d.getReferringComponents("grid",jt).models[0]&&h.add(d.componentIndex)})}}}i&&A(lC,function(u){if(i){var f=n.findComponents({mainType:An(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var v=new Vp;v.add(f[0].componentIndex),e.set(u,v),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(An(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){var n=this.getAxisModel(e,a);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(An(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!x)return!0;_&&(g=!0),S&&(d=!0),x&&(p=!0)}return g&&d&&p})}else Fo(f,function(c){if(i==="empty")l.setData(u=u.map(c,function(p){return s(p)?p:NaN}));else{var d={};d[c]=o,u.selectRange(d)}});Fo(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;Fo(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=kt(a[0]+o,a,[0,100],!0):i!=null&&(o=kt(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var n=Mm(a,[0,500]);n=Math.min(n,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),e[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r})();function wZ(r,t,e){var a=[1/0,-1/0];Fo(e,function(o){FG(a,o.getData(),t)});var n=r.getAxisModel(),i=D2(n.axis.scale,n,a).calculate();return[i.min,i.max]}var TZ={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(An(o),s);n(o,s,l,i)})})}t(function(n,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new bZ(n,i,s,r),e.push(o.__dzAxisProxy))});var a=K();return A(e,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).reset(e)}),e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};function CZ(r){r.registerAction("dataZoom",function(t,e){var a=_Z(e,t);A(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var vC=!1;function V_(r){vC||(vC=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,TZ),CZ(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function AZ(r){r.registerComponentModel(SZ),r.registerComponentView(xZ),V_(r)}var wr=(function(){function r(){}return r})(),IR={};function Ho(r,t){IR[r]=t}function PR(r){return IR[r]}var MZ=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(a,n){var i=PR(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),mt(a,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:B.size.m,itemSize:15,itemGap:B.size.s,showTitle:!0,iconStyle:{borderColor:B.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:B.color.accent50}},tooltip:{show:!1,position:"bottom"}},t})(xt);function RR(r,t){var e=Ls(t.get("padding")),a=t.getItemStyle(["color","opacity"]);a.fill=t.get("backgroundColor");var n=new St({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var DZ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),v=[];A(u,function(m,_){v.push(_)}),new Ja(this._featureNames||[],v).add(h).update(h).remove(pt(h,null)).execute(),this._featureNames=v;function h(m,_){var S=v[m],x=v[_],b=u[S],w=new wt(b,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(b.title=i.newTitle),S&&!x){if(LZ(S))T={onclick:w.option.onclick,featureName:S};else{var C=PR(S);if(!C)return;T=new C}f[S]=T}else if(T=f[x],!T)return;T.uid=Ds("toolbox-feature"),T.model=w,T.ecModel=a,T.api=n;var M=T instanceof wr;if(!S&&x){M&&T.dispose&&T.dispose(a,n);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(a,n);return}c(w,T,S),w.setIconStatus=function(D,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[D]=I,P[D]&&(I==="emphasis"?ja:Ka)(P[D])},T instanceof wr&&T.render&&T.render(w,a,n,i)}function c(m,_,S){var x=m.getModel("iconStyle"),b=m.getModel(["emphasis","iconStyle"]),w=_ instanceof wr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,M;X(w)?(C={},C[S]=w):C=w,X(T)?(M={},M[S]=T):M=T;var D=m.iconPaths={};A(C,function(I,L){var P=As(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(x.getItemStyle());var k=P.ensureState("emphasis");k.style=b.getItemStyle();var R=new Mt({style:{text:M[L],align:b.get("textAlign"),borderRadius:b.get("textBorderRadius"),padding:b.get("textPadding"),fill:null,font:jm({fontStyle:b.get("textFontStyle"),fontFamily:b.get("textFontFamily"),fontSize:b.get("textFontSize"),fontWeight:b.get("textFontWeight")},a)},ignore:!0});P.setTextContent(R),nn({el:P,componentModel:e,itemName:L,formatterParamsExtra:{title:M[L]}}),P.__title=M[L],P.on("mouseover",function(){var O=b.getItemStyle(),E=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";R.setStyle({fill:b.get("textFill")||O.fill||O.stroke||B.color.neutral99,backgroundColor:b.get("textBackgroundColor")}),P.setTextConfig({position:b.get("textPosition")||E}),R.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&n.leaveEmphasis(this),R.hide()}),(m.get(["iconStatus",L])==="emphasis"?ja:Ka)(P),o.add(P),P.on("click",$(_.onclick,_,a,n,L)),D[L]=P})}var d=de(e,n).refContainer,p=e.getBoxLayoutParams(),g=e.get("padding"),y=Xt(p,d,g);Gi(e.get("orient"),o,e.get("itemGap"),y.width,y.height),lc(o,p,d,g),o.add(RR(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),x=S.textConfig||(S.textConfig={}),b=m.getTextContent(),w=b&&b.ensureState("emphasis");if(w&&!tt(w)&&_){var T=w.style||(w.style={}),C=$h(_,Mt.makeFont(T)),M=m.x+o.x,D=m.y+o.y+s,I=!1;D+C.height>n.getHeight()&&(x.position="top",I=!0);var L=I?-5-C.height:s+10;M+C.width/2>n.getWidth()?(x.position=["100%",L],T.align="right"):M-C.width/2<0&&(x.position=[0,L],T.align="left")}})},t.prototype.updateView=function(e,a,n,i){A(this._features,function(o){o instanceof wr&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.remove=function(e,a){A(this._features,function(n){n instanceof wr&&n.remove&&n.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){A(this._features,function(n){n instanceof wr&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t})(Wt);function LZ(r){return r.indexOf("my")===0}var IZ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||B.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Ct.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),c=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];c&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,x=S.document;x.open("image/svg+xml","replace"),x.write(d),x.close(),S.focus(),x.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var b=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},t.getDefaultOption=function(e){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:B.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t})(wr),hC="__ec_magicType_stack__",PZ=[["line","bar"],["stack"]],RZ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return A(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(cC[n]){var s={series:[]},l=function(v){var h=v.subType,c=v.id,d=cC[n](h,c,v,i);d&&(nt(d,v.option),s.series.push(d));var p=v.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=v.getReferringComponents(m,jt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var x=0;x<=S;x++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(PZ,function(v){yt(v,n)>=0&&A(v,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=mt({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t})(wr),cC={line:function(r,t,e,a){if(r==="bar")return mt({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return mt({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===hC;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),mt({id:t,stack:n?"":hC},a.get(["option","stack"])||{},!0)}};qr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var Cc=new Array(60).join("-"),ms=" ";function kZ(r){var t={},e=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function EZ(r){var t=[];return A(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(U(e.series,function(c){return c.name})),l=[n.model.getCategories()];A(e.series,function(c){var d=c.getRawData();l.push(c.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(ms)],f=0;f=0)return!0}var tm=new RegExp("["+ms+"]+","g");function zZ(r){for(var t=r.split(/\n+/g),e=Rh(t.shift()).split(tm),a=[],n=U(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function UZ(r){var t=G_(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return kR(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function YZ(r){ER(r).snapshots=null}function ZZ(r){return G_(r).length}function G_(r){var t=ER(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var XZ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){YZ(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t})(wr);qr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var $Z=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],F_=(function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=dC(e,t);A(qZ,function(o,s){(!a||!a.include||yt(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Gp[a.brushType](0,i,n);a.__rangeOffset={offset:mC[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){A(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&A(i.coordSyses,function(o){var s=Gp[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Gp[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?mC[a.brushType](i.values,o.offset,jZ(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return U(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:VP(n),isTargetByCursor:FP(n,t,a.coordSysModel),getLinearBrushOtherExtent:GP(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&yt(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=dC(e,t),i=0;ir[1]&&r.reverse(),r}function dC(r,t){return Jo(r,t,{includeMainTypes:$Z})}var qZ={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=K(),o={},s={};!e&&!a&&!n||(A(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];A(u.getCartesians(),function(v,h){(yt(e,v.getAxis("x").model)>=0||yt(a,v.getAxis("y").model)>=0)&&f.push(v)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:gC.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:gC.geo})})}},pC=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],gC={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Pn(r)),t}},Gp={lineX:pt(yC,0),lineY:pt(yC,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[em([n[0],i[0]]),em([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=U(e,function(o){var s=r?t.pointToData(o,a):t.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function yC(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=em(U([0,1],function(s){return t?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var mC={lineX:pt(_C,0),lineY:pt(_C,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return U(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function _C(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function jZ(r,t){var e=SC(r),a=SC(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function SC(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var rm=A,KZ=RO("toolbox-dataZoom_"),JZ=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new h_(n.getZr()),this._brushController.on("brush",$(this._onBrush,this)).mount()),eX(e,a,this,i,n),tX(e,a)},t.prototype.onclick=function(e,a,n){QZ[n].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new F_(H_(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,v){if(v.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",v,f[0]),s("y",v,f[1])):s({lineX:"x",lineY:"y"}[h],v,f)}}),WZ(i,n),this._dispatchZoomAction(n);function s(u,f,v){var h=f.getAxis(u),c=h.model,d=l(u,c,i),p=d.findRepresentativeAxisProxy(c).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(v=zn(0,v.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:v[0],endValue:v[1]})}function l(u,f,v){var h;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var d=c.getAxisModel(u,f.componentIndex);d&&(h=c)}),h}},t.prototype._dispatchZoomAction=function(e){var a=[];rm(e,function(n,i){a.push(et(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:B.color.backgroundTint}};return a},t})(wr),QZ={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(UZ(this.ecModel))}};function H_(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function tX(r,t){r.setIconStatus("back",ZZ(t)>1?"emphasis":"normal")}function eX(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new F_(H_(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}cz("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=H_(a),o=Jo(r,i);rm(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),rm(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var v=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:KZ+u+v};h[f]=v,n.push(h)}return n});function rX(r){r.registerComponentModel(MZ),r.registerComponentView(DZ),Ho("saveAsImage",IZ),Ho("magicType",RZ),Ho("dataView",FZ),Ho("dataZoom",JZ),Ho("restore",XZ),_t(AZ)}var aX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:B.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:B.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:B.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:B.color.tertiary,fontSize:14}},t})(xt);function OR(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function NR(r){if(Ct.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,v=o+n,h=v*Math.abs(Math.cos(f))+v*Math.abs(Math.sin(f)),c=Math.round(((h-Math.SQRT2*n)/2+Math.SQRT2*n-(h-v)/2)*100)/100;s+=";"+i+":-"+c+"px";var d=t+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'
'}function fX(r,t,e){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+a,i+=(i.length?",":"")+(Ct.transformSupported?""+W_+n:",left"+n+",top"+n)),oX+":"+i}function xC(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!Ct.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Ct.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+W_+":"+o+";":[["top",0],["left",0],[BR,o]]}function vX(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=Q(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function hX(r,t,e,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),v=r.getModel("textStyle"),h=AL(r,"html"),c=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+c),t&&i>0&&n.push(fX(i,e,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(d){var p="border-"+d,g=u0(p),y=r.get(g);y!=null&&n.push(p+":"+y+(d==="color"?"":"px"))}),n.push(vX(v)),h!=null&&n.push("padding:"+Ls(h).join("px ")+"px"),n.join(";")+";"}function bC(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&Kk(r,o,e,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var cX=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ct.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(X(i)?document.querySelector(i):Ui(i)?i:tt(i)&&i(t.getDom()));bC(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();mr(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),a=iX(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=sX+hX(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+xC(i[0],i[1],!0)+("border-color:"+Ki(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(X(i)&&a.get("trigger")==="item"&&!OR(a)&&(s=uX(a,n,i)),X(t))o.innerHTML=t+s;else if(t){o.innerHTML="",W(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||Ct.node||!n.getDom())){var o=CC(i,n);this._ticket="";var s=i.dataByCoordSys,l=SX(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=pX;f.x=i.x,f.y=i.y,f.update(),ft(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,a,n,i))return;var v=SR(i,a),h=v.point[0],c=v.point[1];h!=null&&c!=null&&this._tryShow({offsetX:h,offsetY:c,target:v.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(CC(i,n))},t.prototype._manuallyAxisShowTip=function(e,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),v=cl([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=ft(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ei(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ft(f).dataIndex!=null?l=f:ft(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=$(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=cl([a.tooltipOption],i),l=this._renderMode,u=[],f=ue("section",{blocks:[],noHeader:!0}),v=[],h=new xd;A(e,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),x=_.value;if(!(!S||x==null)){var b=gR(x,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ue("section",{header:b,noHeader:!sr(b),sortBlocks:!0,blocks:[]});f.blocks.push(w),A(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=C.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=uh(S.axis,{value:x}),D.axisValueLabel=b,D.marker=h.makeTooltipMarker("item",Ki(D.color),l);var I=GS(C.formatTooltip(M,!0,null)),L=I.frag;if(L){var P=cl([C],i).get("valueFormatter");w.blocks.push(P?G({valueFormatter:P},L):L)}I.text&&v.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),v.reverse();var c=a.position,d=s.get("order"),p=ZS(f,h,l,d,n.get("useUTC"),s.get("textStyle"));p&&v.unshift(p);var g=l==="richText"?` - -`:"
",y=v.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,h)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=ft(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,v=o.dataType,h=u.getData(v),c=this._renderMode,d=e.positionDefault,p=cl([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,v),m=new xd;y.marker=m.makeTooltipMarker("item",Ki(y.color),c);var _=GS(u.formatTooltip(f,!1,v)),S=p.get("order"),x=p.get("valueFormatter"),b=_.frag,w=b?ZS(x?G({valueFormatter:x},b):b,m,c,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=ft(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(X(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=et(l),l.content=ze(l.content));var v=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&v.push(h),v.push({formatter:l.content});var c=e.positionDefault,d=cl(v,this._tooltipModel,c?{position:c}:null),p=d.get("content"),g=Math.random()+"",y=new xd;this._showOrMove(d,function(){var m=et(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var v=this._tooltipContent;v.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var c=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(h)if(X(h)){var g=e.ecModel.get("useUTC"),y=W(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=h,m&&(c=zu(y.axisValue,c,g)),c=f0(c,n,!0)}else if(tt(h)){var _=$(function(S,x){S===this._ticket&&(v.setContent(x,f,e,p,l),this._updatePosition(e,l,o,s,v,n,u))},this);this._ticket=i,c=h(n,i,_)}else c=h;v.setContent(c,f,e,p,l),v.show(e,p),this._updatePosition(e,l,o,s,v,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||W(a))return{color:i||o};if(!W(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||e.get("position");var v=o.getSize(),h=e.get("align"),c=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),tt(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:v.slice()})),W(a))n=Z(a[0],u),i=Z(a[1],f);else if(it(a)){var p=a;p.width=v[0],p.height=v[1];var g=Xt(p,{width:u,height:f});n=g.x,i=g.y,h=null,c=null}else if(X(a)&&l){var y=_X(a,d,v,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=yX(n,i,o,u,f,h?null:20,c?null:20);n=y[0],i=y[1]}if(h&&(n-=AC(h)?v[0]/2:h==="right"?v[0]:0),c&&(i-=AC(c)?v[1]/2:c==="bottom"?v[1]:0),OR(e)){var y=mX(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},v=f.dataByAxis||[];o=o&&u.length===v.length,o&&A(u,function(h,c){var d=v[c]||{},p=h.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(h.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){Ct.node||!a.getDom()||(uu(this,"_updatePosition"),this._tooltipContent.dispose(),$y("itemTooltip",a))},t.type="tooltip",t})(Wt);function cl(r,t,e){var a=t.ecModel,n;e?(n=new wt(e,a,a),n=new wt(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof wt&&(o=o.get("tooltip",!0)),X(o)&&(o={formatter:o}),o&&(n=new wt(o,n,a)))}return n}function CC(r,t){return r.dispatchAction||$(t.dispatchAction,t)}function yX(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function mX(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function _X(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function AC(r){return r==="center"||r==="middle"}function SX(r,t,e){var a=Rm(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=xs(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function xX(r){_t(Xu),r.registerComponentModel(aX),r.registerComponentView(gX),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Kt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Kt)}var bX=["rect","polygon","keep","clear"];function wX(r,t){var e=Ht(r?r.brush:[]);if(e.length){var a=[];A(e,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;W(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),TX(s),t&&!s.length&&s.push.apply(s,bX)}}function TX(r){var t={};A(r,function(e){t[e]=1}),r.length=0,A(t,function(e,a){r.push(a)})}var MC=A;function DC(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function am(r,t,e){var a={};return MC(t,function(i){var o=a[i]=n();MC(r[i],function(s,l){if(_e.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new _e(u),l==="opacity"&&(u=et(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new _e(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function VR(r,t,e){var a;A(e,function(n){t.hasOwnProperty(n)&&DC(t[n])&&(a=!0)}),a&&A(e,function(n){t.hasOwnProperty(n)&&DC(t[n])?r[n]=et(t[n]):delete r[n]})}function CX(r,t,e,a,n,i){var o={};A(r,function(v){var h=_e.prepareVisualTypes(t[v]);o[v]=h});var s;function l(v){return S0(e,s,v)}function u(v,h){NL(e,s,v,h)}e.each(f);function f(v,h){s=v;var c=e.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var d=a.call(n,v),p=t[d],g=o[d],y=0,m=g.length;yt[0][1]&&(t[0][1]=i[0]),i[1]t[1][1]&&(t[1][1]=i[1])}return t&&kC(t)}};function kC(r){return new lt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var kX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new h_(a.getZr())).on("brush",$(this._onBrush,this)).mount()},t.prototype.render=function(e,a,n,i){this.model=e,this._updateController(e,a,n,i)},t.prototype.updateTransform=function(e,a,n,i){GR(a),this._updateController(e,a,n,i)},t.prototype.updateVisual=function(e,a,n,i){this.updateTransform(e,a,n,i)},t.prototype.updateView=function(e,a,n,i){this._updateController(e,a,n,i)},t.prototype._updateController=function(e,a,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:et(n),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:et(n),$from:a})},t.type="brush",t})(Wt),EX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&VR(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=U(e,function(a){return EC(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=EC(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:B.color.backgroundTint,borderColor:B.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:B.color.disabled},t})(xt);function EC(r,t){return mt({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new wt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}var OX=["rect","polygon","lineX","lineY","keep","clear"],NX=(function(r){N(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,n){this.render(e,a,n)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),n={};return A(e.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},t.prototype.onclick=function(e,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},t.getDefaultOption=function(e){var a={show:!0,type:OX.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t})(wr);function BX(r){r.registerComponentView(kX),r.registerComponentModel(EX),r.registerPreprocessor(wX),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,DX),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Kt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Kt),Ho("brush",NX)}var zX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:B.size.m,backgroundColor:B.color.transparent,borderColor:B.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:B.color.primary},subtextStyle:{fontSize:12,color:B.color.quaternary}},t})(xt),VX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=Q(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Mt({style:Ft(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),v=f.getBoundingRect(),h=e.get("subtext"),c=new Mt({style:Ft(s,{text:h,fill:s.getTextColor(),y:v.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,c.silent=!p&&!g,d&&f.on("click",function(){Jv(d,"_"+e.get("target"))}),p&&c.on("click",function(){Jv(p,"_"+e.get("subtarget"))}),ft(f).eventData=ft(c).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(c);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=de(e,n),S=Xt(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var x={align:l,verticalAlign:u};f.setStyle(x),c.setStyle(x),y=i.getBoundingRect();var b=S.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var T=new St({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t})(Wt);function GX(r){r.registerComponentModel(zX),r.registerComponentView(VX)}var OC=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,a=e.data||[],n=e.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,f){var v=ve(Ss(u),""),h;it(u)?(h=et(u),h.value=f):h=f,o.push(h),i.push(v)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Ge([{name:"value",type:s}],this);l.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:B.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:B.color.secondary},data:[]},t})(xt),FR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=Un(OC.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:B.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:B.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:B.color.tertiary},itemStyle:{color:B.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:B.color.accent50,borderColor:B.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:B.color.accent60},itemStyle:{color:B.color.accent60,borderColor:B.color.accent60},controlStyle:{color:B.color.accent70,borderColor:B.color.accent70}},progress:{lineStyle:{color:B.color.accent30},itemStyle:{color:B.color.accent40}},data:[]}),t})(OC);Qt(FR,fc.prototype);var FX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t})(Wt),HX=(function(r){N(t,r);function t(e,a,n,i){var o=r.call(this,e,a,n)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t})(kr),Hp=Math.PI,NC=bt(),WX=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,n){if(this.model=e,this.api=n,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ue("nameValue",{noName:!0,value:f})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,a){var n=e.get(["label","position"]),i=e.get("orient"),o=YX(e,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Hp/2},v=i==="vertical"?o.height:o.width,h=e.getModel("controlStyle"),c=h.get("show",!0),d=c?h.get("itemSize"):0,p=c?h.get("itemGap"):0,g=d+p,y=e.get(["label","rotate"])||0;y=y*Hp/180;var m,_,S,x=h.get("position",!0),b=c&&h.get("showPlayBtn",!0),w=c&&h.get("showPrevBtn",!0),T=c&&h.get("showNextBtn",!0),C=0,M=v;x==="left"||x==="bottom"?(b&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[M-d,0],M-=g)):(b&&(m=[M-d,0],M-=g),w&&(_=[0,0],C+=g),T&&(S=[M-d,0],M-=g));var D=[C,M];return e.get("inverse")&&D.reverse(),{viewRect:o,mainLength:v,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:d,controlGap:p}},t.prototype._position=function(e,a){var n=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=me(),l=o.x,u=o.y+o.height;Yr(s,s,[-l,-u]),rn(s,s,-Hp/2),Yr(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),v=m(n.getBoundingRect()),h=m(i.getBoundingRect()),c=[n.x,n.y],d=[i.x,i.y];d[0]=c[0]=f[0][0];var p=e.labelPosOpt;if(p==null||X(p)){var g=p==="+"?0:1;_(c,v,f,1,g),_(d,h,f,1,1-g)}else{var g=p>=0?0:1;_(c,v,f,1,g),d[1]=c[1]+p}n.setPosition(c),i.setPosition(d),n.rotation=i.rotation=e.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,x,b,w,T){S[w]+=b[w][T]-x[w][T]}},t.prototype._createAxis=function(e,a){var n=a.getData(),i=a.get("axisType"),o=UX(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new HX("value",o,e.axisExtent,i);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new rt;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new ne({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:G({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new ne({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:nt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var f=n.dataToCoord(u.value),v=s.getItemModel(u.value),h=v.getModel("itemStyle"),c=v.getModel(["emphasis","itemStyle"]),d=v.getModel(["progress","itemStyle"]),p={x:f,y:0,onclick:$(o._changeTimeline,o,u.value)},g=BC(v,h,a,p);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),In(g);var y=ft(g);v.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(f){var v=f.tickValue,h=l.getItemModel(v),c=h.getModel("label"),d=h.getModel(["emphasis","label"]),p=h.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Mt({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:$(o._changeTimeline,o,v),silent:!1,style:Ft(c,{text:f.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=Ft(d),y.ensureState("progress").style=Ft(p),a.add(y),In(y),NC(y).dataIndex=v,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,a,n,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),v=i.get("inverse",!0);h(e.nextBtnPosition,"next",$(this._changeTimeline,this,v?"-":"+")),h(e.prevBtnPosition,"prev",$(this._changeTimeline,this,v?"+":"-")),h(e.playPosition,f?"stop":"play",$(this._handlePlayClick,this,!f),!0);function h(c,d,p,g){if(c){var y=Zr(Q(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=ZX(i,d+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,a.add(_),In(_)}}},t.prototype._renderCurrentPointer=function(e,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(v){v.draggable=!0,v.drift=$(u._handlePointerDrag,u),v.ondragend=$(u._handlePointerDragend,u),zC(v,u._progressLine,s,n,i,!0)},onUpdate:function(v){zC(v,u._progressLine,s,n,i)}};this._currentPointer=BC(l,l,this._mainGroup,{},this._currentPointer,f)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,a){var n=this._toAxisCoord(e)[0],i=this._axis,o=lr(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(d)),[s,c]}var iv={min:pt(nv,"min"),max:pt(nv,"max"),average:pt(nv,"average"),median:pt(nv,"median")};function Cu(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!JX(t)&&!W(t.coord)&&W(n)){var i=HR(t,e,a,r);if(t=et(t),t.type&&iv[t.type]&&i.baseAxis&&i.valueAxis){var o=yt(n,i.baseAxis.dim),s=yt(n,i.valueAxis.dim),l=iv[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!W(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&iv[t.type]){var f=a.getOtherAxis(u);f&&(t.value=kh(e,e.mapDimension(f.dim),t.type))}}else for(var v=t.coord,h=0;h<2;h++)iv[v[h]]&&(v[h]=kh(e,e.mapDimension(n[h]),v[h]));return t}}function HR(r,t,e,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(QX(a,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function QX(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Au(r,t){return r&&r.containData&&t.coord&&!im(t)?r.containData(t.coord):!0}function t$(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!im(t)&&!im(e)?r.containZone(t.coord,e.coord):!0}function WR(r,t){return r?function(e,a,n,i){var o=i<2?e.coord&&e.coord[i]:e.value;return kn(o,t[i])}:function(e,a,n,i){return kn(e.value,t[i])}}function kh(r,t,e){if(e==="average"){var a=0,n=0;return r.each(t,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Wp=bt(),Y_=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=K()},t.prototype.render=function(e,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Wp(s).keep=!1}),a.eachSeries(function(s){var l=ba.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Wp(s).keep&&i.group.remove(s.group)}),e$(a,o,this.type)},t.prototype.markKeep=function(e){Wp(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var n=this;A(e,function(i){var o=ba.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?nD(l):Gm(l))})}})},t.type="marker",t})(Wt);function e$(r,t,e){r.eachSeries(function(a){var n=ba.getMarkerModelFromSeries(a,e),i=t.get(a.id);if(n&&i&&i.group){var o=ji(n),s=o.z,l=o.zlevel;oc(i.group,s,l)}})}function GC(r,t,e){var a=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:n,v=u?o?o.height:0:i,h=u&&o?o.x:0,c=u&&o?o.y:0,d,p=Z(l.get("x"),f)+h,g=Z(l.get("y"),v)+c;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(t.getMarkerPosition)d=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);d=a.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var r$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ba.getMarkerModelFromSeries(i,"markPoint");o&&(GC(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Wu),v=a$(o,e,a);a.setData(v),GC(a.getData(),e,i),v.each(function(h){var c=v.getItemModel(h),d=c.getShallow("symbol"),p=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(tt(d)||tt(p)||tt(g)||tt(y)){var _=a.getRawValue(h),S=a.getDataParams(h);tt(d)&&(d=d(_,S)),tt(p)&&(p=p(_,S)),tt(g)&&(g=g(_,S)),tt(y)&&(y=y(_,S))}var x=c.getModel("itemStyle").getItemStyle(),b=c.get("z2"),w=Gu(l,"color");x.fill||(x.fill=w),v.setItemVisual(h,{z2:Q(b,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:x})}),f.updateData(v),this.group.add(f.group),v.eachItemGraphicEl(function(h){h.traverse(function(c){ft(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t})(Y_);function a$(r,t,e){var a;r?a=U(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return G(G({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ge(a,e),i=U(e.get("data"),pt(Cu,t));r&&(i=Rt(i,pt(Au,r)));var o=WR(!!r,a);return n.initData(i,null,o),n}function n$(r){r.registerComponentModel(KX),r.registerComponentView(r$),r.registerPreprocessor(function(t){U_(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var i$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},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})(ba),ov=bt(),o$=function(r,t,e,a){var n=r.getData(),i;if(W(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=t.getAxis(a.yAxis!=null?"y":"x"),l=Ce(a.yAxis,a.xAxis);else{var u=HR(a,n,t,r);s=u.valueAxis;var f=k0(n,u.valueDataDim);l=kh(n,f,o)}var v=s.dim==="x"?0:1,h=1-v,c=et(a),d={coord:[]};c.type=null,c.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var p=e.get("precision");p>=0&&Dt(l)&&(l=+l.toFixed(Math.min(p,20))),c.coord[v]=d.coord[v]=l,i=[c,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Cu(r,i[0]),Cu(r,i[1]),G({},i[2])];return g[2].type=g[2].type||null,mt(g[2],g[0]),mt(g[2],g[1]),g};function Eh(r){return!isNaN(r)&&!isFinite(r)}function FC(r,t,e,a){var n=1-r,i=a.dimensions[r];return Eh(t[n])&&Eh(e[n])&&t[r]===e[r]&&a.getAxis(i).containData(t[r])}function s$(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(FC(1,e,a,r)||FC(0,e,a,r)))return!0}return Au(r,t[0])&&Au(r,t[1])}function Up(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get("x"),n.getWidth()),u=Z(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=i.dimensions,v=r.get(f[0],t),h=r.get(f[1],t);s=i.dataToPoint([v,h])}if(Bn(i,"cartesian2d")){var c=i.getAxis("x"),d=i.getAxis("y"),f=i.dimensions;Eh(r.get(f[0],t))?s[0]=c.toGlobalCoord(c.getExtent()[e?0:1]):Eh(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var l$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ba.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=ov(o).from,u=ov(o).to;l.each(function(f){Up(l,f,!0,i,n),Up(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new f_);this.group.add(f.group);var v=u$(o,e,a),h=v.from,c=v.to,d=v.line;ov(a).from=h,ov(a).to=c,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");W(p)||(p=[p,p]),W(g)||(g=[g,g]),W(y)||(y=[y,y]),W(m)||(m=[m,m]),v.from.each(function(S){_(h,S,!0),_(c,S,!1)}),d.each(function(S){var x=d.getItemModel(S),b=x.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[h.getItemLayout(S),c.getItemLayout(S)]);var w=x.get("z2");b.stroke==null&&(b.stroke=h.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:Q(w,0),fromSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(S,"symbolOffset"),fromSymbolRotate:h.getItemVisual(S,"symbolRotate"),fromSymbolSize:h.getItemVisual(S,"symbolSize"),fromSymbol:h.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(d),v.line.eachItemGraphicEl(function(S){ft(S).dataModel=a,S.traverse(function(x){ft(x).dataModel=a})});function _(S,x,b){var w=S.getItemModel(x);Up(S,x,b,e,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Gu(l,"color")),S.setItemVisual(x,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:Q(w.get("symbolOffset",!0),m[b?0:1]),symbolRotate:Q(w.get("symbolRotate",!0),y[b?0:1]),symbolSize:Q(w.get("symbolSize"),g[b?0:1]),symbol:Q(w.get("symbol",!0),p[b?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t})(Y_);function u$(r,t,e){var a;r?a=U(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return G(G({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ge(a,e),i=new Ge(a,e),o=new Ge([],e),s=U(e.get("data"),pt(o$,t,r,e));r&&(s=Rt(s,pt(s$,r)));var l=WR(!!r,a);return n.initData(U(s,function(u){return u[0]}),null,l),i.initData(U(s,function(u){return u[1]}),null,l),o.initData(U(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}function f$(r){r.registerComponentModel(i$),r.registerComponentView(l$),r.registerPreprocessor(function(t){U_(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var v$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t})(ba),sv=bt(),h$=function(r,t,e,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Cu(r,n),s=Cu(r,i),l=o.coord,u=s.coord;l[0]=Ce(l[0],-1/0),l[1]=Ce(l[1],-1/0),u[0]=Ce(u[0],1/0),u[1]=Ce(u[1],1/0);var f=Wh([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Oh(r){return!isNaN(r)&&!isFinite(r)}function HC(r,t,e,a){var n=1-r;return Oh(t[n])&&Oh(e[n])}function c$(r,t){var e=t.coord[0],a=t.coord[1],n={coord:e,x:t.x0,y:t.y0},i={coord:a,x:t.x1,y:t.y1};return Bn(r,"cartesian2d")?e&&a&&(HC(1,e,a)||HC(0,e,a))?!0:t$(r,n,i):Au(r,n)||Au(r,i)}function WC(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=Z(o.get(e[0]),n.getWidth()),u=Z(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],t),v=r.getValues(["x1","y1"],t),h=i.clampData(f),c=i.clampData(v),d=[];e[0]==="x0"?d[0]=h[0]>c[0]?v[0]:f[0]:d[0]=h[0]>c[0]?f[0]:v[0],e[1]==="y0"?d[1]=h[1]>c[1]?v[1]:f[1]:d[1]=h[1]>c[1]?f[1]:v[1],s=a.getMarkerPosition(d,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Bn(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);Oh(p)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Oh(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var UC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],d$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=ba.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=U(UC,function(v){return WC(s,l,v,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new rt});this.group.add(f.group),this.markKeep(f);var v=p$(o,e,a);a.setData(v),v.each(function(h){var c=U(UC,function(M){return WC(v,h,M,e,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(v.get("x0",h)),d.parse(v.get("x1",h))],_=[p.parse(v.get("y0",h)),p.parse(v.get("y1",h))];lr(m),lr(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),x=!S;v.setItemLayout(h,{points:c,allClipped:x});var b=v.getItemModel(h),w=b.getModel("itemStyle").getItemStyle(),T=b.get("z2"),C=Gu(l,"color");w.fill||(w.fill=C,X(w.fill)&&(w.fill=Ql(w.fill,.4))),w.stroke||(w.stroke=C),v.setItemVisual(h,"style",w),v.setItemVisual(h,"z2",Q(T,0))}),v.diff(sv(f).data).add(function(h){var c=v.getItemLayout(h),d=v.getItemVisual(h,"z2");if(!c.allClipped){var p=new Ee({z2:Q(d,0),shape:{points:c.points}});v.setItemGraphicEl(h,p),f.group.add(p)}}).update(function(h,c){var d=sv(f).data.getItemGraphicEl(c),p=v.getItemLayout(h),g=v.getItemVisual(h,"z2");p.allClipped?d&&f.group.remove(d):(d?It(d,{z2:Q(g,0),shape:{points:p.points}},a,h):d=new Ee({shape:{points:p.points}}),v.setItemGraphicEl(h,d),f.group.add(d))}).remove(function(h){var c=sv(f).data.getItemGraphicEl(h);f.group.remove(c)}).execute(),v.eachItemGraphicEl(function(h,c){var d=v.getItemModel(c),p=v.getItemVisual(c,"style");h.useStyle(v.getItemVisual(c,"style")),Se(h,ce(d),{labelFetcher:a,labelDataIndex:c,defaultText:v.getName(c)||"",inheritColor:X(p.fill)?Ql(p.fill,1):B.color.neutral99}),he(h,d),$t(h,null,null,d.get(["emphasis","disabled"])),ft(h).dataModel=a}),sv(f).data=v,f.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t})(Y_);function p$(r,t,e){var a,n,i=["x0","y0","x1","y1"];if(r){var o=U(r&&r.dimensions,function(u){var f=t.getData(),v=f.getDimensionInfo(f.mapDimension(u))||{};return G(G({},v),{name:u,ordinalMeta:null})});n=U(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new Ge(n,e)}else n=[{name:"value",type:"float"}],a=new Ge(n,e);var s=U(e.get("data"),pt(h$,t,r,e));r&&(s=Rt(s,pt(c$,r)));var l=r?function(u,f,v,h){var c=u.coord[Math.floor(h/2)][h%2];return kn(c,n[h])}:function(u,f,v,h){return kn(u.value,n[h])};return a.initData(s,null,l),a.hasItemOption=!0,a}function g$(r){r.registerComponentModel(v$),r.registerComponentView(d$),r.registerPreprocessor(function(t){U_(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var y$=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},om=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),W(a)&&A(a,function(i,o){X(i)&&(i={type:i}),a[o]=mt(i,y$(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=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:B.size.m,align:"auto",backgroundColor:B.color.transparent,borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:B.color.disabled,inactiveBorderColor:B.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:B.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:B.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:B.color.tertiary,borderWidth:1,borderColor:B.color.border},emphasis:{selectorLabel:{show:!0,color:B.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t})(xt),Eo=pt,sm=A,lv=rt,UR=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new lv),this.group.add(this._selectorGroup=new lv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var f=de(e,n).refContainer,v=e.getBoxLayoutParams(),h=e.get("padding"),c=Xt(v,f,h),d=this.layoutInner(e,o,c,i,l,u),p=Xt(nt({width:d.width,height:d.height},v),f,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=RR(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),f=K(),v=a.get("selectedMode"),h=a.get("triggerEvent"),c=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&c.push(d.id)}),sm(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===` -`)){var m=new lv;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),x=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,p,d,a,e,x,w,b,v,i);T.on("click",Eo(YC,y,null,i,c)).on("mouseover",Eo(lm,_.name,null,i,c)).on("mouseout",Eo(um,_.name,null,i,c)),n.ssr&&T.eachChild(function(C){var M=ft(C);M.seriesIndex=_.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),h&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),f.set(y,!0)}else n.eachRawSeries(function(C){var M=this;if(!f.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),L=D.getItemVisual(I,"style"),P=D.getItemVisual(I,"legendIcon"),k=Ve(L.fill);k&&k[3]===0&&(k[3]=.2,L=G(G({},L),{fill:Cr(k,"rgba")}));var R=this._createItem(C,y,p,d,a,e,{},L,P,v,i);R.on("click",Eo(YC,null,y,i,c)).on("mouseover",Eo(lm,null,y,i,c)).on("mouseout",Eo(um,null,y,i,c)),n.ssr&&R.eachChild(function(O){var E=ft(O);E.seriesIndex=C.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),h&&R.eachChild(function(O){M.packEventData(O,a,C,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};ft(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();sm(e,function(u){var f=u.type,v=new Mt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(v);var h=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);Se(v,{normal:h,emphasis:c},{defaultText:u.title}),In(v)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,f,v,h){var c=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=m$(f,i,l,u,c,g,h),x=new lv,b=i.getModel("textStyle");if(tt(e.getLegendIcon)&&(!_||_==="inherit"))x.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;x.add(_$({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,M=o.get("formatter"),D=a;X(M)&&M?D=M.replace("{name}",a??""):tt(M)&&(D=M(a));var I=g?b.getTextColor():i.get("inactiveColor");x.add(new Mt({style:Ft(b,{text:D,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new St({shape:x.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&nn({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),x.add(L),x.eachChild(function(k){k.silent=!0}),L.silent=!v,this.getContentGroup().add(x),In(x),x.__legendDataIndex=n,x},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Gi(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),v=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Gi("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),c=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?c[p]+=f[g]+d:v[p]+=h[g]+d,c[1-p]+=f[y]/2-h[y]/2,u.x=c[0],u.y=c[1],l.x=v[0],l.y=v[1];var _={x:0,y:0};return _[g]=f[g]+d+h[g],_[y]=Math.max(f[y],h[y]),_[m]=Math.min(0,h[m]+c[1-p]),_}else return l.x=v[0],l.y=v[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Wt);function m$(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),sm(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",v=l.getShallow("decal");u.decal=!v||v==="inherit"?a.decal:fs(v,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var h=t.getModel("lineStyle"),c=h.getLineStyle();if(s(c,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),c.stroke=h.get("inactiveColor"),c.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function _$(r){var t=r.icon||"roundRect",e=ie(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=B.color.neutral00,e.style.lineWidth=2),e}function YC(r,t,e,a){um(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),lm(r,t,e,a)}function YR(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;an[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=Q(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=c[s]/2-d[s]/2,f.setPosition(g),v.setPosition(y),h.setPosition(m);var x={x:0,y:0};if(x[o]=p?n[o]:c[o],x[s]=Math.max(c[s],d[s]),x[l]=Math.min(0,d[l]+m[1-i]),v.__rectSize=n[o],p){var b={x:0,y:0};b[o]=Math.max(n[o]-d[o]-_,0),b[s]=x[s],v.setClipPath(new St({shape:b})),v.__rectSize=b[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&It(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(f){var v=f+"DataIndex",h=a[v]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),c.cursor=h?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",X(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Yp[o],l=Zp[o],u=this._findTargetItemIndex(a),f=n.children(),v=f[u],h=f.length,c=h?1:0,d={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return d;var p=S(v);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=h;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!x(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!x(m,_.s))&&y.i=w&&b.s<=w+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(a=s)}),a??i},t.type="legend.scroll",t})(UR);function T$(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function C$(r){_t(ZR),r.registerComponentModel(b$),r.registerComponentView(w$),T$(r)}function A$(r){_t(ZR),_t(C$)}var M$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=Un(Tu.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Tu),Z_=bt();function D$(r,t,e){Z_(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function L$(r,t){for(var e=Z_(r).coordSysRecordMap,a=e.keys(),n=0;ni[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function E$(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=Z_(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=K());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=LR(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,I$(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=K());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){XR(n,i);return}var f=k$(l,i,e);o.enable(f.controlType,f.opt),Rs(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var O$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),D$(n,e,{pan:$(Xp.pan,this),zoom:$(Xp.zoom,this),scrollMove:$(Xp.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){L$(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(z_),Xp={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=$p[t](null,[a.originX,a.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(zn(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:qC(function(r,t,e,a,n,i){var o=$p[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:qC(function(r,t,e,a,n,i){var o=$p[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function qC(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(zn(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var $p={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function $R(r){V_(r),r.registerComponentModel(M$),r.registerComponentView(O$),E$(r)}var N$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=Un(Tu.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:B.color.accent10,borderRadius:0,backgroundColor:B.color.transparent,dataBackground:{lineStyle:{color:B.color.accent30,width:.5},areaStyle:{color:B.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:B.color.accent40,width:.5},areaStyle:{color:B.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:B.color.neutral00,borderColor:B.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:B.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:B.color.tertiary},brushSelect:!0,brushStyle:{color:B.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:B.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t})(Tu),gl=St,B$=1,qp=30,z$=7,yl="horizontal",jC="vertical",V$=5,G$=["line","bar","candlestick","scatter"],F$={easing:"cubicOut",duration:100,delay:0},H$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=$(this._onBrush,this),this._onBrushEnd=$(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),Rs(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){uu(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 a=this._displayables.sliderGroup=new rt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?z$:0,o=de(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===yl?{right:o.width-s.x-s.width,top:o.height-qp-l-i,width:s.width,height:qp}:{right:l,top:s.y,width:qp,height:s.height},f=no(e.option);A(["right","top","width","height"],function(h){f[h]==="ph"&&(f[h]=u[h])});var v=Xt(f,o);this._location={x:v.x,y:v.y},this._size=[v.width,v.height],this._orient===jC&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===yl&&!o?{scaleY:l?1:-1,scaleX:1}:n===yl&&o?{scaleY:l?1:-1,scaleX:-1}:n===jC&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new gl({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new gl({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:$(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var v=o.getDataExtent(e.thisDim),h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var d=[0,a[1]],p=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(v[1]-v[0]),S=e.thisAxis.type==="time",x=-m,b=Math.round(o.count()/a[0]),w;o.each([e.thisDim,l],function(I,L,P){if(b>0&&P%b){S||(x+=m);return}x=S?(+I-v[0])*_:x+m;var k=L==null||isNaN(L)||L==="",R=k?0:kt(L,h,d,!0);k&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!k&&w&&(g.push([x,0]),y.push([x,0])),k||(g.push([x,R]),y.push([x,R])),w=k}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new rt,k=new Ee({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Ae({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(R),P}for(var M=0;M<3;M++){var D=C(M===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&&yt(G$,u.get("type"))<0)){var f=i.getComponent(An(o),s).axis,v=W$(o),h,c=u.coordinateSystem;v!=null&&c.getOtherAxis&&(h=c.getOtherAxis(f).inverse),v=u.getData().mapDimension(v);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:v,otherAxisInverse:h}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,v=l.get("brushSelect"),h=a.filler=new gl({silent:v,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new gl({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:B$,fill:B.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!eh[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var x=ie(S,-1,0,2,2,null,!0);x.attr({cursor:U$(this._orient),draggable:!0,drift:$(this._onDragMove,this,_),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1),z2:5});var b=x.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Z(w,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,x.setStyle(l.getModel("handleStyle").getItemStyle()),x.style.strokeNoScale=!0,x.rectHover=!0,x.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),In(x);var T=l.get("handleColor");T!=null&&(x.style.fill=T),o.add(n[_]=x);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;e.add(i[_]=new Mt({silent:!0,invisible:!D,style:Ft(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var c=h;if(v){var d=Z(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new St({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=a.moveHandleIcon=ie(l.get("moveHandleIcon"),-g/2,-g/2,g,g,B.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));c=a.moveZone=new St({invisible:!0,shape:{y:s[1]-m,height:d+m}}),c.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:"default",drift:$(this._onDragMove,this,"all"),ondragstart:$(this._showDataInfo,this,!0),ondragend:$(this._onDragEnd,this),onmouseover:$(this._showDataInfo,this,!0),onmouseout:$(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[kt(e[0],[0,100],a,!0),kt(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];zn(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?kt(s.minSpan,l,o,!0):null,s.maxSpan!=null?kt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=lr([kt(i[0],o,l,!0),kt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=lr(n.slice()),o=this._size;A([0,1],function(c){var d=a.handles[c],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[c]+(c?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new st(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();zn(0,l,o,0,u.minSpan!=null?kt(u.minSpan,s,o,!0):null,u.maxSpan!=null?kt(u.maxSpan,s,o,!0):null),this._range=lr([kt(l[0],o,s,!0),kt(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(qa(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new gl({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,a),f=l.transformCoordToLocal(s.x,s.y),v=this._size;u[0]=Math.max(Math.min(v[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:v[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?F$:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=LR(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(z_);function W$(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function U$(r){return r==="vertical"?"ns-resize":"ew-resize"}function qR(r){r.registerComponentModel(N$),r.registerComponentView(H$),V_(r)}function Y$(r){_t($R),_t(qR)}var jR={get:function(r,t,e){var a=et((Z$[r]||{})[t]);return e&&W(a)?a[a.length-1]:a}},Z$={color:{active:["#006edd","#e0ffff"],inactive:[B.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]}},KC=_e.mapVisual,X$=_e.eachVisual,$$=W,JC=A,q$=lr,j$=kt,Nh=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&VR(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=$(e,this),this.controllerVisuals=am(this.option.controller,a,e),this.targetVisuals=am(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=xs(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],W(e)&&(e=e.slice(),u=!0);var f=a?e:u?[v(e[0]),v(e[1])]:v(e);if(X(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(tt(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+f[1]:e[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function v(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=q$([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});mt(i,n),mt(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(v){$$(a.color)&&!v.inRange&&(v.inRange={color:a.color.slice().reverse()}),v.inRange=v.inRange||{color:e.get("gradientColor")}}function u(v,h,c){var d=v[h],p=v[c];d&&!p&&(p=v[c]={},JC(d,function(g,y){if(_e.isValidType(y)){var m=jR.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(v){var h=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,c=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";JC(this.stateList,function(y){var m=this.itemSize,_=v[y];_||(_=v[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=h&&et(h)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&et(c)||(s?m[0]:[m[0],m[0]])),_.symbol=KC(_.symbol,function(b){return b==="none"?g:b});var S=_.symbolSize;if(S!=null){var x=-1/0;X$(S,function(b){b>x&&(x=b)}),_.symbolSize=KC(S,function(b){return j$(b,[0,x],[0,m[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:B.color.transparent,borderColor:B.color.borderTint,contentColor:B.color.theme[0],inactiveColor:B.color.disabled,borderWidth:0,padding:B.size.m,textGap:10,precision:0,textStyle:{color:B.color.secondary}},t})(xt),QC=[20,140],K$=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=QC[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=QC[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):W(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=lr((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=tA(this,"outOfRange",this.getExtent()),n=tA(this,"inRange",this.option.range.slice()),i=[];function o(c,d){i.push({value:c,color:e(c,d)})}for(var s=0,l=0,u=n.length,f=a.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new rt(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);J$([0,1],function(v){var h=o[v];h.setStyle("fill",a.handlesColor[v]),h.y=e[v];var c=na(e[v],[0,l[1]],u,!0),d=this.getControllerVisual(c,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var p=Wr(n.handleLabelPoints[v],Pn(h,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[v].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,v=f.indicator;if(v){v.attr("invisible",!1);var h={convertOpacityToAlpha:!0},c=this.getControllerVisual(e,"color",h),d=this.getControllerVisual(e,"symbolSize"),p=na(e,s,u,!0),g=l[0]-d/2,y={x:v.x,y:v.y};v.y=p,v.x=g;var m=Wr(f.indicatorLabelPoint,Pn(v,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),x=this._orient,b=x==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:b?S:"middle",align:b?"center":S});var w={x:g,y:p,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};v.x=y.x,v.y=y.y,v.animateTo(w,C),_.animateTo(T,C)}else v.attr(w),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(v[1]=1/0),a&&(v[0]===-1/0?this._showIndicator(f,v[1],"< ",l):v[1]===1/0?this._showIndicator(f,v[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var h=this._hoverLinkDataIndices,c=[];(a||nA(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(v));var d=OO(h,c);this._dispatchHighDown("downplay",Iv(d[0],n)),this._dispatchHighDown("highlight",Iv(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(Ei(e.target,function(l){var u=ft(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function oq(r,t,e,a){for(var n=t.targetVisuals[a],i=_e.prepareVisualTypes(n),o={color:Gu(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(aq,nq),A(iq,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(sq))}function tk(r){r.registerComponentModel(K$),r.registerComponentView(eq),QR(r)}var lq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],uq[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=et(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=U(this._pieceList,function(l){return l=et(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=_e.listVisualTypes(),i=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),A(a,function(s,l){var u=!1;A(this.stateList,function(f){u=u||o(e,f,l)||o(e.target,f,l)},this),!u&&A(this.stateList,function(f){(e[f]||(e[f]={}))[l]=jR.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,A(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;A(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!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=et(e)},t.prototype.getValueState=function(e){var a=_e.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=_e.findPieceIndex(l,n);f===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,v){var h=i.getRepresentValue({interval:f});v||(v=i.getValueState(h));var c=e(h,v);f[0]===-1/0?n[0]=c:f[1]===1/0?n[1]=c:a.push({value:f[0],color:c},{value:f[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(f){var v=f.interval;v&&(v[0]>u&&o([u,v[0]],"outOfRange"),o(v.slice()),u=v[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=Un(Nh.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})(Nh),uq={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function lA(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}var fq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Ce(a.get("showLabel",!0),!u),v=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,f,o),A(l.viewPieceList,function(h){var c=h.piece,d=new rt;d.onclick=$(this._onItemClick,this,c),this._enableHoverLink(d,h.indexInModelPieceList);var p=a.getRepresentValue(c);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],v),f){var g=this.visualMapModel.getValueState(p),y=i.get("align")||o;d.add(new Mt({style:Ft(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:c.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:Q(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:v}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,f,o),Gi(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:Iv(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return JR(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new rt,l=this.visualMapModel.textStyleModel;s.add(new Mt({style:Ft(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=U(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=ie(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=et(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},t.type="visualMap.piecewise",t})(KR);function ek(r){r.registerComponentModel(lq),r.registerComponentView(fq),QR(r)}function vq(r){_t(tk),_t(ek)}var hq=(function(){function r(t){this._thumbnailModel=t}return r.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},r.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:CD(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(t,e){var a=e.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},r})(),cq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.optionUpdated=function(e,a){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new hq(this);if(this._target=null,this.ecModel.eachSeries(function(n){kw(n,null)}),this.shouldShow()){var a=this.getTarget();kw(a.baseMapProvider,e)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!=="graph"&&(e=null):e=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:e},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:B.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:B.color.neutral30,borderColor:B.color.neutral40,opacity:.3},z:10},t})(xt),dq=(function(r){N(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this._api=n,this._model=e,this._coordSys||(this._coordSys=new uo),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=e.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||B.color.neutral00);var l=de(e,n).refContainer,u=Xt(YD(e,!0),l),f=s.lineWidth||0,v=this._contentRect=qi(u.clone(),f/2,!0,!0),h=new rt;i.add(h),h.setClipPath(new St({shape:v.plain()}));var c=this._targetGroup=new rt;h.add(c);var d=u.plain();d.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new St({style:s,shape:d,silent:!1,cursor:"grab"}));var p=e.getModel("windowStyle"),g=p.getShallow("borderRadius",!0);h.add(this._windowRect=new St({shape:{x:0,y:0,width:0,height:0,r:g},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),fA(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),fA(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!e){var o=e.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=Xt({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var a=this._bridgeRendered;a&&a.renderVersion===e.renderVersion&&(a.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=Dr([],e.targetTrans),n=Fr([],this._coordSys.transform,a);this._transThisToTarget=Dr([],n);var i=e.viewportRect;i?i=i.clone():i=new lt(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(nt({r:s},i))}},t.prototype._resetRoamController=function(e){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new lo(n.getZr())),!e||!this._isEnabled()){i.disable();return}i.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",$(this._onPan,this)).on("zoom",$(this._onZoom,this))},t.prototype._onPan=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=Jt([],[e.oldX,e.oldY],a),i=Jt([],[e.oldX-e.dx,e.oldY-e.dy],a);this._api.dispatchAction(uA(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},t.prototype._onZoom=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=Jt([],[e.originX,e.originY],a);this._api.dispatchAction(uA(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;if(!e||!e.shouldShow())return!1;var a=e.getTarget().baseMapProvider;return!!a},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t})(Wt);function uA(r,t){var e=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:e};return a[r.mainType+"Id"]=r.id,G(a,t),a}function fA(r,t){var e=ji(r);oc(t.group,e.z,e.zlevel)}function pq(r){r.registerComponentModel(cq),r.registerComponentView(dq)}var gq={label:{enabled:!0},decal:{show:!1}},vA=bt(),yq={};function mq(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=et(gq);mt(a.label,r.getLocaleModel().get("aria"),!1),mt(e.option,a,!1),n(),i();function n(){var u=e.getModel("decal"),f=u.get("show");if(f){var v=K();r.eachSeries(function(h){if(!h.isColorBySeries()){var c=v.get(h.type);c||(c={},v.set(h.type,c)),vA(h).scope=c}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(tt(h.enableAriaDecal)){h.enableAriaDecal();return}var c=h.getData();if(h.isColorBySeries()){var m=qg(h.ecModel,h.name,yq,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var d=h.getRawData(),p={},g=vA(h).scope;c.each(function(x){var b=c.getRawIndex(x);p[b]=x});var y=d.count();d.each(function(x){var b=p[x],w=d.getName(x)||x+"",T=qg(h.ecModel,w,g,y),C=c.getItemVisual(b,"decal");c.setItemVisual(b,"decal",S(C,T))})}function S(x,b){var w=x?G(G({},b),x):b;return w.dirty=!0,w}})}}function i(){var u=t.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),v=e.getModel("label");if(v.option=nt(v.option,f),!!v.get("enabled")){if(u.setAttribute("role","img"),v.get("description")){u.setAttribute("aria-label",v.get("description"));return}var h=r.getSeriesCount(),c=v.get(["data","maxCount"])||10,d=v.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var y=s();if(y){var m=v.get(["general","withTitle"]);g=o(m,{title:y})}else g=v.get(["general","withoutTitle"]);var _=[],S=h>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);g+=o(S,{seriesCount:h}),r.eachSeries(function(T,C){if(C1?v.get(["series","multiple",I]):v.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>c){var P=v.get(["data","partialData"]);M+=o(P,{displayCnt:c})}else M+=v.get(["data","allData"]);for(var k=v.get(["data","separator","middle"]),R=v.get(["data","separator","end"]),O=v.get(["data","excludeDimensionId"]),E=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},xq=(function(){function r(t){var e=this._condVal=X(t)?new RegExp(t):qA(t)?t:null;if(e==null){var a="";Et(a)}}return r.prototype.evaluate=function(t){var e=typeof t;return X(e)?this._condVal.test(t):Dt(e)?this._condVal.test(t+""):!1},r})(),bq=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),wq=(function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&a.push(n),n=[L,P]}function f(L,P,k,R){qo(L,k)&&qo(P,R)||n.push(L,P,k,R,k,R)}function v(L,P,k,R,O,E){var z=Math.abs(P-L),V=Math.tan(z/4)*4/3,F=PT:D2&&a.push(n),a}function vm(r,t,e,a,n,i,o,s,l,u){if(qo(r,e)&&qo(t,a)&&qo(n,o)&&qo(i,s)){l.push(o,s);return}var f=2/u,v=f*f,h=o-r,c=s-t,d=Math.sqrt(h*h+c*c);h/=d,c/=d;var p=e-r,g=a-t,y=n-o,m=i-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],M=[];On(r,e,n,o,.5,C),On(t,a,i,s,.5,M),vm(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),vm(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function Bq(r,t){var e=fm(r),a=[];t=t||1;for(var n=0;n0)for(var u=0;uMath.abs(u),v=ak([l,u],f?0:1,t),h=(f?s:u)/v.length,c=0;cn,o=ak([a,n],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",v=r[s]/o.length,h=0;h1?null:new st(p*l+r,p*u+t)}function Gq(r,t,e){var a=new st;st.sub(a,e,t),a.normalize();var n=new st;st.sub(n,r,t);var i=n.dot(a);return i}function No(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Fq(r,t,e){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),Fq(t,u,f)}function Bh(r,t,e,a){if(e===1)a.push(t);else{var n=Math.floor(e/2),i=r(t);Bh(r,i[0],n,a),Bh(r,i[1],e-n,a)}return a}function Hq(r,t){for(var e=[],a=0;a0;u/=2){var f=0,v=0;(r&u)>0&&(f=1),(t&u)>0&&(v=1),s+=u*u*(3*f^v),v===0&&(f===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function Gh(r){var t=1/0,e=1/0,a=-1/0,n=-1/0,i=U(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),v=l.y+l.height/2+(u?u[5]:0);return t=Math.min(f,t),e=Math.min(v,e),a=Math.max(f,a),n=Math.max(v,n),[f,v]}),o=U(i,function(s,l){return{cp:s,z:Kq(s[0],s[1],t,e,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ok(r){return Yq(r.path,r.count)}function hm(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Jq(r,t,e){var a=[];function n(x){for(var b=0;b=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[n].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var tj={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;SA(r)&&(u=r,f=t),SA(t)&&(u=t,f=r);function v(y,m,_,S,x){var b=y.many,w=y.one;if(b.length===1&&!x){var T=m?b[0]:w,C=m?w:b[0];if(zh(T))v({many:[T],one:C},!0,_,S,!0);else{var M=s?nt({delay:s(_,S)},l):l;$_(T,C,M),i(T,C,T,C,M)}}else for(var D=nt({dividePath:tj[e],individualDelay:s&&function(O,E,z,V){return s(O+_,S)}},l),I=m?Jq(b,w,D):Qq(w,b,D),L=I.fromIndividuals,P=I.toIndividuals,k=L.length,R=0;Rt.length,c=u?xA(f,u):xA(h?t:r,[h?r:t]),d=0,p=0;psk))for(var i=a.getIndices(),o=0;o0&&b.group.traverse(function(T){T instanceof Tt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function AA(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function MA(r){return W(r)?r.sort().join(","):r}function _n(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function sj(r,t){var e=K(),a=K(),n=K();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=AA(i),f=MA(u);a.set(f,{dataGroupId:s,data:l}),W(u)&&A(u,function(v){n.set(v,{key:f,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=AA(i),u=MA(l),f=a.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:_n(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:_n(s),data:s}]});else if(W(l)){var v=[];A(l,function(d){var p=a.get(d);p.data&&v.push({dataGroupId:p.dataGroupId,divide:_n(p.data),data:p.data})}),v.length&&e.set(u,{oldSeries:v,newSeries:[{dataGroupId:o,data:s,divide:_n(s)}]})}else{var h=n.get(l);if(h){var c=e.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:_n(h.data)}],newSeries:[]},e.set(h.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:_n(s)})}}}}),e}function DA(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:_n(t.oldData[s]),groupIdDim:o.dimension})}),A(Ht(r.to),function(o){var s=DA(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:_n(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&lk(n,i,a)}function uj(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){A(Ht(a.seriesTransition),function(n){A(Ht(n.to),function(i){for(var o=a.updatedSeries,s=0;so.vmin?e+=o.vmin-a+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-a,a=o.vmax,n=!1;break}e+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(e+=t-a),e},r.prototype.unelapse=function(t){for(var e=LA,a=IA,n=!0,i=0,o=0;ol?i=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):i=a+t-e,a=s.vmax,n=!1;break}e=u,a=s.vmax}return n&&(i=a+t-e),i},r})();function vj(){return new fj}var LA=0,IA=0;function hj(r,t){var e=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(e+=l.val);var u=q_(s,t);if(u){var f=u.vmin!==s.vmin,v=u.vmax!==s.vmax,h=u.vmax-u.vmin;if(!(f&&v))if(f||v){var c=f?"S":"E";i[c][l.type].has=!0,i[c][l.type].span=h,i[c][l.type].inExtFrac=h/(s.vmax-s.vmin),i[c][l.type].val=l.val}else a[l.type].span+=h,a[l.type].val+=l.val}});var o=e*(0+(t[1]-t[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=e!==0?Math.max(o,0)*l.val/e:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function cj(r,t,e,a,n,i){r!=="no"&&A(e,function(o){var s=q_(o,i);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],f=a(u),v=n*3/4;f>s.vmin-v&&ft[0]&&e=0&&o<1-1e-5}A(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:et(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(X(o.gap)){var u=sr(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;n(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var v=t(o.gap);(!isFinite(v)||v<0)&&(v=0),s.gapParsed.type="tpAbs",s.gapParsed.val=v}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),e&&e.noNegative&&A(["vmin","vmax"],function(c){s[c]<0&&(s[c]=0)}),s.vmin>s.vmax){var h=s.vmax;s.vmax=s.vmin,s.vmin=h}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return A(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function j_(r,t){return dm(t)===dm(r)}function dm(r){return r.start+"_\0_"+r.end}function pj(r,t,e){var a=[];A(r,function(i,o){var s=t(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=t(i);if(s&&s.type==="vmax"){var l=Fn(a,function(u){return j_(t(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(e?i:[r[i[0]],r[i[1]]])}),n}function gj(r,t,e,a){var n,i;if(r.break){var o=r.break.parsedBreak,s=Fn(e,function(v){return j_(v.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(t,o.vmin),s.vmin),u=a(Math.pow(t,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?ae(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function yj(r,t,e){var a={noNegative:!0},n=cm(r,e,a),i=cm(r,e,a),o=Math.log(t);return i.breaks=U(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var mj={vmin:"start",vmax:"end"};function _j(r,t){return t&&(r=r||{},r.break={type:mj[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),r}function Sj(){HB({createScaleBreakContext:vj,pruneTicksByBreak:cj,addBreaksToTicks:dj,parseAxisBreakOption:cm,identifyAxisBreak:j_,serializeAxisBreakIdentifier:dm,retrieveAxisBreakPairs:pj,getTicksLogTransformBreak:gj,logarithmicParseBreaksFromOption:yj,makeAxisLabelFormatterParamBreak:_j})}var PA=bt();function xj(r,t){var e=Fn(r,function(a){return se().identifyAxisBreak(a.parsedBreak.breakOption,t.breakOption)});return e||r.push(e={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),e}function bj(r){A(r,function(t){return t.shouldRemove=!0})}function wj(r){for(var t=r.length-1;t>=0;t--)r[t].shouldRemove&&r.splice(t,1)}function Tj(r,t,e,a,n){var i=e.axis;if(i.scale.isBlank()||!se())return;var o=se().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=e.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var v=s.get("expandOnClick"),h=s.get("zigzagZ"),c=s.getModel("itemStyle"),d=c.getItemStyle(),p=d.stroke,g=d.lineWidth,y=d.lineDash,m=d.fill,_=new rt({ignoreModelZ:!0}),S=i.isHorizontal(),x=PA(t).visualList||(PA(t).visualList=[]);bj(x);for(var b=function(C){var M=o[C][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(M.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(M.vmax,!0)),D[1]=E;Pt&&(Y=E);var Bt=[],ht=[];Bt[R]=D,ht[R]=I,!vt&&!Pt&&(Bt[R]+=H?-l:l,ht[R]-=H?l:-l),Bt[O]=Y,ht[O]=Y,V.push(Bt),F.push(ht);var at=void 0;if(jm[1]&&m.reverse(),{coordPair:m,brkId:se().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,v=0;v=0?l[0].width:l[1].width),h=(v+f.x)/2-u.x,c=Math.min(h,h-f.x),d=Math.max(h,h-f.x),p=d<0?d:c>0?c:0;s=(h-p)/f.x}var g=new st,y=new st;st.scale(g,a,-s),st.scale(y,a,1-s),py(e[0],g),py(e[1],y)}function Mj(r,t){var e={breaks:[]};return A(t.breaks,function(a){if(a){var n=Fn(r.get("breaks",!0),function(s){return se().identifyAxisBreak(s,a)});if(n){var i=t.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===yc?!0:i===LI?!1:i===II?!n.isExpanded:n.isExpanded,e.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),e}function Dj(){wH({adjustBreakLabelPair:Aj,buildAxisBreakLine:Cj,rectCoordBuildBreakAxis:Tj,updateModelAxisBreak:Mj})}function Lj(r){LH(r),Sj(),Dj()}function Ij(){jH(Pj)}function Pj(r,t){A(r,function(e){if(!e.model.get(["axisLabel","inside"])){var a=Rj(e);if(a){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[n]-=a[n]+i,e.position==="top"?t.y+=a.height+i:e.position==="left"&&(t.x+=a.width+i)}}})}function Rj(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var a,n,i=e.getExtent();e instanceof vs?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=Os(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;f1&&arguments[1]!==void 0?arguments[1]:60,n=null;return function(){for(var i=this,o=arguments.length,s=new Array(o),l=0;l{const{token:r}=Uj(),{t}=ck(),e={xAxis:{type:"category",show:!1,data:["Mon","Tue","Wed","Thu","Fri"]},yAxis:{show:!1,type:"value"},series:[{data:[120,88,116,60,70],type:"bar",itemStyle:{color:r.colorPrimary},barWidth:10}]},a={xAxis:{show:!1,type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:{show:!1,type:"value"},series:[{data:[1,2,3,2,3,2,1],type:"line",itemStyle:{color:r.colorPrimary}}]},n={title:{text:t("dashboard.analysis.annualSales"),textStyle:{color:r.colorText,fontSize:r.fontSizeLG,fontWeight:r.fontWeightStrong}},tooltip:{trigger:"axis",axisPointer:{type:"cross",label:{backgroundColor:r.colorPrimaryBg,color:r.colorPrimary}},borderWidth:0,backgroundColor:r.colorPrimaryBg,textStyle:{color:r.colorText}},legend:{data:[t("dashboard.analysis.grossProfit"),t("dashboard.analysis.netProfit"),t("dashboard.analysis.totalExpense")],textStyle:{color:r.colorText}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:[{type:"category",boundaryGap:!1,data:[t("dashboard.analysis.january"),t("dashboard.analysis.february"),t("dashboard.analysis.march"),t("dashboard.analysis.april"),t("dashboard.analysis.may"),t("dashboard.analysis.june"),t("dashboard.analysis.july"),t("dashboard.analysis.august"),t("dashboard.analysis.september"),t("dashboard.analysis.october"),t("dashboard.analysis.november"),t("dashboard.analysis.december")]}],yAxis:[{type:"value",splitLine:{lineStyle:{color:r.colorBorder}}}],series:[{name:t("dashboard.analysis.grossProfit"),type:"line",stack:"Total",areaStyle:{color:r.colorPrimaryBorder},emphasis:{focus:"series"},itemStyle:{color:r.colorPrimary},data:[30,36,42,33,21,26,29,35,42,32,28,26]},{name:t("dashboard.analysis.netProfit"),type:"line",stack:"Total",areaStyle:{color:r.colorSuccessBorder},emphasis:{focus:"series"},itemStyle:{color:r.colorSuccess},data:[32,16,18,30,15,19,22,17,24,19,30,31]},{name:t("dashboard.analysis.totalExpense"),type:"line",stack:"Total",areaStyle:{color:r.colorWarningBorder},emphasis:{focus:"series"},itemStyle:{color:r.colorWarning},data:[36,24,36,36,39,56,24,23,21,12,16,19]}]},i={title:{text:t("dashboard.analysis.accessFrom"),textStyle:{color:r.colorText,fontSize:r.fontSizeLG,fontWeight:r.fontWeightStrong}},tooltip:{trigger:"item"},legend:{bottom:"0%",left:"center",textStyle:{color:r.colorText}},series:[{name:t("dashboard.analysis.accessFrom"),type:"pie",radius:["40%","70%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:r.borderRadius,borderColor:r.colorBorder,borderWidth:2},label:{show:!1,position:"center"},emphasis:{label:{show:!0,fontSize:40,fontWeight:"bold"}},labelLine:{show:!1},data:[{value:1048,name:t("dashboard.analysis.searchEngine")},{value:735,name:t("dashboard.analysis.direct")},{value:580,name:t("dashboard.analysis.email")},{value:484,name:t("dashboard.analysis.unionAds")},{value:300,name:t("dashboard.analysis.videoAds")}]}]},o=[{key:"1",name:"John Brown",age:32,address:"New York No. 1 Lake Park",tags:["nice","developer"]},{key:"2",name:"Jim Green",age:42,address:"London No. 1 Lake Park",tags:["loser"]},{key:"3",name:"Joe Black",age:32,address:"Sydney No. 1 Lake Park",tags:["cool","teacher"]},{key:"4",name:"Jim Green",age:42,address:"London No. 1 Lake Park",tags:["loser"]},{key:"5",name:"Joe Black",age:32,address:"Sydney No. 1 Lake Park",tags:["cool","teacher"]}],s=[{title:"Ant Design Title 1"},{title:"Ant Design Title 2"},{title:"Ant Design Title 3"},{title:"Ant Design Title 4"},{title:"Ant Design Title 5"}];return ut.jsx(ut.Fragment,{children:ut.jsxs(dk,{gutter:[20,20],children:[ut.jsx(on,{xxl:6,lg:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsx("div",{children:t("dashboard.analysis.totalRevenue")}),ut.jsxs("div",{className:"flex items-center justify-between pt-4 pb-2",children:[ut.jsx("div",{className:"text-4xl flex-0",children:"¥3,415.00"}),ut.jsx(uv,{style:{width:120,height:80},option:e})]}),ut.jsxs("div",{children:[t("dashboard.since.lastWeek")," ",ut.jsxs("span",{style:{color:r.colorError},children:[ut.jsx(J_,{}),"11.28%"]})]})]})}),ut.jsx(on,{xxl:6,lg:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsx("div",{children:t("dashboard.analysis.totalExpenses")}),ut.jsxs("div",{className:"flex items-center justify-between pt-4 pb-2",children:[ut.jsx("div",{className:"text-4xl flex-0",children:"¥8,425.00"}),ut.jsx(uv,{style:{width:120,height:80},option:a})]}),ut.jsxs("div",{children:[t("dashboard.since.lastWeek")," ",ut.jsxs("span",{style:{color:r.colorSuccess},children:[ut.jsx(Q_,{}),"15.33%"]})]})]})}),ut.jsx(on,{xxl:6,lg:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsx("div",{children:t("dashboard.analysis.visitors")}),ut.jsxs("div",{className:"flex items-center justify-between pt-4 pb-2",children:[ut.jsx("div",{className:"text-4xl flex-0",children:"1,128"}),ut.jsx("div",{className:"text-4xl rounded-full flex items-center justify-center",style:{height:80,width:80,background:r.colorPrimaryBg},children:ut.jsx(pk,{style:{color:r.colorPrimary}})})]}),ut.jsxs("div",{children:[t("dashboard.since.lastWeek")," ",ut.jsxs("span",{style:{color:r.colorError},children:[ut.jsx(J_,{}),"32.60%"]})]})]})}),ut.jsx(on,{xxl:6,lg:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsx("div",{children:t("dashboard.analysis.likes")}),ut.jsxs("div",{className:"flex items-center justify-between pt-4 pb-2",children:[ut.jsx("div",{className:"text-4xl flex-0",children:"668"}),ut.jsx("div",{className:"text-4xl rounded-full flex items-center justify-center",style:{height:80,width:80,background:r.colorPrimaryBg},children:ut.jsx(gk,{style:{color:r.colorPrimary}})})]}),ut.jsxs("div",{children:[t("dashboard.since.lastWeek")," ",ut.jsxs("span",{style:{color:r.colorSuccess},children:[ut.jsx(Q_,{}),"9.60%"]})]})]})}),ut.jsx(on,{xl:18,xs:24,children:ut.jsx(sn,{variant:"borderless",children:ut.jsx(uv,{style:{width:"100%",height:460},option:n})})}),ut.jsx(on,{xl:6,xs:24,children:ut.jsx(sn,{variant:"borderless",children:ut.jsx(uv,{style:{width:"100%",height:460},option:i})})}),ut.jsx(on,{xl:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsxs("div",{className:"flex items-center justify-between mb-5",children:[ut.jsx("div",{style:{fontSize:r.fontSizeLG,fontWeight:r.fontWeightStrong},children:t("dashboard.analysis.salesRanking")}),ut.jsx(xk.Group,{options:[{label:t("dashboard.analysis.month"),value:"month"},{label:t("dashboard.analysis.year"),value:"year"},{label:t("dashboard.analysis.day"),value:"day"}],defaultValue:"day",optionType:"button",buttonStyle:"solid"})]}),ut.jsx(bk,{columns:[{title:t("dashboard.analysis.article"),dataIndex:"name",key:"name",render:l=>ut.jsx("a",{children:l})},{title:t("dashboard.analysis.age"),dataIndex:"age",key:"age"},{title:t("dashboard.analysis.address"),dataIndex:"address",key:"address"},{title:t("dashboard.analysis.tags"),key:"tags",dataIndex:"tags",render:(l,{tags:u})=>ut.jsx(ut.Fragment,{children:u.map(f=>{let v=f.length>5?"geekblue":"green";return f==="loser"&&(v="volcano"),ut.jsx(wk,{color:v,children:f.toUpperCase()},f)})})},{title:t("dashboard.analysis.action"),key:"action",render:(l,u)=>ut.jsxs(yk,{size:"middle",children:[ut.jsxs("a",{children:[t("dashboard.analysis.invite")," ",u.name]}),ut.jsx("a",{children:t("dashboard.analysis.delete")})]})}],dataSource:o,pagination:!1,scroll:{x:800}})]})}),ut.jsx(on,{xl:12,xs:24,children:ut.jsxs(sn,{variant:"borderless",children:[ut.jsx("div",{className:"mb-5",style:{fontSize:r.fontSizeLG,fontWeight:r.fontWeightStrong},children:t("dashboard.analysis.userReviews")}),ut.jsx(Dc,{dataSource:s,renderItem:(l,u)=>ut.jsx(Dc.Item,{children:ut.jsx(Dc.Item.Meta,{avatar:ut.jsx(mk,{src:`https://xsgames.co/randomusers/avatar.php?g=pixel&key=${u}`}),title:ut.jsx("a",{href:"https://ant.design",children:l.title}),description:t("dashboard.analysis.reviewDescription")})})})]})})]})})};export{Qj as default}; diff --git a/public/assets/application-cSrGxK6S.js b/public/assets/application-cSrGxK6S.js new file mode 100644 index 0000000..6bc6484 --- /dev/null +++ b/public/assets/application-cSrGxK6S.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/runner/application`,columns:[{title:t(`runner.application.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`runner.application.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`},{title:t(`runner.application.real_name`),dataIndex:`real_name`,valueType:`text`,align:`center`},{title:t(`runner.application.mobile`),dataIndex:`mobile`,valueType:`text`,align:`center`},{title:t(`runner.application.resume`),dataIndex:`resume`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.application.id_card`),dataIndex:`id_card`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.application.id_card_front`),dataIndex:`id_card_front`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.application.id_card_back`),dataIndex:`id_card_back`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.application.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`runner.application.status.0`)},{value:1,label:t(`runner.application.status.1`)},{value:2,label:t(`runner.application.status.2`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`runner.application.status.1`)}):n===2?(0,d.jsx)(e,{color:`error`,children:t(`runner.application.status.2`)}):(0,d.jsx)(e,{color:`warning`,children:t(`runner.application.status.0`)}),filters:[{text:t(`runner.application.status.0`),value:0},{text:t(`runner.application.status.1`),value:1},{text:t(`runner.application.status.2`),value:2}],align:`center`},{title:t(`runner.application.review_remark`),dataIndex:`review_remark`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.application.reviewed_at`),dataIndex:`reviewed_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.application.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.application.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.application`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`runner.application.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`runner.application.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/badge-C6DVGO8T.js b/public/assets/badge-C6DVGO8T.js new file mode 100644 index 0000000..16df37a --- /dev/null +++ b/public/assets/badge-C6DVGO8T.js @@ -0,0 +1 @@ +import{$r as e,Bi as t,Br as n,Ca as r,Ea as i,Ei as a,Fi as o,Li as s,Ni as c,On as l,Qr as u,Ri as d,Yr as f,Zr as p,_i as m,ci as h,di as g,ti as _}from"./index-DThTpSPU.js";var v=i(r()),y=e=>{let{prefixCls:n,value:r,current:i,offset:a=0}=e,o;return a&&(o={position:`absolute`,top:`${a}00%`,left:0}),v.createElement(`span`,{style:o,className:t(`${n}-only-unit`,{current:i})},r)};function b(e,t,n){let r=e,i=0;for(;(r+10)%10!==t;)r+=n,i+=n;return i}var x=e=>{let{prefixCls:t,count:n,value:r}=e,i=Number(r),a=Math.abs(n),[o,s]=v.useState(i),[c,l]=v.useState(a),u=()=>{s(i),l(a)};v.useEffect(()=>{let e=setTimeout(u,1e3);return()=>clearTimeout(e)},[i]);let d,f;if(o===i||Number.isNaN(i)||Number.isNaN(o))d=[v.createElement(y,{...e,key:i,current:!0})],f={transition:`none`};else{d=[];let t=i+10,n=[];for(let e=i;e<=t;e+=1)n.push(e);let r=ce%10===o);d=(r<0?n.slice(0,s+1):n.slice(s)).map((t,n)=>{let i=t%10;return v.createElement(y,{...e,key:t,value:i,offset:r<0?n-s:n,current:n===s})}),f={transform:`translateY(${-b(o,i,r)}00%)`}}return v.createElement(`span`,{className:`${t}-only`,style:f,onTransitionEnd:u},d)},S=v.forwardRef((e,r)=>{let{prefixCls:i,count:a,className:o,motionClassName:c,style:l,title:u,show:d,component:f=`sup`,children:p,...m}=e,{getPrefixCls:h}=v.useContext(s),g=h(`scroll-number`,i),_={...m,"data-show":d,style:l,className:t(g,o,c),title:u},y=a;if(a&&Number(a)%1==0){let e=String(a).split(``);y=v.createElement(`bdi`,null,e.map((t,n)=>v.createElement(x,{prefixCls:g,count:Number(a),value:t,key:e.length-n})))}return l?.borderColor&&(_.style={...l,boxShadow:`0 0 0 1px ${l.borderColor} inset`}),p?n(p,e=>({className:t(`${g}-custom-component`,e?.className,c)})):v.createElement(f,{..._,ref:r},y)}),C=new c(`antStatusProcessing`,{"0%":{transform:`scale(0.8)`,opacity:.5},"100%":{transform:`scale(2.4)`,opacity:0}}),w=new c(`antZoomBadgeIn`,{"0%":{transform:`scale(0) translate(50%, -50%)`,opacity:0},"100%":{transform:`scale(1) translate(50%, -50%)`}}),T=new c(`antZoomBadgeOut`,{"0%":{transform:`scale(1) translate(50%, -50%)`},"100%":{transform:`scale(0) translate(50%, -50%)`,opacity:0}}),E=new c(`antNoWrapperZoomBadgeIn`,{"0%":{transform:`scale(0)`,opacity:0},"100%":{transform:`scale(1)`}}),D=new c(`antNoWrapperZoomBadgeOut`,{"0%":{transform:`scale(1)`},"100%":{transform:`scale(0)`,opacity:0}}),O=new c(`antBadgeLoadingCircle`,{"0%":{transformOrigin:`50%`},"100%":{transform:`translate(50%, -50%) rotate(360deg)`,transformOrigin:`50%`}}),k=e=>{let{componentCls:t,iconCls:n,antCls:r,badgeShadowSize:i,textFontSize:a,textFontSizeSM:s,statusSize:c,dotSize:l,textFontWeight:u,indicatorHeight:d,indicatorHeightSM:f,marginXS:p,calc:g}=e,_=`${r}-scroll-number`,v=h(e,(e,{darkColor:n})=>({[`&${t} ${t}-color-${e}`]:{background:n,[`&:not(${t}-count)`]:{color:n},"a:hover &":{background:n}}}));return{[t]:{...m(e),position:`relative`,display:`inline-block`,width:`fit-content`,lineHeight:1,[`${t}-count`]:{display:`inline-flex`,justifyContent:`center`,zIndex:e.indicatorZIndex,minWidth:d,height:d,color:e.badgeTextColor,fontWeight:u,fontSize:a,lineHeight:o(d),whiteSpace:`nowrap`,textAlign:`center`,background:e.badgeColor,borderRadius:g(d).div(2).equal(),boxShadow:`0 0 0 ${o(i)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:f,height:f,fontSize:s,lineHeight:o(f),borderRadius:g(f).div(2).equal()},[`${t}-multiple-words`]:{paddingInline:e.paddingInline,bdi:{unicodeBidi:`plaintext`}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:l,minWidth:l,height:l,background:e.badgeColor,borderRadius:`100%`,boxShadow:`0 0 0 ${o(i)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${_}-custom-component`]:{position:`absolute`,top:0,insetInlineEnd:0,transform:`translate(50%, -50%)`,transformOrigin:`100% 0%`,[`&${n}-spin`]:{animationName:O,animationDuration:`1s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`}},[`&${t}-status`]:{lineHeight:`inherit`,verticalAlign:`baseline`,[`${t}-status-dot`]:{position:`relative`,top:-1,display:`inline-block`,width:c,height:c,verticalAlign:`middle`,borderRadius:`50%`},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:`visible`,color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:`currentcolor`,"&::after":{position:`absolute`,top:0,insetInlineStart:0,width:`100%`,height:`100%`,borderWidth:i,borderStyle:`solid`,borderColor:`inherit`,borderRadius:`50%`,animationName:C,animationDuration:e.badgeProcessingDuration,animationIterationCount:`infinite`,animationTimingFunction:`ease-in-out`,content:`""`}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:p,color:e.colorText,fontSize:e.fontSize}},...v,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:w,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:`both`},[`${t}-zoom-leave`]:{animationName:T,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:`both`},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:E,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:D,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:`middle`},[`${_}-custom-component, ${t}-count`]:{transform:`none`},[`${_}-custom-component, ${_}`]:{position:`relative`,top:`auto`,display:`block`,transformOrigin:`50% 50%`}},[_]:{overflow:`hidden`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${_}-only`]:{position:`relative`,display:`inline-block`,height:d,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`,[`> p${_}-only-unit`]:{height:d,margin:0,WebkitTransformStyle:`preserve-3d`,WebkitBackfaceVisibility:`hidden`}},[`${_}-symbol`]:{verticalAlign:`top`}},"&-rtl":{direction:`rtl`,[`${t}-count, ${t}-dot, ${_}-custom-component`]:{transform:`translate(-50%, -50%)`}}}}},A=e=>{let{fontHeight:t,lineWidth:n,marginXS:r,colorBorderBg:i}=e,o=t,s=n,c=e.colorTextLightSolid,l=e.colorError,u=e.colorErrorHover;return a(e,{badgeFontHeight:o,badgeShadowSize:s,badgeTextColor:c,badgeColor:l,badgeColorHover:u,badgeShadowColor:i,badgeProcessingDuration:`1.2s`,badgeRibbonOffset:r,badgeRibbonCornerTransform:`scaleY(0.75)`,badgeRibbonCornerFilter:`brightness(75%)`})},j=e=>{let{fontSize:t,lineHeight:n,fontSizeSM:r,lineWidth:i,paddingXS:a}=e;return{indicatorZIndex:`auto`,indicatorHeight:Math.round(t*n)-2*i,indicatorHeightSM:t,dotSize:r/2,textFontSize:r,textFontSizeSM:r,textFontWeight:`normal`,statusSize:r/2,paddingInline:a}},M=g(`Badge`,e=>k(A(e)),j),N=v.forwardRef((r,i)=>{let{prefixCls:a,scrollNumberPrefixCls:o,children:s,status:c,text:m,color:h,count:g=null,overflowCount:y=99,dot:b=!1,size:x=`medium`,title:C,offset:w,style:T,className:E,rootClassName:D,classNames:O,styles:k,showZero:A=!1,...j}=r,{getPrefixCls:N,direction:P,className:F,style:I,classNames:L,styles:ee}=d(`badge`),R=N(`badge`,a),[te,ne]=M(R),re={...r,overflowCount:y,size:x,dot:b,showZero:A},[z,B]=f([L,O],[ee,k],{props:re}),V=g>y?`${y}+`:g,H=V===`0`||V===0||m===`0`||m===0,U=g===null||H&&!A,W=(p(c)||p(h))&&U,ie=p(c)||!H,G=b&&!H,K=G?``:V,q=(0,v.useMemo)(()=>((!p(K)||K===``)&&(!p(m)||m===``)||H&&!A)&&!G,[K,H,A,G,m]),J=(0,v.useRef)(g);q||(J.current=g);let Y=J.current,ae=(0,v.useRef)(K);q||(ae.current=K);let X=ae.current,oe=(0,v.useRef)(G);q||(oe.current=G);let Z=(0,v.useMemo)(()=>{if(!w)return{...I,...T};let e=Number.parseInt(w[0],10);return{marginTop:w[1],insetInlineEnd:-e,...I,...T}},[w,T,I]),se=C??(typeof Y==`string`||u(Y)?Y:void 0),ce=!q&&(m===0?A:!!m&&m!==!0),le=ce?v.createElement(`span`,{className:`${R}-status-text`},m):null,ue=e(Y)?n(Y,e=>({style:{...Z,...e.style}})):void 0,Q=l(h,!1),de=t(z.indicator,{[`${R}-status-dot`]:W,[`${R}-status-${c}`]:!!c,[`${R}-color-${h}`]:Q}),$={};h&&!Q&&($.color=h,$.background=h);let fe=t(R,{[`${R}-status`]:W,[`${R}-not-a-wrapper`]:!s,[`${R}-rtl`]:P===`rtl`},E,D,F,z.root,te,ne);if(!s&&W&&(m||ie||!U)){let e=Z.color;return v.createElement(`span`,{ref:i,...j,className:fe,style:{...B.root,...Z}},v.createElement(`span`,{className:de,style:{...B.indicator,...$}}),ce&&v.createElement(`span`,{style:{color:e},className:`${R}-status-text`},m))}return v.createElement(`span`,{ref:i,...j,className:fe,style:B.root},s,v.createElement(_,{visible:!q,motionName:`${R}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:e})=>{let n=N(`scroll-number`,o),r=oe.current,i=t(z.indicator,{[`${R}-dot`]:r,[`${R}-count`]:!r,[`${R}-count-sm`]:x===`small`,[`${R}-multiple-words`]:!r&&X&&X.toString().length>1,[`${R}-status-${c}`]:!!c,[`${R}-color-${h}`]:Q}),a={...B.indicator,...Z};return h&&!Q&&(a||={},a.background=h),v.createElement(S,{prefixCls:n,show:!q,motionClassName:e,className:i,count:X,title:se,style:a,key:`scrollNumber`},ue)}),le)}),P=e=>{let{antCls:t,badgeFontHeight:n,marginXS:r,badgeRibbonOffset:i,calc:a}=e,s=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,l=h(e,(e,{darkColor:t})=>({[`&${s}-color-${e}`]:{background:t,color:t}}));return{[c]:{position:`relative`},[s]:{...m(e),position:`absolute`,top:r,padding:`0 ${o(e.paddingXS)}`,color:e.colorPrimary,lineHeight:o(n),whiteSpace:`nowrap`,backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${s}-content`]:{color:e.badgeTextColor},[`${s}-corner`]:{position:`absolute`,top:`100%`,width:i,height:i,color:`currentcolor`,border:`${o(a(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:`top`,filter:e.badgeRibbonCornerFilter},...l,[`&${s}-placement-end`]:{insetInlineEnd:a(i).mul(-1).equal(),borderEndEndRadius:0,[`${s}-corner`]:{insetInlineEnd:0,borderInlineEndColor:`transparent`,borderBlockEndColor:`transparent`}},[`&${s}-placement-start`]:{insetInlineStart:a(i).mul(-1).equal(),borderEndStartRadius:0,[`${s}-corner`]:{insetInlineStart:0,borderBlockEndColor:`transparent`,borderInlineStartColor:`transparent`}},"&-rtl":{direction:`rtl`}}}},F=g([`Badge`,`Ribbon`],e=>P(A(e)),j),I=e=>{let{className:n,prefixCls:r,style:i,color:a,children:o,text:s,placement:c=`end`,rootClassName:u,styles:p,classNames:m}=e,{getPrefixCls:h,direction:g,className:_,style:y,classNames:b,styles:x}=d(`ribbon`),S=h(`ribbon`,r),C=`${S}-wrapper`,[w,T]=F(S,C),E={...e,placement:c},[D,O]=f([b,m],[x,p],{props:E}),k=l(a,!1),A=t(S,`${S}-placement-${c}`,{[`${S}-rtl`]:g===`rtl`,[`${S}-color-${a}`]:k},n,_,D.indicator),j={},M={};return a&&!k&&(j.background=a,M.color=a),v.createElement(`div`,{className:t(C,u,w,T,D.root),style:O.root},o,v.createElement(`div`,{className:t(A,w),style:{...j,...O.indicator,...y,...i}},v.createElement(`span`,{className:t(`${S}-content`,D.content),style:O.content},s),v.createElement(`div`,{className:`${S}-corner`,style:M})))},L=N;L.Ribbon=I;export{L as t}; \ No newline at end of file diff --git a/public/assets/base-layout-DQ91AFp0.js b/public/assets/base-layout-DQ91AFp0.js deleted file mode 100644 index 7a34dfd..0000000 --- a/public/assets/base-layout-DQ91AFp0.js +++ /dev/null @@ -1 +0,0 @@ -import{r as n,z as ie,G as oe,H as ce,J as de,K as me,L as w,M as xe,N as fe,O as he,P as pe,j as e,T as S,S as H,B as b,Q as I,d as P,U as F,V as ue,W as je,X as ye,a as z,C as y,A as ge}from"./index-B-sDl1ER.js";import{C as g}from"./index-CO5DzGxy.js";import{F as M}from"./index-Bc7ikhKh.js";import{T as E}from"./index-C9m5qSM4.js";import{D as v}from"./index-VkcAtM9X.js";import{P as R}from"./progress-C__thZ4V.js";const ve=s=>{const{value:t,formatter:l,precision:i,decimalSeparator:x,groupSeparator:f="",prefixCls:d}=s;let a;if(typeof l=="function")a=l(t);else{const r=String(t),m=r.match(/^(-?)(\d*)(\.(\d+))?$/);if(!m||r==="-")a=r;else{const u=m[1];let h=m[2]||"0",c=m[4]||"";h=h.replace(/\B(?=(\d{3})+(?!\d))/g,f),typeof i=="number"&&(c=c.padEnd(i,"0").slice(0,i>0?i:0)),c&&(c=`${x}${c}`),a=[n.createElement("span",{key:"int",className:`${d}-content-value-int`},u,h),c&&n.createElement("span",{key:"decimal",className:`${d}-content-value-decimal`},c)]}}return n.createElement("span",{className:`${d}-content-value`},a)},Se=s=>{const{componentCls:t,marginXXS:l,padding:i,colorTextDescription:x,titleFontSize:f,colorTextHeading:d,contentFontSize:a,fontFamily:r}=s;return{[t]:{...ce(s),[`${t}-header`]:{paddingBottom:l,[`${t}-title`]:{color:x,fontSize:f}},[`${t}-skeleton`]:{paddingTop:i},[`${t}-content`]:{color:d,fontSize:a,fontFamily:r,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:l},[`${t}-content-suffix`]:{marginInlineStart:l}}}}},be=s=>{const{fontSizeHeading3:t,fontSize:l}=s;return{titleFontSize:l,contentFontSize:t}},Te=ie("Statistic",s=>{const t=oe(s,{});return Se(t)},be),T=n.forwardRef((s,t)=>{const{prefixCls:l,className:i,rootClassName:x,style:f,valueStyle:d,value:a=0,title:r,valueRender:m,prefix:u,suffix:h,loading:c=!1,formatter:o,precision:j,decimalSeparator:C=".",groupSeparator:k=",",onMouseEnter:A,onMouseLeave:W,styles:K,classNames:U,...V}=s,{getPrefixCls:X,direction:G,className:J,style:O,classNames:Q,styles:Y}=de("statistic"),p=X("statistic",l),[Z,_]=Te(p),q={...s,decimalSeparator:C,groupSeparator:k,loading:c,value:a},[N,$]=me([Q,U],[Y,K],{props:q}),B=n.createElement(ve,{decimalSeparator:C,groupSeparator:k,prefixCls:p,formatter:o,precision:j,value:a}),ee=w(p,{[`${p}-rtl`]:G==="rtl"},J,i,x,N.root,Z,_),te=w(`${p}-header`,N.header),se=w(`${p}-title`,N.title),ne=w(`${p}-content`,N.content),re=w(`${p}-content-prefix`,N.prefix),le=w(`${p}-content-suffix`,N.suffix),D=n.useRef(null);n.useImperativeHandle(t,()=>({nativeElement:D.current}));const ae=xe(V,{aria:!0,data:!0});return n.createElement("div",{...ae,className:ee,style:{...$.root,...O,...f},ref:D,onMouseEnter:A,onMouseLeave:W},r&&n.createElement("div",{className:te,style:$.header},n.createElement("div",{className:se,style:$.title},r)),n.createElement(fe,{paragraph:!1,loading:c,className:`${p}-skeleton`,active:!0},n.createElement("div",{className:ne,style:{...d,...$.content}},u&&n.createElement("span",{className:re,style:$.prefix},u),m?m(B):B,h&&n.createElement("span",{className:le,style:$.suffix},h))))}),Ce=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Ne(s,t){let l=s;const i=/\[[^\]]*]/g,x=(t.match(i)||[]).map(r=>r.slice(1,-1)),f=t.replace(i,"[]"),d=Ce.reduce((r,[m,u])=>{if(r.includes(m)){const h=Math.floor(l/u);return l-=h*u,r.replace(new RegExp(`${m}+`,"g"),c=>{const o=c.length;return h.toString().padStart(o,"0")})}return r},f);let a=0;return d.replace(i,()=>{const r=x[a];return a+=1,r})}function $e(s,t,l){const{format:i=""}=t,x=new Date(s).getTime(),f=Date.now(),d=Math.max(l?x-f:f-x,0);return Ne(d,i)}const we=1e3/60;function Ee(s){return new Date(s).getTime()}const L=s=>{const{value:t,format:l="HH:mm:ss",onChange:i,onFinish:x,type:f,...d}=s,a=f==="countdown",[r,m]=n.useState(null),u=he(()=>{const o=Date.now(),j=Ee(t);m({});const C=a?j-o:o-j;return i?.(C),a&&j{let o;const j=()=>{u()||window.clearInterval(o)},C=()=>{o=window.setInterval(j,we)},k=()=>{window.clearInterval(o)};return C(),()=>{k()}},[t,a]),n.useEffect(()=>{m({})},[]);const h=(o,j)=>r?$e(o,{...j,format:l},a):"-",c=o=>pe(o,{title:void 0});return n.createElement(T,{...d,value:t,valueRender:c,formatter:h})},ke=s=>n.createElement(L,{...s,type:"countdown"}),Ie=n.memo(ke);T.Timer=L;T.Countdown=Ie;const{Title:ze}=S,Me=()=>e.jsxs("div",{style:{minHeight:"100vh"},children:[e.jsx(g,{variant:"borderless",style:{marginBottom:20},children:e.jsxs(M,{justify:"space-between",align:"center",children:[e.jsxs("div",{children:[e.jsx(ze,{level:3,style:{marginBottom:4},children:"页面标题"}),e.jsx(S.Text,{type:"secondary",children:"这是页面的描述信息,可以简要说明页面用途"})]}),e.jsxs(H,{style:{height:"100%"},children:[e.jsx(b,{icon:e.jsx(I,{}),children:"操作一"}),e.jsx(b,{icon:e.jsx(P,{}),children:"操作二"}),e.jsx(b,{type:"primary",icon:e.jsx(F,{}),children:"主要操作"}),e.jsx(ue,{trigger:["click"],menu:{items:[{label:"导出数据",key:"1",icon:e.jsx(ye,{})},{label:"批量操作",key:"2"},{label:"更多设置",key:"3"}]},children:e.jsx(b,{style:{padding:"0 8px"},children:e.jsx(je,{style:{fontSize:18}})})})]})]})}),e.jsxs(z,{gutter:[16,16],style:{marginBottom:24},children:[e.jsx(y,{xs:24,sm:12,lg:6,children:e.jsxs(g,{variant:"borderless",children:[e.jsx(T,{title:"总用户数",value:11893,prefix:e.jsx(I,{style:{color:"#1677ff"}}),valueStyle:{color:"#1677ff"}}),e.jsxs("div",{style:{marginTop:12},children:[e.jsx(E,{color:"success",children:"+12.5%"}),e.jsx(S.Text,{type:"secondary",style:{fontSize:12},children:"较上周"})]})]})}),e.jsx(y,{xs:24,sm:12,lg:6,children:e.jsxs(g,{variant:"borderless",children:[e.jsx(T,{title:"活跃用户",value:8234,prefix:e.jsx(P,{style:{color:"#52c41a"}}),valueStyle:{color:"#52c41a"}}),e.jsxs("div",{style:{marginTop:12},children:[e.jsx(E,{color:"success",children:"+8.2%"}),e.jsx(S.Text,{type:"secondary",style:{fontSize:12},children:"较上周"})]})]})}),e.jsx(y,{xs:24,sm:12,lg:6,children:e.jsxs(g,{variant:"borderless",children:[e.jsx(T,{title:"总订单",value:32567,prefix:e.jsx(F,{style:{color:"#faad14"}}),valueStyle:{color:"#faad14"}}),e.jsxs("div",{style:{marginTop:12},children:[e.jsx(E,{color:"warning",children:"+5.3%"}),e.jsx(S.Text,{type:"secondary",style:{fontSize:12},children:"较上周"})]})]})}),e.jsx(y,{xs:24,sm:12,lg:6,children:e.jsxs(g,{variant:"borderless",children:[e.jsx(T,{title:"总收入",value:98234,prefix:"¥",valueStyle:{color:"#f5222d"}}),e.jsxs("div",{style:{marginTop:12},children:[e.jsx(E,{color:"error",children:"-2.1%"}),e.jsx(S.Text,{type:"secondary",style:{fontSize:12},children:"较上周"})]})]})})]}),e.jsxs(g,{variant:"borderless",tabList:[{label:"基本信息",key:"base"},{label:"详细信息",key:"info"},{label:"数据分析",key:"analysis"}],activeTabKey:"base",children:[e.jsxs(z,{gutter:[16,16],style:{marginBottom:24},children:[e.jsx(y,{xs:24,lg:24,children:e.jsx(g,{title:e.jsxs("span",{children:[e.jsx(I,{style:{marginRight:8}}),"用户信息概览"]}),style:{background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",color:"#fff",borderRadius:8},styles:{header:{color:"#fff",borderBottom:"1px solid rgba(255,255,255,0.2)"}},children:e.jsxs(z,{gutter:[16,16],children:[e.jsx(y,{span:6,children:e.jsx(ge,{size:64,icon:e.jsx(I,{})})}),e.jsxs(y,{span:18,children:[e.jsx(S.Title,{level:5,style:{color:"#fff",marginTop:0},children:"张三 / Zhang San"}),e.jsx(S.Text,{style:{color:"rgba(255,255,255,0.85)"},children:"高级管理员 · 北京市朝阳区 · 在职"})]})]})})}),e.jsx(y,{xs:24,lg:16,children:e.jsx(g,{title:"详细信息",style:{height:"100%",borderRadius:8},children:e.jsxs(v,{column:{xs:1,sm:2},children:[e.jsx(v.Item,{label:"用户名",children:"zhangsan"}),e.jsx(v.Item,{label:"手机号",children:"138****8888"}),e.jsx(v.Item,{label:"邮箱",children:"zhangsan@example.com"}),e.jsx(v.Item,{label:"部门",children:"技术部"}),e.jsx(v.Item,{label:"职位",children:"高级工程师"}),e.jsx(v.Item,{label:"入职时间",children:"2023-01-15"}),e.jsx(v.Item,{label:"状态",children:e.jsx(E,{color:"success",children:"正常"})}),e.jsx(v.Item,{label:"权限等级",children:e.jsx(E,{color:"blue",children:"管理员"})})]})})}),e.jsx(y,{xs:24,lg:8,children:e.jsxs(g,{title:"任务完成度",style:{height:"100%",borderRadius:8},children:[e.jsxs("div",{style:{marginBottom:20},children:[e.jsxs("div",{style:{marginBottom:8},children:[e.jsx("span",{children:"本周任务"}),e.jsx("span",{style:{float:"right",fontWeight:600},children:"75%"})]}),e.jsx(R,{percent:75,strokeColor:"#52c41a"})]}),e.jsxs("div",{style:{marginBottom:20},children:[e.jsxs("div",{style:{marginBottom:8},children:[e.jsx("span",{children:"本月目标"}),e.jsx("span",{style:{float:"right",fontWeight:600},children:"60%"})]}),e.jsx(R,{percent:60,strokeColor:"#1677ff"})]}),e.jsxs("div",{children:[e.jsxs("div",{style:{marginBottom:8},children:[e.jsx("span",{children:"年度KPI"}),e.jsx("span",{style:{float:"right",fontWeight:600},children:"45%"})]}),e.jsx(R,{percent:45,strokeColor:"#faad14"})]})]})})]}),e.jsxs(M,{justify:"space-between",align:"center",children:[e.jsxs(H,{children:[e.jsx(b,{size:"large",children:"重置"}),e.jsx(b,{type:"primary",size:"large",children:"保存"}),e.jsx(b,{type:"primary",size:"large",ghost:!0,children:"提交审核"})]}),e.jsx(S.Text,{type:"secondary",children:"最后更新时间: 2026-01-01 10:30:00"})]})]})]});export{Me as default}; diff --git a/public/assets/bid-ptvdckPQ.js b/public/assets/bid-ptvdckPQ.js new file mode 100644 index 0000000..66bbfea --- /dev/null +++ b/public/assets/bid-ptvdckPQ.js @@ -0,0 +1 @@ +import{Ca as e,Ea as t,c as n,hn as r,rt as i,s as a,t as o}from"./index-DThTpSPU.js";import{t as s}from"./XinTable-D_6_7i3V.js";e();var c=t(r(),1),l=t(o(),1),u=a(),{Title:d,Text:f}=i;c.default.extend(l.default);var p=()=>{let{t:e}=n(),t={api:`/task/bid`,columns:[{title:e(`task.bid.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:e(`task.bid.task_id`),dataIndex:`task_id`,valueType:`text`,align:`center`},{title:e(`task.bid.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`},{title:e(`task.bid.price`),dataIndex:`price`,hideInForm:!0,align:`center`,render:e=>`¥${e||`0.00`}`},{title:e(`task.bid.message`),dataIndex:`message`,valueType:`text`,align:`center`},{title:e(`task.bid.status`),dataIndex:`status`,valueType:`text`,align:`center`},{title:e(`task.bid.accepted_at`),dataIndex:`accepted_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,c.default)(e).fromNow():`-`},{title:e(`task.bid.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,c.default)(e).fromNow():`-`},{title:e(`task.bid.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,c.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`task.bid`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`mb-5`,children:[(0,u.jsx)(d,{level:3,children:e(`task.bid.page.title`)}),(0,u.jsx)(f,{type:`secondary`,children:e(`task.bid.page.description`)})]}),(0,u.jsx)(s,{...t})]})};export{p as default}; \ No newline at end of file diff --git a/public/assets/card-BDbI8Gdq.js b/public/assets/card-BDbI8Gdq.js new file mode 100644 index 0000000..60dbc6f --- /dev/null +++ b/public/assets/card-BDbI8Gdq.js @@ -0,0 +1,10 @@ +import{t as e}from"./tabs-B0pGTc5N.js";import{Bi as t,Ca as n,Ea as r,Ei as i,Fi as a,Ki as o,Li as s,Ri as c,Yi as l,Yr as u,_i as d,di as f,ir as p,pi as m,qn as h,wr as g,yi as _}from"./index-DThTpSPU.js";var v=r(n()),y=({prefixCls:e,className:n,hoverable:r=!0,...i})=>{let{getPrefixCls:a}=v.useContext(s),o=a(`card`,e),c=t(`${o}-grid`,n,{[`${o}-grid-hoverable`]:r});return v.createElement(`div`,{...i,className:c})},b=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:o}=e;return{display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${a(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`,...m(),"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":{display:`inline-block`,flex:1,..._,[` + > ${n}-typography, + > ${n}-typography-edit-content + `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:`both`,marginBottom:o,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${a(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},x=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:` + ${a(i)} 0 0 0 ${n}, + 0 ${a(i)} 0 0 ${n}, + ${a(i)} ${a(i)} 0 0 ${n}, + ${a(i)} 0 0 0 ${n} inset, + 0 ${a(i)} 0 0 ${n} inset; + `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},S=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:s}=e;return{margin:0,padding:0,listStyle:`none`,background:s,borderTop:`${a(e.lineWidth)} ${e.lineType} ${o}`,display:`flex`,borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`,...m(),"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:a(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:a(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${a(e.lineWidth)} ${e.lineType} ${o}`}}}},C=e=>({margin:`${a(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`,...m(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,..._},"&-description":{color:e.colorTextDescription}}),w=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${a(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${a(e.padding)} ${a(i)}`}}},T=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},E=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:s,extraColor:c,motionDurationMid:l}=e;return{[t]:{...d(e),position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:b(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:c,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:x(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:S(e),[`${t}-meta`]:C(e)},[`${t}-bordered`]:{border:`${a(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:[`box-shadow`,`border-color`].map(e=>`${e} ${l}`).join(`, `),"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${a(e.borderRadiusLG)} ${a(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:w(e),[`${t}-loading`]:T(e),[`${t}-rtl`]:{direction:`rtl`}}},D=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${a(r)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},O=f(`Card`,e=>{let t=i(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[E(t),D(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),k=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return v.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return v.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},v.createElement(`span`,null,e))}))},A=v.forwardRef((n,r)=>{let{prefixCls:i,className:a,rootClassName:s,style:d,extra:f,headStyle:m={},bodyStyle:_={},title:b,loading:x,bordered:S,variant:C,size:w,type:T,cover:E,actions:D,tabList:A,children:j,activeTabKey:M,defaultActiveTabKey:N,tabBarExtraContent:P,hoverable:F,tabProps:I={},classNames:L,styles:ee,...te}=n,{getPrefixCls:ne,direction:re,className:ie,style:R,classNames:z,styles:B}=c(`card`),[V]=h(`card`,C,S),H=g(w),U={...n,size:H,variant:V},[W,G]=u([z,L],[B,ee],{props:U}),K=e=>{n.onTabChange?.(e)},q=v.useMemo(()=>o(j),[j]),J=v.useMemo(()=>q.some(e=>v.isValidElement(e)&&e.type===y),[q]),Y=ne(`card`,i),[ae,oe]=O(Y),se=v.createElement(p,{loading:!0,active:!0,paragraph:{rows:4},title:!1},j),X=M!==void 0,ce={...I,[X?`activeKey`:`defaultActiveKey`]:X?M:N,tabBarExtraContent:P},Z,le=H===`small`?H:`large`,Q=A?v.createElement(e,{size:le,...ce,className:`${Y}-head-tabs`,onChange:K,items:A.map(({tab:e,...t})=>({label:e,...t}))}):null;if(b||f||Q){let e=t(`${Y}-head`,W.header),n=t(`${Y}-head-title`,W.title),r=t(`${Y}-extra`,W.extra),i={...m,...G.header};Z=v.createElement(`div`,{className:e,style:i},v.createElement(`div`,{className:`${Y}-head-wrapper`},b&&v.createElement(`div`,{className:n,style:G.title},b),f&&v.createElement(`div`,{className:r,style:G.extra},f)),Q)}let ue=t(`${Y}-cover`,W.cover),de=E?v.createElement(`div`,{className:ue,style:G.cover},E):null,fe=t(`${Y}-body`,W.body),pe={..._,...G.body},$=x||q.length?v.createElement(`div`,{className:fe,style:pe},x?se:j):null,me=t(`${Y}-actions`,W.actions),he=D?.length?v.createElement(k,{actionClasses:me,actionStyle:G.actions,actions:D}):null,ge=l(te,[`onTabChange`]),_e=t(Y,ie,{[`${Y}-loading`]:x,[`${Y}-bordered`]:V!==`borderless`,[`${Y}-hoverable`]:F,[`${Y}-contain-grid`]:J,[`${Y}-contain-tabs`]:A?.length,[`${Y}-small`]:H===`small`,[`${Y}-type-${T}`]:!!T,[`${Y}-rtl`]:re===`rtl`},a,s,ae,oe,W.root),ve={...G.root,...R,...d};return v.createElement(`div`,{ref:r,...ge,className:_e,style:ve},Z,de,$,he)}),j=e=>{let{prefixCls:n,className:r,avatar:i,title:a,description:o,style:s,classNames:l,styles:d,...f}=e,{getPrefixCls:p,className:m,style:h,classNames:g,styles:_}=c(`cardMeta`),y=`${p(`card`,n)}-meta`,[b,x]=u([g,l],[_,d],{props:e}),S=t(y,r,m,b.root),C={...h,...x.root,...s},w=t(`${y}-avatar`,b.avatar),T=t(`${y}-title`,b.title),E=t(`${y}-description`,b.description),D=t(`${y}-section`,b.section),O=i?v.createElement(`div`,{className:w,style:x.avatar},i):null,k=a?v.createElement(`div`,{className:T,style:x.title},a):null,A=o?v.createElement(`div`,{className:E,style:x.description},o):null,j=k||A?v.createElement(`div`,{className:D,style:x.section},k,A):null;return v.createElement(`div`,{...f,className:S,style:C},O,j)},M=A;M.Grid=y,M.Meta=j;export{M as t}; \ No newline at end of file diff --git a/public/assets/category-B5H_1gLw.js b/public/assets/category-B5H_1gLw.js new file mode 100644 index 0000000..ffbcbe2 --- /dev/null +++ b/public/assets/category-B5H_1gLw.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/forum/category`,columns:[{title:t(`forum.category.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`forum.category.name`),dataIndex:`name`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`forum.category.name.required`)}]},{title:t(`forum.category.slug`),dataIndex:`slug`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`forum.category.slug.required`)}]},{title:t(`forum.category.parent_id`),dataIndex:`parent_id`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.category.description`),dataIndex:`description`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.category.icon`),dataIndex:`icon`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.category.sort`),dataIndex:`sort`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.category.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`forum.category.status.0`)},{value:1,label:t(`forum.category.status.1`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`forum.category.status.1`)}):(0,d.jsx)(e,{color:`error`,children:t(`forum.category.status.0`)}),filters:[{text:t(`forum.category.status.0`),value:0},{text:t(`forum.category.status.1`),value:1}],align:`center`},{title:t(`forum.category.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`forum.category.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`forum.category`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:600},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`forum.category.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`forum.category.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/category-C9AAglcu.js b/public/assets/category-C9AAglcu.js new file mode 100644 index 0000000..888244a --- /dev/null +++ b/public/assets/category-C9AAglcu.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/merchant/category`,columns:[{title:t(`merchant.category.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`merchant.category.name`),dataIndex:`name`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`merchant.category.name.required`)}]},{title:t(`merchant.category.slug`),dataIndex:`slug`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`merchant.category.slug.required`)}]},{title:t(`merchant.category.description`),dataIndex:`description`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`merchant.category.sort`),dataIndex:`sort`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`merchant.category.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`merchant.category.status.0`)},{value:1,label:t(`merchant.category.status.1`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`merchant.category.status.1`)}):(0,d.jsx)(e,{color:`error`,children:t(`merchant.category.status.0`)}),filters:[{text:t(`merchant.category.status.0`),value:0},{text:t(`merchant.category.status.1`),value:1}],align:`center`},{title:t(`merchant.category.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`merchant.category.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`merchant.category`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:600},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`merchant.category.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`merchant.category.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/category-DsDU92RH.js b/public/assets/category-DsDU92RH.js new file mode 100644 index 0000000..b6a2ce6 --- /dev/null +++ b/public/assets/category-DsDU92RH.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/task/category`,columns:[{title:t(`task.category.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`task.category.name`),dataIndex:`name`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`task.category.name.required`)}]},{title:t(`task.category.slug`),dataIndex:`slug`,valueType:`text`,align:`center`,required:!0,rules:[{required:!0,message:t(`task.category.slug.required`)}]},{title:t(`task.category.description`),dataIndex:`description`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`task.category.icon`),dataIndex:`icon`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`task.category.form_schema`),dataIndex:`form_schema`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`task.category.sort`),dataIndex:`sort`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`task.category.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`task.category.status.0`)},{value:1,label:t(`task.category.status.1`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`task.category.status.1`)}):(0,d.jsx)(e,{color:`error`,children:t(`task.category.status.0`)}),filters:[{text:t(`task.category.status.0`),value:0},{text:t(`task.category.status.1`),value:1}],align:`center`},{title:t(`task.category.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`task.category.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`task.category`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:600},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`task.category.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`task.category.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/chat-btezQoJY.css b/public/assets/chat-btezQoJY.css new file mode 100644 index 0000000..58d6cc8 --- /dev/null +++ b/public/assets/chat-btezQoJY.css @@ -0,0 +1 @@ +.x-markdown-debug-panel{z-index:9999;color:#fff;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);-webkit-user-select:none;user-select:none;background:#000000d9;border-radius:8px;width:180px;padding:12px;font-family:SF Mono,Monaco,Inconsolata,Fira Mono,Droid Sans Mono,Source Code Pro,monospace;font-size:12px;transition:box-shadow .2s;position:fixed;right:0;box-shadow:0 2px 8px #00000026}.x-markdown-debug-panel:hover{box-shadow:0 4px 12px #00000040}.x-markdown-debug-row{align-items:center;gap:8px;margin-bottom:8px;display:flex}.x-markdown-debug-row:last-child{margin-bottom:0}.x-markdown-debug-label{color:#ffffffa6;min-width:60px;font-weight:500}.x-markdown-debug-value{text-align:right;min-width:50px;font-weight:600}.x-markdown-debug-chart{margin-left:auto}.x-markdown-debug-actions{border-top:1px solid #ffffff1a;gap:8px;margin-top:12px;padding-top:12px;display:flex}.x-markdown-debug-action{color:#fff;cursor:pointer;background:#ffffff1a;border:1px solid #fff3;border-radius:4px;flex:1;padding:6px 12px;font-family:inherit;font-size:11px;font-weight:500;transition:all .2s}.x-markdown-debug-action:hover{background:#ffffff26;border-color:#ffffff4d}.x-markdown-debug-action:active{transform:scale(.98)}.x-markdown-debug-record-btn.recording{background:#ff4d4f33;border-color:#ff4d4f;animation:1.5s ease-in-out infinite recording-pulse}@keyframes recording-pulse{0%,to{box-shadow:0 0 #ff4d4f66}50%{box-shadow:0 0 0 8px #ff4d4f00}}.x-markdown-debug-modal-overlay{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:10000;background:#000000bf;justify-content:center;align-items:center;animation:.2s ease-out fadeIn;display:flex;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.x-markdown-debug-modal{background:#1e1e1ef2;border:1px solid #ffffff1a;border-radius:12px;max-width:90vw;max-height:90vh;animation:.3s ease-out slideIn;overflow:auto;box-shadow:0 8px 32px #0006}@keyframes slideIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.x-markdown-debug-modal-header{border-bottom:1px solid #ffffff1a;justify-content:space-between;align-items:center;padding:20px 24px;display:flex}.x-markdown-debug-close-btn{color:#fff;cursor:pointer;background:#ffffff1a;border:none;border-radius:6px;justify-content:center;align-items:center;width:32px;height:32px;font-size:18px;transition:all .2s;display:flex}.x-markdown-debug-close-btn:hover{background:#ff4d4f4d}.x-markdown-debug-modal-content{padding:24px}.x-markdown-debug-stats-summary{grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px;display:grid}.x-markdown-debug-stat-item{background:#ffffff0d;border:1px solid #ffffff1a;border-radius:8px;padding:16px}.x-markdown-debug-stat-label{color:#fff9;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px;font-size:11px}.x-markdown-debug-stat-value{color:#fff;font-size:20px;font-weight:700}.x-markdown-debug-chart-full{background:#ffffff05;border:1px solid #ffffff1a;border-radius:8px}.x-markdown-debug-chart-full .fps-line,.x-markdown-debug-chart-full .memory-line{filter:drop-shadow(0 0 4px)}.x-markdown-debug-legend{justify-content:center;gap:24px;margin-top:16px;display:flex}.x-markdown-debug-legend-item{color:#fffc;align-items:center;gap:8px;font-size:13px;display:flex}.x-markdown-debug-legend-color{border-radius:2px;width:12px;height:12px}@media (width<=768px){.x-markdown-debug-stats-summary{grid-template-columns:repeat(2,1fr)}}@keyframes x-markdown-fade-in{0%{opacity:0}to{opacity:1}}.x-markdown{--text-color:inherit;--font-size:inherit;--margin-block:0 0 1em 0;--td-th-padding:.85em 1em;--pre-th-td-padding:2px 0;--border-font-weight:600;--padding-ul-ol:0 0 0 1em;--margin-ul-ol:0 0 1em 1.8em;--margin-li:.25em 0;--margin-pre:1em 0;--padding-code-inline:.2em .4em;--margin-code-inline:0 .2em;--code-inline-text:.85em;--small-border-radius:2px;--image-margin:.5em 0;--hr-margin:1.5em 0;--table-margin:1em 0;font-size:var(--font-size);width:100%;color:var(--text-color);line-height:1.57143}xmd-tail{display:inline}.xmd-tail{color:inherit;font-size:inherit;line-height:inherit}.x-markdown p,.x-markdown div,.x-markdown span,.x-markdown li{word-break:break-word;overflow-wrap:break-word}.x-markdown pre,.x-markdown code{word-break:break-word;overflow-wrap:break-word;white-space:pre-wrap}.x-markdown th,.x-markdown td{padding:var(--td-th-padding)}.x-markdown th{font-weight:var(--border-font-weight)}.x-markdown pre table{box-shadow:none}.x-markdown pre td,.x-markdown pre th{padding:var(--pre-th-td-padding);text-align:left;border:none}.x-markdown p{margin:var(--margin-block)}.x-markdown p:first-child{margin-top:0}.x-markdown p:last-child{margin-bottom:0}.x-markdown ul,.x-markdown ol{margin:var(--margin-ul-ol);padding:var(--padding-ul-ol)}.x-markdown ul:first-child,.x-markdown ol:first-child{margin-top:0}.x-markdown ul:last-child,.x-markdown ol:last-child{margin-bottom:0}.x-markdown ol>li{list-style:decimal}.x-markdown ul>li{list-style:outside}.x-markdown li{margin:var(--margin-li)}.x-markdown li:first-child{margin-top:0}.x-markdown li:last-child{margin-bottom:0}.x-markdown pre{margin:var(--margin-pre);overflow-x:auto}.x-markdown pre:first-child{margin-top:0}.x-markdown pre:last-child{margin-bottom:0}.x-markdown code{padding:var(--padding-code-inline);margin:var(--margin-code-inline);font-size:var(--code-inline-text);border-radius:var(--small-border-radius)}.x-markdown pre code{font-size:inherit;border-radius:0;margin:0;padding:0;line-height:2}.x-markdown img{max-width:100%;height:auto;margin:var(--image-margin)}.x-markdown hr{margin:var(--hr-margin)}.x-markdown table:not(pre){margin:var(--table-margin);border-collapse:collapse;width:max-content;max-width:100%;display:block;overflow:auto}.x-markdown table:not(pre):first-child{margin-top:0}.x-markdown table:not(pre):last-child{margin-bottom:0}.x-markdown .inline-katex .katex-display{text-align:initial;vertical-align:middle;margin:0;display:inline-block}.x-markdown .inline-katex .katex-display>.katex{text-align:initial;white-space:normal;display:inline-block}.x-markdown .inline-katex .katex-display>.katex>.katex-html{display:inline-block;position:static}.x-markdown .inline-katex .katex-display>.katex>.katex-html>.tag{position:static}.x-markdown .block-katex{margin:1em 0;display:block}.x-markdown-light{--font-size:14px;--primary-color:#1677ff;--primary-color-hover:#4096ff;--heading-color:#000;--text-color:#000000d9;--border-color:#f0f0f0;--line-color:#0505050f;--light-bg:#0000000a;--table-head-bg:#fafafa;--table-body-bg:#fff;--cite-bg:#0000001a;--cite-hover-bg:#0003;--border-radius-middle:6px;--border-radius-small:4px;--td-th-padding:10px 12px;--border-font-weight:600;--margin-block:0 0 16px 0;--padding-ul-ol:0 0 0 16px;--margin-ul-ol:0 0 16px 28px;--margin-li:0 0 14px 0;--hr-margin:24px 0;--table-margin:0 0 24px 0;--margin-pre:0 0 16px 0;--padding-code:16px;--xmd-tail-color:var(--text-color)}.x-markdown-light h1,.x-markdown-light h2,.x-markdown-light h3,.x-markdown-light h4{color:var(--heading-color);font-weight:var(--border-font-weight);margin:var(--margin-block)}.x-markdown-light h1{font-size:24px;line-height:36px}.x-markdown-light h2{font-size:20px;line-height:32px}.x-markdown-light h3{font-size:18px;line-height:30px}.x-markdown-light h4{font-size:16px}.x-markdown-light p,.x-markdown-light li{color:var(--text-color);margin:var(--margin-block)}.x-markdown-light li{position:relative}.x-markdown-light li::marker{color:var(--heading-color);font-size:16px;font-weight:400;line-height:28px}.x-markdown-light ul>li ul>li,.x-markdown-light ul>li ol>li{list-style:circle}.x-markdown-light ul>li ul>li ul>li,.x-markdown-light ul>li ul>li ol>li,.x-markdown-light ul>li ol>li ul>li,.x-markdown-light ul>li ol>li ol>li{list-style:square}.x-markdown-light ol>li ol>li,.x-markdown-light ol>li ul>li{list-style:lower-alpha}.x-markdown-light ol>li ol>li ol>li,.x-markdown-light ol>li ol>li ul>li,.x-markdown-light ol>li ul>li ol>li,.x-markdown-light ol>li ul>li ul>li{list-style:lower-roman}.x-markdown-light hr{border:0;border-top:1px solid var(--line-color);margin:var(--hr-margin)}.x-markdown-light table{border-collapse:collapse;margin:var(--table-margin);overflow:hidden;box-shadow:0 1px 3px #0000000d}.x-markdown-light thead{background-color:var(--table-head-bg)}.x-markdown-light tbody{background-color:var(--table-body-bg)}.x-markdown-light tbody tr{background-color:var(--table-body-bg);transition:background-color .2s linear}.x-markdown-light tbody tr:hover{background-color:var(--table-head-bg)}.x-markdown-light th,.x-markdown-light td{padding:var(--td-th-padding);border:1px solid var(--border-color)}.x-markdown-light th{color:var(--heading-color)}.x-markdown-light td{color:var(--text-color)}.x-markdown-light blockquote{border-left:4px solid var(--border-color);background-color:var(--cite-bg);border-radius:0 var(--border-radius-middle) var(--border-radius-middle) 0;margin:16px 0;padding:4px 12px;transition:background-color .2s}.x-markdown-light blockquote:hover{background-color:var(--cite-hover-bg)}.x-markdown-light pre code:not([class$=-highlightCode-code] pre code){padding:var(--padding-code);line-height:1.3;font-size:var(--font-size);border-radius:var(--border-radius-middle);margin:var(--margin-pre);display:block;background:var(--light-bg)!important;color:var(--text-color)!important}.x-markdown-light code:not([class$=-highlightCode-code] code):not(pre code){border-radius:var(--border-radius-small);font-size:var(--font-size);border:1px solid var(--border-color);margin-inline:3px;padding:2px 6px;background-color:var(--light-bg)!important;color:var(--text-color)!important}.x-markdown-light img{max-width:100%}.x-markdown-light a{color:var(--primary-color);text-decoration:none;transition:color .2s;position:relative}.x-markdown-light a:hover{color:var(--primary-color-hover);text-decoration:underline}.x-markdown-light a:after{content:"↗";vertical-align:super;opacity:.7;margin-left:4px} diff --git a/public/assets/chat-ip2_xdN9.js b/public/assets/chat-ip2_xdN9.js new file mode 100644 index 0000000..0f24939 --- /dev/null +++ b/public/assets/chat-ip2_xdN9.js @@ -0,0 +1,127 @@ +import{t as e}from"./card-BDbI8Gdq.js";import{t}from"./flex-Chz2_RPk.js";import{$t as n,Bi as r,Ca as i,Ci as a,Dn as o,Dt as s,Ea as c,Ei as l,Fi as u,Ii as d,It as f,Lt as p,Ni as m,Pi as h,Rr as g,Sa as _,Ti as v,W as y,X as b,Y as x,Z as S,_a as C,ai as w,at as T,ba as E,c as D,dr as O,fr as k,ft as A,g as j,gn as M,ot as N,pa as P,qt as ee,rr as F,rt as te,s as ne,st as I,ti as L,va as R,wa as z,wn as B,xa as re,ya as V,yn as H}from"./index-DThTpSPU.js";import{t as ie}from"./agent-B0_A2P2o.js";function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:G(BigInt.prototype.toString),Ie=typeof Symbol>`u`?null:G(Symbol.prototype.toString),W=G(Object.prototype.hasOwnProperty),Le=G(Object.prototype.toString),Re=G(RegExp.prototype.test),ze=Be(TypeError);function G(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return ye(e,t,n)}}function Be(e){return function(){return be(e,[...arguments])}}function K(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:De;if(fe&&fe(e,null),!Ee(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(pe(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ve(e){for(let t=0;t/g),at=ge(/\${[\w\W]*/g),ot=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),st=ge(/^aria-[\-\w]+$/),ct=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lt=ge(/^(?:\w+script|data):/i),ut=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dt=ge(/^html$/i),ft=ge(/^[a-z][.\w]*(-[.\w]+)+$/i),pt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},mt=function(){return typeof window>`u`?null:window},ht=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},gt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _t(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mt(),t=e=>_t(e);if(t.version=`3.4.7`,t.removed=[],!e||!e.document||e.document.nodeType!==pt.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=We(d,`cloneNode`),p=We(d,`remove`),m=We(d,`nextSibling`),h=We(d,`childNodes`),g=We(d,`parentNode`),_=We(d,`shadowRoot`),v=We(d,`attributes`),y=o&&o.prototype?We(o.prototype,`nodeType`):null,b=o&&o.prototype?We(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C=n,w=C.implementation,T=C.createNodeIterator,E=C.createDocumentFragment,D=C.getElementsByTagName,O=r.importNode,k=gt();t.isSupported=typeof de==`function`&&typeof g==`function`&&w&&w.createHTMLDocument!==void 0;let A=rt,j=it,M=at,N=ot,P=st,ee=lt,F=ut,te=ft,ne=ct,I=null,L=K({},[...Ke,...qe,...Je,...Xe,...Qe]),R=null,z=K({},[...$e,...et,...tt,...nt]),B=Object.seal(_e(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,V=null,H=Object.seal(_e(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ie=!0,ae=!0,oe=!1,se=!0,ce=!1,le=!0,ue=!1,fe=!1,pe=!1,me=!1,he=!1,ge=!1,ve=!0,ye=!1,be=`user-content-`,Ne=!0,Pe=!1,Fe={},Ie=null,Le=K({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),G=null,Be=K({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ve=null,vt=K({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),yt=`http://www.w3.org/1998/Math/MathML`,q=`http://www.w3.org/2000/svg`,bt=`http://www.w3.org/1999/xhtml`,xt=bt,St=!1,Ct=null,wt=K({},[yt,q,bt],Oe),Tt=K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Et=K({},[`annotation-xml`]),Dt=K({},[`title`,`style`,`font`,`a`,`script`]),Ot=null,kt=[`application/xhtml+xml`,`text/html`],J=null,At=null,jt=n.createElement(`form`),Mt=function(e){return e instanceof RegExp||e instanceof Function},Nt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(At&&At===e)return;(!e||typeof e!=`object`)&&(e={}),e=He(e),Ot=kt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Ot===`application/xhtml+xml`?Oe:De,I=W(e,`ALLOWED_TAGS`)&&Ee(e.ALLOWED_TAGS)?K({},e.ALLOWED_TAGS,J):L,R=W(e,`ALLOWED_ATTR`)&&Ee(e.ALLOWED_ATTR)?K({},e.ALLOWED_ATTR,J):z,Ct=W(e,`ALLOWED_NAMESPACES`)&&Ee(e.ALLOWED_NAMESPACES)?K({},e.ALLOWED_NAMESPACES,Oe):wt,Ve=W(e,`ADD_URI_SAFE_ATTR`)&&Ee(e.ADD_URI_SAFE_ATTR)?K(He(vt),e.ADD_URI_SAFE_ATTR,J):vt,G=W(e,`ADD_DATA_URI_TAGS`)&&Ee(e.ADD_DATA_URI_TAGS)?K(He(Be),e.ADD_DATA_URI_TAGS,J):Be,Ie=W(e,`FORBID_CONTENTS`)&&Ee(e.FORBID_CONTENTS)?K({},e.FORBID_CONTENTS,J):Le,re=W(e,`FORBID_TAGS`)&&Ee(e.FORBID_TAGS)?K({},e.FORBID_TAGS,J):He({}),V=W(e,`FORBID_ATTR`)&&Ee(e.FORBID_ATTR)?K({},e.FORBID_ATTR,J):He({}),Fe=W(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?He(e.USE_PROFILES):e.USE_PROFILES:!1,ie=e.ALLOW_ARIA_ATTR!==!1,ae=e.ALLOW_DATA_ATTR!==!1,oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,se=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ce=e.SAFE_FOR_TEMPLATES||!1,le=e.SAFE_FOR_XML!==!1,ue=e.WHOLE_DOCUMENT||!1,me=e.RETURN_DOM||!1,he=e.RETURN_DOM_FRAGMENT||!1,ge=e.RETURN_TRUSTED_TYPE||!1,pe=e.FORCE_BODY||!1,ve=e.SANITIZE_DOM!==!1,ye=e.SANITIZE_NAMED_PROPS||!1,Ne=e.KEEP_CONTENT!==!1,Pe=e.IN_PLACE||!1,ne=Ge(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ct,xt=typeof e.NAMESPACE==`string`?e.NAMESPACE:bt,Tt=W(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?He(e.MATHML_TEXT_INTEGRATION_POINTS):K({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),Et=W(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?He(e.HTML_INTEGRATION_POINTS):K({},[`annotation-xml`]);let t=W(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?He(e.CUSTOM_ELEMENT_HANDLING):_e(null);if(B=_e(null),W(t,`tagNameCheck`)&&Mt(t.tagNameCheck)&&(B.tagNameCheck=t.tagNameCheck),W(t,`attributeNameCheck`)&&Mt(t.attributeNameCheck)&&(B.attributeNameCheck=t.attributeNameCheck),W(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(B.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),ce&&(ae=!1),he&&(me=!0),Fe&&(I=K({},Qe),R=_e(null),Fe.html===!0&&(K(I,Ke),K(R,$e)),Fe.svg===!0&&(K(I,qe),K(R,et),K(R,nt)),Fe.svgFilters===!0&&(K(I,Je),K(R,et),K(R,nt)),Fe.mathMl===!0&&(K(I,Xe),K(R,tt),K(R,nt))),H.tagCheck=null,H.attributeCheck=null,W(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?H.tagCheck=e.ADD_TAGS:Ee(e.ADD_TAGS)&&(I===L&&(I=He(I)),K(I,e.ADD_TAGS,J))),W(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?H.attributeCheck=e.ADD_ATTR:Ee(e.ADD_ATTR)&&(R===z&&(R=He(R)),K(R,e.ADD_ATTR,J))),W(e,`ADD_URI_SAFE_ATTR`)&&Ee(e.ADD_URI_SAFE_ATTR)&&K(Ve,e.ADD_URI_SAFE_ATTR,J),W(e,`FORBID_CONTENTS`)&&Ee(e.FORBID_CONTENTS)&&(Ie===Le&&(Ie=He(Ie)),K(Ie,e.FORBID_CONTENTS,J)),W(e,`ADD_FORBID_CONTENTS`)&&Ee(e.ADD_FORBID_CONTENTS)&&(Ie===Le&&(Ie=He(Ie)),K(Ie,e.ADD_FORBID_CONTENTS,J)),Ne&&(I[`#text`]=!0),ue&&K(I,[`html`,`head`,`body`]),I.table&&(K(I,[`tbody`]),delete re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ze(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ze(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);x=e.TRUSTED_TYPES_POLICY,S=x.createHTML(``)}else x===void 0&&(x=ht(u,i)),x!==null&&typeof S==`string`&&(S=x.createHTML(``));(k.uponSanitizeElement.length>0||k.uponSanitizeAttribute.length>0)&&I===L&&(I=He(I)),k.uponSanitizeAttribute.length>0&&R===z&&(R=He(R)),U&&U(e),At=e},Pt=K({},[...qe,...Je,...Ye]),Ft=K({},[...Xe,...Ze]),It=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:xt,tagName:`template`});let n=De(e.tagName),r=De(t.tagName);return Ct[e.namespaceURI]?e.namespaceURI===q?t.namespaceURI===bt?n===`svg`:t.namespaceURI===yt?n===`svg`&&(r===`annotation-xml`||Tt[r]):!!Pt[n]:e.namespaceURI===yt?t.namespaceURI===bt?n===`math`:t.namespaceURI===q?n===`math`&&Et[r]:!!Ft[n]:e.namespaceURI===bt?t.namespaceURI===q&&!Et[r]||t.namespaceURI===yt&&!Tt[r]?!1:!Ft[n]&&(Dt[n]||!Pt[n]):!!(Ot===`application/xhtml+xml`&&Ct[e.namespaceURI]):!1},Lt=function(e){we(t.removed,{element:e});try{g(e).removeChild(e)}catch{p(e)}},Y=function(e,n){try{we(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{we(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(me||he)try{Lt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Rt=function(e){let t=null,r=null;if(pe)e=``+e;else{let t=ke(e,/^[\r\n\t ]+/);r=t&&t[0]}Ot===`application/xhtml+xml`&&xt===bt&&(e=``+e+``);let i=x?x.createHTML(e):e;if(xt===bt)try{t=new l().parseFromString(i,Ot)}catch{}if(!t||!t.documentElement){t=w.createDocument(xt,`template`,null);try{t.documentElement.innerHTML=St?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),xt===bt?D.call(t,ue?`html`:`body`)[0]:ue?t.documentElement:a},zt=function(e){return T.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Bt=function(e){e.normalize();let t=T.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;){let e=n.data;xe([A,j,M],t=>{e=Ae(e,t,` `)}),n.data=e,n=t.nextNode()}},Vt=function(e){let t=b?b(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Ht=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===pt.documentFragment}catch{return!1}},Ut=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Wt(e,n,r){xe(e,e=>{e.call(t,n,r,At)})}let Gt=function(e){let n=null;if(Wt(k.beforeSanitizeElements,e,null),Vt(e))return Lt(e),!0;let r=J(e.nodeName);if(Wt(k.uponSanitizeElement,e,{tagName:r,allowedTags:I}),le&&e.hasChildNodes()&&!Ut(e.firstElementChild)&&Re(/<[/\w!]/g,e.innerHTML)&&Re(/<[/\w!]/g,e.textContent)||le&&e.namespaceURI===bt&&r===`style`&&Ut(e.firstElementChild)||e.nodeType===pt.progressingInstruction||le&&e.nodeType===pt.comment&&Re(/<[/\w]/g,e.data))return Lt(e),!0;if(re[r]||!(H.tagCheck instanceof Function&&H.tagCheck(r))&&!I[r]){if(!re[r]&&Jt(r)&&(B.tagNameCheck instanceof RegExp&&Re(B.tagNameCheck,r)||B.tagNameCheck instanceof Function&&B.tagNameCheck(r)))return!1;if(Ne&&!Ie[r]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=f(n[i],!0);t.insertBefore(r,m(e))}}}return Lt(e),!0}return(y?y(e):e.nodeType)===pt.element&&!It(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Re(/<\/no(script|embed|frames)/i,e.innerHTML)?(Lt(e),!0):(ce&&e.nodeType===pt.text&&(n=e.textContent,xe([A,j,M],e=>{n=Ae(n,e,` `)}),e.textContent!==n&&(we(t.removed,{element:e.cloneNode()}),e.textContent=n)),Wt(k.afterSanitizeElements,e,null),!1)},Kt=function(e,t,r){if(V[t]||ve&&(t===`id`||t===`name`)&&(r in n||r in jt))return!1;let i=R[t]||H.attributeCheck instanceof Function&&H.attributeCheck(t,e);if(!(ae&&!V[t]&&Re(N,t))&&!(ie&&Re(P,t))){if(!i||V[t]){if(!(Jt(e)&&(B.tagNameCheck instanceof RegExp&&Re(B.tagNameCheck,e)||B.tagNameCheck instanceof Function&&B.tagNameCheck(e))&&(B.attributeNameCheck instanceof RegExp&&Re(B.attributeNameCheck,t)||B.attributeNameCheck instanceof Function&&B.attributeNameCheck(t,e))||t===`is`&&B.allowCustomizedBuiltInElements&&(B.tagNameCheck instanceof RegExp&&Re(B.tagNameCheck,r)||B.tagNameCheck instanceof Function&&B.tagNameCheck(r))))return!1}else if(!Ve[t]&&!Re(ne,Ae(r,F,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&je(r,`data:`)===0&&G[e])&&!(oe&&!Re(ee,Ae(r,F,``)))&&r)return!1}return!0},qt=K({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Jt=function(e){return!qt[De(e)]&&Re(te,e)},Yt=function(e){Wt(k.beforeSanitizeAttributes,e,null);let n=e.attributes;if(!n||Vt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},i=n.length;for(;i--;){let a=n[i],o=a.name,s=a.namespaceURI,c=a.value,l=J(o),d=c,f=o===`value`?d:Me(d);if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,Wt(k.uponSanitizeAttribute,e,r),f=r.attrValue,ye&&(l===`id`||l===`name`)&&je(f,be)!==0&&(Y(o,e),f=be+f),le&&Re(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Y(o,e);continue}if(l===`attributename`&&ke(f,`href`)){Y(o,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Y(o,e);continue}if(!se&&Re(/\/>/i,f)){Y(o,e);continue}ce&&xe([A,j,M],e=>{f=Ae(f,e,` `)});let p=J(e.nodeName);if(!Kt(p,l,f)){Y(o,e);continue}if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!s)switch(u.getAttributeType(p,l)){case`TrustedHTML`:f=x.createHTML(f);break;case`TrustedScriptURL`:f=x.createScriptURL(f);break}if(f!==d)try{s?e.setAttributeNS(s,o,f):e.setAttribute(o,f),Vt(e)?Lt(e):Ce(t.removed)}catch{Y(o,e)}}Wt(k.afterSanitizeAttributes,e,null)},Xt=function(e){let t=null,n=zt(e);for(Wt(k.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Wt(k.uponSanitizeShadowNode,t,null),Gt(t),Yt(t),Ht(t.content)&&Xt(t.content),(y?y(t):t.nodeType)===pt.element){let e=_?_(t):t.shadowRoot;Ht(e)&&(Zt(e),Xt(e))}Wt(k.afterSanitizeShadowDOM,e,null)},Zt=function(e){let t=y?y(e):e.nodeType;if(t===pt.element){let t=_?_(e):e.shadowRoot;Ht(t)&&(Zt(t),Xt(t))}let n=h?h(e):e.childNodes;if(!n)return;let r=[];xe(n,e=>{we(r,e)});for(let e of r)Zt(e);if(t===pt.element){let t=b?b(e):null;if(typeof t==`string`&&J(t)===`template`){let t=e.content;Ht(t)&&Zt(t)}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(St=!e,St&&(e=``),typeof e!=`string`&&!Ut(e)&&(e=Ue(e),typeof e!=`string`))throw ze(`dirty is not a string, aborting`);if(!t.isSupported)return e;if(fe||Nt(n),t.removed=[],typeof e==`string`&&(Pe=!1),Pe){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=J(t);if(!I[e]||re[e])throw ze(`root node is forbidden and cannot be sanitized in-place`)}if(Vt(e))throw ze(`root node is clobbered and cannot be sanitized in-place`);Zt(e)}else if(Ut(e))i=Rt(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===pt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Zt(a);else{if(!me&&!ce&&!ue&&e.indexOf(`<`)===-1)return x&&ge?x.createHTML(e):e;if(i=Rt(e),!i)return me?null:ge?S:``}i&&pe&&Lt(i.firstChild);let c=zt(Pe?e:i);for(;o=c.nextNode();)Gt(o),Yt(o),Ht(o.content)&&Xt(o.content);if(Pe)return ce&&Bt(e),e;if(me){if(ce&&Bt(i),he)for(s=E.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=O.call(r,s,!0)),s}let l=ue?i.outerHTML:i.innerHTML;return ue&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Re(dt,i.ownerDocument.doctype.name)&&(l=` +`+l),ce&&xe([A,j,M],e=>{l=Ae(l,e,` `)}),x&&ge?x.createHTML(l):l},t.setConfig=function(){Nt(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),fe=!0},t.clearConfig=function(){At=null,fe=!1},t.isValidAttribute=function(e,t,n){return At||Nt({}),Kt(J(e),J(t),n)},t.addHook=function(e,t){typeof t==`function`&&we(k[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=Se(k[e],t);return n===-1?void 0:Te(k[e],n,1)[0]}return Ce(k[e])},t.removeHooks=function(e){k[e]=[]},t.removeAllHooks=function(){k=gt()},t}var vt=_t(),yt=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var t=`accept acceptCharset accessKey action allowFullScreen allowTransparency + alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge + charSet checked classID className colSpan cols content contentEditable contextMenu + controls coords crossOrigin data dateTime default defer dir disabled download draggable + encType form formAction formEncType formMethod formNoValidate formTarget frameBorder + headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity + is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media + mediaGroup method min minLength multiple muted name noValidate nonce open + optimum pattern placeholder poster preload radioGroup readOnly rel required + reversed role rowSpan rows sandbox scope scoped scrolling seamless selected + shape size sizes span spellCheck src srcDoc srcLang srcSet start step style + summary tabIndex target title type useMap value width wmode wrap onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick + onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown + onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel + onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough + onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`.split(/[\s\n]+/),n=`aria-`,r=`data-`;function i(e,t){return e.indexOf(t)===0}function a(e,a=!1){let o;o=a===!1?{aria:!0,data:!0,attr:!0}:a===!0?{aria:!0}:{...a};let s={};return Object.keys(e).forEach(a=>{(o.aria&&(a===`role`||i(a,n))||o.data&&i(a,r)||o.attr&&t.includes(a))&&(s[a]=e[a])}),s}})),q=c(i());function bt(e,t){return(0,q.useImperativeHandle)(e,()=>{let e=t(),{nativeElement:n}=e;return new Proxy(n,{get(t,n){return e[n]?e[n]:Reflect.get(t,n)}})})}var xt=q.createContext({}),St={classNames:{},styles:{},className:``,style:{},shortcutKeys:{}},Ct=e=>{let t=q.useContext(xt);return q.useMemo(()=>({...St,...t[e]}),[t[e]])};z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.preMessage=void 0;var t={},n=[],r=e=>{n.push(e)};e.preMessage=r;function i(e,t){}function a(e,t){}function o(){t={}}function s(e,n,r){!n&&!t[r]&&(e(!1,r),t[r]=!0)}function c(e,t){s(i,e,t)}function l(e,t){s(a,e,t)}c.preMessage=r,c.resetWarned=o,c.noteOnce=l,e.default=c}))();function wt(){}var Tt=wt,Et=(0,q.createContext)(void 0),Dt=z(((e,t)=>{function n(e){return e&&e.__esModule?e:{default:e}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})),Ot=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={items_per_page:`/ page`,jump_to:`Go to`,jump_to_confirm:`confirm`,page:`Page`,prev_page:`Previous Page`,next_page:`Next Page`,prev_5:`Previous 5 Pages`,next_5:`Next 5 Pages`,prev_3:`Previous 3 Pages`,next_3:`Next 3 Pages`,page_size:`Page Size`}})),kt=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.commonLocale=void 0,e.commonLocale={yearFormat:`YYYY`,dayFormat:`D`,cellMeridiemFormat:`A`,monthBeforeYear:!0}})),J=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=kt();function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default={placeholder:`Select time`,rangePlaceholder:[`Start time`,`End time`]}})),jt=z((e=>{var t=Dt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(J()),r=t(At());e.default={lang:{placeholder:`Select date`,yearPlaceholder:`Select year`,quarterPlaceholder:`Select quarter`,monthPlaceholder:`Select month`,weekPlaceholder:`Select week`,rangePlaceholder:[`Start date`,`End date`],rangeYearPlaceholder:[`Start year`,`End year`],rangeQuarterPlaceholder:[`Start quarter`,`End quarter`],rangeMonthPlaceholder:[`Start month`,`End month`],rangeWeekPlaceholder:[`Start week`,`End week`],...n.default},timePickerLocale:{...r.default}}})),Mt=z((e=>{var t=Dt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=t(jt()).default})),Nt=z((e=>{var t=Dt().default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Ot()),r=t(Mt()),i=t(jt()),a=t(At()),o="${label} is not a valid ${type}";e.default={locale:`en`,Pagination:n.default,DatePicker:i.default,TimePicker:a.default,Calendar:r.default,global:{placeholder:`Please select`,close:`Close`,sortable:`sortable`,show:`Show`,hide:`Hide`},Table:{filterTitle:`Filter menu`,filterConfirm:`OK`,filterReset:`Reset`,filterEmptyText:`No filters`,filterCheckAll:`Select all items`,filterSearchPlaceholder:`Search in filters`,emptyText:`No data`,selectAll:`Select current page`,selectInvert:`Invert current page`,selectNone:`Clear all data`,selectionAll:`Select all data`,sortTitle:`Sort`,expand:`Expand row`,collapse:`Collapse row`,triggerDesc:`Click to sort descending`,triggerAsc:`Click to sort ascending`,cancelSort:`Click to cancel sorting`},Tour:{Next:`Next`,Previous:`Previous`,Finish:`Finish`},Modal:{okText:`OK`,cancelText:`Cancel`,justOkText:`OK`},Popconfirm:{okText:`OK`,cancelText:`Cancel`},Transfer:{titles:[``,``],searchPlaceholder:`Search here`,itemUnit:`item`,itemsUnit:`items`,remove:`Remove`,selectCurrent:`Select current page`,removeCurrent:`Remove current page`,selectAll:`Select all data`,deselectAll:`Deselect all data`,removeAll:`Remove all data`,selectInvert:`Invert current page`},Upload:{uploading:`Uploading...`,removeFile:`Remove file`,uploadError:`Upload error`,previewFile:`Preview file`,downloadFile:`Download file`},Empty:{description:`No data`},Icon:{icon:`icon`},Text:{edit:`Edit`,copy:`Copy`,copied:`Copied`,expand:`Expand`,collapse:`Collapse`},Form:{optional:`(optional)`,defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:o,method:o,array:o,object:o,number:o,date:o,boolean:o,integer:o,float:o,regexp:o,email:o,url:o,hex:o},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:`QR code expired`,refresh:`Refresh`,scanned:`Scanned`},ColorPicker:{presetEmpty:`Empty`,transparent:`Transparent`,singleColor:`Single`,gradientColor:`Gradient`}}})),Pt=z(((e,t)=>{t.exports=Nt()})),Ft={locale:`en`,Conversations:{create:`New chat`},Sender:{stopLoading:`Stop loading`,speechRecording:`Speech recording`},Actions:{feedbackLike:`Like`,feedbackDislike:`Dislike`,audio:`Play audio`,audioRunning:`Audio playing`,audioError:`Playback error`,audioLoading:`Loading audio`},Bubble:{editableOk:`OK`,editableCancel:`Cancel`},Mermaid:{zoomIn:`Zoom in`,zoomOut:`Zoom out`,zoomReset:`Reset`,download:`Download`,code:`Code`,image:`Image`},Folder:{selectFile:`Please select a file`,loadError:`Failed to load file`,noService:`File content service not configured`,loadFailed:`Failed to load file`}},It=c(Pt()),Lt=(e,t)=>{let n=q.useContext(Et);return[q.useMemo(()=>{let r=t||Ft?.[e]||It.default?.[e],i=n?.[e]??{};return{...typeof r==`function`?r():r,...i||{}}},[e,t,n]),q.useMemo(()=>{let e=n?.locale;return n?.exist&&!e?Ft.locale:e},[n])]};function Y(){let{getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r,theme:i}=q.useContext(g.ConfigContext);return{theme:i,getPrefixCls:e,direction:t,csp:n,iconPrefixCls:r}}var Rt=1e3,zt=4,Bt=140,Vt=Bt/2,Ht=250,Ut=500,Wt=.8;function Gt({className:e}){let[t]=Lt(`Sender`,Ft.Sender);return q.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 ${Rt} ${Rt}`,xmlns:`http://www.w3.org/2000/svg`,className:e},q.createElement(`title`,null,t.speechRecording),Array.from({length:zt}).map((e,t)=>{let n=t*286.66666666666663,r=Rt/2-Ht/2,i=Rt/2-Ut/2;return q.createElement(`rect`,{fill:`currentColor`,rx:Vt,ry:Vt,height:Ht,width:Bt,x:n,y:r,key:t},q.createElement(`animate`,{attributeName:`height`,values:`${Ht}; ${Ut}; ${Ht}`,keyTimes:`0; 0.5; 1`,dur:`${Wt}s`,begin:`${Wt/zt*t}s`,repeatCount:`indefinite`}),q.createElement(`animate`,{attributeName:`y`,values:`${r}; ${i}; ${r}`,keyTimes:`0; 0.5; 1`,dur:`${Wt}s`,begin:`${Wt/zt*t}s`,repeatCount:`indefinite`}))}))}var Kt=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:`hidden`,"&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:`hidden`,transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),qt=`2.7.0`,Jt={blue:`#1677FF`,purple:`#722ED1`,cyan:`#13C2C2`,green:`#52C41A`,magenta:`#EB2F96`,pink:`#EB2F96`,red:`#F5222D`,orange:`#FA8C16`,yellow:`#FADB14`,volcano:`#FA541C`,geekblue:`#2F54EB`,gold:`#FAAD14`,lime:`#A0D911`,colorPrimary:`#1677ff`,colorSuccess:`#52c41a`,colorWarning:`#faad14`,colorError:`#ff4d4f`,colorInfo:`#1677ff`,colorLink:``,colorTextBase:``,colorBgBase:``,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', +'Noto Color Emoji'`,fontFamilyCode:`'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,fontSize:14,lineWidth:1,lineType:`solid`,motionUnit:.1,motionBase:0,motionEaseOutCirc:`cubic-bezier(0.08, 0.82, 0.17, 1)`,motionEaseInOutCirc:`cubic-bezier(0.78, 0.14, 0.15, 0.86)`,motionEaseOut:`cubic-bezier(0.215, 0.61, 0.355, 1)`,motionEaseInOut:`cubic-bezier(0.645, 0.045, 0.355, 1)`,motionEaseOutBack:`cubic-bezier(0.12, 0.4, 0.29, 1.46)`,motionEaseInBack:`cubic-bezier(0.71, -0.46, 0.88, 0.6)`,motionEaseInQuint:`cubic-bezier(0.755, 0.05, 0.855, 0.06)`,motionEaseOutQuint:`cubic-bezier(0.23, 1, 0.32, 1)`,borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0};function Yt(e){return e>=0&&e<=255}function Xt(e,t){let{r:n,g:r,b:i,a:o}=new a(e).toRgb();if(o<1)return e;let{r:s,g:c,b:l}=new a(t).toRgb();for(let e=.01;e<=1;e+=.01){let t=Math.round((n-s*(1-e))/e),o=Math.round((r-c*(1-e))/e),u=Math.round((i-l*(1-e))/e);if(Yt(t)&&Yt(o)&&Yt(u))return new a({r:t,g:o,b:u,a:Math.round(e*100)/100}).toRgbString()}return new a({r:n,g:r,b:i,a:1}).toRgbString()}function Zt(e){let{override:t,...n}=e,r={...t};Object.keys(Jt).forEach(e=>{delete r[e]});let i={...n,...r},o=1200,s=1600;return i.motion===!1&&(i.motionDurationFast=`0s`,i.motionDurationMid=`0s`,i.motionDurationSlow=`0s`),{...i,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Xt(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Xt(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Xt(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Xt(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:`none`,linkHoverDecoration:`none`,linkFocusDecoration:`none`,controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowSecondary:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTertiary:` + 0 1px 2px 0 rgba(0, 0, 0, 0.03), + 0 1px 6px -1px rgba(0, 0, 0, 0.02), + 0 2px 4px 0 rgba(0, 0, 0, 0.02) + `,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:o-1,screenXL:o,screenXLMin:o,screenXLMax:s-1,screenXXL:s,screenXXLMin:s,boxShadowPopoverArrow:`2px 2px 5px rgba(0, 0, 0, 0.05)`,boxShadowCard:` + 0 1px 2px -2px ${new a(`rgba(0, 0, 0, 0.16)`).toRgbString()}, + 0 3px 6px 0 ${new a(`rgba(0, 0, 0, 0.12)`).toRgbString()}, + 0 5px 12px 4px ${new a(`rgba(0, 0, 0, 0.09)`).toRgbString()} + `,boxShadowDrawerRight:` + -6px 0 16px 0 rgba(0, 0, 0, 0.08), + -3px 0 6px -4px rgba(0, 0, 0, 0.12), + -9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerLeft:` + 6px 0 16px 0 rgba(0, 0, 0, 0.08), + 3px 0 6px -4px rgba(0, 0, 0, 0.12), + 9px 0 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerUp:` + 0 6px 16px 0 rgba(0, 0, 0, 0.08), + 0 3px 6px -4px rgba(0, 0, 0, 0.12), + 0 9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowDrawerDown:` + 0 -6px 16px 0 rgba(0, 0, 0, 0.08), + 0 -3px 6px -4px rgba(0, 0, 0, 0.12), + 0 -9px 28px 8px rgba(0, 0, 0, 0.05) + `,boxShadowTabsOverflowLeft:`inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowRight:`inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowTop:`inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)`,boxShadowTabsOverflowBottom:`inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)`,...r}}var Qt={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},$t={motionBase:!0,motionUnit:!0},en=d(I.defaultAlgorithm),tn={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},nn=(e,t,n)=>{let r=n.getDerivativeToken(e),{override:i,...a}=t,o={...r,override:i};return o=Zt(o),a&&Object.entries(a).forEach(([e,t])=>{let{theme:n,...r}=t,i=r;n&&(i=nn({...o,...r},{override:r},n)),o[e]=i}),o};function rn(){let{token:e,hashed:t,theme:n,override:r,cssVar:i,zeroRuntime:a}=q.useContext(I._internalContext),o={prefix:i?.prefix??`ant`,key:i?.key??`css-var-root`},s=n||en,[c,l,u]=h(s,[I.defaultSeed,e],{salt:`${qt}-${t||``}`,override:r,getComputedToken:nn,cssVar:{...o,unitless:Qt,ignore:$t,preserve:tn}});return[s,u,t?l:``,c,o,!!a]}function an(){let[e,t,n]=rn();return{theme:e,token:t,hashId:n}}var{genStyleHooks:on,genComponentStyleHook:sn,genSubStyleComponent:cn}=v({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=Y();return{iconPrefixCls:t,rootPrefixCls:e()}},useToken:()=>{let[e,t,n,r,i,a]=rn();return{theme:e,realToken:t,hashId:n,token:r,cssVar:i,zeroRuntime:a}},useCSP:()=>{let{csp:e}=Y();return e??{}},layer:{name:`antdx`}}),ln=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=Object.assign({},e);return Array.isArray(t)&&t.forEach(e=>{delete n[e]}),n}})),un=q.createContext({});function dn(e){let t=getComputedStyle(e).display;return t===`block`||t===`flex`||t===`list-item`||t===`table`}function fn(e){let t=[``],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);for(;n.nextNode();){let e=n.currentNode;if(e.nodeType===Node.TEXT_NODE){t[t.length-1]+=e.textContent;continue}e.tagName===`BR`&&e.parentNode?.childElementCount===1||(e.tagName===`BR`||dn(e))&&t.push(``)}return t.join(` +`)}var pn=({content:e,prefixCls:n,okText:r,cancelText:i,onEditConfirm:a,onEditCancel:o})=>{let s=q.useRef(null),[c]=Lt(`Bubble`,Ft.Bubble),l=C(()=>{a?.(fn(s.current))}),u=C(()=>o?.());if(q.useEffect(()=>{s.current.textContent=e,s.current.focus();let t=window.getSelection(),n=document.createRange();n.selectNodeContents(s.current),n.collapse(!1),t.removeAllRanges(),t.addRange(n)},[]),typeof e!=`string`)throw Error(`Content of editable Bubble should be string`);let d=q.useMemo(()=>q.createElement(`div`,{ref:s,contentEditable:!0}),[]);return q.createElement(q.Fragment,null,d,q.createElement(t,{rootClassName:`${n}-editing-opts`,gap:8},q.createElement(M,{type:`primary`,shape:`round`,size:`small`,onClick:l},r||c.editableOk),q.createElement(M,{type:`text`,shape:`round`,size:`small`,onClick:u},i||c.editableCancel)))},mn=({prefixCls:e})=>q.createElement(`span`,{className:`${e}-dot`},q.createElement(`i`,{className:`${e}-dot-item`,key:`item-1`}),q.createElement(`i`,{className:`${e}-dot-item`,key:`item-2`}),q.createElement(`i`,{className:`${e}-dot-item`,key:`item-3`})),hn=new m(`loadingMove`,{"0%":{transform:`translateY(0)`},"10%":{transform:`translateY(4px)`},"20%":{transform:`translateY(0)`},"30%":{transform:`translateY(-4px)`},"40%":{transform:`translateY(0)`}}),gn=new m(`cursorBlink`,{"0%":{opacity:1},"50%":{opacity:0},"100%":{opacity:1}}),_n=new m(`fadeIn`,{"0%":{opacity:0},"100%":{opacity:1}}),vn=e=>{let{componentCls:t,fontSize:n,typingContent:r,typingAnimationDuration:i,typingAnimationName:a,lineHeight:o,paddingSM:s,colorText:c,calc:l}=e;return[{[t]:{display:`flex`,columnGap:s,[`&${t}-rtl`]:{direction:`rtl`},[`&${t}-loading`]:{alignItems:`center`},[`${t}-body`]:{display:`flex`,flexDirection:`column`,maxWidth:`100%`},[`${t}-content`]:{position:`relative`,boxSizing:`border-box`,minWidth:0,maxWidth:`100%`,minHeight:l(s).mul(2).add(l(o).mul(n)).equal(),paddingInline:`${u(e.padding)}`,paddingBlock:`${u(s)}`,color:c,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,"&-string":{whiteSpace:`pre-wrap`}},[`${t}-typing:last-child::after`]:{content:r,fontWeight:900,userSelect:`none`,opacity:1,marginInlineStart:`0.1em`,animationName:a,animationDuration:u(i),animationIterationCount:`infinite`,animationTimingFunction:`linear`},[`${t}-fade-in .fade-in`]:{display:`inline`,animationName:_n,animationDuration:`1s`,animationTimingFunction:`linear`},[`${t}-dot`]:{position:`relative`,height:e.controlHeight,display:`flex`,alignItems:`center`,columnGap:e.marginXS,padding:`0 ${u(e.paddingXXS)}`,alignSelf:`center`,"&-item":{backgroundColor:e.colorPrimary,borderRadius:`100%`,width:4,height:4,animationName:hn,animationDuration:`2s`,animationIterationCount:`infinite`,animationTimingFunction:`linear`,"&:nth-child(1)":{animationDelay:`0s`},"&:nth-child(2)":{animationDelay:`0.2s`},"&:nth-child(3)":{animationDelay:`0.4s`}}},[`&${t}-start`]:{flexDirection:`row`,alignSelf:`flex-start`,[`& ${t}-header`]:{flexDirection:`row`}},[`&${t}-end`]:{flexDirection:`row-reverse`,alignSelf:`flex-end`,[`& ${t}-header`]:{flexDirection:`row-reverse`},[`& ${t}-editing-opts`]:{flexDirection:`row-reverse`}}}},gn]},yn=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-content`]:{"&-filled":{backgroundColor:e.colorFillContent},"&-outlined":{border:`1px solid ${e.colorBorderSecondary}`},"&-shadow":{boxShadow:e.boxShadowTertiary},"&-borderless":{backgroundColor:`transparent`,padding:0,minHeight:0}}}}},bn=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingSM:i,borderRadius:a,calc:o}=e,s=o(n).mul(r).div(2).add(i).equal(),c=o(a).mul(2).equal(),l=`${t}-content`;return{[t]:{[l]:{"&-default":{borderRadius:{_skip_check_:!0,value:c}},"&-round":{borderRadius:{_skip_check_:!0,value:s}},"&-corner":{borderRadius:{_skip_check_:!0,value:c}},"&-editing":{"div:first-child":{outline:`none`},[`${t}-editing-opts`]:{marginBlockStart:e.marginSM,"button:last-child":{backgroundColor:e.colorBgContainer,"&:hover":{backgroundColor:e.colorBgLayout}}}}},[`&${t}-start ${t}-content-corner`]:{borderStartStartRadius:e.borderRadiusXS},[`&${t}-end ${t}-content-corner`]:{borderStartEndRadius:e.borderRadiusXS}}}},xn=e=>{let{componentCls:t}=e;return{[t]:{"&-divider":{width:`100%`,justifyContent:`center`,[`& ${t}-body`]:{width:`100%`}}}}},Sn=e=>{let{componentCls:t}=e;return{[`${t}-list`]:{maxHeight:`100%`,width:`100%`,boxSizing:`border-box`,[`& ${t}`]:{width:`100%`,boxSizing:`border-box`,paddingBlock:e.padding},[`& ${t}-start:not(${t}-divider):not(${t}-system)`]:{paddingInlineEnd:`15%`},[`& ${t}-end:not(${t}-divider):not(${t}-system)`]:{paddingInlineStart:`15%`},[`${t}-list-scroll-box`]:{overflowY:`auto`,display:`flex`,width:`100%`,maxHeight:`100%`,flexDirection:`column`,scrollbarWidth:`thin`,scrollbarColor:`${e.colorTextTertiary} transparent`,"&::-webkit-scrollbar":{width:8,backgroundColor:`transparent`},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM}},[`${t}-list-autoscroll`]:{flexDirection:`column-reverse`},[`${t}-list-scroll-content`]:{display:`flex`,width:`100%`,height:`fit-content`,flexDirection:`column`,boxSizing:`border-box`,paddingInline:e.paddingXS}}}},Cn=e=>{let{componentCls:t,fontSize:n,lineHeight:r,paddingXXS:i,margin:a,colorText:o,fontSizeLG:s,calc:c}=e;return{[t]:{[`${t}-header`]:{display:`flex`,marginBottom:i,fontSize:n,lineHeight:r,color:o},[`${t}-footer`]:{display:`flex`,marginBlockStart:a,fontSize:n,lineHeight:r,color:o,"&-start":{flexDirection:`row`},"&-end":{flexDirection:`row-reverse`}},[`${t}-avatar`]:{minWidth:c(s).mul(2).equal()}}}},wn=e=>{let{componentCls:t,paddingSM:n,paddingXS:r,lineHeight:i,fontSize:a,fontSizeSM:o,calc:s}=e;return{[t]:{[`&${t}-system`]:{width:`100%`,justifyContent:`center`,[`${t}-content`]:{display:`flex`,gap:`${u(o)}`,alignItems:`center`,minHeight:s(r).mul(2).add(s(i).mul(a)).equal(),fontSize:`${u(a)}`,paddingInline:`${u(n)}`,paddingBlock:`${u(r)}`},[`${t}-system-content`]:{},[`${t}-system-extra`]:{}}}}},Tn=on(`Bubble`,e=>{let t=l(e,{});return[vn(t),yn(t),bn(t),Cn(t),Sn(t),wn(t),xn(t)]},()=>({typingContent:`"|"`,typingAnimationName:`cursorBlink`,typingAnimationDuration:`0.8s`})),En=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}})),Dn=c(z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.useLayoutUpdateEffect=e.default=void 0;var t=o(i()),n=r(En());function r(e){return e&&e.__esModule?e:{default:e}}function a(e){if(typeof WeakMap!=`function`)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!=`object`&&typeof e!=`function`)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!==`default`&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}var s=(0,n.default)()?t.useLayoutEffect:t.useEffect,c=(e,n)=>{let r=t.useRef(!0);s(()=>e(r.current),n),s(()=>(r.current=!1,()=>{r.current=!0}),[])};e.useLayoutUpdateEffect=(e,t)=>{c(t=>{if(!t)return e()},t)},e.default=c}))());function On(e){return!e||e.length===0?``:e.reduce((e,t)=>{let n=0;for(;n{let e={effect:`fade-in`,interval:100,step:6,keepPrefix:!0};if(n===!0)return e;let{step:t=6,interval:r=100}=n,i=e=>typeof e==`number`;if(!i(r)||r<=0)throw`[Bubble] invalid prop typing.interval, expect positive number.`;if(!i(t)&&!Array.isArray(t))throw`[Bubble] invalid prop typing.step, expect positive number or positive number array`;if(i(t)&&t<=0)throw`[Bubble] invalid prop typing.step, expect positive number`;if(Array.isArray(t)){if(!i(t[0])||t[0]<=0)throw`[Bubble] invalid prop typing.step[0], expect positive number`;if(!i(t[1])||t[1]<=0)throw`[Bubble] invalid prop typing.step[1], expect positive number`;if(t[0]>t[1])throw`[Bubble] invalid prop typing.step, step[0] should less than step[1]`}return{...e,...n}},[n]),p=q.useRef({content:t,interval:f.interval,step:f.step});p.current={content:t,interval:f.interval,step:f.step};let m=()=>Math.random().toString().slice(2),h=q.useCallback(e=>{let t=0;c.current=f.keepPrefix?On([p.current.content,c.current]):``,o(c.current?[{text:c.current,id:m(),taskId:e,done:!0}]:[]);let n=()=>{if(e!==l.current)return;let a=performance.now(),{content:f,interval:h,step:g}=p.current;if(a-t[{text:t.map(({text:e})=>e).join(``),id:m(),taskId:e,done:!0}]),i?.(f),s.current=!1,l.current++;return}c.current+=y;let b={id:m(),text:y,taskId:e,done:!1};o(e=>e.concat(b)),s.current||=!0,t=a,u.current=requestAnimationFrame(n),r?.(c.current,f)};n()},[f.keepPrefix,r,i]),g=q.useCallback(()=>{cancelAnimationFrame(u.current),o([]),c.current=``,s.current=!1},[]);return(0,Dn.default)(()=>{if(!t)return g();t!==c.current&&(s.current&&!t.startsWith(c.current)?(cancelAnimationFrame(u.current),s.current=!1,requestAnimationFrame(()=>h(++l.current))):s.current===!1&&h(l.current))},[t,h]),{renderedData:a,animating:s.current,memoedAnimationCfg:f}}var An=({prefixCls:e,streaming:t,content:n,typing:i,onTyping:a,onTypingComplete:o})=>{let{renderedData:s,animating:c,memoedAnimationCfg:l}=kn({streaming:t,content:n,typing:i,onTyping:a,onTypingComplete:o}),{effect:u}=l,d=s.map(e=>u===`fade-in`&&!e.done?q.createElement(`span`,{key:e.id,className:`fade-in`},e.text):e.text),f=i===!0?!1:u===`typing`;return q.createElement(`div`,{className:r({[`${e}-typing`]:f&&c,[`${e}-fade-in`]:!f})},d)},jn=c(yt()),Mn=q.forwardRef(({prefixCls:e,rootClassName:t,style:n,className:i,styles:a={},classNames:o={},placement:s=`start`,content:c,contentRender:l,editable:u=!1,typing:d,streaming:f=!1,variant:p=`filled`,shape:m=`default`,header:h,footer:g,avatar:_,extra:v,footerPlacement:y,loading:b,loadingRender:x,onTyping:S,onTypingComplete:C,onEditConfirm:w,onEditCancel:T,...E},D)=>{let k=q.useRef(null);q.useImperativeHandle(D,()=>({nativeElement:k.current}));let A=Ct(`bubble`),{direction:j,getPrefixCls:M}=Y(),N=M(`bubble`,e),P=q.useContext(un),[ee,F]=Tn(N),te={...A.style,...A.styles.root,...a.root,...n},ne=r(N,A.className,A.classNames.root,o.root,t,i,ee,F,`${N}-${s}`,{[`${N}-${P.status}`]:P.status,[`${N}-rtl`]:j===`rtl`,[`${N}-loading`]:b}),I=(0,jn.default)(E,{attr:!0,aria:!0,data:!0}),L={key:P?.key,status:P?.status,extraInfo:P?.extraInfo},R=q.useMemo(()=>l?l(c,L):c,[c,l,L.key,L.status,L.extraInfo]),z=typeof d==`function`?d(c,L):d,B=!!z&&typeof R==`string`;q.useEffect(()=>{B||f||c&&C?.(c)},[R,B,f]);let re=y||(s===`start`?`outer-start`:`outer-end`),V=typeof u==`boolean`?u:u.editing,H=()=>{if(b)return x?x():q.createElement(mn,{prefixCls:N});let e=q.createElement(q.Fragment,null,B?q.createElement(An,{prefixCls:N,streaming:f,typing:z,content:R,onTyping:S,onTypingComplete:C}):R),t=re.includes(`inner`);return q.createElement(`div`,{className:ie(`body`),style:ae(`body`)},le(),q.createElement(`div`,{style:{...A.styles.content,...a.content},className:r(`${N}-content`,`${N}-content-${p}`,A.classNames.content,o.content,{[`${N}-content-${P?.status}`]:P?.status,[`${N}-content-${m}`]:p!==`borderless`,[`${N}-content-editing`]:V,[`${N}-content-string`]:typeof R==`string`})},V?q.createElement(pn,{prefixCls:N,content:c,okText:u?.okText,cancelText:u?.cancelText,onEditConfirm:w,onEditCancel:T}):q.createElement(q.Fragment,null,t?q.createElement(`div`,{className:r(`${N}-content-with-footer`)},e):e,t&&ue())),!V&&!t&&ue())},ie=e=>r(`${N}-${e}`,A.classNames[e],o[e]),ae=e=>({...A.styles[e],...a[e]}),oe=e=>typeof e==`function`?e(c,L):e,se=()=>_?q.createElement(`div`,{className:ie(`avatar`),style:ae(`avatar`)},oe(_)):null,ce=()=>v?q.createElement(`div`,{className:ie(`extra`),style:ae(`extra`)},oe(v)):null,le=()=>h?q.createElement(`div`,{className:ie(`header`),style:ae(`header`)},oe(h)):null,ue=()=>{if(!g)return null;let e=r(ie(`footer`),{[`${N}-footer-start`]:re.includes(`start`),[`${N}-footer-end`]:re.includes(`end`)});return q.createElement(`div`,{className:e,style:ae(`footer`)},oe(g))};return q.createElement(`div`,O({className:ne,style:te},E,I,{ref:k}),se(),H(),!V&&!b&&ce())}),Nn=q.forwardRef(({prefixCls:e,content:t=``,rootClassName:n,style:i,className:a,styles:o={},classNames:s={},dividerProps:c,...l},u)=>{let{getPrefixCls:d}=Y(),f=Ct(`bubble`),p=d(`bubble`,e),[m,h]=Tn(p),g=r(m,h,p,`${p}-divider`,f.className,f.classNames.root,a,s.root,n);return q.createElement(Mn,O({ref:u,style:i,styles:o,className:g,classNames:s,prefixCls:p,variant:`borderless`,content:t,contentRender:e=>q.createElement(ee,c,e)},l))});function Pn(e){return getComputedStyle(e).flexDirection===`column-reverse`}function Fn(e,t){let n=(0,q.useRef)(null),r=(0,q.useRef)(!0),i=(0,q.useRef)(!1),a=(0,q.useRef)(0),o=(0,q.useRef)(void 0),s=(0,q.useRef)(!1),c=(0,q.useRef)(!1);(0,q.useLayoutEffect)(()=>{if(!e||!t)return;if(!n.current){let t=document.createElement(`div`);t.style.bottom=`0`,t.style.flexShrink=`0`,t.style.pointerEvents=`none`,t.style.height=`10px`,t.style.visibility=`hidden`,e.insertBefore(t,e.firstChild),n.current=t}let a=new IntersectionObserver(([e])=>{r.current=e.isIntersecting,i.current=!e.isIntersecting},{root:e,threshold:0});a.observe(n.current);let s=new ResizeObserver(()=>{if(e){if(o.current){c.current&&requestAnimationFrame(()=>e.scrollTo({top:Pn(e)?0:e.scrollHeight,behavior:`instant`}));return}Pn(e)&&i.current&&d()}});return s.observe(t),()=>{a.disconnect(),s.disconnect(),clearTimeout(o.current),n.current?.parentNode&&(n.current.parentNode.removeChild(n.current),n.current=null)}},[e,t]);let l=(0,q.useCallback)(()=>{o.current=setTimeout(()=>{clearTimeout(o.current),o.current=void 0,c.current=!1},50)},[]),u=(0,q.useCallback)(e=>{let t=e.target;if(!Pn(t))return;let{scrollTop:n,scrollHeight:r}=t;if(a.current=r+n,s.current){s.current=!1;return}o.current&&clearTimeout(o.current),l()},[l]);(0,q.useLayoutEffect)(()=>{if(e)return e.addEventListener(`scroll`,u,{capture:!0}),()=>e?.removeEventListener(`scroll`,u,{capture:!0})},[e,u]);let d=(0,q.useCallback)(()=>{e.scrollTop=a.current-e.scrollHeight,s.current=!0},[e]);return{reset:(0,q.useCallback)(()=>{r.current=!0,i.current=!1,a.current=e?.scrollHeight||0},[e]),scrollTo:(0,q.useCallback)(n=>{if(!e||!t)return;let{top:r,intoView:i,intoViewDom:a}=n||{};Pn(e)?r!==void 0&&r>=-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1:r!==void 0&&r>=e.scrollHeight-e.clientHeight-10?c.current=!0:a&&i?.block===`end`?c.current=t.lastElementChild===a:c.current=!1,o.current||l(),a?a.scrollIntoView(i):e.scrollTo(n)},[e,t])}}var In=q.forwardRef(({prefixCls:e,content:t,variant:n=`shadow`,shape:i,style:a,className:o,styles:s={},classNames:c={},rootClassName:l,...u},d)=>{let f=Ct(`bubble`),{getPrefixCls:p}=Y(),m=p(`bubble`,e),[h,g]=Tn(m),_=r(h,g,`${m}-system`,m,f.className,f.classNames.root,c.root,o,l);return q.createElement(Mn,O({ref:d,style:a,className:_,styles:s,classNames:c,variant:n,shape:i,content:t},u))}),Ln=c(ln());function Rn(e){return typeof e==`function`&&e instanceof Function}var zn=q.memo(Mn),Bn=q.memo(Nn),Vn=q.memo(In),Hn=e=>{let{_key:t,bubblesRef:n,extraInfo:r,status:i,role:a,classNames:o={},styles:s={},...c}=e,l=q.useCallback(e=>{e?n.current[t]=e:delete n.current[t]},[t]),{root:u,bubble:d,divider:f,system:p,...m}=o,{root:h,bubble:g,divider:_,system:v,...y}=s,b=q.createElement(zn,O({ref:l,style:h||g,className:u||d,classNames:m,styles:y},c));return a===`divider`?b=q.createElement(Bn,O({ref:l,style:h||_,className:u||f,classNames:m,styles:y},c)):a===`system`&&(b=q.createElement(Vn,O({ref:l,style:h||v,className:u||p,classNames:m,styles:y},c))),q.createElement(un.Provider,{value:{key:t,status:i,extraInfo:r}},b)};Mn.List=q.forwardRef((e,t)=>{let{prefixCls:n,rootClassName:i,className:a,styles:o={},classNames:s={},style:c,items:l,autoScroll:u=!0,role:d,onScroll:f,...p}=e,m=(0,jn.default)(p,{attr:!0,aria:!0}),h=q.useRef(null),g=q.useRef({}),[_,v]=q.useState(),[y,b]=q.useState(),{scrollTo:x}=Fn(_,y),{getPrefixCls:S}=Y(),C=S(`bubble`,n),w=`${C}-list`,[T,E]=Tn(C),D=r(w,i,a,s.root,T,E),k={...o.root,...c};return bt(t,()=>({nativeElement:h.current,scrollBoxNativeElement:_,scrollTo:({key:e,top:t,behavior:n=`smooth`,block:r})=>{let{scrollHeight:i,clientHeight:a}=_;typeof t==`number`?x({top:u?-i+a+t:t,behavior:n}):t===`bottom`?x({top:u?0:i,behavior:n}):t===`top`?x({top:u?-i:0,behavior:n}):e&&g.current[e]&&x({intoView:{behavior:n,block:r},intoViewDom:g.current[e].nativeElement})}})),q.createElement(`div`,O({},m,{className:D,style:k,ref:h}),q.createElement(`div`,{className:r(`${w}-scroll-box`,s.scroll,{[`${w}-autoscroll`]:u}),style:o.scroll,ref:e=>v(e),onScroll:f},q.createElement(`div`,{ref:e=>b(e),className:r(`${w}-scroll-content`)},l.map(e=>{let t;if(e.role&&d){let n=d[e.role];t={...Rn(n)?n(e):n,...e}}else t=e;return q.createElement(Hn,O({classNames:(0,Ln.default)(s,[`root`,`scroll`]),styles:(0,Ln.default)(o,[`root`,`scroll`])},(0,Ln.default)(t,[`key`]),{key:e.key,_key:e.key,bubblesRef:g}))}))))}),Mn.System=In,Mn.Divider=Nn;var Un=Mn,Wn=()=>({height:0,opacity:0}),Gn=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},Kn=e=>({height:e?e.offsetHeight:0}),qn=(e,t)=>t?.deadline===!0||t.propertyName===`height`,Jn=(e=`ant`)=>({motionName:`${e}-motion-collapse`,onAppearStart:Wn,onEnterStart:Wn,onAppearActive:Gn,onEnterActive:Gn,onLeaveStart:Kn,onLeaveActive:Wn,onAppearEnd:qn,onEnterEnd:qn,onLeaveEnd:qn,motionDeadline:500}),Yn=(e,t,n)=>{let r=typeof e==`boolean`||e?.expandedKeys===void 0,[i,a,o,s]=q.useMemo(()=>{let t={expandedKeys:[],defaultExpandedKeys:[],onExpand:()=>{}};return e?(typeof e==`object`&&(t={...t,...e}),[!0,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]):[!1,t.defaultExpandedKeys,t.expandedKeys,t.onExpand]},[e]),[c,l]=P(a||[],r?void 0:o),u=e=>{l(t=>{let n=r?t:o,i=n.includes(e)?n.filter(t=>t!==e):[...n,e];return s?.(i),i})},d=q.useMemo(()=>i?{...Jn(n),motionAppear:!1,leavedClassName:`${t}-content-hidden`}:{},[n,t,i]);return[i,c,i?u:void 0,d]},Xn=c(z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){let{keyCode:n}=e;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE||e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY||e>=t.A&&e<=t.Z||window.navigator.userAgent.indexOf(`WebKit`)!==-1&&e===0)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},isEditableTarget:function(e){let t=e.target;if(!(t instanceof HTMLElement))return!1;let n=t.tagName;return!!(n===`INPUT`||n===`TEXTAREA`||n===`SELECT`||t.isContentEditable)}};e.default=t}))()),Zn={Alt:[`altKey`,`⌥`,`Alt`],Ctrl:[`ctrlKey`,`⌃`,`Ctrl`],Meta:[`metaKey`,`⌘`,`Win`],Shift:[`shiftKey`,`⇧`,`Shift`]},Qn=Array.from({length:9},(e,t)=>Xn.default.ONE+t),$n=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<`u`?navigator?.platform:``),er=e=>e===`number`?e:typeof e==`string`&&Zn?.[e]?.[$n?1:2]?Zn[e][$n?1:2]:Object.entries(Xn.default||{})?.find(([t,n])=>n===e)?.[0]||``,tr=(e,t)=>{let n=[...e],r=n.pop();return n.reduce((e,n)=>e&&(t[Zn?.[n]?.[0]]||!1),r===t.keyCode)?{actionShortcutKey:e,actionKeyCodeNumber:Qn.indexOf(t.keyCode)>-1?Qn.indexOf(t.keyCode):!1,actionKeyCode:t.keyCode,timeStamp:t.timeStamp}:!1},nr=e=>{let t=[...e],n=t.pop();return{keyCodeDict:n===`number`?Qn:[n],prefixKeys:t}},rr=(e,t,n)=>{Tt(!e.find(({shortcutKey:e})=>e.toString()===t.toString()),n,`Same shortcutKey ${t.toString()}`)},ir=(e,t,n)=>{let r=Object.assign({},t||{},n);return Object.keys(r).reduce(({flattenShortcutKeys:t,shortcutKeysInfo:n},i)=>{let a=r[i];if(!Array.isArray(a))return{flattenShortcutKeys:t,shortcutKeysInfo:n};if(n={...n,[i]:{shortcutKeys:a,shortcutKeysIcon:[]}},a.every(e=>Array.isArray(e)))a.forEach((r,a)=>{let o=r;rr(t,o,e),t.push({name:i,shortcutKey:o,index:a}),n[i].shortcutKeysIcon.push(o?.map(e=>er(e)))});else{let{keyCodeDict:r,prefixKeys:o}=nr(a);r.forEach(n=>{rr(t,[...o,n],e),t.push({name:i,shortcutKey:[...o,n]})}),n[i].shortcutKeysIcon=a.map(e=>er(e))}return{flattenShortcutKeys:t,shortcutKeysInfo:n}},{flattenShortcutKeys:[],shortcutKeysInfo:{}})},ar=()=>{let e=(0,q.useRef)(void 0);return[e,t=>{e.current=t}]},or=(e,t)=>{let{flattenShortcutKeys:n,shortcutKeysInfo:r}=ir(e,Ct(e).shortcutKeys,t),[i,a]=(0,q.useState)(null),[o,s]=ar(),c=(0,q.useRef)(!1),l=e=>{for(let t of n){let n=tr(t.shortcutKey,e);if(n){let e={...n,name:t.name,index:t?.index};if(c.current)return;c.current=!0,a(e),o?.current?.(e)}}},u=()=>{c.current=!1};return(0,q.useEffect)(()=>{if(n.length!==0)return document.addEventListener(`keydown`,l),document.addEventListener(`keyup`,u),()=>{document.removeEventListener(`keydown`,l),document.removeEventListener(`keyup`,u)}},[n.length,o]),[i,r,s]},sr=({shortcutKeysIcon:e,prefixCls:t})=>{let[n]=Lt(`Conversations`,Ft.Conversations),i=!!e?.length;return q.createElement(`div`,{className:r(t,{[`${t}-shortcut-keys-show`]:i})},q.createElement(`span`,null,n.create),i&&q.createElement(`span`,{className:r(`${t}-shortcut-keys`)},e.map(e=>q.createElement(`span`,{className:r(`${t}-shortcut-key`),key:e},e))))},cr=({icon:e,label:t,align:r,shortcutKeyInfo:i,prefixCls:a})=>{let{shortcutKeysIcon:o}=i||{},s={label:q.createElement(sr,{prefixCls:`${a}-label`,shortcutKeysIcon:o}),icon:q.createElement(n,{className:`${a}-icon`}),align:`center`};return t&&(s.label=typeof t==`function`?t({shortcutKeyInfo:i,components:{CreationLabel:sr}}):t),e&&(s.icon=typeof e==`function`?e():e),[s.icon,s.label,r||s.align]},lr=({className:e,icon:t,label:n,align:i,style:a,disabled:o,onClick:s,prefixCls:c,shortcutKeyInfo:l})=>{let[u,d,f]=cr({prefixCls:c,label:n,icon:t,align:i,shortcutKeyInfo:l});return q.createElement(`button`,{type:`button`,onClick:e=>{o||s?.(e)},style:a,className:r(c,e,`${c}-${f}`,{[`${c}-disabled`]:o})},u,d)},ur=q.createContext(null),dr=({className:e,children:t})=>{let{prefixCls:n,groupInfo:i,enableCollapse:a,expandedKeys:o,onItemExpand:s,collapseMotion:c}=q.useContext(ur)||{},{label:l,name:u,collapsible:d}=i||{},f=typeof l==`function`?l(u,{groupInfo:i}):l||u,p=d&&a,m=()=>{p&&s?.(i.name)},h=p&&!!o?.includes?.(u);return q.createElement(`li`,{className:e},q.createElement(`div`,{className:r(`${n}-group-title`,{[`${n}-group-title-collapsible`]:p}),onClick:m},f&&q.createElement(`div`,{className:r(`${n}-group-label`)},f),p&&q.createElement(`div`,{className:r(`${n}-group-collapse-trigger `,`${n}-group-collapse-trigger-${h?`open`:`close`}`)},q.createElement(k,null))),q.createElement(L,O({},c,{visible:p?h:!0}),({className:e,style:n},i)=>q.createElement(`div`,{className:r(e),ref:i,style:n},t)))},fr=(e,t=[])=>{let[n,r,i]=(0,q.useMemo)(()=>{let t={label:``,collapsibleHandle:!1,collapsibleOptions:{}};if(!e)return[``,t.collapsibleHandle,t.collapsibleOptions];if(typeof e==`object`){let{collapsible:n,defaultExpandedKeys:r,expandedKeys:i,onExpand:a,...o}=e;t={...t,...o,collapsibleHandle:n,collapsibleOptions:{defaultExpandedKeys:r,expandedKeys:i,onExpand:a}}}return[t.label,t.collapsibleHandle,t.collapsibleOptions]},[e]);return q.useMemo(()=>{let a=t.reduce((t,i)=>{if(i?.type===`divider`||!i.group||!e)return t.push({data:[i],name:``,label:``,enableGroup:!1,collapsible:!1}),t;let a=i,o=t.some((e,n)=>e.name===a?.group?(t[n].data.push(a),!0):!1),s=typeof r==`function`?r?.(a?.group):r;return o||t.push({data:[a],enableGroup:!0,name:a?.group,label:n,collapsible:s}),t},[]);return[a,i,a.reduce((e,t)=>(t.data.forEach(t=>{t.type!==`divider`&&e.push({key:t.key,disabled:t.disabled})}),e),[])]},[t,i])},pr=e=>{e.stopPropagation()},mr=e=>{let{prefixCls:t,info:n,className:i,direction:a,onClick:o,active:s,menu:c,...l}=e,u=(0,jn.default)(l,{aria:!0,data:!0,attr:!0}),{disabled:d}=n,p=r(i,`${t}-item`,{[`${t}-item-active`]:s&&!d},{[`${t}-item-disabled`]:d}),m=()=>{!d&&o&&o(n.key)},{trigger:h,...g}=c||{},_=g?.getPopupContainer;return q.createElement(`li`,O({title:typeof n.label==`object`?void 0:`${n.label}`},u,{className:p,onClick:m}),n.icon&&q.createElement(`div`,{className:`${t}-icon`},n.icon),q.createElement(te.Text,{className:`${t}-label`},n.label),!d&&c&&q.createElement(`div`,{onClick:pr},q.createElement(f,{menu:g,placement:a===`rtl`?`bottomLeft`:`bottomRight`,trigger:[`click`],disabled:d,getPopupContainer:_},(e=>{let n=q.createElement(H,{onClick:pr,className:`${t}-menu-icon`});return h?typeof h==`function`?h(e,{originNode:n}):h:n})(n))))},hr=e=>{let{componentCls:t,calc:n}=e;return{[t]:{display:`flex`,flexDirection:`column`,gap:e.paddingXXS,overflowY:`auto`,padding:e.paddingSM,margin:0,listStyle:`none`,"ul, ol":{margin:0,padding:0,listStyle:`none`},[`&${t}-rtl`]:{direction:`rtl`},[`${t}-creation`]:{backgroundColor:e.creationBgColor,color:e.colorPrimary,border:`none`,fontWeight:500,paddingBlock:e.paddingXS,paddingInline:e.paddingSM,fontSize:e.fontSize,cursor:`pointer`,display:`flex`,gap:e.paddingXS,marginBlockEnd:e.marginSM,lineHeight:e.lineHeight,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-creation-disabled):hover`]:{color:e.colorPrimary,background:e.creationHoverColor},[`&:not(${t}-creation-disabled)`]:{border:`${u(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-label":{display:`flex`,justifyContent:`space-between`,alignItems:`center`},"&-label-shortcut-keys-show":{flex:1},"&-label-shortcut-keys":{height:e.controlHeightXS,display:`flex`,alignItems:`center`,gap:u(4)},"&-label-shortcut-key":{borderRadius:e.borderRadiusSM,height:`100%`,boxSizing:`border-box`,fontSize:e.fontSizeIcon,paddingInline:`${u(n(e.paddingXXS).sub(1).equal())}`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:e.shortcutKeyTextColor,border:`${u(e.lineWidth)} ${e.lineType}, ${e.creationBorderColor}`},"&-disabled":{cursor:`not-allowed`,background:e.colorBgContainerDisabled,[`& ${t}-creation-label, ${t}-creation-icon`]:{color:e.colorTextDisabled},[`& ${t}-creation-label-shortcut-keys`]:{color:e.colorTextDisabled,border:`${u(e.lineWidth)} ${e.lineType}, ${e.colorBgContainerDisabled}`}}},[`${t}-divider`]:{marginBlock:e.marginXXS},[`${t}-item`]:{display:`flex`,height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${u(e.paddingXS)}`,alignItems:`center`,borderRadius:e.borderRadiusLG,cursor:`pointer`,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,[`&:not(${t}-item-disabled):hover`]:{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:`not-allowed`,[`& ${t}-label, ${t}-icon, ${t}-menu-icon`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:.6}},[`${t}-menu-icon:hover`]:{opacity:1}},[`${t}-content-hidden`]:{display:`none`},[`${t}-label`]:{flex:1,color:e.colorText,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},[`${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`${t}-list`]:{display:`flex`,gap:e.paddingXXS,flexDirection:`column`},[`${t}-group-collapsible-list`]:{paddingBlockStart:e.paddingXXS,[`& ${t}-item`]:{paddingInlineStart:e.paddingXL}},[`${t}-group-title`]:{display:`flex`,alignItems:`center`,color:e.colorTextDescription,height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${u(e.paddingXS)}`},[`${t}-group-title-collapsible`]:{justifyContent:`space-between`,cursor:`pointer`,color:e.colorText,borderRadius:e.borderRadiusLG,transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover}},[`${t}-group-collapse-trigger`]:{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,transform:`rotate(0deg)`,transformOrigin:`center center`},[`${t}-group-collapse-trigger-open`]:{transform:`rotate(90deg)`},[`${t}-group-collapse-trigger-close`]:{transform:`rotate(0deg)`}}}},gr=on(`Conversations`,e=>{let t=l(e,{});return[hr(t),Kt(t)]},e=>{let t=new a(e.colorPrimary).setA(.15),n=new a(e.colorPrimary).setA(.22),r=new a(e.colorPrimary).setA(.25),i=new a(e.colorPrimary).setA(.65);return{creationBgColor:t.toRgbString(),creationBorderColor:n.toRgbString(),creationHoverColor:r.toRgbString(),shortcutKeyTextColor:i.toRgbString()}}),_r=q.forwardRef((e,t)=>{let{prefixCls:n,shortcutKeys:i,rootClassName:a,items:o,activeKey:s,defaultActiveKey:c,onActiveChange:l,menu:u,styles:d={},classNames:f={},groupable:p,className:m,style:h,creation:g,..._}=e,v=(0,jn.default)(_,{attr:!0,aria:!0,data:!0}),y=q.useRef(null);bt(t,()=>({nativeElement:y.current}));let[b,x]=P(c,s),[S,C,w]=fr(p,o),{getPrefixCls:T,direction:E}=Y(),D=T(`conversations`,n),k=Ct(`conversations`),[A,j]=gr(D),M=r(D,k.className,k.classNames.root,m,f.root,a,A,j,{[`${D}-rtl`]:E===`rtl`}),N=e=>{x(e),l?.(e,o?.find(t=>t.key===e))},[F,te,ne]=or(`conversations`,i);ne(e=>{switch(e?.name){case`items`:{let t=e?.actionKeyCodeNumber??e?.index;typeof t==`number`&&!w?.[t]?.disabled&&w?.[t]?.key&&(x(w?.[t]?.key),l?.(w?.[t]?.key,o?.find(e=>e.key===w?.[t]?.key)))}break;case`creation`:typeof g?.onClick==`function`&&!g?.disabled&&g.onClick();break}});let I=e=>e.map((e,t)=>{if(e.type===`divider`)return q.createElement(ee,{key:`key-divider-${t}`,className:`${D}-divider`,dashed:e.dashed});let n=e,{label:i,disabled:a,icon:o,...s}=n;return q.createElement(mr,O({},s,{key:n.key||`key-${t}`,info:n,prefixCls:D,direction:E,className:r(f.item,k.classNames.item,n.className),style:{...k.styles.item,...d.item,...n.style},menu:typeof u==`function`?u(n):u,active:b===n.key,onClick:N}))}),[L,R,z,B]=Yn(C,D,T());return q.createElement(`ul`,O({},v,{style:{...k.style,...h,...k.styles.root,...d.root},className:M,ref:y}),!!g&&q.createElement(lr,O({className:r(k.classNames.creation,f.creation),style:{...k.styles.creation,...d.creation},shortcutKeyInfo:te?.creation,prefixCls:`${D}-creation`},g)),S.map((e,t)=>{let n=I(e.data);return e.enableGroup?q.createElement(ur.Provider,{key:e.name||`key-${t}`,value:{prefixCls:D,groupInfo:e,enableCollapse:L,expandedKeys:R,onItemExpand:z,collapseMotion:B}},q.createElement(dr,{className:r(k.classNames.group,f.group)},q.createElement(`ul`,{className:r(`${D}-list`,{[`${D}-group-collapsible-list`]:e.collapsible}),style:{...k.styles.group,...d.group}},n))):n}))});_r.Creation=lr;var vr=q.createContext(null),yr=q.forwardRef((e,t)=>{let{className:n,action:i,onClick:a,...o}=e,s=(0,q.useContext)(vr),{prefixCls:c,disabled:l,setSubmitDisabled:u}=s,d=o.disabled??l??s[`${i}Disabled`];return(0,q.useEffect)(()=>{i===`onSend`&&u?.(d)},[d,i,u]),q.createElement(M,O({type:`text`},o,{ref:t,onClick:e=>{d||(s[i]?.(),a?.(e))},disabled:d,className:r(c,n,{[`${c}-disabled`]:d})}))});function br(e,t){return q.createElement(yr,O({icon:q.createElement(y,null)},e,{action:`onClear`,ref:t}))}var xr=q.forwardRef(br),Sr=(0,q.memo)(e=>{let{className:t}=e,[n]=Lt(`Sender`,Ft.Sender);return q.createElement(`svg`,{color:`currentColor`,viewBox:`0 0 1000 1000`,xmlns:`http://www.w3.org/2000/svg`,className:t},q.createElement(`title`,null,n.stopLoading),q.createElement(`rect`,{fill:`currentColor`,height:`250`,rx:`24`,ry:`24`,width:`250`,x:`375`,y:`375`}),q.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,opacity:`0.45`}),q.createElement(`circle`,{cx:`500`,cy:`500`,fill:`none`,r:`450`,stroke:`currentColor`,strokeWidth:`100`,strokeDasharray:`600 9999999`},q.createElement(`animateTransform`,{attributeName:`transform`,dur:`1s`,from:`0 500 500`,repeatCount:`indefinite`,to:`360 500 500`,type:`rotate`})))}),Cr=q.forwardRef((e,t)=>{let{prefixCls:n}=q.useContext(vr),{className:i}=e;return q.createElement(yr,O({icon:q.createElement(Sr,{className:`${n}-loading-icon`}),color:`primary`,variant:`text`,shape:`circle`},e,{className:r(i,`${n}-loading-button`),action:`onCancel`,ref:t}))});function wr(e,t){return q.createElement(yr,O({icon:q.createElement(S,null),type:`primary`,shape:`circle`},e,{action:`onSend`,ref:t}))}var Tr=q.forwardRef(wr),Er=q.createContext({}),Dr=e=>{let t=(0,q.useCallback)(()=>typeof window>`u`?null:window.getSelection(),[]),n=(e,t)=>{if(!e||!t)return t;let n=e,r=null;for(n.nodeType===Node.TEXT_NODE&&(n=n.parentElement);n&&n!==t;)n instanceof HTMLElement&&n.tagName===`SPAN`&&(r=n),n=n.parentElement;return r||t},r=(0,q.useCallback)(()=>{let e=t();if(!e)return{range:null,selection:e};try{return{range:e.getRangeAt(0)||document.createRange(),selection:e}}catch{return{range:document.createRange(),selection:e}}},[t]),i=(0,q.useCallback)((e,t)=>{if(!(!e||!t))try{t.removeAllRanges(),t.addRange(e)}catch(e){Tt(!1,`Sender`,`Failed to set range: ${e}`)}},[]),a=(0,q.useCallback)(()=>{let e=t();if(e)try{e.removeAllRanges()}catch(e){Tt(!1,`Sender`,`Failed to remove all ranges: ${e}`)}},[t]),o=(0,q.useCallback)((e,t=!1)=>{if(!(!e||typeof e.focus!=`function`))try{e.focus({preventScroll:t})}catch(e){Tt(!1,`Sender`,`Failed to focus element: ${e}`)}},[]),s=(0,q.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!1),i(n,a)}catch(e){Tt(!1,`Sender`,`Failed to set end cursor: ${e}`)}},[o,r,i]),c=(0,q.useCallback)((e,t)=>{if(!e)return;o(e,t);let{range:n,selection:a}=r();if(n&&a)try{n.selectNodeContents(e),n.collapse(!0),i(n,a)}catch(e){Tt(!1,`Sender`,`Failed to set start cursor: ${e}`)}},[o,r,i]),l=(0,q.useCallback)((e,t,n)=>{if(!e)return;o(e,n);let{range:a,selection:s}=r();if(a&&s)try{a.selectNodeContents(e),t&&a.setStart(e,1),i(a,s)}catch(e){Tt(!1,`Sender`,`Failed to select all content: ${e}`)}},[o,r,i]),u=(0,q.useCallback)((e,t,n,a)=>{if(!e||typeof n!=`number`||n<0||!t)return{range:null,selection:null};o(t,a);let{range:s,selection:c}=r();if(s&&c)try{let t=Math.min(n,e.childNodes.length);s.setStart(e,t),s.setEnd(e,t),s.collapse(!1),i(s,c)}catch(e){Tt(!1,`Sender`,`Failed to set cursor position:: ${e}`)}return{range:s,selection:c}},[o,r,i]),d=(0,q.useCallback)((t,n,r=!1)=>{if(!e||!t?.current)return;let{getSlotDom:i,slotConfigMap:a}=e,o=e=>{let t=i(e);if(!t)return null;let n=a.get(e);if(!n)return null;if(n.type===`input`)return t.querySelector(`input`);let r=t?.getAttribute?.(`data-node-type`)||``;return n.type===`content`&&r!==`nbsp`?t:null},s=(e=>{let n=t.current;if(!n)return null;if(e)return o(e);for(let e of Array.from(n.childNodes)){let t=e?.getAttribute?.(`data-slot-key`);if(t){let e=o(t);if(e)return e}}return null})(n);s&&(s.nodeName===`INPUT`?s.focus({preventScroll:r}):u(s,t.current,0,r))},[e,u]),f=(0,q.useCallback)((e,t,n,r,i)=>{!n||!r||(o(t,i),n?.setStartAfter(e),n.collapse(!1),r.removeAllRanges(),r.addRange(n))},[o]),p=(0,q.useCallback)(e=>{if(!e)return{value:``,startContainer:null,startOffset:0};let n=t();if(!n||n.rangeCount===0)return{value:``,startContainer:null,startOffset:0};try{let t=n.getRangeAt(0),r=t.cloneRange();if(!e.contains(t.startContainer))return{value:``,startContainer:null,startOffset:0};if(t.endContainer===e&&t.endContainer.lastChild?.nodeType===Node.TEXT_NODE){let e=t.endContainer.lastChild;t=document.createRange(),t.setStart(e,e.length),t.setEnd(e,e.length)}return r=t.cloneRange(),r.selectNodeContents(e),r.setEnd(t.startContainer,t.startOffset),{value:r.toString().replace(/\u200B/g,``),startContainer:t.startContainer,startOffset:t.startOffset}}catch(e){return Tt(!1,`Sender`,`Failed to get text before cursor: ${e}`),{value:``,startContainer:null,startOffset:0}}},[t]),m=(0,q.useCallback)((i,a,o)=>{if(i===`start`||i===`end`)return{type:i,selection:t()};let l=null,u=null;if(o?.current)l=o.current,u=t();else{let e=r();l=e.range,u=e.selection}if(!l||!u)return{type:`end`,selection:u};let d=a?.current;if(!d)return{type:`end`,selection:u};let f=d.contains(l.endContainer),p=d.contains(l.startContainer);if(!f)return s(d,!0),{type:`end`,selection:u};if(!p)return c(d,!0),{type:`start`,selection:u};let m=n(l.endContainer,d),h=n(l.startContainer,d);if(m===h&&h!==d&&e?.getNodeInfo){let{slotKey:t,slotConfig:n,skillKey:r}=e.getNodeInfo(m)||{};if(t)return{type:`slot`,slotKey:n?.key,slotType:n?.type,range:l,selection:u};if(r)return{type:`start`,selection:u}}return{type:`box`,range:l,selection:u}},[e,r,t,s,c,n]),h=(0,q.useCallback)(e=>{let t=e.childNodes[e.childNodes.length-1];return u(e,e,t?.nodeType===Node.TEXT_NODE&&t.textContent===` +`?e.childNodes.length-1:e.childNodes.length).range||document.createRange()},[u]),g=(0,q.useCallback)(t=>u(t,t,+!!e?.getEditorValue?.().skill).range||document.createRange(),[u,e]),_=(0,q.useCallback)(e=>e.replace(/\u200B/g,``).replace(/\n/g,``).replace(/^\n+|\n+$/g,``),[]);return{setEndCursor:s,setStartCursor:c,setAllSelectCursor:l,setCursorPosition:u,setAfterNodeFocus:f,setSlotFocus:d,getTextBeforeCursor:p,getSelection:t,removeAllRanges:a,getRange:r,getInsertPosition:m,getEndRange:h,getStartRange:g,copySelectionString:(0,q.useCallback)(async()=>{try{let e=t();if(!e)return!1;let n=e.toString();if(!n)return!1;let r=_(n);return await navigator.clipboard.writeText(r),!0}catch(e){return Tt(!1,`Sender`,`Failed to copy selection: ${e}`),!1}},[t,_]),getCleanedText:_}},Or=4.35,kr=(e,t,n)=>{let{token:r}=an(),i=n.current?window.getComputedStyle(n.current):{},a=parseFloat(`${e.lineHeight||r.lineHeight}`),o=parseFloat(`${i?.fontSize||e.fontSize||r.fontSize}`),s=i?.lineHeight?parseFloat(`${i?.lineHeight}`):a*o;return t===!1||!t?{}:t===!0?{height:`auto`}:{minHeight:t.minRows?(s+Or)*t.minRows:`auto`,maxHeight:t.maxRows?(s+Or)*t.maxRows:`auto`,overflowY:`auto`}},Ar=e=>{let{prefixCls:t,placeholder:n,slotDomMap:i,slotConfigMap:a}=e,o=(0,q.useCallback)(e=>{let r=document.createElement(`span`);return r.setAttribute(`contenteditable`,`false`),r.dataset.skillKey=e,r.dataset.placeholder=n||``,r.className=`${t}-skill`,r},[t,n]),s=(0,q.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`true`),n.dataset.slotKey=e.key,n.className=r(`${t}-slot`,`${t}-slot-content`),n},[t]),c=(0,q.useCallback)(e=>{let n=document.createElement(`span`);return n.setAttribute(`contenteditable`,`false`),n.dataset.slotKey=e,n.className=`${t}-slot`,n},[t]),l=(0,q.useCallback)((e,n)=>{let i=document.createElement(`span`);return i.setAttribute(`contenteditable`,`false`),i.dataset.slotKey=e,i.dataset.nodeType=`nbsp`,i.className=r(`${t}-slot-${n}`,`${t}-slot-no-width`),i.textContent=`\xA0`,i},[t]),u=(e,t)=>{i.current.set(e,t)},d=e=>i.current.get(e);return{buildSkillSpan:o,buildEditSlotSpan:s,buildSlotSpan:c,buildSpaceSpan:l,saveSlotDom:u,getSlotDom:d,getSlotLastDom:(e,t)=>(t??a.get(e)?.type)===`content`?d(`${e}_after`):d(e)}},jr=new Set([`input`,`select`,`custom`,`content`]),Mr=e=>e?.reduce((e,t)=>{let{key:n,type:r}=t;if(!n)return e;let i=t.props||{};return e[n]=(jr.has(r)?i.defaultValue:i.value??i.label)??``,e},{})??{},Nr=(e,t)=>{e?.forEach(e=>{e.key&&t.set(e.key,e)})},Pr=(e,t)=>{if(!e?.dataset)return null;let{dataset:n}=e;return{slotKey:n.slotKey,placeholder:n.placeholder,nodeType:n.nodeType,skillKey:n.skillKey,slotConfig:n.slotKey?t.get(n.slotKey):void 0,targetNode:e}},Fr=e=>{let[t,n]=(0,q.useState)({}),r=(0,q.useRef)(t),i=(0,q.useRef)(new Map);(0,q.useEffect)(()=>{if(!e)return;i.current.clear(),Nr(e,i.current);let t=Mr(e);n(t),r.current=t},[e]);let a=(0,q.useCallback)(e=>{let t=typeof e==`function`?e(r.current):e;n(t),r.current=t},[]),o=(0,q.useCallback)(e=>{let t=Mr(e);e.forEach(e=>{e.key&&i.current.set(e.key,e)}),n(e=>({...e,...t})),r.current={...r.current,...t}},[]),s=(0,q.useCallback)(e=>Pr(e,i.current),[]);return[i.current,{getSlotValues:()=>r.current,setSlotValues:a,mergeSlotConfig:o,getNodeInfo:s,getNodeTextValue:e=>{let t=e.nodeType;if(t===Node.TEXT_NODE)return e.textContent||``;if(t!==Node.ELEMENT_NODE)return``;let n=e,i=s(n);if(!i)return n.innerText||``;let{slotKey:a,skillKey:o,nodeType:c,slotConfig:l}=i;if(o)return``;let u=n.innerText||``;if(a){if(c===`nbsp`)return` `;if(!l||l.type===`content`)return u;let e=r.current[a]??``;return l.formatResult?.(e)??e}return u}}]},Ir=({removeSkill:e,prefixCls:t,toolTip:n,closable:i,title:a,value:s})=>{let c=`${t}-skill`,l=(0,q.useMemo)(()=>{if(!i)return[null];let t=typeof i==`boolean`?{}:i,n=n=>{t.disabled||(n.stopPropagation(),e(),t.onClose?.(n))},a=t.closeIcon||q.createElement(w,{className:`${c}-close-icon`});return q.createElement(`div`,{className:r(`${c}-close`,{[`${c}-close-disabled`]:t.disabled}),onClick:n,role:`button`,"aria-label":`Close skill`,tabIndex:0},a)},[i,e]),u=a||s,d=n?q.createElement(o,n,u):u;return q.createElement(`div`,{className:`${c}-wrapper`,contentEditable:!1},q.createElement(`div`,{className:`${c}-tag`,contentEditable:!1,role:`button`,tabIndex:0},q.createElement(`span`,{className:`${c}-tag-text`},d),l),q.createElement(`div`,{className:`${c}-holder`}))};Ir.displayName=`Skill`;var Lr=c(_()),Rr=q.forwardRef((e,t)=>{let{onChange:n,onKeyUp:i,onKeyDown:a,onPaste:o,onPasteFile:c,disabled:l,readOnly:u,submitType:d=`enter`,prefixCls:p,styles:m={},classNames:h={},autoSize:g,triggerSend:_,placeholder:v,onFocus:y,onBlur:b,slotConfig:x,skill:S,...C}=q.useContext(Er),{direction:w,getPrefixCls:T}=Y(),E=`${T(`sender`,p)}`,D=Ct(`sender`),k=`${E}-input`,j=(0,q.useRef)(null),M=(0,q.useRef)(new Map),N=(0,q.useRef)(!1),P=(0,q.useRef)(!1),ee=(0,q.useRef)(null),F=(0,q.useRef)(null),te=(0,q.useRef)(null),ne={...D.styles?.input,...m.input},I=kr(ne,g,j),L={...(0,jn.default)(C,{attr:!0,aria:!0,data:!0}),ref:j},[R,{getSlotValues:z,setSlotValues:B,getNodeInfo:re,mergeSlotConfig:V,getNodeTextValue:H}]=Fr(x),[ie,ae]=(0,q.useState)(new Map),[oe,se]=(0,q.useState)(null),{setEndCursor:ce,setStartCursor:le,setAllSelectCursor:ue,setCursorPosition:de,setSlotFocus:fe,setAfterNodeFocus:pe,getTextBeforeCursor:me,removeAllRanges:he,getRange:U,getInsertPosition:ge,getEndRange:_e,getStartRange:ve,getSelection:ye,copySelectionString:be,getCleanedText:xe}=Dr({prefixCls:E,getSlotDom:e=>M.current.get(e),slotConfigMap:R,getNodeInfo:re,getEditorValue:()=>Ne()}),{buildSkillSpan:Se,buildEditSlotSpan:Ce,buildSlotSpan:we,buildSpaceSpan:Te,getSlotDom:Ee,saveSlotDom:De,getSlotLastDom:Oe}=Ar({prefixCls:E,placeholder:v,slotDomMap:M,slotConfigMap:R}),ke=e=>{let t=Ne();F.current&&(!t?.value&&t.slotConfig.length===0&&v?(F.current.setAttribute(`contenteditable`,`true`),F.current.classList.add(`${E}-skill-empty`)):(F.current.setAttribute(`contenteditable`,`false`),F.current.classList.remove(`${E}-skill-empty`))),n?.(t.value,e,t.slotConfig,t.skill)},Ae=(e,t,n)=>{let r=Ee(e),i=R.get(e);if(B(n=>({...n,[e]:t})),r&&i){let t=je(i,r);ae(n=>{let r=new Map(n);return r.set(e,t),r}),ke(n)}},je=(e,t)=>{if(!e.key)return null;let n=z()[e.key];return(0,Lr.createPortal)((()=>{switch(e.type){case`content`:return t.innerHTML=n||``,t.setAttribute(`data-placeholder`,e.props?.placeholder||``),null;case`input`:return q.createElement(s,{readOnly:u,className:`${E}-slot-input`,placeholder:e.props?.placeholder||``,"data-slot-input":e.key,size:`small`,variant:`borderless`,value:n||``,tabIndex:0,onKeyDown:We,onChange:t=>{Ae(e.key,t.target.value,t)},spellCheck:!1});case`select`:return q.createElement(f,{disabled:u,menu:{items:e.props?.options?.map(e=>({label:e,key:e})),defaultSelectedKeys:e.props?.defaultValue?[e.props.defaultValue]:[],selectable:!0,onSelect:({key:t,domEvent:n})=>{Ae(e.key,t,n)}},trigger:[`click`]},q.createElement(`span`,{className:r(`${E}-slot-select`,{placeholder:!n,[`${E}-slot-select-selector-value`]:n})},q.createElement(`span`,{"data-placeholder":e.props?.placeholder,className:`${E}-slot-select-value`},n||``),q.createElement(`span`,{className:`${E}-slot-select-arrow`},q.createElement(A,null))));case`tag`:return q.createElement(`span`,{className:`${E}-slot-tag`},e.props?.label||e.props?.value||``);case`custom`:return e.customRender?.(n,t=>{Ae(e.key,t)},{disabled:l,readOnly:u},e);default:return null}})(),t)},Me=e=>e.reduce((e,t)=>{if(t.type===`text`)return e.push(document.createTextNode(t.value||``)),e;let n=t.key;if(Tt(!!n,`Sender`,`Slot key is missing: ${n}`),n){let r,i;if(t.type===`content`){i=Ce(t);let e=Te(n,`before`),a=Te(n,`after`);r=[e,i,a],De(`${n}_before`,e),De(n,i),De(`${n}_after`,a)}else i=we(n),r=[i],De(n,i);if(i){let a=je(t,i);a&&(ae(e=>{let t=new Map(e);return t.set(n,a),t}),e.push(...r))}}return e},[]),Ne=()=>{let e=j.current,t={value:``,slotConfig:[],skill:void 0};if(!e)return t;let n=e.childNodes;if(n.length===0)return e.innerHTML=``,F.current=null,t;let r=!!S,i=Array(n.length),a=[],o,s=0;for(let e=0;e{let e=j.current;e&&(e.innerHTML=``,F.current=null,te.current=null,ee.current=null,he(),M?.current?.clear())},Fe=e=>{e.forEach(e=>{j.current?.appendChild(e)})},Ie=(e,t)=>{let n=j.current;n&&(n.querySelectorAll(`[data-slot-key="${e}"]`).forEach(e=>{e.remove()}),M.current.delete(e),B(t=>{let{[e]:n,...r}=t;return r}),ae(t=>{let n=new Map(t);return n.delete(e),n}),ke(t))},W=()=>{if(S&&te.current!==S){Le(!1),te.current=S;let e=Se(S.value);se((0,Lr.createPortal)(q.createElement(Ir,O({removeSkill:Le},S,{prefixCls:E})),e));let t=document.createRange(),n=j.current;if(!n)return;t.setStart(n,0),t.insertNode(e),F.current=e,ke()}},Le=(e=!0)=>{!j.current||!F.current||(F.current?.remove(),F.current=null,te.current=null,e&&ke())},Re=e=>{d!==`enter`||!e||e.querySelectorAll(`br`).forEach(e=>{e.remove()})},ze=()=>{x&&x.length>0&&j.current&&(Pe(),Fe(Me(x)))},G=e=>{let t=a?.(e);return P.current||N.current||t===!1},Be=(e,t)=>{if(!j.current)return!1;let{range:n,selection:r}=U();if(!r||r.rangeCount===0)return!1;let{focusOffset:i,anchorNode:a}=r;if(!a||!j.current.contains(a))return!1;if(a.nodeType===Node.TEXT_NODE&&n){let r=a.parentNode,o=re(r),s=n.toString(),c=a.textContent?.length===s.length,l=a.textContent?.length===1&&i===1;if(o?.slotConfig?.type===`content`&&(c||l))return e.preventDefault(),t===`cut`&&be(),a.parentNode.innerHTML=``,!0}if(t===`backspace`&&i===0){let t=a.previousSibling;if(t){let n=re(t);if(n){let{slotKey:t,skillKey:r}=n;if(t)return e.preventDefault(),Ie(t,e),!0;if(r)return e.preventDefault(),Le(),!0}}}return!1},K=e=>{let{key:t,shiftKey:n,ctrlKey:r,altKey:i,metaKey:a}=e;if(t!==`Enter`)return!1;let o=r||i||a;return d===`enter`&&!n&&!o||d===`shiftEnter`&&n&&!o},Ve=()=>{if(!F.current||!j.current||F.current.getAttribute(`contenteditable`)===`false`)return;let e=ye();!e?.anchorNode||!F.current.contains(e.anchorNode)||!j.current.contains(e.anchorNode)||(F.current.setAttribute(`contenteditable`,`false`),F.current.classList.remove(`${E}-skill-empty`),rt({cursor:`end`}))},He=()=>{N.current=!0},Ue=()=>{N.current=!1,P.current=!1},We=e=>{if(!G(e)&&!(e.key===`Backspace`&&Be(e,`backspace`))){if(K(e)){e.preventDefault(),P.current=!0,_?.();return}if((e.key===`a`||e.key===`A`)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey){ue(j.current,F.current),e.preventDefault();return}Ve()}},Ge=e=>{y?.(e)},Ke=e=>{P.current&&=!1;let{range:t}=U();ee.current=t;let n=setTimeout(()=>{ee.current=null,clearTimeout(n)},200);b?.(e)},qe=e=>{Re(j?.current),ke(e)},Je=e=>{Be(e,`cut`)},Ye=e=>{e.preventDefault();let t=e.clipboardData?.files,n=e.clipboardData?.getData(`text/plain`);if(!n&&t?.length&&c){c(t);return}if(n){let e=!1,t=xe(n);try{e=document.execCommand(`insertText`,!1,t)}catch(e){Tt(!1,`Sender`,`insertText command failed: ${e}`)}e||Qe([{type:`text`,value:t}])}o?.(e)},Xe=e=>{e.key===`Enter`&&(P.current=!1),i?.(e)},Ze=()=>{let e=j.current,t=ye();e&&t?.focusNode===e&&t.focusOffset===0&&Ne().skill&&de(e,j.current,1)},Qe=(e,t,n,r)=>{let i=j.current;if(i)try{V(e);let a=Me(e);if(a.length===0)return;let o=$e(t,i);if(!o.range||!o.selection)return;let{range:s,selection:c}=o;n?.length&&et(s,n,i),s.deleteContents(),tt(a,s,o),nt(a,s,c,r)}catch(e){Tt(!1,`Sender`,`Insert operation failed: ${e}`)}},$e=(e,t)=>{let{type:n,slotKey:r,slotType:i,range:a,selection:o}=ge(e,j,ee);if(!o)return{range:null,selection:null,type:n};let s=null;switch(n){case`end`:s=_e(t);break;case`start`:s=ve(t);break;case`slot`:s=U().range;break;case`box`:s=a||null,s&&F.current&&s.collapsed&&s.startOffset===0&&s.setStartAfter(F.current);break}return{range:s,selection:o,type:n,slotKey:r,slotType:i}},et=(e,t,n)=>{let{value:r,startContainer:i,startOffset:a}=me(n);r.length>=t.length&&r.endsWith(t)&&i&&a>=0&&(e.setStart(i,a-t.length),e.setEnd(i,a),e.deleteContents())},tt=(e,t,n)=>{let{type:r,slotKey:i,slotType:a}=n,o=!0;e.forEach(e=>{if(o&&r===`slot`&&(a!==`content`||e.nodeType!==Node.TEXT_NODE)&&i){o=!1;let e=Oe(i);e&&t.setStartAfter(e)}t.insertNode(e),t.setStartAfter(e)})},nt=(e,t,n,r)=>{let i=e[e.length-1];pe(i,j.current,t,n,r),setTimeout(()=>{qe(null)},0)},rt=e=>{let t={preventScroll:e?.preventScroll??!1,cursor:e?.cursor??`end`,key:e?.key};switch(t.cursor){case`slot`:fe(j,e?.key,t.preventScroll);break;case`start`:le(j.current,t.preventScroll);break;case`all`:ue(j.current,F.current,t.preventScroll);break;case`end`:ce(j.current,t.preventScroll);break}},it=()=>{let e=j.current;e&&(e.innerHTML=``,te.current=null,F.current=null,R.clear(),W(),B({}),ee.current=null,M?.current?.clear(),qe(null))};return(0,q.useEffect)(()=>{ze(),S?W():ke()},[x]),(0,q.useEffect)(()=>{W()},[S]),(0,q.useImperativeHandle)(t,()=>({nativeElement:j.current,focus:rt,blur:()=>j.current?.blur(),insert:Qe,clear:it,getValue:Ne})),q.createElement(q.Fragment,null,q.createElement(`div`,O({},L,{role:`textbox`,tabIndex:0,style:{...ne,...I},className:r(k,`${k}-slot`,D.classNames.input,h.input,{[`${E}-rtl`]:w===`rtl`}),"data-placeholder":v,contentEditable:!u,suppressContentEditableWarning:!0,spellCheck:!1,onCut:Je,onKeyDown:We,onKeyUp:Xe,onPaste:Ye,onCompositionStart:He,onCompositionEnd:Ue,onFocus:Ge,onBlur:Ke,onSelect:Ze,onInput:qe},C)),q.createElement(`div`,{style:{display:`none`},id:`${E}-slot-placeholders`},Array.from(ie.values()),oe))}),zr=q.forwardRef((e,t)=>{let{speechRecording:n,disabled:r,onSpeechDisabled:i,prefixCls:a}=q.useContext(vr),o=e.disabled??r??i,s=null;return s=n?q.createElement(Gt,{className:`${a}-recording-icon`}):o?q.createElement(b,null):q.createElement(x,null),q.createElement(yr,O({icon:s,variant:`text`,color:`primary`},e,{action:`onSpeech`,ref:t}))}),Br=c(z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e,t){let n=e;for(let e=0;e{let{value:n,onChange:i,onKeyUp:a,onKeyDown:o,onPaste:c,onPasteFile:l,disabled:u,readOnly:d,submitType:f=`enter`,prefixCls:p,styles:m={},classNames:h={},autoSize:g,components:_,triggerSend:v,placeholder:y,onFocus:b,onBlur:x,...S}=q.useContext(Er),C=q.useRef(null),w=(e,t=`cursor`)=>{let n=C.current?.resizableTextArea?.textArea,r=n.value,a=r.length,o=r.length;t===`cursor`&&(a=n?.selectionStart,o=n?.selectionEnd),t===`start`&&(a=0,o=0),n.value=r.substring(0,a)+e+r.substring(o,r.length),n.selectionStart=a+e.length,n.selectionEnd=a+e.length,n.focus(),i?.(n.value)},T=()=>{i?.(``)},E=()=>({value:n||``,slotConfig:[]});q.useImperativeHandle(t,()=>({nativeElement:C.current?.resizableTextArea?.textArea,focus:C.current?.focus,blur:C.current?.blur,insert:w,clear:T,getValue:E}));let D=q.useRef(!1),k=()=>{D.current=!0},A=()=>{D.current=!1},j=e=>{let t=o?.(e),{key:n,shiftKey:r,ctrlKey:i,altKey:a,metaKey:s}=e;if(!(D.current||n!==`Enter`||t===!1)&&n===`Enter`){let t=i||a||s;if(f===`enter`&&!r&&!t||f===`shiftEnter`&&r&&!t){e.preventDefault(),v?.();return}}},M=e=>{let t=e.clipboardData?.files;!e.clipboardData?.getData(`text/plain`)&&t?.length&&l&&(l(t),e.preventDefault()),c?.(e)},N=Vr(_,[`input`],s.TextArea),P={...(0,jn.default)(S,{attr:!0,aria:!0,data:!0}),ref:C};return q.createElement(N,O({},P,{disabled:u,style:m.input,className:r(`${p}-input`,h.input),autoSize:g,value:n,onChange:e=>{i?.(e.target.value,e)},onKeyUp:a,onCompositionStart:k,onCompositionEnd:A,onKeyDown:j,onPaste:M,variant:`borderless`,readOnly:d,placeholder:y,onFocus:b,onBlur:x}))});function Ur(e,t){let n=C(e),[r,i,a]=q.useMemo(()=>typeof t==`object`?[t.recording,t.onRecordingChange,typeof t.recording==`boolean`]:[void 0,void 0,!1],[t]),[o,s]=q.useState(null);q.useEffect(()=>{if(!a&&`permissions`in navigator){let e=null;return navigator.permissions.query({name:`microphone`}).then(t=>{s(t.state),t.onchange=function(){s(this.state)},e=t}).catch(e=>{Tt(!1,`Sender`,`Browser does not support querying microphone permission. ${e instanceof Error?e.message:String(e)}`)}),()=>{e&&(e.onchange=null)}}},[a]);let c;!c&&typeof window<`u`&&(c=window.SpeechRecognition||window.webkitSpeechRecognition);let l=!!(a||c&&o!==`denied`),u=q.useRef(null),[d,f]=P(!1,r),p=q.useRef(!1),m=()=>{if(l&&!u.current){let e=new c;e.onstart=()=>{f(!0)},e.onend=()=>{f(!1)},e.onresult=e=>{if(!p.current){let t=e.results?.[0]?.[0]?.transcript;n(t)}p.current=!1},u.current=e}};return[l,C(e=>{e&&!d||(p.current=e,a?i?.(!d):(m(),u.current&&(d?(u.current.stop(),i?.(!1)):(u.current.start(),i?.(!0)))))}),d]}var Wr=q.createContext({}),Gr=()=>({height:0}),Kr=e=>({height:e.scrollHeight});function qr(e){let{title:t,onOpenChange:n,open:i,children:a,className:o,style:s,classNames:c={},styles:l={},prefixCls:u,closable:d,forceRender:f}=e,{prefixCls:p}=q.useContext(Wr),{direction:m,getPrefixCls:h}=Y(),g=h(`sender`,u||p),_=`${g}-header`,v=()=>{n?.(!i)};return q.createElement(L,{motionEnter:!0,motionLeave:!0,motionName:`${_}-motion`,leavedClassName:`${_}-motion-hidden`,onEnterStart:Gr,onEnterActive:Kr,onLeaveStart:Kr,onLeaveActive:Gr,visible:i,forceRender:f},({className:e,style:n})=>q.createElement(`div`,{className:r(g,_,e,o,{[`${_}-rtl`]:m===`rtl`}),style:{...n,...s}},(d!==!1||t)&&q.createElement(`div`,{className:r(`${_}-header`,c.header),style:{...l.header}},q.createElement(`div`,{className:`${_}-title`},t),d!==!1&&q.createElement(`div`,{className:`${_}-close`},q.createElement(M,{type:`text`,icon:q.createElement(w,null),size:`small`,onClick:v}))),a&&q.createElement(`div`,{className:r(`${_}-content`,c.content),style:{...l.content}},a)))}var Jr=e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`${r}`]:{borderBottomWidth:e.lineWidth,borderBottomStyle:`solid`,borderBottomColor:e.colorBorderInput,[`${r}-header`]:{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:`flex`,borderRadius:{_skip_check_:!0,value:n(e.borderRadius).mul(2).equal()},borderEndStartRadius:0,borderEndEndRadius:0,[`${r}-title`]:{flex:`auto`}},[`${r}-content`]:{padding:e.padding}},[`${r}-motion`]:{transition:[`height`,`border`].map(t=>`${t} ${e.motionDurationSlow}`).join(`,`),overflow:`hidden`,"&-enter-start, &-leave-active":{borderBottomColor:`transparent`},"&-hidden":{display:`none`}}}}},Yr=e=>{let{componentCls:t,antCls:n,calc:r}=e,i=`${t}-slot`,a=`${n}-input`,o=`${n}-dropdown-trigger`,s=`${t}-slot-input`,c=`${t}-slot-select`,l=`${t}-slot-tag`,d=`${t}-slot-content`,f=`${t}-skill`;return{[t]:{[`${t}-input-slot`]:{outline:`none`,cursor:`text`,whiteSpace:`pre-wrap`,width:`100%`,caretColor:e.colorPrimary,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}},[`${i}:not(${d})`]:{display:`inline-block`,verticalAlign:`middle`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,marginInline:e.marginXXS},[`${a}${s}`]:{height:`100%`,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,fontSize:`inherit`,lineHeight:`inherit`,position:`relative`,"&::placeholder":{color:e.colorTextSlotPlaceholder,fontSize:`inherit`,lineHeight:`inherit`},[i]:{display:`inline-flex`,margin:`0 ${u(e.marginXXS)}`,verticalAlign:`bottom`,alignItems:`center`,marginBlock:u(r(e.marginXXS).div(2).equal()),minHeight:e.controlHeightSM,wordBreak:`break-all`}},[c]:{fontSize:e.fontSize,lineHeight:e.lineHeight,paddingInline:e.paddingXXS,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline-flex`,alignItems:`center`,cursor:`pointer`,background:e.colorBgSlot,height:`100%`,boxSizing:`border-box`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`${c}`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,padding:`0 ${u(e.paddingXXS)}`,transition:`border-color ${e.motionDurationMid}`,position:`relative`,display:`inline`,cursor:`pointer`,background:e.colorBgSlot,alignItems:`center`,justifyContent:`center`,borderRadius:e.borderRadius,color:e.colorTextSlot,border:`1px solid ${e.colorBorderSlot}`,"&.placeholder":{color:e.colorTextSlotPlaceholder},[`&${o}-open`]:{borderColor:e.colorBorderSlotHover}},[`${c}-value`]:{flex:1,fontSize:e.fontSize,lineHeight:e.lineHeight,"&:empty::before":{content:`attr(data-placeholder)`}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[`${l}`]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${u(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,position:`relative`,cursor:`default`}},[`${c}-arrow`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSize,lineHeight:e.lineHeight,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},[l]:{background:e.colorBgSlot,border:`1px solid ${e.colorBorderSlot}`,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,padding:`0 ${u(e.paddingXXS)}`,fontSize:e.fontSize,lineHeight:e.lineHeight,height:`100%`,boxSizing:`border-box`,position:`relative`,cursor:`default`},[d]:{height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),caretColor:e.colorPrimary,background:e.colorBgSlot,outline:`none`,color:e.colorTextSlot,borderRadius:e.borderRadius,paddingInline:e.paddingXXS,boxSizing:`border-box`,verticalAlign:`middle`,fontSize:e.fontSize,marginBlock:1,lineHeight:e.lineHeight,display:`inline-block`,position:`relative`,cursor:`text`,"&:empty":{width:`fit-content`,"&::after":{display:`inline-block`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextSlotPlaceholder}}},[`${i}-no-width`]:{userSelect:`none`,width:`3px`,display:`inline-block`,lineHeight:`inherit`},[f]:{display:`inline-block`,verticalAlign:`baseline`,alignItems:`center`,marginBlock:1,height:r(e.fontSize).mul(e.lineHeight).add(2).equal(),wordBreak:`break-all`,paddingInlineEnd:0,paddingInlineStart:0,marginInlineEnd:0,marginInlineStart:-1,[`&${f}-empty`]:{"&::after":{display:`inline-block`,pointerEvents:`none`,height:`inherit`,content:`attr(data-placeholder)`,color:e.colorTextPlaceholder}}},[`${f}-wrapper`]:{height:`100%`,display:`inline-flex`},[`${f}-tag`]:{paddingInline:e.paddingXS,height:`100%`,backgroundColor:e.colorBgSkill,borderRadius:e.borderRadius,color:e.colorPrimary,alignItems:`center`,fontWeight:500,display:`inline-flex`,cursor:`pointer`,gap:e.marginXXS,transition:`background-color ${e.motionDurationMid}`,"&:hover":{backgroundColor:e.colorBgSkillHover,[`${f}-tag-close:not(${f}-tag-close-disabled)`]:{color:e.colorPrimaryHover}},"&-close":{fontSize:e.fontSizeSM,display:`inline-flex`,transition:`color ${e.motionDurationMid}`,color:e.colorPrimary},"&-close-disabled":{cursor:`not-allowed`,color:e.colorTextDisabled}},[`${f}-holder`]:{width:e.marginXS,height:`100%`}}}},Xr=e=>{let{componentCls:t,antCls:n}=e,r=`${t}-switch`;return{[t]:{[`&${r}-rtl`]:{direction:`rtl`},[`&${r}`]:{display:`inline-block`,[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchUncheckedHoverBg,borderColor:e.colorBorder,color:e.colorText},[`&${r}-checked`]:{[`${n}-btn:not(:disabled):not(${n}-btn-disabled):hover`]:{background:e.switchCheckedHoverBg,borderColor:e.colorPrimary,color:e.colorPrimaryText},[`${r}-content`]:{background:e.switchCheckedBg}}}}}},Zr=e=>{let{antCls:t,componentCls:n,paddingSM:r,paddingXS:i,paddingXXS:a,lineWidth:o,calc:s}=e;return{[n]:{[`&${n}-main`]:{position:`relative`,width:`100%`,boxSizing:`border-box`,boxShadow:`${e.boxShadowTertiary}`,borderRadius:{_skip_check_:!0,value:s(e.borderRadius).mul(2).equal()},borderColor:e.colorBorderInput,borderWidth:o,borderStyle:`solid`},[`&${n}-disabled`]:{background:e.colorBgContainerDisabled,borderColor:`transparent`},[`&${n}-rtl`]:{direction:`rtl`},[`${n}-content`]:{display:`flex`,gap:i,width:`100%`,paddingBlock:r,paddingInlineStart:r,paddingInlineEnd:r,boxSizing:`border-box`,alignItems:`flex-end`},[`${n}-prefix`]:{flex:`none`},[`${n}-input`]:{paddingInline:0,borderRadius:0,flex:`auto`,alignSelf:`center`,caretColor:e.colorPrimary,fontSize:e.fontSize},[`${n}-actions-list`]:{flex:`none`,display:`flex`,"&-presets":{gap:e.paddingXS}},[`${n}-actions-btn`]:{[`&-disabled:where(${t}-btn-variant-text)`]:{color:e.colorTextActionsDisabled,borderColor:`transparent`},[`&-disabled:not(${t}-btn-variant-text)`]:{background:e.colorBgActionsDisabled,color:e.colorTextLightSolid,borderColor:`transparent`},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:`top`},"&-recording-icon":{height:`1.2em`,width:`1.2em`,verticalAlign:`top`}},[`${n}-footer`]:{paddingInlineStart:r,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:a,boxSizing:`border-box`}}}},Qr=on(`Sender`,e=>{let{paddingXS:t,calc:n}=e,r=l(e,{SenderContentMaxWidth:`calc(100% - ${u(n(t).add(32).equal())})`});return[Zr(r),Jr(r),Xr(r),Yr(r)]},e=>{let{colorPrimary:t,colorFillTertiary:n}=e,r=new a(t).setA(.06).toRgbString(),i=new a(t).setA(.08).toRgbString(),o=new a(t).setA(.15).toRgbString(),s=t,c=new a(t).setA(.25).toRgbString(),l=new a(t).setA(.1).toRgbString(),u=r,d=new a(t).setA(.08).toRgbString(),f=new a(n).setA(.04).toRgbString(),p=new a(t).setA(.1).toRgbString(),m=new a(n).setA(.1).toRgbString(),h=`0 4px 12px 0 ${new a(t).setA(.1).toRgbString()}`,g=new a(t).setA(.45).toRgbString();return{colorBgSlot:r,colorBgSkill:i,colorBgSkillHover:o,colorTextSlot:s,colorTextSlotPlaceholder:c,colorBorderSlotHover:l,colorBorderSlot:u,switchCheckedBg:d,switchCheckedHoverBg:p,switchUncheckedHoverBg:f,colorBorderInput:m,boxShadowInput:h,colorBgActionsDisabled:g,colorTextActionsDisabled:g}}),$r={SendButton:Tr,ClearButton:xr,LoadingButton:Cr,SpeechButton:zr},ei=q.forwardRef((e,n)=>{let{prefixCls:i,styles:a={},classNames:o={},className:s,rootClassName:c,style:l,defaultValue:u,value:d,slotConfig:f,readOnly:p,submitType:m=`enter`,onSubmit:h,loading:g,components:_,onCancel:v,onChange:y,suffix:b,onKeyUp:x,onKeyDown:S,disabled:C,allowSpeech:w,prefix:T,footer:E,header:D,onPaste:k,onPasteFile:A,autoSize:j={maxRows:8},placeholder:M,onFocus:N,onBlur:ee,skill:F,...te}=e,ne=(0,jn.default)(te,{attr:!0,aria:!0,data:!0}),I=q.useId(),L=Array.isArray(f)||F?.value,{direction:R,getPrefixCls:z}=Y(),B=z(`sender`,i),re=q.useRef(null),V=q.useRef(null);bt(n,()=>({nativeElement:re.current,inputElement:V.current?.nativeElement,focus:e=>V.current?.focus(e),blur:()=>V.current?.blur(),insert:(...e)=>V.current?.insert?.(...e),clear:()=>V.current?.clear(),getValue:()=>V.current?.getValue()??{value:``,slotConfig:[],skill:void 0}}));let H=Ct(`sender`),ie=`${B}-input`,[ae,oe]=Qr(B),se=r(B,H.className,s,c,H.classNames.root,o.root,ae,oe,`${B}-main`,{[`${B}-rtl`]:R===`rtl`,[`${B}-disabled`]:C}),ce=`${B}-actions-btn`,le=`${B}-actions-list`,[ue,de]=P(u||``,d),fe=(e,t,n,r)=>{de(e),y?.(e,t,n??[],r)},[pe,me,he]=Ur(e=>{L?V.current?.insert?.([{type:`text`,value:e}]):fe(`${ue} ${e}`)},w),U=()=>{if(V?.current&&h&&!g&&!Se){let e=V.current.getValue();h(e.value,e.slotConfig,e.skill)}},ge=()=>{fe(``),L&&V.current?.clear?.()},_e=q.createElement(t,{className:`${le}-presets`},w&&q.createElement(zr,null),g?q.createElement(Cr,null):q.createElement(Tr,null)),ve=_e;typeof b==`function`?ve=b(_e,{components:$r}):(b||b===!1)&&(ve=b);let ye=typeof T==`function`?T(_e,{components:$r}):T||null,be=typeof D==`function`?D(_e,{components:$r}):D||null,xe=typeof E==`function`?E(_e,{components:$r}):E||null,[Se,Ce]=(0,q.useState)(!ue),we={prefixCls:ce,onSend:U,onSendDisabled:!ue,onClear:ge,onClearDisabled:!ue,onCancel:v,onCancelDisabled:!g,onSpeech:()=>me(!1),onSpeechDisabled:!pe,speechRecording:he,disabled:C,setSubmitDisabled:Ce},Te=q.useMemo(()=>({value:ue,onChange:fe,slotConfig:f,onKeyUp:x,onKeyDown:S,onPaste:k,onPasteFile:A,disabled:C,readOnly:p,submitType:m,prefixCls:B,styles:a,classNames:o,autoSize:j,components:_,triggerSend:U,placeholder:M,onFocus:N,onBlur:ee,skill:F,...te}),[ue,fe,f,x,S,k,A,C,p,m,B,a,o,j,_,U,M,N,ee,F,te]),Ee=e=>{!L&&e.target!==re.current?.querySelector(`.${ie}`)&&e.preventDefault(),e.target===re.current?.querySelector(`.${ie}`)&&V.current?.focus()};return q.createElement(`div`,O({key:I,ref:re,className:se,style:{...H.style,...l,...H.styles.root,...a.root}},ne),q.createElement(Er.Provider,{value:Te},q.createElement(vr.Provider,{value:we},be&&q.createElement(Wr.Provider,{value:{prefixCls:B}},be),q.createElement(`div`,{className:r(`${B}-content`,o.content),style:a.content,onMouseDown:Ee},ye&&q.createElement(`div`,{className:r(`${B}-prefix`,H.classNames.prefix,o.prefix),style:{...H.styles.prefix,...a.prefix}},ye),L?q.createElement(Rr,{ref:V}):q.createElement(Hr,{ref:V}),ve&&q.createElement(`div`,{className:r(le,H.classNames.suffix,o.suffix),style:{...H.styles.suffix,...a.suffix}},ve)),xe&&q.createElement(`div`,{className:r(`${B}-footer`,H.classNames.footer,o.footer),style:{...H.styles.footer,...a.footer}},xe))))}),ti=q.forwardRef((e,t)=>{let{children:n,className:i,classNames:a={},styles:o={},icon:s,style:c,onChange:l,rootClassName:u,loading:d,defaultValue:f,value:p,checkedChildren:m,unCheckedChildren:h,disabled:g,prefixCls:_,...v}=e,{styles:y={},classNames:b={},prefixCls:x}=q.useContext(Er),S=(0,jn.default)(v,{attr:!0,aria:!0,data:!0}),C=q.useId(),{direction:w,getPrefixCls:T}=Y(),E=T(`sender`,_||x),D=`${E}-switch`,[k,A]=Qr(E),j=q.useRef(null);bt(t,()=>({nativeElement:j.current}));let[N,ee]=P(f,p),F=Ct(`sender`),te=r(E,D,i,u,F.classNames.switch,b.switch,a.root,k,A,{[`${D}-checked`]:N,[`${D}-rtl`]:w===`rtl`});return q.createElement(`div`,O({ref:j,className:te,key:C,style:{...c,...F.styles.switch,...y.switch,...o.root}},S),q.createElement(M,{disabled:g,loading:d,className:r(`${D}-content`,a.content),style:o.content,styles:{icon:o.icon,content:o.title},classNames:{icon:a.icon,content:a.title},variant:`outlined`,color:N?`primary`:`default`,icon:s,onClick:()=>{let e=!N;ee(e),l?.(e)}},N?m:h,n))}),ni=ei;ni.Header=qr,ni.Switch=ti;var ri=e=>{let{componentCls:t,calc:n}=e,r=n(e.fontSizeHeading3).mul(e.lineHeightHeading3).equal(),i=n(e.fontSize).mul(e.lineHeight).equal();return{[t]:{gap:e.padding,[`${t}-icon`]:{height:n(r).add(i).add(e.paddingXXS).equal(),display:`flex`,img:{height:`100%`}},[`${t}-content-wrapper`]:{gap:e.paddingXS,flex:`auto`,minWidth:0,[`${t}-title-wrapper`]:{gap:e.paddingXS},[`${t}-title`]:{margin:0},[`${t}-extra`]:{marginInlineStart:`auto`}}}}},ii=e=>{let{componentCls:t}=e;return{[t]:{"&-filled":{paddingInline:e.padding,paddingBlock:e.paddingSM,background:e.colorFillContent,borderRadius:e.borderRadiusLG},"&-borderless":{[`${t}-title`]:{fontSize:e.fontSizeHeading3,lineHeight:e.lineHeightHeading3}}}}},ai=on(`Welcome`,e=>{let t=l(e,{});return[ri(t),ii(t)]},()=>({})),oi=q.forwardRef((e,n)=>{let{prefixCls:i,rootClassName:a,className:o,style:s,variant:c=`filled`,classNames:l={},styles:u={},icon:d,title:f,description:p,extra:m}=e,{direction:h,getPrefixCls:g}=Y(),_=g(`welcome`,i),v=Ct(`welcome`),[y,b]=ai(_),x=q.useMemo(()=>{if(!d)return null;let e=d;return typeof d==`string`&&d.startsWith(`http`)&&(e=q.createElement(`img`,{src:d,alt:`icon`})),q.createElement(`div`,{className:r(`${_}-icon`,v.classNames.icon,l.icon),style:u.icon},e)},[d]),S=q.useMemo(()=>f?q.createElement(te.Title,{level:4,className:r(`${_}-title`,v.classNames.title,l.title),style:u.title},f):null,[f]),C=q.useMemo(()=>m?q.createElement(`div`,{className:r(`${_}-extra`,v.classNames.extra,l.extra),style:u.extra},m):null,[m]);return q.createElement(t,{ref:n,className:r(_,v.className,o,a,l.root,y,b,`${_}-${c}`,{[`${_}-rtl`]:h===`rtl`}),style:{...s,...u.root}},x,q.createElement(t,{vertical:!0,className:`${_}-content-wrapper`},m?q.createElement(t,{align:`flex-start`,className:`${_}-title-wrapper`},S,C):S,p&&q.createElement(te.Text,{className:r(`${_}-description`,v.classNames.description,l.description),style:u.description},p)))}),si={_chatMessagesStores:new Map,get:e=>si._chatMessagesStores.get(e),set:(e,t)=>{si._chatMessagesStores.set(e,t)},delete:e=>{si._chatMessagesStores.delete(e)},getMessages:e=>si._chatMessagesStores.get(e)?.getMessages()},ci={_allConversationStores:new Map,set:(e,t)=>{ci._allConversationStores.set(e,t)},delete:e=>{ci._allConversationStores.delete(e)},getConversation:e=>{for(let t of ci._allConversationStores.values())if(t){let n=t.getConversation(e);if(n)return n}}},li=class{conversations=[];listeners=[];storeKey;activeConversationKey;emitListeners(){this.listeners.forEach(e=>{e()})}constructor(e,t){this.setConversations(e),this.storeKey=Math.random().toString(),ci.set(this.storeKey,this),this.activeConversationKey=t}setActiveConversationKey=e=>(this.activeConversationKey=e,this.emitListeners(),!0);setConversations=e=>(this.conversations=[...e],this.emitListeners(),!0);getConversation=e=>this.conversations.find(t=>t.key===e);addConversation=(e,t)=>this.getConversation(e.key)?!1:(this.setConversations(t===`prepend`?[e,...this.conversations]:[...this.conversations,e]),!0);setConversation=(e,t)=>{let n=this.getConversation(e);return n?(Object.assign(n,t),this.setConversations([...this.conversations]),!0):!1};removeConversation=e=>{let t=this.conversations.findIndex(t=>t.key===e);return t===-1?!1:(this.conversations.splice(t,1),this.setConversations([...this.conversations]),!0)};getMessages=e=>si.getMessages(e);getSnapshot=()=>this.conversations;getActiveConversationKey=()=>this.activeConversationKey;subscribe=e=>(this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)});destroy=()=>{ci.delete(this.storeKey)}};function ui(e){let[t]=(0,q.useState)(()=>new li(e?.defaultConversations||[],e?.defaultActiveConversationKey||``));return(0,q.useEffect)(()=>()=>{t.destroy()},[]),{conversations:(0,q.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getSnapshot),activeConversationKey:(0,q.useSyncExternalStore)(t.subscribe,t.getActiveConversationKey,t.getActiveConversationKey),setActiveConversationKey:t.setActiveConversationKey,addConversation:t.addConversation,removeConversation:t.removeConversation,setConversation:t.setConversation,getConversation:t.getConversation,setConversations:t.setConversations,getMessages:t.getMessages}}var di=` + +`,fi=` +`,pi=`:`,mi=e=>(e??``).trim()!==``;function hi(e=di){let t=``;return new TransformStream({transform(n,r){t+=n;let i=t.split(e);i.slice(0,-1).forEach(e=>{mi(e)&&r.enqueue(e)}),t=i[i.length-1]},flush(e){mi(t)&&e.enqueue(t)}})}function gi(e=fi,t=pi){return new TransformStream({transform(n,r){let i=n.split(e).reduce((e,n)=>{let r=n.indexOf(t);if(r===-1)return console.warn(`The key-value separator "${t}" is not found in the sse line: ${n} !`),e;let i=n.slice(0,r).trim();if(!mi(i))return e;let a=n.slice(r+1).trim();return{...e,[i]:a}},{});Object.keys(i).length!==0&&r.enqueue(i)}})}function _i(){if(typeof TextDecoderStream<`u`)return new TextDecoderStream;let e=new TextDecoder(`utf-8`);return new TransformStream({transform(t,n){n.enqueue(e.decode(t,{stream:!0}))},flush(t){t.enqueue(e.decode())}})}function vi(e){let{readableStream:t,transformStream:n,streamSeparator:r,partSeparator:i,kvSeparator:a}=e;if(!(t instanceof ReadableStream))throw Error(`The options.readableStream must be an instance of ReadableStream.`);let o=_i(),s=n?t.pipeThrough(o).pipeThrough(n):t.pipeThrough(o).pipeThrough(hi(r)).pipeThrough(gi(i,a));return s[Symbol.asyncIterator]=async function*(){let e=this.getReader();for(;;){let{done:t,value:n}=await e.read();if(t)break;n&&(yield n)}},s}var yi=async(e,t)=>{let{fetch:n=globalThis.fetch,middlewares:r={},...i}=t;if(typeof n!=`function`)throw Error(`The options.fetch must be a typeof fetch function!`);let a=[e,i];typeof r.onRequest==`function`&&(a=await r.onRequest(...a));let o=await n(...a);if(typeof r.onResponse==`function`){let e=await r.onResponse(o);if(!(e instanceof Response))throw Error(`The options.onResponse must return a Response instance!`);o=e}if(!o.ok)throw Error(`Fetch failed with status ${o.status}`);if(!o.body)throw Error(`The response body is empty.`);return o},bi={manual:!1,headers:{"Content-Type":`application/json`}},xi=`Last-Event-ID`,Si=class{baseURL;options;constructor(e,t){if(!e||typeof e!=`string`)throw Error(`The baseURL is not valid!`);this.baseURL=e,this.options=t||{}}},Ci=class extends Si{_asyncHandler;timeoutHandler;_isTimeout=!1;streamTimeoutHandler;_isStreamTimeout=!1;abortController;_isRequesting=!1;_manual=!1;lastManualParams;retryTimes=0;retryTimer;lastEventId=void 0;get asyncHandler(){return this._asyncHandler}get isTimeout(){return this._isTimeout}set isTimeout(e){this._isTimeout=e}get isStreamTimeout(){return this._isStreamTimeout}set isStreamTimeout(e){this._isStreamTimeout=e}get isRequesting(){return this._isRequesting}get manual(){return this._manual}constructor(e,t){super(e,t),this._manual=t?.manual||!1,this.manual||this.init()}run(e){return this.manual?(this.resetRetry(),this.lastManualParams=e,this.init(e),!0):(console.warn(`The request is not manual, so it cannot be run!`),!1)}abort(){clearTimeout(this.timeoutHandler),clearTimeout(this.streamTimeoutHandler),this.abortController.abort()}init(e,t){this.abortController=new AbortController;let{callbacks:n,params:r,headers:i={},transformStream:a,fetch:o,timeout:s,streamTimeout:c,middlewares:l,streamSeparator:u,partSeparator:d,kvSeparator:f,...p}=this.options,m=Object.assign({},bi.headers||{},i,t||{}),h={...p,method:`POST`,body:JSON.stringify({...r,...e||{}}),params:{...r,...e},headers:m,signal:this.abortController.signal,middlewares:l};s&&s>0&&(this.timeoutHandler=window.setTimeout(()=>{this.isTimeout=!0,this.finishRequest(),n?.onError?.(Error(`TimeoutError`))},s)),this.startRequest(),this._asyncHandler=yi(this.baseURL,{fetch:o,...h}).then(async e=>{if(clearTimeout(this.timeoutHandler),this.isTimeout)return;if(a){let t=a;typeof a==`function`&&(t=a(this.baseURL,e.headers)),await this.customResponseHandler(e,n,t,c,u,d,f);return}let t=e.headers.get(`content-type`)||``;switch(t.split(`;`)[0].trim()){case`text/event-stream`:await this.sseResponseHandler(e,n,c,u,d,f);break;case`application/json`:await this.jsonResponseHandler(e,n);break;default:throw Error(`The response content-type: ${t} is not support!`)}}).catch(e=>{clearTimeout(this.timeoutHandler),this.finishRequest();let t=e instanceof Error||e instanceof DOMException?e:Error(`Unknown error!`),r=n?.onError?.(t);if(t.name!==`AbortError`){let e=typeof r==`number`?r:this.options.retryInterval;if(e&&e>0){if(typeof this.options.retryTimes==`number`&&this.retryTimes>=this.options.retryTimes)return;clearTimeout(this.retryTimer),this.retryTimer=setTimeout(()=>{let e={};this.lastEventId!==void 0&&(e[xi]=this.lastEventId),this.init(this.lastManualParams,e)},e),this.retryTimes+=1}}})}startRequest(){this._isRequesting=!0}finishRequest(){this._isRequesting=!1}customResponseHandler=async(e,t,n,r,i,a,o)=>{let s=vi({readableStream:e.body,transformStream:n,streamSeparator:i,partSeparator:a,kvSeparator:o});await this.processStream(s,e,t,r)};sseResponseHandler=async(e,t,n,r,i,a)=>{let o=vi({readableStream:e.body,streamSeparator:r,partSeparator:i,kvSeparator:a});await this.processStream(o,e,t,n)};async processStream(e,t,n,r){let i=[],a=e[Symbol.asyncIterator](),o;do{if(r&&(this.streamTimeoutHandler=window.setTimeout(()=>{this.isStreamTimeout=!0,this.finishRequest(),n?.onError?.(Error(`StreamTimeoutError`),void 0,t.headers)},r)),o=await a.next(),clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)break;o.value&&(i.push(o.value),n?.onUpdate?.(o.value,t.headers),o?.value?.id!==void 0&&(this.lastEventId=o.value.id))}while(!o.done);if(r&&(clearTimeout(this.streamTimeoutHandler),this.isStreamTimeout)){this.finishRequest();return}this.finishRequest(),n?.onSuccess?.(i,t.headers)}jsonResponseHandler=async(e,t)=>{let n=await e.json();if(n?.success===!1){let r=Error(n.message||`System error`);r.name=n.name||`SystemError`,t?.onError?.(r,n,e.headers)}else t?.onUpdate?.(n,e.headers),this.finishRequest(),t?.onSuccess?.([n],e.headers)};resetRetry(){clearTimeout(this.retryTimer),this.retryTimes=0,this.lastEventId=void 0}};function wi(e,t){return new Ci(e,t)}function Ti(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ei=Ti();function Di(e){Ei=e}var Oi={exec:()=>null};function X(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(ki.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var ki={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Ai=/^(?:[ \t]*(?:\n|$))+/,ji=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Mi=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ni=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Pi=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Fi=/(?:[*+-]|\d{1,9}[.)])/,Ii=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Li=X(Ii).replace(/bull/g,Fi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Ri=X(Ii).replace(/bull/g,Fi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),zi=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Bi=/^[^\n]+/,Vi=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Hi=X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Vi).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ui=X(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Fi).getRegex(),Wi=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Gi=/|$))/,Ki=X(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Gi).replace(`tag`,Wi).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qi=X(zi).replace(`hr`,Ni).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Wi).getRegex(),Ji={blockquote:X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,qi).getRegex(),code:ji,def:Hi,fences:Mi,heading:Pi,hr:Ni,html:Ki,lheading:Li,list:Ui,newline:Ai,paragraph:qi,table:Oi,text:Bi},Yi=X(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Ni).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Wi).getRegex(),Xi={...Ji,lheading:Ri,table:Yi,paragraph:X(zi).replace(`hr`,Ni).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Yi).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Wi).getRegex()},Zi={...Ji,html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Gi).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Oi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(zi).replace(`hr`,Ni).replace(`heading`,` *#{1,6} *[^ +]`).replace(`lheading`,Li).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Qi=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$i=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ea=/^( {2,}|\\)\n(?!\s*$)/,ta=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,ua=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,da=X(ua,`u`).replace(/punct/g,na).getRegex(),fa=X(ua,`u`).replace(/punct/g,oa).getRegex(),pa=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ma=X(pa,`gu`).replace(/notPunctSpace/g,ia).replace(/punctSpace/g,ra).replace(/punct/g,na).getRegex(),ha=X(pa,`gu`).replace(/notPunctSpace/g,ca).replace(/punctSpace/g,sa).replace(/punct/g,oa).getRegex(),ga=X(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ia).replace(/punctSpace/g,ra).replace(/punct/g,na).getRegex(),_a=X(/\\(punct)/,`gu`).replace(/punct/g,na).getRegex(),va=X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ya=X(Gi).replace(`(?:-->|$)`,`-->`).getRegex(),ba=X(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,ya).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Sa=X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,xa).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ca=X(/^!?\[(label)\]\[(ref)\]/).replace(`label`,xa).replace(`ref`,Vi).getRegex(),wa=X(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Vi).getRegex(),Ta={_backpedal:Oi,anyPunctuation:_a,autolink:va,blockSkip:la,br:ea,code:$i,del:Oi,emStrongLDelim:da,emStrongRDelimAst:ma,emStrongRDelimUnd:ga,escape:Qi,link:Sa,nolink:wa,punctuation:aa,reflink:Ca,reflinkSearch:X(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Ca).replace(`nolink`,wa).getRegex(),tag:ba,text:ta,url:Oi},Ea={...Ta,link:X(/^!?\[(label)\]\((.*?)\)/).replace(`label`,xa).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,xa).getRegex()},Da={...Ta,emStrongRDelimAst:ha,emStrongLDelim:fa,url:X(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,`i`).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},Ma=e=>ja[e];function Na(e,t){if(t){if(ki.escapeTest.test(e))return e.replace(ki.escapeReplace,Ma)}else if(ki.escapeTestNoEncode.test(e))return e.replace(ki.escapeReplaceNoEncode,Ma);return e}function Pa(e){try{e=encodeURI(e).replace(ki.percentDecode,`%`)}catch{return null}return e}function Fa(e,t){let n=e.replace(ki.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(ki.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function Ra(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function za(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` +`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` +`)}var Ba=class{options;rules;lexer;constructor(e){this.options=e||Ei}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Ia(e,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=za(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Ia(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Ia(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Ia(t[0],` +`).split(` +`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` +`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` +`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` +`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` +`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` +`+l}!u&&!l.trim()&&(u=!0),r+=f+` +`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Ia(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=La(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ra(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ra(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&!(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Va=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ei,this.options.tokenizer=this.options.tokenizer||new Ba,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:ki,block:ka.normal,inline:Aa.normal};this.options.pedantic?(t.block=ka.pedantic,t.inline=Aa.pedantic):this.options.gfm&&(t.block=ka.gfm,this.options.breaks?t.inline=Aa.breaks:t.inline=Aa.gfm),this.tokenizer.rules=t}static get rules(){return{block:ka,inline:Aa}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(ki.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` +`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=` +`+r.raw,a.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,a=``;for(;e;){i||(a=``),i=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,a)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let o=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(o)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(a=r.raw.slice(-1)),i=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Ha=class{options;parser;constructor(e){this.options=e||Ei}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(ki.notSpaceStart)?.[0],i=e.replace(ki.endingNewline,``)+` +`;return r?`
`+(n?i:Na(i,!0))+`
+`:`
`+(n?i:Na(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t +`+r+` +`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Na(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t=``,n=``;for(let t=0;t${r}`,` + +`+t+` +`+r+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Na(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Pa(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Pa(e);if(i===null)return Na(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Na(e.text)}},Ua=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Wa=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ei,this.options.renderer=this.options.renderer||new Ha,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ua}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ha(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Ba(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ga;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Ga.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then(e=>a.call(t,e));let n=i.call(t,e);return a.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Va.lex(e,t??this.defaults)}parser(e,t){return Wa.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(t==null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?Va.lex:Va.lexInline,s=i.hooks?i.hooks.provideParser():e?Wa.parse:Wa.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(e=>o(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let e=o(t,i);i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens);let n=s(e,i);return i.hooks&&(n=i.hooks.postprocess(n)),n}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+Na(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},qa=new Ka;function Z(e,t){return qa.parse(e,t)}Z.options=Z.setOptions=function(e){return qa.setOptions(e),Z.defaults=qa.defaults,Di(Z.defaults),Z},Z.getDefaults=Ti,Z.defaults=Ei,Z.use=function(...e){return qa.use(...e),Z.defaults=qa.defaults,Di(Z.defaults),Z},Z.walkTokens=function(e,t){return qa.walkTokens(e,t)},Z.parseInline=qa.parseInline,Z.Parser=Wa,Z.parser=Wa.parse,Z.Renderer=Ha,Z.TextRenderer=Ua,Z.Lexer=Va,Z.lexer=Va.lex,Z.Tokenizer=Ba,Z.Hooks=Ga,Z.parse=Z,Z.options,Z.setOptions,Z.use,Z.walkTokens,Z.parseInline,Wa.parse,Va.lex;var Ja={escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeTest:/[&<>"'/]/,notSpaceStart:/^\S*/,endingNewline:/\n$/,escapeReplace:/[&<>"'/]/g,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,completeFencedCode:/^ {0,3}(`{3,}|~{3,})([\s\S]*?)\n {0,3}\1[ \n\t]*$/},Ya={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Xa=e=>Ya[e];function Za(e,t){if(t){if(Ja.escapeTest.test(e))return e.replace(Ja.escapeReplace,Xa)}else if(Ja.escapeTestNoEncode.test(e))return e.replace(Ja.escapeReplaceNoEncode,Xa);return e}var Qa=Symbol(`tailMarker`),$a=class{options;markdownInstance;injectTail=!1;constructor(e={}){this.options=e,this.markdownInstance=new Ka,this.configureLinkRenderer(),this.configureParagraphRenderer(),this.configureCodeRenderer(),this.configureHtmlEscapeRenderer(),this.configureTailInjection(),this.markdownInstance.use(e.markedConfig||{})}configureHtmlEscapeRenderer(){this.options.escapeRawHtml&&this.markdownInstance.use({renderer:{html(e){let{raw:t=``,text:n=``}=e;return Za(t||n,!0)}}})}configureLinkRenderer(){this.options.openLinksInNewTab&&this.markdownInstance.use({renderer:{link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n);return`${r}`}}})}configureParagraphRenderer(){let{paragraphTag:e}=this.options;e&&this.markdownInstance.use({renderer:{paragraph({tokens:t}){return`<${e}>${this.parser.parseInline(t)}\n`}}})}configureCodeRenderer(){this.markdownInstance.use({renderer:{code({text:e,raw:t,lang:n,escaped:r,codeBlockStyle:i}){let a=(n||``).trim(),o=a.match(Ja.notSpaceStart)?.[0],s=`${e.replace(Ja.endingNewline,``)}\n`,c=i===`indented`||Ja.completeFencedCode.test(t)?`done`:`loading`,l=r?s:Za(s,!0),u=o?` class="language-${Za(o)}"`:``;return`
    ${l}
    \n`}}})}configureTailInjection(){let e=this;this.markdownInstance.use({hooks:{processAllTokens(t){if(!e.injectTail)return t;let n=e.findLastTextToken(t);return n&&(n[Qa]=!0),t}},renderer:{text(e){let t=`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`text`in e?e.text:``;return e[Qa]?`${t}`:t}}})}protectCustomTags(e){let t=new Map,n=Object.keys(this.options.components||{});if(n.length===0)return{protected:e,placeholders:t};let r=0,i=n.map(e=>e.toLowerCase().replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),a=RegExp(`<(${i})(?:\\s[^>]*)?>`,`gi`),o=RegExp(``,`gi`),s=[],c=a.exec(e);for(;c!==null;)s.push({index:c.index,type:`open`,tagName:c[1].toLowerCase(),match:c[0]}),c=a.exec(e);for(o.lastIndex=0,c=o.exec(e);c!==null;)s.push({index:c.index,type:`close`,tagName:c[1].toLowerCase(),match:c[0]}),c=o.exec(e);s.sort((e,t)=>e.index-t.index);let l=[],u=[],d=0;for(let n of s)if(n.type===`open`)n.match.endsWith(`/>`)||l.push({tagName:n.tagName,start:n.index,openTag:n.match});else if(n.type===`close`&&l.length>0&&l[l.length-1].tagName===n.tagName){let i=l.pop();if(l.length===0){let a=i.start,o=n.index+n.match.length,s=i.openTag,c=n.match,l=e.slice(a+s.length,n.index);if(d{let e=`__X_MD_PLACEHOLDER_${r++}__`;return t.set(e,` + +`),e});u.push(s+e+c)}else u.push(s+l+c);d=o}}return dt.get(e)??e)}findLastNonEmptyToken(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`list`&&`items`in n&&Array.isArray(n.items))for(let e=n.items.length-1;e>=0;e--){let t=n.items[e];if(`tokens`in t&&t.tokens&&t.tokens.length>0){let e=this.findLastNonEmptyToken(t.tokens);if(e)return e}}if(`tokens`in n&&n.tokens&&n.tokens.length>0){let e=this.findLastNonEmptyToken(n.tokens);if(e)return e}if(n.type===`text`){if((`text`in n?n.text:``).trim())return n}else if(n.type===`html`||n.type===`tag`)return n}return null}findLastTextToken(e){let t=this.findLastNonEmptyToken(e);return!t||t.type!==`text`?null:t}parse(e,t){if(this.injectTail=t?.injectTail??!1,this.options.protectCustomTagNewlines){let{protected:t,placeholders:n}=this.protectCustomTags(e),r=this.markdownInstance.parse(t);return this.restorePlaceholders(r,n)}return this.markdownInstance.parse(e)}},eo=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(e){e.Root=`root`,e.Text=`text`,e.Directive=`directive`,e.Comment=`comment`,e.Script=`script`,e.Style=`style`,e.Tag=`tag`,e.CDATA=`cdata`,e.Doctype=`doctype`})(t=e.ElementType||={});function n(e){return e.type===t.Tag||e.type===t.Script||e.type===t.Style}e.isTag=n,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})),to=z((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),n}(i);e.NodeWithChildren=l;var u=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.CDATA,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),n}(l);e.CDATA=u;var d=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=r.ElementType.Root,t}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),n}(l);e.Document=d;var f=function(e){t(n,e);function n(t,n,i,a){i===void 0&&(i=[]),a===void 0&&(a=t===`script`?r.ElementType.Script:t===`style`?r.ElementType.Style:r.ElementType.Tag);var o=e.call(this,i)||this;return o.name=t,o.attribs=n,o.type=a,o}return Object.defineProperty(n.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){return{name:t,value:e.attribs[t],namespace:e[`x-attribsNamespace`]?.[t],prefix:e[`x-attribsPrefix`]?.[t]}})},enumerable:!1,configurable:!0}),n}(l);e.Element=f;function p(e){return(0,r.isTag)(e)}e.isTag=p;function m(e){return e.type===r.ElementType.CDATA}e.isCDATA=m;function h(e){return e.type===r.ElementType.Text}e.isText=h;function g(e){return e.type===r.ElementType.Comment}e.isComment=g;function _(e){return e.type===r.ElementType.Directive}e.isDirective=_;function v(e){return e.type===r.ElementType.Root}e.isDocument=v;function y(e){return Object.prototype.hasOwnProperty.call(e,`children`)}e.hasChildren=y;function b(e,t){t===void 0&&(t=!1);var r;if(h(e))r=new o(e.data);else if(g(e))r=new s(e.data);else if(p(e)){var i=t?x(e.children):[],a=new f(e.name,n({},e.attribs),i);i.forEach(function(e){return e.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e[`x-attribsNamespace`]&&(a[`x-attribsNamespace`]=n({},e[`x-attribsNamespace`])),e[`x-attribsPrefix`]&&(a[`x-attribsPrefix`]=n({},e[`x-attribsPrefix`])),r=a}else if(m(e)){var i=t?x(e.children):[],l=new u(i);i.forEach(function(e){return e.parent=l}),r=l}else if(v(e)){var i=t?x(e.children):[],y=new d(i);i.forEach(function(e){return e.parent=y}),e[`x-mode`]&&(y[`x-mode`]=e[`x-mode`]),r=y}else if(_(e)){var b=new c(e.name,e.data);e[`x-name`]!=null&&(b[`x-name`]=e[`x-name`],b[`x-publicId`]=e[`x-publicId`],b[`x-systemId`]=e[`x-systemId`]),r=b}else throw Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}e.cloneNode=b;function x(e){for(var t=e.map(function(e){return b(e,!0)}),n=1;n{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.DomHandler=void 0;var r=eo(),i=to();n(to(),e);var a={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof t==`function`&&(n=t,t=a),typeof e==`object`&&(t=e,e=void 0),this.callback=e??null,this.options=t??a,this.elementCB=n??null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?r.ElementType.Tag:void 0,a=new i.Element(e,t,void 0,n);this.addNode(a),this.tagStack.push(a)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===r.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===r.ElementType.Comment){this.lastNode.data+=e;return}var t=new i.Comment(e);this.addNode(t),this.lastNode=t},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(``),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if(typeof this.callback==`function`)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();e.DomHandler=o,e.default=o})),ro=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=e.CARRIAGE_RETURN_PLACEHOLDER=e.CARRIAGE_RETURN_REGEX=e.CARRIAGE_RETURN=e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES=void 0,e.CASE_SENSITIVE_TAG_NAMES=`animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`),e.CASE_SENSITIVE_TAG_NAMES_MAP=e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),e.CARRIAGE_RETURN=`\r`,e.CARRIAGE_RETURN_REGEX=new RegExp(e.CARRIAGE_RETURN,`g`),e.CARRIAGE_RETURN_PLACEHOLDER=`__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`,e.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER,`g`)})),io=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatAttributes=i,e.hasOpenTag=o,e.escapeSpecialCharacters=s,e.revertEscapedCharacters=c,e.formatDOM=l;var t=no(),n=ro();function r(e){return n.CASE_SENSITIVE_TAG_NAMES_MAP[e]}function i(e){for(var t={},n=0,r=e.length;n`||i===` `||i===` `||i===` +`||i===`\r`||i===`/`}function s(e){return e.replace(n.CARRIAGE_RETURN_REGEX,n.CARRIAGE_RETURN_PLACEHOLDER)}function c(e){return e.replace(n.CARRIAGE_RETURN_PLACEHOLDER_REGEX,n.CARRIAGE_RETURN)}function l(e,n,r){n===void 0&&(n=null);for(var o=[],s,u=0,d=e.length;u{Object.defineProperty(e,"__esModule",{value:!0}),e.default=h;var t=io(),n=`html`,r=`head`,i=`body`,a=/<([a-zA-Z]+[0-9]?)/,o=function(e,t){throw Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(e,t){throw Error("This browser does not support `DOMParser.prototype.parseFromString`")},c=typeof window==`object`&&window.DOMParser;if(typeof c==`function`){var l=new c,u=`text/html`;s=function(e,t){return t&&(e=`<${t}>${e}`),l.parseFromString(e,u)},o=s}if(typeof document==`object`&&document.implementation){var d=document.implementation.createHTMLDocument();o=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var f=typeof document==`object`&&document.createElement(`template`),p;f&&f.content&&(p=function(e){return f.innerHTML=e,f.content.childNodes});var m=function(){return document.createDocumentFragment().childNodes};function h(e){var c,l;e=(0,t.escapeSpecialCharacters)(e);var u=(a.exec(e)?.[1])?.toLowerCase();switch(u){case n:var d=s(e);if(!(0,t.hasOpenTag)(e,r)){var f=d.querySelector(r);(c=f?.parentNode)==null||c.removeChild(f)}if(!(0,t.hasOpenTag)(e,i)){var f=d.querySelector(i);(l=f?.parentNode)==null||l.removeChild(f)}return d.querySelectorAll(n);case r:case i:var h=o(e).querySelectorAll(u);return(0,t.hasOpenTag)(e,i)&&(0,t.hasOpenTag)(e,r)?h[0].parentNode?.childNodes??m():h;default:if(p)return p(e);var f=o(e,i).querySelector(i);return f?.childNodes??m()}}})),oo=z((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var n=t(ao()),r=io(),i=/<(![a-zA-Z\s]+)>/;function a(e){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];var t=i.exec(e),a=t?t[1]:void 0;return(0,r.formatDOM)((0,n.default)(e),null,a)}})),so=z((e=>{e.SAME=0,e.CAMELCASE=1,e.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":`acceptCharset`,accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:`className`,classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:`htmlFor`,form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":`httpEquiv`,icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":`accentHeight`,accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":`alignmentBaseline`,allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":`arabicForm`,ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":`baselineShift`,baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":`capHeight`,clip:0,clipPath:1,"clip-path":`clipPath`,clipPathUnits:1,clipRule:1,"clip-rule":`clipRule`,color:0,colorInterpolation:1,"color-interpolation":`colorInterpolation`,colorInterpolationFilters:1,"color-interpolation-filters":`colorInterpolationFilters`,colorProfile:1,"color-profile":`colorProfile`,colorRendering:1,"color-rendering":`colorRendering`,contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":`dominantBaseline`,dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":`enableBackground`,end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":`fillOpacity`,fillRule:1,"fill-rule":`fillRule`,filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":`floodOpacity`,floodColor:1,"flood-color":`floodColor`,focusable:0,fontFamily:1,"font-family":`fontFamily`,fontSize:1,"font-size":`fontSize`,fontSizeAdjust:1,"font-size-adjust":`fontSizeAdjust`,fontStretch:1,"font-stretch":`fontStretch`,fontStyle:1,"font-style":`fontStyle`,fontVariant:1,"font-variant":`fontVariant`,fontWeight:1,"font-weight":`fontWeight`,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":`glyphName`,glyphOrientationHorizontal:1,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphOrientationVertical:1,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":`horizAdvX`,horizOriginX:1,"horiz-origin-x":`horizOriginX`,ideographic:0,imageRendering:1,"image-rendering":`imageRendering`,in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":`letterSpacing`,lightingColor:1,"lighting-color":`lightingColor`,limitingConeAngle:1,local:0,markerEnd:1,"marker-end":`markerEnd`,markerHeight:1,markerMid:1,"marker-mid":`markerMid`,markerStart:1,"marker-start":`markerStart`,markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":`overlinePosition`,overlineThickness:1,"overline-thickness":`overlineThickness`,paintOrder:1,"paint-order":`paintOrder`,panose1:0,"panose-1":`panose1`,pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":`pointerEvents`,points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":`renderingIntent`,repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":`shapeRendering`,slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":`stopColor`,stopOpacity:1,"stop-opacity":`stopOpacity`,strikethroughPosition:1,"strikethrough-position":`strikethroughPosition`,strikethroughThickness:1,"strikethrough-thickness":`strikethroughThickness`,string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":`strokeDasharray`,strokeDashoffset:1,"stroke-dashoffset":`strokeDashoffset`,strokeLinecap:1,"stroke-linecap":`strokeLinecap`,strokeLinejoin:1,"stroke-linejoin":`strokeLinejoin`,strokeMiterlimit:1,"stroke-miterlimit":`strokeMiterlimit`,strokeWidth:1,"stroke-width":`strokeWidth`,strokeOpacity:1,"stroke-opacity":`strokeOpacity`,suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":`textAnchor`,textDecoration:1,"text-decoration":`textDecoration`,textLength:1,textRendering:1,"text-rendering":`textRendering`,to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":`underlinePosition`,underlineThickness:1,"underline-thickness":`underlineThickness`,unicode:0,unicodeBidi:1,"unicode-bidi":`unicodeBidi`,unicodeRange:1,"unicode-range":`unicodeRange`,unitsPerEm:1,"units-per-em":`unitsPerEm`,unselectable:0,vAlphabetic:1,"v-alphabetic":`vAlphabetic`,values:0,vectorEffect:1,"vector-effect":`vectorEffect`,version:0,vertAdvY:1,"vert-adv-y":`vertAdvY`,vertOriginX:1,"vert-origin-x":`vertOriginX`,vertOriginY:1,"vert-origin-y":`vertOriginY`,vHanging:1,"v-hanging":`vHanging`,vIdeographic:1,"v-ideographic":`vIdeographic`,viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":`vMathematical`,vocab:0,widths:0,wordSpacing:1,"word-spacing":`wordSpacing`,writingMode:1,"writing-mode":`writingMode`,x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":`xHeight`,xlinkActuate:1,"xlink:actuate":`xlinkActuate`,xlinkArcrole:1,"xlink:arcrole":`xlinkArcrole`,xlinkHref:1,"xlink:href":`xlinkHref`,xlinkRole:1,"xlink:role":`xlinkRole`,xlinkShow:1,"xlink:show":`xlinkShow`,xlinkTitle:1,"xlink:title":`xlinkTitle`,xlinkType:1,"xlink:type":`xlinkType`,xmlBase:1,"xml:base":`xmlBase`,xmlLang:1,"xml:lang":`xmlLang`,xmlns:0,"xml:space":`xmlSpace`,xmlnsXlink:1,"xmlns:xlink":`xmlnsXlink`,xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}})),co=z((e=>{var t=0,n=1,r=2,i=3,a=4,o=5,s=6;function c(e){return u.hasOwnProperty(e)?u[e]:null}function l(e,t,n,o,s,c,l){this.acceptsBooleans=t===r||t===i||t===a,this.attributeName=o,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=l}var u={};[`children`,`dangerouslySetInnerHTML`,`defaultValue`,`defaultChecked`,`innerHTML`,`suppressContentEditableWarning`,`suppressHydrationWarning`,`style`].forEach(e=>{u[e]=new l(e,t,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(([e,t])=>{u[e]=new l(e,n,!1,t,null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(e=>{u[e]=new l(e,r,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(e=>{u[e]=new l(e,r,!1,e,null,!1,!1)}),[`allowFullScreen`,`async`,`autoFocus`,`autoPlay`,`controls`,`default`,`defer`,`disabled`,`disablePictureInPicture`,`disableRemotePlayback`,`formNoValidate`,`hidden`,`loop`,`noModule`,`noValidate`,`open`,`playsInline`,`readOnly`,`required`,`reversed`,`scoped`,`seamless`,`itemScope`].forEach(e=>{u[e]=new l(e,i,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(e=>{u[e]=new l(e,i,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(e=>{u[e]=new l(e,a,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(e=>{u[e]=new l(e,s,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(e=>{u[e]=new l(e,o,!1,e.toLowerCase(),null,!1,!1)});var d=/[\-\:]([a-z])/g,f=e=>e[1].toUpperCase();`accent-height.alignment-baseline.arabic-form.baseline-shift.cap-height.clip-path.clip-rule.color-interpolation.color-interpolation-filters.color-profile.color-rendering.dominant-baseline.enable-background.fill-opacity.fill-rule.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-name.glyph-orientation-horizontal.glyph-orientation-vertical.horiz-adv-x.horiz-origin-x.image-rendering.letter-spacing.lighting-color.marker-end.marker-mid.marker-start.overline-position.overline-thickness.paint-order.panose-1.pointer-events.rendering-intent.shape-rendering.stop-color.stop-opacity.strikethrough-position.strikethrough-thickness.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.underline-position.underline-thickness.unicode-bidi.unicode-range.units-per-em.v-alphabetic.v-hanging.v-ideographic.v-mathematical.vector-effect.vert-adv-y.vert-origin-x.vert-origin-y.word-spacing.writing-mode.xmlns:xlink.x-height`.split(`.`).forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,null,!1,!1)}),[`xlink:actuate`,`xlink:arcrole`,`xlink:role`,`xlink:show`,`xlink:title`,`xlink:type`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(e=>{let t=e.replace(d,f);u[t]=new l(t,n,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!1,!1)});var p=`xlinkHref`;u[p]=new l(`xlinkHref`,n,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(e=>{u[e]=new l(e,n,!1,e.toLowerCase(),null,!0,!0)});var{CAMELCASE:m,SAME:h,possibleStandardNames:g}=so(),_=RegExp.prototype.test.bind(RegExp(`^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`)),v=Object.keys(g).reduce((e,t)=>{let n=g[t];return n===h?e[t]=t:n===m?e[t.toLowerCase()]=t:e[t]=n,e},{});e.BOOLEAN=i,e.BOOLEANISH_STRING=r,e.NUMERIC=o,e.OVERLOADED_BOOLEAN=a,e.POSITIVE_NUMERIC=s,e.RESERVED=t,e.STRING=n,e.getPropertyInfo=c,e.isCustomAttribute=_,e.possibleStandardNames=v})),lo=z(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=` +`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),uo=z((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(lo());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),fo=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),po=z(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(uo()),r=fo();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),mo=z((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.returnFirstArg=e.canTextBeChildOfNode=e.ELEMENTS_WITH_NO_TEXT_CHILDREN=e.PRESERVE_CUSTOM_ATTRIBUTES=void 0,e.isCustomComponent=o,e.setStyleProp=c;var n=i(),r=t(po()),a=new Set([`annotation-xml`,`color-profile`,`font-face`,`font-face-src`,`font-face-uri`,`font-face-format`,`font-face-name`,`missing-glyph`]);function o(e,t){return e.includes(`-`)?!a.has(e):!!(t&&typeof t.is==`string`)}var s={reactCompat:!0};function c(e,t){if(typeof e==`string`){if(!e.trim()){t.style={};return}try{t.style=(0,r.default)(e,s)}catch{t.style={}}}}e.PRESERVE_CUSTOM_ATTRIBUTES=Number(n.version.split(`.`)[0])>=16,e.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set([`tr`,`tbody`,`thead`,`tfoot`,`colgroup`,`table`,`head`,`html`,`frameset`]),e.canTextBeChildOfNode=function(t){return!e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name)},e.returnFirstArg=function(e){return e}})),ho=z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=co(),n=mo(),r=[`checked`,`value`],i=[`input`,`select`,`textarea`],a={reset:!0,submit:!0};function o(e,o){e===void 0&&(e={});var c={},l=!!(e.type&&a[e.type]);for(var u in e){var d=e[u];if((0,t.isCustomAttribute)(u)){c[u]=d;continue}var f=u.toLowerCase(),p=s(f);if(p){var m=(0,t.getPropertyInfo)(p);switch(r.includes(p)&&i.includes(o)&&!l&&(p=s(`default`+f)),c[p]=d,m?.type){case t.BOOLEAN:c[p]=!0;break;case t.OVERLOADED_BOOLEAN:d===``&&(c[p]=!0);break}continue}n.PRESERVE_CUSTOM_ATTRIBUTES&&(c[u]=d)}return(0,n.setStyleProp)(e.style,c),c}function s(e){return t.possibleStandardNames[e]}})),go=z((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var n=i(),r=t(ho()),a=mo(),o={cloneElement:n.cloneElement,createElement:n.createElement,isValidElement:n.isValidElement};function s(e,t){t===void 0&&(t={});for(var n=[],i=typeof t.replace==`function`,l=t.transform??a.returnFirstArg,u=t.library??o,d=u.cloneElement,f=u.createElement,p=u.isValidElement,m=e.length,h=0;h1&&(_=d(_,{key:_.key??h})),n.push(l(_,g,h));continue}}if(g.type===`text`){var v=!g.data.trim().length;if(v&&g.parent&&!(0,a.canTextBeChildOfNode)(g.parent)||t.trim&&v)continue;n.push(l(g.data,g,h));continue}var y=g,b={};c(y)?((0,a.setStyleProp)(y.attribs.style,y.attribs),b=y.attribs):y.attribs&&(b=(0,r.default)(y.attribs,y.name));var x=void 0;switch(g.type){case`script`:case`style`:g.children[0]&&(b.dangerouslySetInnerHTML={__html:g.children[0].data});break;case`tag`:g.name===`textarea`&&g.children[0]?b.defaultValue=g.children[0].data:g.children?.length&&(x=s(g.children,t));break;default:continue}m>1&&(b.key=h),n.push(l(f(g.name,b,x),g,h))}return n.length===1?n[0]:n}function c(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&e.type===`tag`&&(0,a.isCustomComponent)(e.name,e.attribs)}})),_o=c(z((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToDOM=e.domToReact=e.attributesToProps=e.Text=e.ProcessingInstruction=e.Element=e.Comment=void 0,e.default=o;var n=t(oo());e.htmlToDOM=n.default,e.attributesToProps=t(ho()).default;var r=t(go());e.domToReact=r.default;var i=no();Object.defineProperty(e,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(e,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(e,"Text",{enumerable:!0,get:function(){return i.Text}});var a={lowerCaseAttributeNames:!1};function o(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);return e?(0,r.default)((0,n.default)(e,t?.htmlparser2??a),t):[]}}))(),1),vo=_o.default.default||_o.default,yo=q.memo(e=>{let{text:t,animationConfig:n}=e,{fadeDuration:r=200,easing:i=`ease-in-out`}=n||{},[a,o]=(0,q.useState)([]),s=(0,q.useRef)(``);(0,q.useEffect)(()=>{if(t===s.current)return;if(!(s.current&&t.indexOf(s.current)===0)){o([t]),s.current=t;return}let e=t.slice(s.current.length);e&&(o(t=>[...t,e]),s.current=t)},[t]);let c=(0,q.useMemo)(()=>({animation:`x-markdown-fade-in ${r}ms ${i} forwards`,color:`inherit`}),[r,i]);return q.createElement(q.Fragment,null,a.map((e,t)=>q.createElement(`span`,{style:c,key:`animation-text-${t}`},e)))}),bo=/\s/,xo=/[a-zA-Z0-9-]/,So=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),Co=``,To=``,Do=(e,t)=>`${e}-${t}`,Oo=(e,t)=>{if(!e.startsWith(Co,t))return t;let n=e.indexOf(wo,t+4);return n===-1?e.length:n+3},ko=(e,t)=>{if(!e.startsWith(To,t))return t;let n=e.indexOf(Eo,t+9);return n===-1?e.length:n+3},Ao=(e,t)=>{if(e[t+1]!==`/`)return null;let n=t+2,r=``;for(;n`?null:{tagName:r.toLowerCase(),endPos:n+1}},jo=(e,t)=>{let n=t+1,r=``;for(;n`){i=!0,a=e[n-1]===`/`;break}if(e[n]===`"`||e[n]===`'`){let t=e[n];for(n++;ne.toLowerCase()));if(n.size===0||e.length===0)return new Set;let r=new Set,i={},a={},o=0;for(;o{r.add(Do(e,t))});return r}var No=class e{options;static NON_WHITESPACE_REGEX=/[^\r\n\s]+/;constructor(e){this.options=e}detectUnclosedTags(e){return Mo(e,Object.keys(this.options.components??{}))}configureDOMPurify(){let e=Object.keys(this.options.components||{}),t=this.options.dompurifyConfig||{},n=Array.isArray(t.ADD_TAGS)?t.ADD_TAGS:[],r=Array.isArray(t.ADD_ATTR)?t.ADD_ATTR:[];return{...t,ADD_TAGS:Array.from(new Set([...e,...n])),ADD_ATTR:Array.from(new Set([`target`,`rel`,...r]))}}createReplaceElement(t,n){let{enableAnimation:r,animationConfig:i}=this.options.streaming||{};return a=>{let o=`x-markdown-component-${n.current++}`,s=a.type===`text`&&a.data&&e.NON_WHITESPACE_REGEX.test(a.data),c=a.parent?.name,l=c&&this.options.components?.[c];if(r&&s&&!l)return q.createElement(yo,{text:a.data,key:o,animationConfig:i});if(!(`name`in a))return;let{name:u,attribs:d,children:f}=a,p=this.options.components?.[u];if(p){n.tagIndexes[u]=(n.tagIndexes[u]??0)+1;let e={domNode:a,streamStatus:t?.has(Do(u,n.tagIndexes[u]))?`loading`:`done`,key:o,...d,...d.disabled!==void 0&&{disabled:!0},...d.checked!==void 0&&{checked:!0}};if(e.className=[e.className,e.classname,e.class].filter(Boolean).join(` `).trim()||``,u===`code`){let{"data-block":t=`false`,"data-state":n=`done`}=d||{};e.block=t===`true`,e.streamStatus=n===`loading`?`loading`:`done`;let r=d?.[`data-lang`],i=d?.class?.match(/(?:^|\s)language-([^\s]+)/)?.[1]??d?.class?.match(/(?:^|\s)lang-([^\s]+)/)?.[1],a=r||i;a&&(e.lang=a)}return f&&(e.children=this.processChildren(f,t,n)),q.createElement(p,e)}}}processChildren(e,t,n){return(0,_o.domToReact)(e,{replace:this.createReplaceElement(t,n)})}processHtml(e){let t=this.detectUnclosedTags(e),n={current:0,tagIndexes:{}},r=this.configureDOMPurify();return vo(vt.sanitize(e,r),{replace:this.createReplaceElement(t,n)})}render(e){return this.processHtml(e)}},Po={FPS_THRESHOLD:{GOOD:55,WARNING:40},COLORS:{GOOD:`#52c41a`,WARNING:`#faad14`,DANGER:`#ff4d4f`},CHART:{WIDTH:750,HEIGHT:400,PADDING:80}},Fo=()=>typeof window>`u`?{x:12,y:12}:{x:window.innerWidth-220,y:window.innerHeight/2-100},Io=()=>{let[e,t]=(0,q.useState)(0),[n,r]=(0,q.useState)(0),[i,a]=(0,q.useState)(!1),[o,s]=(0,q.useState)(!1),[c,l]=(0,q.useState)([]),[u,d]=(0,q.useState)(Fo()),[f,p]=(0,q.useState)(!1),m=(0,q.useRef)([]),h=(0,q.useRef)([]),g=(0,q.useRef)(0),_=(0,q.useRef)(0),v=(0,q.useRef)(void 0),y=(0,q.useRef)({isDragging:!1,startX:0,startY:0,initialX:0,initialY:0});(0,q.useEffect)(()=>{if(typeof window>`u`)return;f||(p(!0),g.current=performance.now());let e=()=>{let n=performance.now(),a=n-g.current;if(h.current.push(a),h.current.length>60&&h.current.shift(),_.current++,a>=1e3){let e=Math.round(_.current*1e3/a),o=b();t(e),r(o),i&&m.current.push({timestamp:Date.now(),fps:e,memory:o}),_.current=0,g.current=n}v.current=requestAnimationFrame(e)};return v.current=requestAnimationFrame(e),()=>{v.current!==void 0&&cancelAnimationFrame(v.current)}},[i,f]);let b=()=>{let e=performance;return e.memory?Math.round(e.memory.usedJSHeapSize/1024/1024):0},x=e=>e<1?`${Math.round(e*1024)} KB`:e>=1024?`${(e/1024).toFixed(2)} GB`:`${e.toFixed(2)} MB`,S=e=>e>=Po.FPS_THRESHOLD.GOOD?Po.COLORS.GOOD:e>=Po.FPS_THRESHOLD.WARNING?Po.COLORS.WARNING:Po.COLORS.DANGER,C=(0,q.useCallback)(()=>{i?(a(!1),l([...m.current]),s(!0)):(m.current=[],a(!0))},[i]),w=(0,q.useCallback)(e=>{e.target.closest(`.x-markdown-debug-action`)||(y.current={isDragging:!0,startX:e.clientX,startY:e.clientY,initialX:u.x,initialY:u.y})},[u]),T=(0,q.useCallback)(e=>{if(!y.current.isDragging)return;let t=e.clientX-y.current.startX,n=e.clientY-y.current.startY;d({x:y.current.initialX+t,y:y.current.initialY+n})},[]),E=(0,q.useCallback)(()=>{y.current.isDragging=!1},[]);return(0,q.useEffect)(()=>{if(!(typeof window>`u`))return document.addEventListener(`mousemove`,T),document.addEventListener(`mouseup`,E),()=>{document.removeEventListener(`mousemove`,T),document.removeEventListener(`mouseup`,E)}},[T,E]),q.createElement(q.Fragment,null,q.createElement(`div`,{className:`x-markdown-debug-panel`,style:{left:u.x,top:u.y,cursor:y.current.isDragging?`grabbing`:`grab`},onMouseDown:w},q.createElement(`div`,{className:`x-markdown-debug-row`},q.createElement(`span`,{className:`x-markdown-debug-label`},`FPS`),q.createElement(`span`,{className:`x-markdown-debug-value`,style:{color:S(e)}},e)),q.createElement(`div`,{className:`x-markdown-debug-row`},q.createElement(`span`,{className:`x-markdown-debug-label`},`Memory`),q.createElement(`span`,{className:`x-markdown-debug-value`},x(n))),q.createElement(`div`,{className:`x-markdown-debug-actions`},q.createElement(`button`,{type:`button`,className:`x-markdown-debug-action x-markdown-debug-record-btn ${i?`recording`:``}`,onClick:C},i?`⏹ Stop`:`⏺ Record`),c.length>0&&!i&&q.createElement(`button`,{type:`button`,className:`x-markdown-debug-action`,onClick:()=>s(!0)},`📊 View`))),o&&c.length>0?q.createElement(`div`,{className:`x-markdown-debug-modal-overlay`,onClick:()=>s(!1)},q.createElement(`div`,{className:`x-markdown-debug-modal`,onClick:e=>e.stopPropagation()},q.createElement(`div`,{className:`x-markdown-debug-modal-header`},q.createElement(`span`,{style:{color:`#fff`,fontSize:18,fontWeight:`600`}},`Performance Recording`),q.createElement(`button`,{type:`button`,className:`x-markdown-debug-close-btn`,onClick:()=>s(!1)},`✕`)),q.createElement(()=>{if(!c.length)return null;let{WIDTH:e,HEIGHT:t,PADDING:n}=Po.CHART,r=e-n*2,i=t-n*2,a=c[0]?.timestamp??0,o=(c[c.length-1]?.timestamp??0)-a||1,s=Math.max(...c.map(e=>e.fps),60),l=Math.max(...c.map(e=>e.memory),0)*1.1,u=c.length>0?c.reduce((e,t)=>e+t.fps,0)/c.length:0,d=c.length>0?c.reduce((e,t)=>e+t.memory,0)/c.length:0,f=c.length>0?Math.min(...c.map(e=>e.fps)):0,p=c.length>0?Math.max(...c.map(e=>e.fps)):0,m=(e,t)=>c.map(s=>`${n+(s.timestamp-a)/o*r},${n+i-s[e]/t*i}`).join(` `);return q.createElement(`div`,{className:`x-markdown-debug-modal-content`},q.createElement(`div`,{className:`x-markdown-debug-stats-summary`},q.createElement(`div`,{className:`x-markdown-debug-stat-item`},q.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Duration`),q.createElement(`div`,{className:`x-markdown-debug-stat-value`},(o/1e3).toFixed(2),`s`)),q.createElement(`div`,{className:`x-markdown-debug-stat-item`},q.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Avg`),q.createElement(`div`,{className:`x-markdown-debug-stat-value`,style:{color:S(u)}},u.toFixed(1))),q.createElement(`div`,{className:`x-markdown-debug-stat-item`},q.createElement(`div`,{className:`x-markdown-debug-stat-label`},`FPS Range`),q.createElement(`div`,{className:`x-markdown-debug-stat-value`},f,` - `,p)),q.createElement(`div`,{className:`x-markdown-debug-stat-item`},q.createElement(`div`,{className:`x-markdown-debug-stat-label`},`Memory Avg`),q.createElement(`div`,{className:`x-markdown-debug-stat-value`},x(d)))),q.createElement(`svg`,{width:e,height:t,className:`x-markdown-debug-chart-full`,role:`img`,"aria-label":`Performance chart showing FPS and memory usage over time`},q.createElement(`title`,null,`Performance Chart`),[0,.25,.5,.75,1].map(a=>q.createElement(`g`,{key:a},q.createElement(`line`,{x1:n,y1:n+i*a,x2:e-n,y2:n+i*a,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}),q.createElement(`line`,{x1:n+r*a,y1:n,x2:n+r*a,y2:t-n,stroke:`rgba(255,255,255,0.1)`,strokeWidth:`1`}))),q.createElement(`polyline`,{points:m(`fps`,s),fill:`none`,stroke:Po.COLORS.GOOD,strokeWidth:`2`,className:`fps-line`}),q.createElement(`polyline`,{points:m(`memory`,l),fill:`none`,stroke:`#1890ff`,strokeWidth:`2`,className:`memory-line`}),q.createElement(`text`,{x:n-10,y:n,fill:Po.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},s.toFixed(0)),q.createElement(`text`,{x:n-10,y:t-n,fill:Po.COLORS.GOOD,fontSize:`12`,textAnchor:`end`},`0`),q.createElement(`text`,{x:n-10,y:n-15,fill:Po.COLORS.GOOD,fontSize:`14`,fontWeight:`bold`,textAnchor:`end`},`FPS`),q.createElement(`text`,{x:e-n+10,y:n+20,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(l)),q.createElement(`text`,{x:e-n+10,y:t-n,fill:`#1890ff`,fontSize:`12`,textAnchor:`start`},x(0)),q.createElement(`text`,{x:e-n+10,y:n+5,fill:`#1890ff`,fontSize:`14`,fontWeight:`bold`,textAnchor:`start`},`Memory`),q.createElement(`text`,{x:n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},`0s`),q.createElement(`text`,{x:e-n,y:t-n+20,fill:`rgba(255,255,255,0.6)`,fontSize:`12`,textAnchor:`middle`},(o/1e3).toFixed(1),`s`)),q.createElement(`div`,{className:`x-markdown-debug-legend`},q.createElement(`div`,{className:`x-markdown-debug-legend-item`},q.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:Po.COLORS.GOOD}}),q.createElement(`span`,null,`FPS`)),q.createElement(`div`,{className:`x-markdown-debug-legend-item`},q.createElement(`span`,{className:`x-markdown-debug-legend-color`,style:{backgroundColor:`#1890ff`}}),q.createElement(`span`,null,`Memory`))))},null))):null)},Q=function(e){return e.Text=`text`,e.Link=`link`,e.Image=`image`,e.Html=`html`,e.Emphasis=`emphasis`,e.List=`list`,e.Table=`table`,e.InlineCode=`inline-code`,e}({}),Lo={image:[/^!\[[^\]\r\n]{0,1000}$/,/^!\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],link:[/^\[[^\]\r\n]{0,1000}$/,/^\[[^\r\n]{0,1000}\]\(*[^)\r\n]{0,1000}$/],html:[/^<\/$/,/^<\/?[a-zA-Z][a-zA-Z0-9-]{0,100}[^>\r\n]{0,1000}$/],commonEmphasis:[/^(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],list:[/^[-+*]\s{0,3}$/,/^[-+*]\s{1,3}(\*{1,3}|_{1,3})(?!\s)(?!.*\1$)[^\r\n]{0,1000}$/],"inline-code":[/^`[^`\r\n]{0,300}$/]},Ro=e=>{if(e.includes(` + +`))return!1;let t=e.split(` +`);if(t.length<=1)return!0;let[n,r]=t,i=n.trim();if(!/^\|.*\|$/.test(i))return!1;let a=r.trim().split(`|`).map(e=>e.trim()).filter(Boolean),o=/^:?-+:?$/;return a.every((e,t)=>t===a.length-1&&e===`:`||o.test(e))},zo={[Q.Link]:{tokenType:Q.Link,isStartOfToken:e=>e.startsWith(`[`),isStreamingValid:e=>Lo.link.some(t=>t.test(e))},[Q.Image]:{tokenType:Q.Image,isStartOfToken:e=>e.startsWith(`!`),isStreamingValid:e=>Lo.image.some(t=>t.test(e))},[Q.Html]:{tokenType:Q.Html,isStartOfToken:e=>e.startsWith(`<`),isStreamingValid:e=>Lo.html.some(t=>t.test(e))},[Q.Emphasis]:{tokenType:Q.Emphasis,isStartOfToken:e=>e.startsWith(`*`)||e.startsWith(`_`),isStreamingValid:e=>Lo.commonEmphasis.some(t=>t.test(e))},[Q.List]:{tokenType:Q.List,isStartOfToken:e=>/^[-+*]/.test(e),isStreamingValid:e=>Lo.list.some(t=>t.test(e)),getCommitPrefix:e=>{let t=e.match(/^([-+*]\s{0,3})/)?.[1],n=t?e.slice(t.length):``;return t&&n.startsWith("`")?t:null}},[Q.Table]:{tokenType:Q.Table,isStartOfToken:e=>e.startsWith(`|`),isStreamingValid:Ro},[Q.InlineCode]:{tokenType:Q.InlineCode,isStartOfToken:e=>e.startsWith("`"),isStreamingValid:e=>Lo[`inline-code`].some(t=>t.test(e))}},Bo=(e,t)=>{let n=zo[t];if(!n)return;let{token:r,pending:i}=e;if(r===Q.Text&&n.isStartOfToken(i)){e.token=t;return}if(r===t&&!n.isStreamingValid(i)){let t=n.getCommitPrefix?.(i);if(t){e.completeMarkdown+=t,e.pending=i.slice(t.length),e.token=Q.Text;return}Uo(e)}},Vo=Object.values(zo).map(e=>({tokenType:e.tokenType,recognize:t=>Bo(t,e.tokenType)})),Ho=()=>({pending:``,token:Q.Text,processedLength:0,completeMarkdown:``}),Uo=e=>{e.pending&&=(e.completeMarkdown+=e.pending,``),e.token=Q.Text},Wo=(e,t=!1)=>{let n=e.split(` +`),r=!1,i=``,a=0;for(let e=0;e=a&&/^\s*$/.test(c)&&(t||e{let t=``;for(let n=0;n=55296&&r<=56319?n+1=56320&&e.charCodeAt(n+1)<=57343&&(t+=e[n]+e[n+1],n++):(r<56320||r>57343)&&(t+=e[n])}return t},Ko=e=>{try{return encodeURIComponent(e)}catch(t){return t instanceof URIError?encodeURIComponent(Go(e)):``}},qo=(e,t)=>{let{streaming:n,components:r={}}=t||{},{hasNextChunk:i=!1,incompleteMarkdownComponentMap:a}=n||{},[o,s]=(0,q.useState)(``),c=(0,q.useRef)(Ho()),l=(0,q.useCallback)(e=>{let{token:t,pending:n}=e;if(t===Q.Text||t===Q.Image&&n===`!`)return;if(t===Q.Table&&n.split(` +`).length>2)return n;let i=(a||{})[t]||`incomplete-${t}`,o=Ko(n);return r?.[i]?`<${i} data-raw="${o}" />`:void 0},[a,r]),u=(0,q.useCallback)(e=>{if(!e){s(``),c.current=Ho();return}let t=c.current.completeMarkdown+c.current.pending;e.startsWith(t)||(c.current=Ho());let n=c.current,r=e.slice(n.processedLength);if(!r)return;n.processedLength+=r.length;for(let e of r){if(n.pending+=e,Wo(n.completeMarkdown+n.pending)){Uo(n);continue}if(n.token===Q.Text)for(let e of Vo)e.recognize(n);else if(Vo.find(e=>e.tokenType===n.token)?.recognize(n),n.token===Q.Text)for(let e of Vo)e.recognize(n);n.token===Q.Text&&Uo(n)}let i=l(n);s(n.completeMarkdown+(i||``))},[l]);return(0,q.useEffect)(()=>{if(typeof e!=`string`){console.error(`X-Markdown: input must be string, not ${typeof e}.`),s(``);return}i?u(e):s(e)},[e,i,u]),o},Jo=e=>e?typeof e==`boolean`?`▋`:e.content||`▋`:null,Yo=q.memo(e=>{let{streaming:t,config:n,components:i,paragraphTag:a,content:o,children:s,rootClassName:c,className:l,style:u,openLinksInNewTab:d,dompurifyConfig:f,protectCustomTagNewlines:p,escapeRawHtml:m,debug:h}=e,g=(0,q.useMemo)(()=>Jo(t?.tail),[t?.tail]),_=typeof t?.tail==`object`?t.tail.component:void 0,v=!!t?.hasNextChunk&&g,y=r(`x-markdown`,c,l),b=qo(o||s||``,{streaming:t,components:i}),x=(0,q.useMemo)(()=>{if(!v)return i;let e=_?q.createElement(_,{content:g}):q.createElement(`span`,{className:`xmd-tail`},g);return{...i,"xmd-tail":()=>e}},[v,i,_,g]),S=(0,q.useMemo)(()=>new $a({markedConfig:n,paragraphTag:a,openLinksInNewTab:d,components:x,protectCustomTagNewlines:p,escapeRawHtml:m}),[n,a,d,x,p,m]),C=(0,q.useMemo)(()=>new No({components:x,dompurifyConfig:f,streaming:t}),[x,f,t]),w=(0,q.useMemo)(()=>b?S.parse(b,{injectTail:!!v}):``,[b,S,v]),T=(0,q.useMemo)(()=>w?C.render(w):null,[w,C]);return b?q.createElement(q.Fragment,null,q.createElement(`div`,{className:y,style:u},T),h?q.createElement(Io,null):null):null});async function Xo(){return V({url:`/ai/chat/conversations`,method:`get`})}async function Zo(e){return V({url:`/ai/chat/messages/${e}`,method:`get`})}async function Qo(e){return V({url:`/ai/chat/conversations/${e}`,method:`delete`})}var $=ne(),{Text:$o}=te,es=()=>{let{t}=D(),{message:n,modal:r}=F.useApp(),{token:i}=I.useToken(),a=R(e=>e.themeConfig),o=E(),[s]=re(),c=s.get(`agent_id`),[l,u]=(0,q.useState)(null),d=(0,q.useRef)(null),{conversations:f,setConversations:m,activeConversationKey:h,setActiveConversationKey:g}=ui({}),[_,v]=(0,q.useState)([]),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(``),[C,w]=(0,q.useState)(!1),O=async()=>{let{data:e}=await Xo();e.success&&e.data&&m(e.data)},k=async e=>{let{data:t}=await Zo(e);t.success&&t.data&&(v(t.data),setTimeout(()=>{d.current?.scrollTo({top:`bottom`})},100))};(0,q.useEffect)(()=>{O()},[]),(0,q.useEffect)(()=>{c&&ie(Number(c)).then(({data:e})=>{e.success&&e.data&&u(e.data)})},[c]);let A=e=>{g(e),k(e)},P=()=>{g(``),v([])},ee=e=>{r.confirm({title:t(`ai.chat.delete.confirm`),okButtonProps:{danger:!0},onOk:async()=>{await Qo(e),n.success(t(`ai.chat.delete.success`)),h===e&&(g(``),v([])),await O()}})},te=async e=>{if(!e.trim()||y)return;let t={key:`user-${Date.now()}`,role:`user`,content:e,status:`success`},n={key:`assistant-${Date.now()}`,role:`assistant`,content:``,loading:!0,extraInfo:{isStreaming:!0}};v(e=>[...e,t,n]),b(!0),w(!0);let r=localStorage.getItem(`token`),i=``;wi(`/index.php/ai/chat/send`,{headers:{"Content-Type":`application/json`,Authorization:`Bearer ${r}`,Accept:`text/event-stream`},method:`post`,params:{conversation_id:h,message:e,agent_id:c?Number(c):void 0},callbacks:{onSuccess:async()=>{if(b(!1),S(``),w(!1),!h){let{data:e}=await Xo();if(e.success&&e.data&&e.data.length>0){m(e.data);let t=e.data[0].key;g(t)}}},onError:()=>{b(!1),w(!1)},onUpdate:e=>{console.log(`onUpdate`,e);let t=e.data;if(t!==`[DONE]`)try{let e=JSON.parse(t);e.type===`text_delta`&&e.delta&&(i+=e.delta,v(e=>e.map(e=>e.key===n.key?{...e,content:i,loading:!1}:e))),e.type===`text_end`&&v(t=>t.map(t=>t.key===n.key?{...t,key:e.message_id,loading:!1}:t))}catch{}}}})},ne={assistant:{placement:`start`,variant:`filled`,avatar:(0,$.jsx)(B,{src:l?.icon||`https://file.xinadmin.cn/file/favicons.ico`}),contentRender:(e,t)=>{if(!e)return null;let n=t?.extraInfo?.isStreaming===!0;return(0,$.jsx)(Yo,{content:e,streaming:{hasNextChunk:n,enableAnimation:!0,tail:n},openLinksInNewTab:!0,escapeRawHtml:!0})}},user:{placement:`end`,variant:`filled`,avatar:(0,$.jsx)(B,{icon:(0,$.jsx)(j,{}),style:{background:i.colorFillSecondary,color:i.colorTextSecondary},size:36})}},L=_.length>0;return(0,$.jsxs)(e,{styles:{body:{padding:0,overflow:`hidden`,display:`flex`,height:`calc(100vh - 180px)`}},title:(0,$.jsx)(p,{align:`center`,children:l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(B,{src:l.icon,size:36}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,marginRight:10},children:l.name}),l.description&&(0,$.jsx)($o,{type:`secondary`,style:{fontSize:12,lineHeight:1},children:l.description})]})]}):(0,$.jsx)(`span`,{children:t(`ai.chat.defaultTitle`)})}),extra:(0,$.jsx)(M,{onClick:()=>o(`/ai/agent`),children:t(`ai.chat.switchAgent`)}),children:[(0,$.jsx)(`div`,{style:{width:280,borderRight:`1px solid ${i.colorBorderSecondary}`},children:(0,$.jsx)(_r,{items:f,activeKey:h,onActiveChange:A,menu:e=>({items:[{label:`Rename`,key:`Rename`,icon:(0,$.jsx)(T,{})},{type:`divider`},{label:`Delete Chat`,key:`delete`,icon:(0,$.jsx)(N,{}),danger:!0,onClick:()=>ee(e.key)}]}),creation:{onClick:P},style:{flex:1,overflow:`auto`}})}),(0,$.jsxs)(`div`,{className:`flex-1 flex flex-col min-w-0 px-1`,children:[!L&&(0,$.jsx)(`div`,{className:`h-full flex items-center justify-center`,children:(0,$.jsx)(oi,{icon:l?.icon||`https://file.xinadmin.cn/file/favicons.ico`,style:{backgroundImage:a.themeScheme===`dark`?`linear-gradient(97deg, rgba(90,196,255,0.12) 0%, rgba(174,136,255,0.12) 100%)`:`linear-gradient(97deg, #f2f9fe 0%, #f7f3ff 100%)`,borderRadius:20,width:`80%`,padding:`20px`},title:t(`ai.chat.welcome.title`),description:t(`ai.chat.welcome.description`),variant:`borderless`})}),L&&(0,$.jsx)(`div`,{style:{flex:1,overflow:`hidden`},children:(0,$.jsx)(Un.List,{ref:d,items:_,autoScroll:!0,style:{height:`100%`,padding:16},role:ne})}),(0,$.jsx)(`div`,{style:{padding:`0 16px 16px`},children:(0,$.jsx)(ni,{loading:y,disabled:C,value:x,onChange:S,placeholder:t(`ai.chat.placeholder`),onSubmit:te,onCancel:()=>b(!1),autoSize:{minRows:1,maxRows:6}})})]})]})};export{es as default}; \ No newline at end of file diff --git a/public/assets/comment-DSSGpqfu.js b/public/assets/comment-DSSGpqfu.js new file mode 100644 index 0000000..7272a8a --- /dev/null +++ b/public/assets/comment-DSSGpqfu.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/forum/comment`,columns:[{title:t(`forum.comment.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`forum.comment.post_id`),dataIndex:`post_id`,valueType:`text`,align:`center`,required:!0},{title:t(`forum.comment.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`,required:!0,hideInSearch:!0},{title:t(`forum.comment.parent_id`),dataIndex:`parent_id`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.comment.reply_to`),dataIndex:`reply_to`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`forum.comment.content`),dataIndex:`content`,valueType:`text`,hideInTable:!0,hideInSearch:!0,required:!0,rules:[{required:!0,message:t(`forum.comment.content.required`)}]},{title:t(`forum.comment.like_count`),dataIndex:`like_count`,hideInForm:!0,hideInSearch:!0,align:`center`},{title:t(`forum.comment.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`forum.comment.status.0`)},{value:1,label:t(`forum.comment.status.1`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`forum.comment.status.1`)}):(0,d.jsx)(e,{color:`error`,children:t(`forum.comment.status.0`)}),filters:[{text:t(`forum.comment.status.0`),value:0},{text:t(`forum.comment.status.1`),value:1}],align:`center`},{title:t(`forum.comment.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`forum.comment.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`forum.comment`,scroll:{x:1200},formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:700},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`forum.comment.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`forum.comment.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/complaint-appeal-Zn-ZIuz4.js b/public/assets/complaint-appeal-Zn-ZIuz4.js new file mode 100644 index 0000000..2ccbd89 --- /dev/null +++ b/public/assets/complaint-appeal-Zn-ZIuz4.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/runner/complaint-appeal`,columns:[{title:t(`runner.complaint_appeal.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`runner.complaint_appeal.complaint_id`),dataIndex:`complaint_id`,valueType:`text`,align:`center`},{title:t(`runner.complaint_appeal.worker_id`),dataIndex:`worker_id`,valueType:`text`,align:`center`},{title:t(`runner.complaint_appeal.content`),dataIndex:`content`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint_appeal.images`),dataIndex:`images`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint_appeal.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`runner.complaint_appeal.status.0`)},{value:1,label:t(`runner.complaint_appeal.status.1`)},{value:2,label:t(`runner.complaint_appeal.status.2`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`runner.complaint_appeal.status.1`)}):n===2?(0,d.jsx)(e,{color:`error`,children:t(`runner.complaint_appeal.status.2`)}):(0,d.jsx)(e,{color:`warning`,children:t(`runner.complaint_appeal.status.0`)}),filters:[{text:t(`runner.complaint_appeal.status.0`),value:0},{text:t(`runner.complaint_appeal.status.1`),value:1},{text:t(`runner.complaint_appeal.status.2`),value:2}],align:`center`},{title:t(`runner.complaint_appeal.reply`),dataIndex:`reply`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint_appeal.reviewed_at`),dataIndex:`reviewed_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.complaint_appeal.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.complaint_appeal.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.complaint_appeal`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`runner.complaint_appeal.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`runner.complaint_appeal.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/complaint-smntvNAs.js b/public/assets/complaint-smntvNAs.js new file mode 100644 index 0000000..bae3e91 --- /dev/null +++ b/public/assets/complaint-smntvNAs.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/runner/complaint`,columns:[{title:t(`runner.complaint.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`runner.complaint.complaint_no`),dataIndex:`complaint_no`,valueType:`text`,align:`center`},{title:t(`runner.complaint.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`},{title:t(`runner.complaint.worker_id`),dataIndex:`worker_id`,valueType:`text`,align:`center`},{title:t(`runner.complaint.order_id`),dataIndex:`order_id`,valueType:`text`,align:`center`},{title:t(`runner.complaint.type`),dataIndex:`type`,valueType:`text`,align:`center`},{title:t(`runner.complaint.content`),dataIndex:`content`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint.images`),dataIndex:`images`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`runner.complaint.status.0`)},{value:1,label:t(`runner.complaint.status.1`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`runner.complaint.status.1`)}):(0,d.jsx)(e,{color:`warning`,children:t(`runner.complaint.status.0`)}),filters:[{text:t(`runner.complaint.status.0`),value:0},{text:t(`runner.complaint.status.1`),value:1}],align:`center`},{title:t(`runner.complaint.result`),dataIndex:`result`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint.result_remark`),dataIndex:`result_remark`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`runner.complaint.handled_at`),dataIndex:`handled_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.complaint.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`runner.complaint.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.complaint`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`runner.complaint.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`runner.complaint.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/config-Cv4QnqXU.js b/public/assets/config-Cv4QnqXU.js new file mode 100644 index 0000000..1194f50 --- /dev/null +++ b/public/assets/config-Cv4QnqXU.js @@ -0,0 +1 @@ +import{t as e}from"./XinForm-DX04WSwD.js";import{n as t}from"./pagination-BklXHwQ9.js";import{t as n}from"./card-BDbI8Gdq.js";import{t as r}from"./spin-D1ik486_.js";import{t as i}from"./popconfirm-2wuVGTgH.js";import{$t as a,Ca as o,Ct as s,D as c,Dt as l,Ea as u,Jt as d,Kt as f,Lt as p,Pt as m,Zt as h,_n as g,at as _,c as v,gn as y,ot as b,qt as ee,rt as x,s as S,vt as C,w,ya as T,yt as E}from"./index-DThTpSPU.js";var D=u(o(),1);async function O(){return T({url:`/system/config/group`,method:`get`})}async function k(e){return T({url:`/system/config/group`,method:`post`,data:e})}async function te(e,t){return T({url:`/system/config/group/${e}`,method:`put`,data:t})}async function ne(e){return T({url:`/system/config/group/${e}`,method:`delete`})}async function re(e){return T({url:`/system/config/items`,method:`get`,params:{group_id:e}})}async function ie(e){return T({url:`/system/config/items`,method:`post`,data:e})}async function ae(e,t){return T({url:`/system/config/items/${e}`,method:`put`,data:t})}async function oe(e){return T({url:`/system/config/items/${e}`,method:`delete`})}async function se(e){return T({url:`/system/config/items/save`,method:`put`,data:{configs:e}})}var A=S(),{TextArea:ce}=l,{Text:j,Title:M}=x,N=()=>{let{t:o}=v(),u=[{label:o(`system.config.component.Input`),value:`Input`},{label:o(`system.config.component.TextArea`),value:`TextArea`},{label:o(`system.config.component.InputNumber`),value:`InputNumber`},{label:o(`system.config.component.Switch`),value:`Switch`},{label:o(`system.config.component.Radio`),value:`Radio`},{label:o(`system.config.component.Checkbox`),value:`Checkbox`}],[x,S]=(0,D.useState)([]),[T,N]=(0,D.useState)(),[P,F]=(0,D.useState)(),[I,L]=(0,D.useState)([]),[R,z]=(0,D.useState)(!1),[B,V]=(0,D.useState)(!1),[H,U]=(0,D.useState)(!1),[W,G]=(0,D.useState)(null),K=(0,D.useRef)(null),[q,J]=(0,D.useState)(null),Y=(0,D.useRef)(null),[X]=m.useForm(),Z=async()=>{try{z(!0);let{data:e}=await O(),t=e.data||[];S(t),!T&&t.length>0&&(N(t[0].id),F(t[0].key))}finally{z(!1)}},Q=async e=>{if(e)try{V(!0);let{data:t}=await re(e),n=t.data||[];L(n);let r={};n.forEach(e=>{if((!e.type||[`Input`,`TextArea`,`Radio`].includes(e.type))&&(r[`item_${e.id}`]=String(e.values)),e.type&&e.type===`InputNumber`&&(r[`item_${e.id}`]=Number(e.values)),e.type&&e.type===`Switch`&&(e.values===`0`||e.values===`false`?r[`item_${e.id}`]=!1:r[`item_${e.id}`]=!!e.values),e.type&&e.type===`Checkbox`)try{r[`item_${e.id}`]=JSON.parse(e.values||`[]`)}catch{r[`item_${e.id}`]=[]}}),console.log(r),X.setFieldsValue(r)}finally{V(!1)}};(0,D.useEffect)(()=>{Z()},[]),(0,D.useEffect)(()=>{T&&Q(T)},[T]);let le=()=>{G(null),K.current?.resetFields(),K.current?.open()},ue=e=>{G(e),K.current?.setFieldsValue(e),K.current?.open()},de=async e=>{try{return W?(await te(W.id,e),s.success(o(`system.config.group.updateSuccess`))):(await k(e),s.success(o(`system.config.group.createSuccess`))),K.current?.close(),await Z(),!0}catch{return!1}},fe=async e=>{try{await ne(e),s.success(o(`system.config.group.deleteSuccess`)),T===e&&(N(void 0),F(void 0)),await Z()}catch(e){console.error(`删除设置组失败:`,e)}},pe=()=>{J(null),Y.current?.resetFields(),Y.current?.setFieldsValue({group_id:T}),Y.current?.open()},$=e=>{J(e),Y.current?.setFieldsValue(e),Y.current?.open()},me=async e=>{try{return q?(await ae(q.id,{...e,group_id:T}),s.success(o(`system.config.item.updateSuccess`))):(await ie({...e,group_id:T}),s.success(o(`system.config.item.createSuccess`))),Y.current?.close(),await Q(T),!0}catch{return!1}},he=async e=>{try{await oe(e),s.success(o(`system.config.item.deleteSuccess`)),await Q(T)}catch(e){console.error(`删除设置项失败:`,e)}},ge=async()=>{try{U(!0);let e=X.getFieldsValue();await se(I.map(t=>{let n=e[`item_${t.id}`];return!t.type||[`Input`,`TextArea`,`Radio`].includes(t.type)||t.type&&t.type===`InputNumber`?{id:t.id,value:String(n)}:t.type&&t.type===`Switch`?n===`0`||n===`false`||n?{id:t.id,value:`false`}:{id:t.id,value:`true`}:t.type&&t.type===`Checkbox`?{id:t.id,value:JSON.stringify(n)}:{id:t.id,value:n}})),s.success(o(`system.config.item.updateSuccess`))}finally{U(!1)}},_e=e=>{let n=`item_${e.id}`,r=e.type||`Input`,a=`site_config('${P}.${e.key}')`,s=[];if(e.options_json)try{s=JSON.parse(e.options_json)}catch{console.error(`options解析失败:`,e.options_json)}let c={};if(e.props_json)try{c=JSON.parse(e.props_json)}catch{console.error(`props解析失败:`,e.props_json)}let u=()=>(0,A.jsxs)(`div`,{style:{marginBottom:8},children:[(0,A.jsxs)(p,{children:[(0,A.jsx)(j,{strong:!0,children:e.title}),(0,A.jsx)(y,{type:`text`,size:`small`,icon:(0,A.jsx)(_,{}),onClick:()=>$(e)}),(0,A.jsx)(i,{title:o(`system.config.item.deleteConfirm`),onConfirm:()=>he(e.id),okText:o(`system.config.confirm.ok`),cancelText:o(`system.config.confirm.cancel`),children:(0,A.jsx)(y,{type:`text`,size:`small`,danger:!0,icon:(0,A.jsx)(b,{})})})]}),(0,A.jsx)(`div`,{style:{marginBottom:4},children:(0,A.jsxs)(j,{type:`secondary`,style:{fontSize:12},children:[e.describe,` `,(0,A.jsx)(j,{code:!0,copyable:!0,children:a})]})})]}),d;switch(r){case`Input`:d=(0,A.jsx)(l,{placeholder:e.describe||o(`system.config.form.placeholder.input`),...c});break;case`TextArea`:d=(0,A.jsx)(ce,{placeholder:e.describe||o(`system.config.form.placeholder.input`),rows:4,...c});break;case`InputNumber`:d=(0,A.jsx)(f,{style:{width:`100%`},placeholder:e.describe||o(`system.config.form.placeholder.input`),...c});break;case`Switch`:d=(0,A.jsx)(C,{...c});break;case`Radio`:d=(0,A.jsx)(t.Group,{options:s,...c});break;case`Checkbox`:d=(0,A.jsx)(h.Group,{options:s,...c});break;default:d=(0,A.jsx)(l,{placeholder:e.describe||o(`system.config.form.placeholder.input`),...c})}return(0,A.jsxs)(`div`,{style:{marginBottom:24},children:[(0,A.jsx)(u,{}),(0,A.jsx)(m.Item,{name:n,noStyle:!0,children:d})]})},ve=[{title:o(`system.config.group.field.title`),dataIndex:`title`,valueType:`text`,rules:[{required:!0,message:o(`system.config.group.field.title.required`)}]},{title:o(`system.config.group.field.key`),dataIndex:`key`,valueType:`text`,rules:[{required:!0,message:o(`system.config.group.field.key.required`)}]},{title:o(`system.config.group.field.remark`),dataIndex:`remark`,valueType:`textarea`,colProps:{span:24}}],ye=[{title:o(`system.config.item.field.key`),dataIndex:`key`,valueType:`text`,rules:[{required:!0,message:o(`system.config.item.field.key.required`)}]},{title:o(`system.config.item.field.title`),dataIndex:`title`,valueType:`text`,rules:[{required:!0,message:o(`system.config.item.field.title.required`)}]},{title:o(`system.config.item.field.type`),dataIndex:`type`,valueType:`select`,fieldProps:{options:u},rules:[{required:!0,message:o(`system.config.item.field.type.required`)}]},{title:o(`system.config.item.field.sort`),dataIndex:`sort`,valueType:`digit`},{title:o(`system.config.item.field.describe`),dataIndex:`describe`,valueType:`textarea`,colProps:{span:24}},{title:o(`system.config.item.field.options`),dataIndex:`options`,valueType:`textarea`,tooltip:o(`system.config.item.field.options.tooltip`)},{title:o(`system.config.item.field.props`),dataIndex:`props`,valueType:`textarea`,tooltip:o(`system.config.item.field.props.tooltip`)},{title:o(`system.config.item.field.values`),dataIndex:`values`,valueType:`text`}];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`mb-5`,children:[(0,A.jsx)(M,{level:3,children:o(`system.config.page.title`)}),(0,A.jsx)(j,{type:`secondary`,children:o(`system.config.page.description`)})]}),(0,A.jsxs)(E,{gutter:[16,16],children:[(0,A.jsx)(d,{xs:24,lg:4,children:(0,A.jsx)(n,{styles:{header:{paddingInline:16,paddingBlock:0,minHeight:48},body:{padding:16,minHeight:52}},title:(0,A.jsxs)(p,{children:[(0,A.jsx)(w,{}),o(`system.config.group.title`)]}),extra:(0,A.jsx)(y,{type:`link`,size:`small`,icon:(0,A.jsx)(a,{}),onClick:le,children:o(`system.config.group.add`)}),loading:R,children:(0,A.jsx)(g,{mode:`inline`,selectedKeys:T?[String(T)]:[],items:x.map(e=>({key:String(e.id),label:(0,A.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,A.jsx)(`span`,{children:e.title}),(0,A.jsxs)(p,{size:`small`,children:[(0,A.jsx)(y,{type:`text`,size:`small`,icon:(0,A.jsx)(_,{}),onClick:t=>{t.stopPropagation(),ue(e)}}),(0,A.jsx)(i,{title:o(`system.config.group.deleteConfirm`),description:o(`system.config.group.deleteWarning`),onConfirm:t=>{t?.stopPropagation(),fe(e.id)},okText:o(`system.config.confirm.ok`),cancelText:o(`system.config.confirm.cancel`),children:(0,A.jsx)(y,{type:`text`,size:`small`,danger:!0,icon:(0,A.jsx)(b,{}),onClick:e=>e.stopPropagation()})})]})]}),onClick:()=>{N(e.id),F(e.key)}}))})})}),(0,A.jsx)(d,{xs:24,lg:20,children:(0,A.jsx)(n,{styles:{header:{paddingInline:16,paddingBlock:0,minHeight:48},body:{padding:16,minHeight:52}},title:o(`system.config.item.title`),extra:T&&(0,A.jsxs)(p,{children:[(0,A.jsx)(y,{type:`primary`,icon:(0,A.jsx)(c,{}),loading:H,onClick:ge,children:o(`system.config.save.button`)}),(0,A.jsx)(y,{type:`primary`,icon:(0,A.jsx)(a,{}),onClick:pe,children:o(`system.config.item.add`)})]}),children:T?(0,A.jsx)(r,{spinning:B,children:(0,A.jsx)(m,{form:X,layout:`vertical`,children:I.length===0?(0,A.jsx)(`div`,{style:{textAlign:`center`,padding:`60px 0`,color:`#999`},children:o(`system.config.item.empty`)}):I.map((e,t)=>(0,A.jsxs)(`div`,{style:{position:`relative`},children:[(0,A.jsx)(`div`,{style:{paddingRight:80},children:_e(e)}),tK.current?.close(),forceRender:!0,width:800},grid:!0,layout:`vertical`,colProps:{span:8},rowProps:{gutter:[30,0]},trigger:(0,A.jsx)(`span`,{style:{display:`none`}})}),(0,A.jsx)(e,{formRef:Y,layoutType:`ModalForm`,columns:ye,onFinish:me,grid:!0,colProps:{span:12},rowProps:{gutter:30},layout:`vertical`,modalProps:{title:o(q?`system.config.item.edit`:`system.config.item.create`),onCancel:()=>Y.current?.close(),forceRender:!0,width:800},trigger:(0,A.jsx)(`span`,{style:{display:`none`}})})]})]})};export{N as default}; \ No newline at end of file diff --git a/public/assets/conversation-8qz3V5Q0.js b/public/assets/conversation-8qz3V5Q0.js new file mode 100644 index 0000000..f5aa701 --- /dev/null +++ b/public/assets/conversation-8qz3V5Q0.js @@ -0,0 +1 @@ +import{o as e}from"./tslib.es6-DffexlHv.js";import{t}from"./tag-Bn-IyYw0.js";import{Ca as n,Dn as r,Ea as i,Ot as a,c as o,gn as s,hn as c,rt as l,s as u,ya as d,zt as f}from"./index-DThTpSPU.js";import{t as p}from"./XinTable-D_6_7i3V.js";async function m(e,t){return d({url:`/ai/conversation/${e}/messages`,method:`get`,params:t})}var h=i(c(),1),g=i(n(),1),_=u(),{Title:v,Text:y}=l;function b(){let{t:n}=o(),[i,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``),[d,b]=(0,g.useState)([]),[x,S]=(0,g.useState)(!1),[C,w]=(0,g.useState)(0),[T,E]=(0,g.useState)(1),[D,O]=(0,g.useState)(``),k=async(e,t)=>{S(!0);try{let n=(await m(e,{page:t,pageSize:20})).data.data;b(n.data),w(n.total)}finally{S(!1)}},A=async e=>{O(e.id),u(e.title||``),E(1),c(!0),await k(e.id,1)},j=e=>{E(e),k(D,e)},M=[{title:n(`ai.conversation.id`),dataIndex:`id`,hideInForm:!0,width:260,ellipsis:!0,align:`center`},{title:n(`ai.conversation.username`),dataIndex:`username`,hideInForm:!0,align:`center`,width:120,render:e=>e||n(`ai.conversation.noUser`)},{title:n(`ai.conversation.title`),dataIndex:`title`,valueType:`text`,ellipsis:!0},{title:n(`ai.conversation.messageCount`),dataIndex:`message_count`,hideInForm:!0,hideInSearch:!0,align:`center`,width:100},{title:n(`ai.conversation.createdAt`),dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`},{title:n(`ai.conversation.updatedAt`),dataIndex:`updated_at`,hideInForm:!0,hideInSearch:!0,align:`center`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}],N=[{title:n(`ai.conversation.message.role`),dataIndex:`role`,width:100,render:e=>(0,_.jsx)(t,{color:{user:`blue`,assistant:`green`,system:`orange`}[e]||`default`,children:n(`ai.conversation.message.role.${e}`,e)})},{title:n(`ai.conversation.message.agent`),dataIndex:`agent`,width:150,ellipsis:!0},{title:n(`ai.conversation.message.content`),dataIndex:`content`,ellipsis:!0},{title:n(`ai.conversation.message.createdAt`),dataIndex:`created_at`,width:180,render:e=>e?(0,h.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`}];return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{className:`mb-5`,children:[(0,_.jsx)(v,{level:3,children:n(`ai.conversation.page.title`)}),(0,_.jsx)(y,{type:`secondary`,children:n(`ai.conversation.page.description`)})]}),(0,_.jsx)(p,{api:`/ai/conversation`,columns:M,rowKey:`id`,accessName:`ai.conversation`,addShow:!1,editShow:!1,formProps:!1,operateProps:{fixed:`right`,width:120},operateRender:(e,t)=>[(0,_.jsx)(r,{title:n(`ai.conversation.viewMessages`),children:(0,_.jsx)(s,{type:`primary`,icon:(0,_.jsx)(a,{}),size:`small`,onClick:()=>A(e)})},`view`),t.del],scroll:{x:1100},cardProps:{variant:`borderless`}}),(0,_.jsx)(f,{title:`${n(`ai.conversation.messageTitle`)} - ${l}`,open:i,onClose:()=>c(!1),width:900,children:(0,_.jsx)(e,{dataSource:d,columns:N,rowKey:`id`,loading:x,pagination:{current:T,total:C,pageSize:20,onChange:j,showSizeChanger:!1},scroll:{x:700},size:`small`})})]})}export{b as default}; \ No newline at end of file diff --git a/public/assets/credit-log-PAbPgIpp.js b/public/assets/credit-log-PAbPgIpp.js new file mode 100644 index 0000000..a659586 --- /dev/null +++ b/public/assets/credit-log-PAbPgIpp.js @@ -0,0 +1 @@ +import{Ca as e,Ea as t,c as n,hn as r,rt as i,s as a,t as o}from"./index-DThTpSPU.js";import{t as s}from"./XinTable-D_6_7i3V.js";e();var c=t(r(),1),l=t(o(),1),u=a(),{Title:d,Text:f}=i;c.default.extend(l.default);var p=()=>{let{t:e}=n(),t={api:`/runner/credit-log`,columns:[{title:e(`runner.credit_log.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:e(`runner.credit_log.worker_id`),dataIndex:`worker_id`,valueType:`text`,align:`center`},{title:e(`runner.credit_log.score`),dataIndex:`score`,valueType:`text`,align:`center`,hideInSearch:!0},{title:e(`runner.credit_log.score_after`),dataIndex:`score_after`,valueType:`text`,align:`center`,hideInSearch:!0},{title:e(`runner.credit_log.type`),dataIndex:`type`,valueType:`text`,align:`center`},{title:e(`runner.credit_log.description`),dataIndex:`description`,valueType:`text`,align:`center`,hideInSearch:!0},{title:e(`runner.credit_log.related_type`),dataIndex:`related_type`,valueType:`text`,align:`center`},{title:e(`runner.credit_log.related_id`),dataIndex:`related_id`,valueType:`text`,align:`center`},{title:e(`runner.credit_log.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,c.default)(e).fromNow():`-`},{title:e(`runner.credit_log.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,c.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.credit_log`,addShow:!1,editShow:!1,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(`div`,{className:`mb-5`,children:[(0,u.jsx)(d,{level:3,children:e(`runner.credit_log.page.title`)}),(0,u.jsx)(f,{type:`secondary`,children:e(`runner.credit_log.page.description`)})]}),(0,u.jsx)(s,{...t})]})};export{p as default}; \ No newline at end of file diff --git a/public/assets/deposit-DVY3zSbS.js b/public/assets/deposit-DVY3zSbS.js new file mode 100644 index 0000000..ebeb3ba --- /dev/null +++ b/public/assets/deposit-DVY3zSbS.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/runner/deposit`,columns:[{title:t(`finance.deposit.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`finance.deposit.deposit_no`),dataIndex:`deposit_no`,valueType:`text`,align:`center`},{title:t(`finance.deposit.worker_id`),dataIndex:`worker_id`,valueType:`text`,align:`center`},{title:t(`finance.deposit.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`},{title:t(`finance.deposit.amount`),dataIndex:`amount`,valueType:`text`,align:`center`},{title:t(`finance.deposit.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`finance.deposit.status.0`)},{value:1,label:t(`finance.deposit.status.1`)},{value:2,label:t(`finance.deposit.status.2`)},{value:3,label:t(`finance.deposit.status.3`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`finance.deposit.status.1`)}):n===2?(0,d.jsx)(e,{color:`warning`,children:t(`finance.deposit.status.2`)}):n===3?(0,d.jsx)(e,{color:`error`,children:t(`finance.deposit.status.3`)}):(0,d.jsx)(e,{color:`default`,children:t(`finance.deposit.status.0`)}),filters:[{text:t(`finance.deposit.status.0`),value:0},{text:t(`finance.deposit.status.1`),value:1},{text:t(`finance.deposit.status.2`),value:2},{text:t(`finance.deposit.status.3`),value:3}],align:`center`},{title:t(`finance.deposit.deduct_reason`),dataIndex:`deduct_reason`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`finance.deposit.paid_at`),dataIndex:`paid_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit.refund_at`),dataIndex:`refund_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit.deducted_at`),dataIndex:`deducted_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.deposit`,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`finance.deposit.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`finance.deposit.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/deposit-payment-B5Bb31XG.js b/public/assets/deposit-payment-B5Bb31XG.js new file mode 100644 index 0000000..25a75c1 --- /dev/null +++ b/public/assets/deposit-payment-B5Bb31XG.js @@ -0,0 +1 @@ +import{t as e}from"./tag-Bn-IyYw0.js";import{Ca as t,Ea as n,c as r,hn as i,rt as a,s as o,t as s}from"./index-DThTpSPU.js";import{t as c}from"./XinTable-D_6_7i3V.js";t();var l=n(i(),1),u=n(s(),1),d=o(),{Title:f,Text:p}=a;l.default.extend(u.default);var m=()=>{let{t}=r(),n={api:`/runner/deposit-payment`,columns:[{title:t(`finance.deposit_payment.id`),dataIndex:`id`,hideInForm:!0,sorter:!0,align:`center`,width:80},{title:t(`finance.deposit_payment.payment_no`),dataIndex:`payment_no`,valueType:`text`,align:`center`},{title:t(`finance.deposit_payment.deposit_id`),dataIndex:`deposit_id`,valueType:`text`,align:`center`},{title:t(`finance.deposit_payment.user_id`),dataIndex:`user_id`,valueType:`text`,align:`center`},{title:t(`finance.deposit_payment.payment_transaction_id`),dataIndex:`payment_transaction_id`,valueType:`text`,align:`center`,hideInSearch:!0},{title:t(`finance.deposit_payment.amount`),dataIndex:`amount`,valueType:`text`,align:`center`},{title:t(`finance.deposit_payment.pay_type`),dataIndex:`pay_type`,valueType:`text`,align:`center`},{title:t(`finance.deposit_payment.status`),dataIndex:`status`,valueType:`radioButton`,fieldProps:{options:[{value:0,label:t(`finance.deposit_payment.status.0`)},{value:1,label:t(`finance.deposit_payment.status.1`)},{value:2,label:t(`finance.deposit_payment.status.2`)}]},render:n=>n===1?(0,d.jsx)(e,{color:`success`,children:t(`finance.deposit_payment.status.1`)}):n===2?(0,d.jsx)(e,{color:`warning`,children:t(`finance.deposit_payment.status.2`)}):(0,d.jsx)(e,{color:`default`,children:t(`finance.deposit_payment.status.0`)}),filters:[{text:t(`finance.deposit_payment.status.0`),value:0},{text:t(`finance.deposit_payment.status.1`),value:1},{text:t(`finance.deposit_payment.status.2`),value:2}],align:`center`},{title:t(`finance.deposit_payment.paid_at`),dataIndex:`paid_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit_payment.refund_at`),dataIndex:`refund_at`,hideInForm:!0,hideInSearch:!0,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit_payment.created_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`created_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`},{title:t(`finance.deposit_payment.updated_at`),hideInForm:!0,hideInSearch:!0,dataIndex:`updated_at`,align:`center`,render:e=>e?(0,l.default)(e).fromNow():`-`}],rowKey:`id`,accessName:`runner.deposit_payment`,addShow:!1,editShow:!1,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},cardProps:{variant:`borderless`},pagination:{size:`small`,style:{marginBottom:0}}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`div`,{className:`mb-5`,children:[(0,d.jsx)(f,{level:3,children:t(`finance.deposit_payment.page.title`)}),(0,d.jsx)(p,{type:`secondary`,children:t(`finance.deposit_payment.page.description`)})]}),(0,d.jsx)(c,{...n})]})};export{m as default}; \ No newline at end of file diff --git a/public/assets/dept-DXcViZXZ.js b/public/assets/dept-DXcViZXZ.js deleted file mode 100644 index ef5dbc6..0000000 --- a/public/assets/dept-DXcViZXZ.js +++ /dev/null @@ -1 +0,0 @@ -import{z as je,H as Te,a3 as ae,r,J as we,a8 as O,K as Ee,L as $,M as Q,a9 as Ne,aa as ke,a5 as Re,a6 as Pe,ab as ze,a7 as Be,ac as Me,ad as Y,ae as He,af as Ae,ag as Fe,ah as qe,ai as Le,aj as z,u as _e,j as s,T as Z,a as Ke,C as ee,S as te,B as A,ak as We,al as se,am as F,w as G,an as Ve,d as Xe,Q as Ge}from"./index-B-sDl1ER.js";import{X as re}from"./index-duCmqVUU.js";import{A as P}from"./index-CkiGQ3z2.js";import{u as Oe}from"./useAuth-BOs-nzG0.js";import{T as ne}from"./index-C9m5qSM4.js";import{C as oe}from"./index-CO5DzGxy.js";import{P as Je}from"./index-BPV0ygaW.js";import{T as Qe,F as Ye}from"./Table-B11dzOaz.js";import"./index-BZjcF0yn.js";import"./tslib.es6-BaFViOhq.js";import"./index-D3yl9SWR.js";import"./progress-C__thZ4V.js";import"./index-CeRfFUxJ.js";import"./index-DmtjhyJb.js";const q=(e,t,o,a,l)=>({background:e,border:`${ae(a.lineWidth)} ${a.lineType} ${t}`,[`${l}-icon`]:{color:o}}),Ze=e=>{const{componentCls:t,motionDurationSlow:o,marginXS:a,marginSM:l,fontSize:p,fontSizeLG:c,lineHeight:u,borderRadiusLG:m,motionEaseInOutCirc:g,withDescriptionIconSize:x,colorText:b,colorTextHeading:D,withDescriptionPadding:S,defaultPadding:w}=e;return{[t]:{...Te(e),position:"relative",display:"flex",alignItems:"center",padding:w,wordWrap:"break-word",borderRadius:m,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:a,lineHeight:0},"&-description":{display:"none",fontSize:p,lineHeight:u},"&-title":{color:D},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(i=>`${i} ${o} ${g}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}},[`${t}-with-description`]:{alignItems:"flex-start",padding:S,[`${t}-icon`]:{marginInlineEnd:l,fontSize:x,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:a,color:D,fontSize:c},[`${t}-description`]:{display:"block",color:b}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},et=e=>{const{componentCls:t,colorSuccess:o,colorSuccessBorder:a,colorSuccessBg:l,colorWarning:p,colorWarningBorder:c,colorWarningBg:u,colorError:m,colorErrorBorder:g,colorErrorBg:x,colorInfo:b,colorInfoBorder:D,colorInfoBg:S}=e;return{[t]:{"&-success":q(l,a,o,e,t),"&-info":q(S,D,b,e,t),"&-warning":q(u,c,p,e,t),"&-error":{...q(x,g,m,e,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},tt=e=>{const{componentCls:t,iconCls:o,motionDurationMid:a,marginXS:l,fontSizeIcon:p,colorIcon:c,colorIconHover:u}=e;return{[t]:{"&-actions":{marginInlineStart:l},[`${t}-close-icon`]:{marginInlineStart:l,padding:0,overflow:"hidden",fontSize:p,lineHeight:ae(p),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${o}-close`]:{color:c,transition:`color ${a}`,"&:hover":{color:u}}},"&-close-text":{color:c,transition:`color ${a}`,"&:hover":{color:u}}}}},st=e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),rt=je("Alert",e=>[Ze(e),et(e),tt(e)],st),nt=e=>{const{icon:t,type:o,className:a,style:l,successIcon:p,infoIcon:c,warningIcon:u,errorIcon:m}=e,g={success:p??r.createElement(Be,null),info:c??r.createElement(ze,null),error:m??r.createElement(Pe,null),warning:u??r.createElement(Re,null)};return r.createElement("span",{className:a,style:l},t??g[o])},ot=e=>{const{isClosable:t,prefixCls:o,closeIcon:a,handleClose:l,ariaProps:p,className:c,style:u}=e,m=a===!0||a===void 0?r.createElement(Me,null):a;return t?r.createElement("button",{type:"button",onClick:l,className:$(`${o}-close-icon`,c),tabIndex:0,style:u,...p},m):null},le=r.forwardRef((e,t)=>{const{description:o,prefixCls:a,message:l,title:p,banner:c,className:u,rootClassName:m,style:g,onMouseEnter:x,onMouseLeave:b,onClick:D,afterClose:S,showIcon:w,closable:i,closeText:v,closeIcon:h,action:C,id:_,styles:B,classNames:E,...N}=e,k=p??l,[M,K]=r.useState(!1),R=r.useRef(null);r.useImperativeHandle(t,()=>({nativeElement:R.current}));const{getPrefixCls:W,direction:H,closable:I,closeIcon:n,className:d,style:f,classNames:ce,styles:de,successIcon:ue,infoIcon:pe,warningIcon:me,errorIcon:ye}=we("alert"),y=W("alert",a),[fe,ge]=rt(y),{onClose:he,afterClose:xe}=i&&typeof i=="object"?i:{},be=U=>{K(!0),(he??e.onClose)?.(U)},V=r.useMemo(()=>e.type!==void 0?e.type:c?"warning":"info",[e.type,c]),J=r.useMemo(()=>typeof i=="object"&&i.closeIcon||v?!0:typeof i=="boolean"?i:h!==!1&&O(h)?!0:!!I,[v,h,i,I]),X=c&&w===void 0?!0:w,De={...e,prefixCls:y,type:V,showIcon:X,closable:J},[j,T]=Ee([ce,E],[de,B],{props:De}),Ie=$(y,`${y}-${V}`,{[`${y}-with-description`]:!!o,[`${y}-no-icon`]:!X,[`${y}-banner`]:!!c,[`${y}-rtl`]:H==="rtl"},d,u,m,j.root,ge,fe),Se=Q(N,{aria:!0,data:!0}),Ce=r.useMemo(()=>typeof i=="object"&&i.closeIcon?i.closeIcon:v||(h!==void 0?h:typeof I=="object"&&I.closeIcon?I.closeIcon:n),[h,i,I,v,n]),ve=r.useMemo(()=>{const U=i??I;return typeof U=="object"?Q(U,{data:!0,aria:!0}):{}},[i,I]);return r.createElement(Ne,{visible:!M,motionName:`${y}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:U=>({maxHeight:U.offsetHeight}),onLeaveEnd:xe??S},({className:U,style:Ue},$e)=>r.createElement("div",{id:_,ref:ke(R,$e),"data-show":!M,className:$(Ie,U),style:{...T.root,...f,...g,...Ue},onMouseEnter:x,onMouseLeave:b,onClick:D,role:"alert",...Se},X?r.createElement(nt,{className:$(`${y}-icon`,j.icon),style:T.icon,description:o,icon:e.icon,prefixCls:y,type:V,successIcon:ue,infoIcon:pe,warningIcon:me,errorIcon:ye}):null,r.createElement("div",{className:$(`${y}-section`,j.section),style:T.section},k?r.createElement("div",{className:$(`${y}-title`,j.title),style:T.title},k):null,o?r.createElement("div",{className:$(`${y}-description`,j.description),style:T.description},o):null),C?r.createElement("div",{className:$(`${y}-actions`,j.actions),style:T.actions},C):null,r.createElement(ot,{className:j.close,style:T.close,isClosable:J,prefixCls:y,closeIcon:Ce,handleClose:be,ariaProps:ve})))});function at(e,t,o){return t=Y(t),He(e,Ae()?Reflect.construct(t,o||[],Y(e).constructor):t.apply(e,o))}let lt=(function(e){function t(){var o;return Le(this,t),o=at(this,t,arguments),o.state={error:void 0,info:{}},o}return Fe(t,e),qe(t,[{key:"componentDidCatch",value:function(a,l){this.setState({error:a,info:l})}},{key:"render",value:function(){const{message:a,title:l,description:p,id:c,children:u}=this.props,{error:m,info:g}=this.state,x=l??a,b=g?.componentStack||null,D=O(x)?x:m?.toString(),S=O(p)?p:b;return m?r.createElement(le,{id:c,type:"error",title:D,description:r.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},S)}):u}}])})(r.PureComponent);const ie=le;ie.ErrorBoundary=lt;async function it(){return z({url:"/system/dept",method:"get"})}async function ct(e){return z({url:"/system/dept",method:"post",data:e})}async function dt(e,t){return z({url:"/system/dept/"+e,method:"put",data:t})}async function ut(e){return z({url:"/system/dept",method:"delete",data:{ids:e}})}async function pt(e,t={page:1,pageSize:10}){return z({url:"/system/dept/users/"+e,method:"get",params:t})}const L=new Map,jt=()=>{const{t:e}=_e(),{auth:t}=Oe(),o=r.useRef(null),a=r.useRef(null),[l,p]=r.useState(""),[c,u]=r.useState([]),[m,g]=r.useState("info"),x=[{key:"info",label:e("sysUserDept.tab.info")},{key:"users",label:e("sysUserDept.tab.users"),disabled:!t("system.dept.users")}],[b,D]=r.useState([]),[S,w]=r.useState([]),[i,v]=r.useState({page:1,pageSize:10,total:0}),[h,C]=r.useState(!1),[_,B]=r.useState(!1),E=async(n,d)=>{try{B(!0);const f=await pt(n,F.omit(d||i,"total"));w(f.data.data.data),v({...i,total:f.data.data.total})}finally{B(!1)}},N=async()=>{C(!0);const n=d=>d?.length?d.map(f=>(L.set(f.id.toString(),F.omit(f,"children")),{title:f.name||e("sysUserDept.tab.users"),key:f.id?.toString()||"",icon:f.type===0?s.jsx(Ve,{}):f.type===1?s.jsx(Xe,{}):s.jsx(Ge,{}),children:n(f.children||[])})):[];try{const d=await it();d.data.data&&d.data.data.length>0&&(L.clear(),D(n(d.data.data)),(!l||!L.has(l))&&(p(d.data.data[0].id.toString()),o.current?.setFieldsValue(F.omit(d.data.data[0],"children")),t("system.dept.users")&&await E(d.data.data[0].id)))}finally{C(!1)}},k=(n=!1)=>{a.current?.resetFields(),a.current?.setFieldsValue({parent_id:n?Number(l):0,sort:0,status:0,type:0}),a.current?.open()},M=n=>{if(n&&n.length>=1){p(n[0].toString());const d=L.get(n[0].toString());d&&o.current?.setFieldsValue(d),E(Number(n[0])).then()}},K=n=>{F.isArray(n)?u(n):u(n.checked)},R=async(n,d=!1)=>{try{C(!0),d?(await dt(Number(l),n),G.success(e("sysUserDept.updateSuccess"))):(await ct(n),G.success(e("sysUserDept.createSuccess")),a.current?.close()),await N()}finally{C(!1)}},W=async()=>{try{C(!0),await ut(c),await N(),u([]),G.success(e("sysUserDept.deleteSuccess"))}finally{C(!1)}},H=[{title:e("sysUserDept.column.name"),valueType:"text",dataIndex:"name",rules:[{required:!0,message:e("sysUserDept.column.name.required")}]},{title:e("sysUserDept.column.code"),valueType:"text",dataIndex:"code",rules:[{required:!0,message:e("sysUserDept.column.code.required")}]},{title:e("sysUserDept.column.type"),valueType:"radioButton",dataIndex:"type",fieldProps:{options:[{value:0,label:e("sysUserDept.column.type.0")},{value:1,label:e("sysUserDept.column.type.1")},{value:2,label:e("sysUserDept.column.type.2")}]},rules:[{required:!0,message:e("sysUserDept.column.type.required")}]},{title:e("sysUserDept.column.parent"),valueType:"treeSelect",dataIndex:"parent_id",fieldProps:{treeData:[{title:e("sysUserDept.column.parent.0"),value:0,children:b}],fieldNames:{label:"title",value:"key"},disabled:!0},rules:[{required:!0,message:e("sysUserDept.column.parent.required")}]},{title:e("sysUserDept.column.email"),valueType:"text",dataIndex:"email"},{title:e("sysUserDept.column.address"),valueType:"text",dataIndex:"address"},{title:e("sysUserDept.column.phone"),valueType:"text",dataIndex:"phone"},{title:e("sysUserDept.column.sort"),valueType:"digit",dataIndex:"sort",rules:[{required:!0,message:e("sysUserDept.column.sort.required")}]},{title:e("sysUserDept.column.status"),valueType:"radioButton",dataIndex:"status",fieldProps:{options:[{value:0,label:e("sysUserDept.column.status.0")},{value:1,label:e("sysUserDept.column.status.1")}]},rules:[{required:!0,message:e("sysUserDept.column.status.required")}]},{title:e("sysUserDept.column.remark"),valueType:"textarea",dataIndex:"remark"}],I=[{title:e("sysUserDept.users.column.id"),dataIndex:"id",key:"id",align:"center"},{title:e("sysUserDept.users.column.username"),dataIndex:"username",key:"username",align:"center"},{title:e("sysUserDept.users.column.nickname"),dataIndex:"nickname",key:"nickname",align:"center"},{title:e("sysUserDept.users.column.nickname"),dataIndex:"email",key:"email",align:"center"},{title:e("sysUserDept.users.column.mobile"),dataIndex:"mobile",key:"mobile",align:"center"},{title:e("sysUserDept.users.column.status"),dataIndex:"status",key:"status",align:"center",render:n=>s.jsxs(s.Fragment,{children:[n===1&&s.jsx(ne,{color:"success",children:e("sysUserDept.users.column.status.0")}),n===0&&s.jsx(ne,{color:"error",children:e("sysUserDept.users.column.status.1")})]})}];return r.useEffect(()=>{N()},[]),s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-5",children:[s.jsx(Z.Title,{level:3,children:e("sysUserDept.page.title")}),s.jsx(Z.Text,{type:"secondary",children:e("sysUserDept.page.description")})]}),s.jsxs(Ke,{gutter:[20,20],children:[s.jsxs(ee,{xxl:12,lg:12,xs:24,children:[s.jsx(re,{layoutType:"ModalForm",formRef:a,modalProps:{title:e("sysUserDept.createModalTitle"),styles:{body:{paddingTop:20}},width:800},onFinish:async n=>(await R(n,!1),!0),columns:H,layout:"vertical",grid:!0,rowProps:{gutter:[30,0]},colProps:{span:12}}),s.jsxs(oe,{title:s.jsxs(te,{children:[s.jsx(P,{auth:"system.dept.create",children:s.jsx(A,{loading:h,children:e("sysUserDept.createButton"),icon:s.jsx(se,{}),type:"primary",onClick:()=>k()})}),s.jsx(P,{auth:"system.dept.create",children:s.jsx(A,{loading:h,children:e("sysUserDept.createChildrenButton"),icon:s.jsx(se,{}),type:"primary",onClick:()=>k(!0)})})]}),variant:"borderless",loading:h,styles:{body:{minHeight:"70vh"}},children:[c.length>0&&s.jsx(ie,{style:{marginBottom:20},description:e("sysUserDept.checkedMessage",{checked:c.length}),type:"info",action:s.jsxs(te,{children:[s.jsx(A,{size:"small",type:"primary",onClick:()=>u([]),children:e("sysUserDept.unselect")}),s.jsx(P,{auth:"system.dept.delete",children:s.jsx(Je,{okText:e("sysUserDept.delete.ok"),cancelText:e("sysUserDept.delete.cancel"),title:e("sysUserDept.delete.title"),description:e("sysUserDept.delete.description"),onConfirm:()=>W(),children:s.jsx(A,{type:"primary",icon:s.jsx(We,{}),size:"small",danger:!0,loading:h})})})]})}),s.jsx(Qe,{checkable:!0,treeData:b,showIcon:!0,checkStrictly:!0,selectedKeys:[l],defaultExpandedKeys:[l],onSelect:M,checkedKeys:c,onCheck:K})]})]}),s.jsx(ee,{xxl:12,lg:12,xs:24,children:s.jsxs(oe,{variant:"borderless",tabList:x,tabProps:{accessKey:m},onTabChange:g,styles:{body:{minHeight:"70vh"}},children:[s.jsx(re,{formRef:o,onFinish:async n=>(await R(n,!0),!0),columns:H,layout:"horizontal",style:{display:m==="info"?"block":"none"},submitter:{render:n=>s.jsx(P,{auth:"system.dept.update",children:n.submit}),submitText:e("sysUserDept.saveInfo")}}),s.jsx(P,{auth:"system.dept.users",children:s.jsx(Ye,{style:{display:m==="users"?"block":"none"},dataSource:S,bordered:!0,columns:I,loading:_,size:"small",pagination:{current:i.page,pageSize:i.pageSize,total:i.total,showSizeChanger:!0,onChange:(n,d)=>{const f={total:i.total,pageSize:d,page:n};v(f),E(Number(l),f).then()}},scroll:{x:600}})})]})})]})]})};export{jt as default}; diff --git a/public/assets/dept-oUbBpnuT.js b/public/assets/dept-oUbBpnuT.js new file mode 100644 index 0000000..ddc7e28 --- /dev/null +++ b/public/assets/dept-oUbBpnuT.js @@ -0,0 +1 @@ +import{t as e}from"./alert-nEKP-pli.js";import{o as t,s as n}from"./tslib.es6-DffexlHv.js";import{t as r}from"./XinForm-DX04WSwD.js";import{t as i}from"./card-BDbI8Gdq.js";import{t as a}from"./popconfirm-2wuVGTgH.js";import{t as o}from"./tag-Bn-IyYw0.js";import{$t as s,Ca as c,Ct as l,Ea as u,J as d,Jt as f,Lt as p,c as m,g as h,gn as g,ot as ee,r as _,rt as v,s as y,x as b,ya as x,yt as te}from"./index-DThTpSPU.js";import{t as S}from"./AuthButton-B-7Fg-gg.js";import{t as C}from"./useAuth-CJD3kiRq.js";var w=u(c(),1);async function T(){return x({url:`/system/dept`,method:`get`})}async function E(e){return x({url:`/system/dept`,method:`post`,data:e})}async function D(e,t){return x({url:`/system/dept/`+e,method:`put`,data:t})}async function O(e){return x({url:`/system/dept`,method:`delete`,data:{ids:e}})}async function k(e,t={page:1,pageSize:10}){return x({url:`/system/dept/users/`+e,method:`get`,params:t})}var A=_(),j=y(),M=new Map,N=()=>{let{t:c}=m(),{auth:u}=C(),_=(0,w.useRef)(null),y=(0,w.useRef)(null),[x,N]=(0,w.useState)(``),[P,F]=(0,w.useState)([]),[I,L]=(0,w.useState)(`info`),R=[{key:`info`,label:c(`system.dept.tab.info`)},{key:`users`,label:c(`system.dept.tab.users`),disabled:!u(`system.dept.users`)}],[z,B]=(0,w.useState)([]),[V,H]=(0,w.useState)([]),[U,W]=(0,w.useState)({page:1,pageSize:10,total:0}),[G,K]=(0,w.useState)(!1),[q,J]=(0,w.useState)(!1),Y=async(e,t)=>{try{J(!0);let n=await k(e,(0,A.omit)(t||U,`total`));H(n.data.data.data),W({...U,total:n.data.data.total})}finally{J(!1)}},X=async()=>{K(!0);let e=t=>t?.length?t.map(t=>(M.set(t.id.toString(),(0,A.omit)(t,`children`)),{title:t.name||c(`system.dept.tab.users`),key:t.id?.toString()||``,icon:t.type===0?(0,j.jsx)(d,{}):t.type===1?(0,j.jsx)(b,{}):(0,j.jsx)(h,{}),children:e(t.children||[])})):[];try{let t=await T();t.data.data&&t.data.data.length>0&&(M.clear(),B(e(t.data.data)),(!x||!M.has(x))&&(N(t.data.data[0].id.toString()),_.current?.setFieldsValue((0,A.omit)(t.data.data[0],`children`)),u(`system.dept.users`)&&await Y(t.data.data[0].id)))}finally{K(!1)}},Z=(e=!1)=>{y.current?.resetFields(),y.current?.setFieldsValue({parent_id:e?Number(x):0,sort:0,status:0,type:0}),y.current?.open()},ne=e=>{if(e&&e.length>=1){N(e[0].toString());let t=M.get(e[0].toString());t&&_.current?.setFieldsValue(t),Y(Number(e[0])).then()}},re=e=>{(0,A.isArray)(e)?F(e):F(e.checked)},Q=async(e,t=!1)=>{try{K(!0),t?(await D(Number(x),e),l.success(c(`system.dept.updateSuccess`))):(await E(e),l.success(c(`system.dept.createSuccess`)),y.current?.close()),await X()}finally{K(!1)}},ie=async()=>{try{K(!0),await O(P),await X(),F([]),l.success(c(`system.dept.deleteSuccess`))}finally{K(!1)}},$=[{title:c(`system.dept.column.name`),valueType:`text`,dataIndex:`name`,rules:[{required:!0,message:c(`system.dept.column.name.required`)}]},{title:c(`system.dept.column.code`),valueType:`text`,dataIndex:`code`,rules:[{required:!0,message:c(`system.dept.column.code.required`)}]},{title:c(`system.dept.column.type`),valueType:`radioButton`,dataIndex:`type`,fieldProps:{options:[{value:0,label:c(`system.dept.column.type.0`)},{value:1,label:c(`system.dept.column.type.1`)},{value:2,label:c(`system.dept.column.type.2`)}]},rules:[{required:!0,message:c(`system.dept.column.type.required`)}]},{title:c(`system.dept.column.parent`),valueType:`treeSelect`,dataIndex:`parent_id`,fieldProps:{treeData:[{title:c(`system.dept.column.parent.0`),value:0,children:z}],fieldNames:{label:`title`,value:`key`},disabled:!0},rules:[{required:!0,message:c(`system.dept.column.parent.required`)}]},{title:c(`system.dept.column.email`),valueType:`text`,dataIndex:`email`},{title:c(`system.dept.column.address`),valueType:`text`,dataIndex:`address`},{title:c(`system.dept.column.phone`),valueType:`text`,dataIndex:`phone`},{title:c(`system.dept.column.sort`),valueType:`digit`,dataIndex:`sort`,rules:[{required:!0,message:c(`system.dept.column.sort.required`)}]},{title:c(`system.dept.column.status`),valueType:`radioButton`,dataIndex:`status`,fieldProps:{options:[{value:0,label:c(`system.dept.column.status.0`)},{value:1,label:c(`system.dept.column.status.1`)}]},rules:[{required:!0,message:c(`system.dept.column.status.required`)}]},{title:c(`system.dept.column.remark`),valueType:`textarea`,dataIndex:`remark`}],ae=[{title:c(`system.dept.users.column.id`),dataIndex:`id`,key:`id`,align:`center`},{title:c(`system.dept.users.column.username`),dataIndex:`username`,key:`username`,align:`center`},{title:c(`system.dept.users.column.nickname`),dataIndex:`nickname`,key:`nickname`,align:`center`},{title:c(`system.dept.users.column.nickname`),dataIndex:`email`,key:`email`,align:`center`},{title:c(`system.dept.users.column.mobile`),dataIndex:`mobile`,key:`mobile`,align:`center`},{title:c(`system.dept.users.column.status`),dataIndex:`status`,key:`status`,align:`center`,render:e=>(0,j.jsxs)(j.Fragment,{children:[e===1&&(0,j.jsx)(o,{color:`success`,children:c(`system.dept.users.column.status.0`)}),e===0&&(0,j.jsx)(o,{color:`error`,children:c(`system.dept.users.column.status.1`)})]})}];return(0,w.useEffect)(()=>{X()},[]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`mb-5`,children:[(0,j.jsx)(v.Title,{level:3,children:c(`system.dept.page.title`)}),(0,j.jsx)(v.Text,{type:`secondary`,children:c(`system.dept.page.description`)})]}),(0,j.jsxs)(te,{gutter:[20,20],children:[(0,j.jsxs)(f,{xxl:12,lg:12,xs:24,children:[(0,j.jsx)(r,{layoutType:`ModalForm`,formRef:y,modalProps:{title:c(`system.dept.createModalTitle`),styles:{body:{paddingTop:20}},width:800},onFinish:async e=>(await Q(e,!1),!0),columns:$,layout:`vertical`,grid:!0,rowProps:{gutter:[30,0]},colProps:{span:12}}),(0,j.jsxs)(i,{title:(0,j.jsxs)(p,{children:[(0,j.jsx)(S,{auth:`system.dept.create`,children:(0,j.jsx)(g,{loading:G,children:c(`system.dept.createButton`),icon:(0,j.jsx)(s,{}),type:`primary`,onClick:()=>Z()})}),(0,j.jsx)(S,{auth:`system.dept.create`,children:(0,j.jsx)(g,{loading:G,children:c(`system.dept.createChildrenButton`),icon:(0,j.jsx)(s,{}),type:`primary`,onClick:()=>Z(!0)})})]}),variant:`borderless`,loading:G,styles:{body:{minHeight:`70vh`}},children:[P.length>0&&(0,j.jsx)(e,{style:{marginBottom:20},description:c(`system.dept.checkedMessage`,{checked:P.length}),type:`info`,action:(0,j.jsxs)(p,{children:[(0,j.jsx)(g,{size:`small`,type:`primary`,onClick:()=>F([]),children:c(`system.dept.unselect`)}),(0,j.jsx)(S,{auth:`system.dept.delete`,children:(0,j.jsx)(a,{okText:c(`system.dept.delete.ok`),cancelText:c(`system.dept.delete.cancel`),title:c(`system.dept.delete.title`),description:c(`system.dept.delete.description`),onConfirm:()=>ie(),children:(0,j.jsx)(g,{type:`primary`,icon:(0,j.jsx)(ee,{}),size:`small`,danger:!0,loading:G})})})]})}),(0,j.jsx)(n,{checkable:!0,treeData:z,showIcon:!0,checkStrictly:!0,selectedKeys:[x],defaultExpandedKeys:[x],onSelect:ne,checkedKeys:P,onCheck:re})]})]}),(0,j.jsx)(f,{xxl:12,lg:12,xs:24,children:(0,j.jsxs)(i,{variant:`borderless`,tabList:R,tabProps:{accessKey:I},onTabChange:L,styles:{body:{minHeight:`70vh`}},children:[(0,j.jsx)(r,{formRef:_,onFinish:async e=>(await Q(e,!0),!0),columns:$,layout:`horizontal`,style:{display:I===`info`?`block`:`none`},submitter:{render:e=>(0,j.jsx)(S,{auth:`system.dept.update`,children:e.submit}),submitText:c(`system.dept.saveInfo`)}}),(0,j.jsx)(S,{auth:`system.dept.users`,children:(0,j.jsx)(t,{style:{display:I===`users`?`block`:`none`},dataSource:V,bordered:!0,columns:ae,loading:q,size:`small`,pagination:{current:U.page,pageSize:U.pageSize,total:U.total,showSizeChanger:!0,onChange:(e,t)=>{let n={total:U.total,pageSize:t,page:e};W(n),Y(Number(x),n).then()}},scroll:{x:600}})})]})})]})]})};export{N as default}; \ No newline at end of file diff --git a/public/assets/descriptions-7UvHFHcf.js b/public/assets/descriptions-7UvHFHcf.js deleted file mode 100644 index 59f550f..0000000 --- a/public/assets/descriptions-7UvHFHcf.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,T as y,U as p,S as u,B as a,Y as b,Z as g,_ as n,a as S,C as o,A as I,Q as f,D as c,i as v}from"./index-B-sDl1ER.js";import{C as l}from"./index-CO5DzGxy.js";import{F as d}from"./index-Bc7ikhKh.js";import{S as R,T as C}from"./Timeline-BM8lZv8J.js";import{D as s}from"./index-VkcAtM9X.js";import{T as x}from"./index-C9m5qSM4.js";import{F as r}from"./Table-B11dzOaz.js";import"./index-CeRfFUxJ.js";import"./index-DmtjhyJb.js";const{Title:B,Text:t}=y,A=()=>{const m=[{title:"商品名称",dataIndex:"name",key:"name"},{title:"商品编号",dataIndex:"code",key:"code"},{title:"数量",dataIndex:"quantity",key:"quantity"},{title:"单价",dataIndex:"price",key:"price",render:i=>`¥${i.toFixed(2)}`},{title:"小计",dataIndex:"total",key:"total",render:i=>`¥${i.toFixed(2)}`}],j=[{key:"1",name:"iPhone 15 Pro Max",code:"IP15PM-256-BLK",quantity:2,price:9999,total:19998},{key:"2",name:"AirPods Pro 2",code:"APP2-WHT",quantity:1,price:1899,total:1899},{key:"3",name:'MacBook Pro 16"',code:"MBP16-M3-SLV",quantity:1,price:25999,total:25999}],h=[{time:"2026-01-01 15:30:00",status:"已签收",description:"您的订单已由本人签收,感谢您的购买"},{time:"2026-01-01 09:20:00",status:"派送中",description:"快递员正在为您派送 [北京市朝阳区] 快递员:李师傅 13800138000"},{time:"2025-12-31 18:45:00",status:"运输中",description:"您的包裹已到达 [北京分拨中心]"},{time:"2025-12-30 14:20:00",status:"已发货",description:"您的订单已从 [上海仓库] 发出,物流单号: SF1234567890"},{time:"2025-12-30 10:00:00",status:"已支付",description:"订单支付成功,等待商家发货"}];return e.jsxs("div",{style:{minHeight:"100vh"},children:[e.jsx(l,{variant:"borderless",style:{marginBottom:20},children:e.jsxs(d,{justify:"space-between",align:"center",children:[e.jsxs("div",{children:[e.jsxs(B,{level:3,style:{marginBottom:4},children:[e.jsx(p,{style:{marginRight:8}}),"订单详情"]}),e.jsx(t,{type:"secondary",children:"订单号: OD2026010100001 · 创建时间: 2025-12-30 09:45:32"})]}),e.jsxs(u,{style:{height:"100%"},children:[e.jsx(a,{icon:e.jsx(b,{}),children:"打印订单"}),e.jsx(a,{icon:e.jsx(g,{}),children:"导出订单"}),e.jsx(a,{type:"primary",children:"联系客服"})]})]})}),e.jsx(l,{variant:"borderless",style:{marginBottom:20},children:e.jsx(R,{current:4,items:[{title:"提交订单",description:"2025-12-30 09:45",icon:e.jsx(n,{})},{title:"支付完成",description:"2025-12-30 10:00",icon:e.jsx(n,{})},{title:"商家发货",description:"2025-12-30 14:20",icon:e.jsx(n,{})},{title:"运输中",description:"2025-12-31 18:45",icon:e.jsx(n,{})},{title:"已签收",description:"2026-01-01 15:30",icon:e.jsx(n,{})}]})}),e.jsxs(S,{gutter:[16,16],children:[e.jsxs(o,{xs:24,lg:16,children:[e.jsx(l,{variant:"borderless",title:"订单基本信息",style:{marginBottom:16},children:e.jsxs(s,{column:{xs:1,sm:2},bordered:!0,children:[e.jsx(s.Item,{label:"订单号",children:"OD2026010100001"}),e.jsx(s.Item,{label:"订单状态",children:e.jsx(x,{color:"success",icon:e.jsx(n,{}),children:"已完成"})}),e.jsx(s.Item,{label:"下单时间",children:"2025-12-30 09:45:32"}),e.jsx(s.Item,{label:"支付时间",children:"2025-12-30 10:00:15"}),e.jsx(s.Item,{label:"发货时间",children:"2025-12-30 14:20:00"}),e.jsx(s.Item,{label:"完成时间",children:"2026-01-01 15:30:00"}),e.jsx(s.Item,{label:"支付方式",children:e.jsx(x,{color:"blue",children:"微信支付"})}),e.jsx(s.Item,{label:"配送方式",children:"顺丰速运"}),e.jsx(s.Item,{label:"发票类型",children:"电子发票"}),e.jsx(s.Item,{label:"发票抬头",children:"北京科技有限公司"})]})}),e.jsx(l,{variant:"borderless",title:"收货信息",style:{marginBottom:16},children:e.jsxs(s,{column:{xs:1,sm:2},bordered:!0,children:[e.jsx(s.Item,{label:"收货人",children:"张三"}),e.jsx(s.Item,{label:"联系电话",children:"138****8888"}),e.jsx(s.Item,{label:"收货地址",span:2,children:"北京市朝阳区建国路88号SOHO现代城A座2106室"})]})}),e.jsx(l,{variant:"borderless",title:"商品信息",children:e.jsx(r,{columns:m,dataSource:j,pagination:!1,summary:()=>e.jsxs(r.Summary,{children:[e.jsxs(r.Summary.Row,{children:[e.jsx(r.Summary.Cell,{index:0,colSpan:4,children:e.jsx(t,{strong:!0,children:"合计"})}),e.jsx(r.Summary.Cell,{index:1,children:e.jsx(t,{strong:!0,style:{color:"#f5222d",fontSize:16},children:"¥47,896.00"})})]}),e.jsxs(r.Summary.Row,{children:[e.jsx(r.Summary.Cell,{index:0,colSpan:4,children:e.jsx(t,{children:"运费"})}),e.jsx(r.Summary.Cell,{index:1,children:e.jsx(t,{children:"¥0.00"})})]}),e.jsxs(r.Summary.Row,{children:[e.jsx(r.Summary.Cell,{index:0,colSpan:4,children:e.jsx(t,{children:"优惠"})}),e.jsx(r.Summary.Cell,{index:1,children:e.jsx(t,{style:{color:"#52c41a"},children:"-¥500.00"})})]}),e.jsxs(r.Summary.Row,{children:[e.jsx(r.Summary.Cell,{index:0,colSpan:4,children:e.jsx(t,{strong:!0,style:{fontSize:16},children:"实付金额"})}),e.jsx(r.Summary.Cell,{index:1,children:e.jsx(t,{strong:!0,style:{color:"#f5222d",fontSize:18},children:"¥47,396.00"})})]})]})})})]}),e.jsxs(o,{xs:24,lg:8,children:[e.jsxs(l,{variant:"borderless",title:"买家信息",style:{marginBottom:16},children:[e.jsxs(d,{align:"center",style:{marginBottom:16},children:[e.jsx(I,{size:48,icon:e.jsx(f,{})}),e.jsxs("div",{style:{marginLeft:12},children:[e.jsx(t,{strong:!0,children:"张三"}),e.jsx("br",{}),e.jsx(t,{type:"secondary",style:{fontSize:12},children:"会员等级: VIP金卡"})]})]}),e.jsx(c,{style:{margin:"12px 0"}}),e.jsxs(s,{column:1,size:"small",children:[e.jsx(s.Item,{label:"用户ID",children:"U202512300001"}),e.jsx(s.Item,{label:"手机号",children:"138****8888"}),e.jsx(s.Item,{label:"邮箱",children:"zhangsan@example.com"}),e.jsx(s.Item,{label:"历史订单",children:"156 笔"}),e.jsx(s.Item,{label:"累计消费",children:"¥358,960"})]})]}),e.jsxs(l,{variant:"borderless",title:"物流追踪",children:[e.jsx(t,{type:"secondary",style:{fontSize:12},children:"物流公司: 顺丰速运"}),e.jsx("br",{}),e.jsx(t,{type:"secondary",style:{fontSize:12},children:"快递单号: SF1234567890"}),e.jsx(c,{style:{margin:"12px 0"}}),e.jsx(C,{items:h.map(i=>({color:i.status==="已签收"?"green":"blue",children:e.jsxs("div",{children:[e.jsx(t,{strong:!0,children:i.status}),e.jsx("br",{}),e.jsx(t,{type:"secondary",style:{fontSize:12},children:i.description}),e.jsx("br",{}),e.jsxs(t,{type:"secondary",style:{fontSize:12},children:[e.jsx(v,{style:{marginRight:4}}),i.time]})]})}))})]})]})]}),e.jsxs(l,{variant:"borderless",title:"订单备注",style:{marginTop:16},children:[e.jsx(t,{type:"secondary",children:"买家留言: 请在工作日配送,周末家里没人。如有问题请提前电话联系。"}),e.jsx(c,{}),e.jsx(t,{type:"secondary",children:"商家备注: 已按照买家要求在工作日配送,客户体验良好。"})]})]})};export{A as default}; diff --git a/public/assets/dict-DX15ayYz.js b/public/assets/dict-DX15ayYz.js new file mode 100644 index 0000000..5336967 --- /dev/null +++ b/public/assets/dict-DX15ayYz.js @@ -0,0 +1 @@ +import{t as e}from"./badge-C6DVGO8T.js";import{Dn as t,Ea as n,ba as r,c as i,gn as a,hn as o,n as s,rt as c,s as l,v as u}from"./index-DThTpSPU.js";import{t as d}from"./XinTable-D_6_7i3V.js";var f=l(),p=n(o(),1),{Title:m,Text:h}=c;function g(){let{t:n}=i(),o=r(),c=s(e=>e.initDict),l=[{title:n(`system.dict.id`),dataIndex:`id`,hideInForm:!0,width:80,sorter:!0,align:`center`},{title:n(`system.dict.name`),dataIndex:`name`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:n(`system.dict.name.required`)}]},{title:n(`system.dict.code`),dataIndex:`code`,valueType:`text`,colProps:{span:12},rules:[{required:!0,message:n(`system.dict.code.required`)}]},{title:n(`system.dict.status`),dataIndex:`status`,valueType:`select`,filters:[{text:n(`system.dict.status.normal`),value:0},{text:n(`system.dict.status.disabled`),value:1}],colProps:{span:12},rules:[{required:!0,message:n(`system.dict.status.required`)}],fieldProps:{options:[{label:n(`system.dict.status.normal`),value:0},{label:n(`system.dict.status.disabled`),value:1}]},render:t=>t===0?(0,f.jsx)(e,{status:`success`,text:n(`system.dict.status.normal`)}):(0,f.jsx)(e,{status:`error`,text:n(`system.dict.status.disabled`)})},{title:n(`system.dict.sort`),dataIndex:`sort`,valueType:`digit`,colProps:{span:12},hideInSearch:!0,fieldProps:{min:0,style:{width:`100%`}}},{title:n(`system.dict.describe`),dataIndex:`describe`,valueType:`textarea`,colProps:{span:24},hideInSearch:!0,ellipsis:!0},{title:n(`system.dict.createdAt`),dataIndex:`created_at`,render:e=>e?(0,p.default)(e).format(`YYYY-MM-DD HH:mm`):`-`,hideInForm:!0,hideInSearch:!0,width:160}],g=async()=>{await c(),window.$message?.success(n(`system.dict.refreshSuccess`))},_=e=>{o(`/system/dict/item?dictId=${e.id}&dictName=${encodeURIComponent(e.name||``)}&dictCode=${e.code}`)};return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`mb-5`,children:[(0,f.jsx)(m,{level:3,children:n(`system.dict.page.title`)}),(0,f.jsx)(h,{type:`secondary`,children:n(`system.dict.page.description`)})]}),(0,f.jsx)(d,{api:`/system/dict/list`,columns:l,rowKey:`id`,accessName:`system.dict.list`,searchProps:!1,formProps:{grid:!0,colProps:{span:12},rowProps:{gutter:[30,0]},layout:`vertical`},modalProps:{width:800},actionBarRender:e=>[e.add,(0,f.jsx)(a,{type:`primary`,onClick:g,children:n(`system.dict.refreshCache`)},`refresh`),e.keywordSearch],operateProps:{fixed:`right`,width:180},scroll:{x:1e3},operateRender:(e,r)=>[(0,f.jsx)(t,{title:n(`system.dict.manageItems`),children:(0,f.jsx)(a,{type:`default`,icon:(0,f.jsx)(u,{}),size:`small`,onClick:()=>_(e)})}),r.edit,r.del]})]})}export{g as default}; \ No newline at end of file diff --git a/public/assets/fail-BHtOA_db.js b/public/assets/fail-BHtOA_db.js deleted file mode 100644 index 0f23f88..0000000 --- a/public/assets/fail-BHtOA_db.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,T as t,a0 as r,B as o}from"./index-B-sDl1ER.js";import{C as i}from"./index-CO5DzGxy.js";import{R as a}from"./index-CwBuiwuD.js";const{Paragraph:s,Text:n}=t,h=()=>e.jsx(i,{variant:"borderless",children:e.jsx(a,{status:"error",title:"Submission Failed",subTitle:"Please check and modify the following information before resubmitting.",extra:[e.jsx(o,{type:"primary",children:"Go Console"},"console"),e.jsx(o,{children:"Buy Again"},"buy")],children:e.jsxs("div",{className:"desc",children:[e.jsx(s,{children:e.jsx(n,{strong:!0,style:{fontSize:16},children:"The content you submitted has the following error:"})}),e.jsxs(s,{children:[e.jsx(r,{className:"site-result-demo-error-icon"})," Your account has been frozen. ",e.jsx("a",{children:"Thaw immediately >"})]}),e.jsxs(s,{children:[e.jsx(r,{className:"site-result-demo-error-icon"})," Your account is not yet eligible to apply. ",e.jsx("a",{children:"Apply Unlock >"})]})]})})});export{h as default}; diff --git a/public/assets/file-B4x3U0bn.js b/public/assets/file-B4x3U0bn.js deleted file mode 100644 index 4f27cb2..0000000 --- a/public/assets/file-B4x3U0bn.js +++ /dev/null @@ -1 +0,0 @@ -import{r as s,av as Zt,aw as Wt,L as A,R as se,O as ht,ax as Je,ay as Ut,az as Vt,a9 as Kt,aA as He,aB as qt,aC as Qt,aD as Jt,z as es,G as ts,aE as we,a3 as ss,aF as et,aG as Ze,au as We,ac as ns,aH as os,aI as is,aJ as rs,aK as as,J as xt,K as wt,aL as vt,aj as W,u as ls,j as n,aM as tt,aq as st,V as nt,B as te,aN as cs,Z as ds,a2 as ot,aO as it,aP as rt,ak as me,S as fe,ar as Te,aQ as at,T as Ct,a as us,C as lt,I as ct,aR as dt,aS as ms,aT as fs,aU as ut,aV as Xe,F as Be,aW as ps,D as gs,w as B,am as mt,aX as ys}from"./index-B-sDl1ER.js";import{X as hs,T as xs}from"./index-duCmqVUU.js";import{T as Ge}from"./index-C9m5qSM4.js";import{C as ft}from"./index-CO5DzGxy.js";import{S as ws}from"./index-DmtjhyJb.js";import{T as vs,F as pt}from"./Table-B11dzOaz.js";import{U as Cs}from"./index-D3yl9SWR.js";import{P as Fs}from"./progress-C__thZ4V.js";import{D as bs}from"./index-VkcAtM9X.js";import"./index-BZjcF0yn.js";import"./tslib.es6-BaFViOhq.js";import"./index-CeRfFUxJ.js";const $e=s.createContext(null);function Ss(e){return new Promise(t=>{if(!e){t(!1);return}const o=document.createElement("img");o.onerror=()=>t(!1),o.onload=()=>t(!0),o.src=e})}function Ft(){const e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}const Ne={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Is(e,t,o,r){const c=s.useRef(null),a=s.useRef([]),[l,u]=s.useState(Ne),p=g=>{u(Ne),Zt(Ne,l)||r?.({transform:Ne,action:g})},d=(g,b)=>{c.current===null&&(a.current=[],c.current=Wt(()=>{u(w=>{let y=w;return a.current.forEach(S=>{y={...y,...S}}),c.current=null,r?.({transform:y,action:b}),y})})),a.current.push({...l,...g})};return{transform:l,resetTransform:p,updateTransform:d,dispatchZoomChange:(g,b,w,y,S)=>{const{width:C,height:I,offsetWidth:m,offsetHeight:f,offsetLeft:j,offsetTop:F}=e.current;let k=g,h=l.scale*g;h>o?(h=o,k=o/l.scale):hr){if(t>0)return{[e]:a};if(t<0&&cr)return{[e]:t<0?a:-a};return{}}function bt(e,t,o,r){const{width:c,height:a}=Ft();let l=null;return e<=c&&t<=a?l={x:0,y:0}:(e>c||t>a)&&(l={...gt("x",o,e,c),...gt("y",r,t,a)}),l}const ye=1,ks=1;function js(e,t,o,r,c,a,l){const{rotate:u,scale:p,x:d,y:x}=c,[g,b]=s.useState(!1),w=s.useRef({diffX:0,diffY:0,transformX:0,transformY:0}),y=m=>{!t||m.button!==0||(m.preventDefault(),m.stopPropagation(),w.current={diffX:m.pageX-d,diffY:m.pageY-x,transformX:d,transformY:x},b(!0))},S=m=>{o&&g&&a({x:m.pageX-w.current.diffX,y:m.pageY-w.current.diffY},"move")},C=()=>{if(o&&g){b(!1);const{transformX:m,transformY:f}=w.current;if(!(d!==m&&x!==f))return;const F=e.current.offsetWidth*p,k=e.current.offsetHeight*p,{left:h,top:R}=e.current.getBoundingClientRect(),P=u%180!==0,T=bt(P?k:F,P?F:k,h,R);T&&a({...T},"dragRebound")}},I=m=>{if(!o||m.deltaY==0)return;const f=Math.abs(m.deltaY/100),j=Math.min(f,ks);let F=ye+j*r;m.deltaY>0&&(F=ye/F),l(F,"wheel",m.clientX,m.clientY)};return s.useEffect(()=>{if(t){window.addEventListener("mouseup",C,!1),window.addEventListener("mousemove",S,!1);try{window.top!==window.self&&(window.top.addEventListener("mouseup",C,!1),window.top.addEventListener("mousemove",S,!1))}catch{}}return()=>{window.removeEventListener("mouseup",C),window.removeEventListener("mousemove",S);try{window.top?.removeEventListener("mouseup",C),window.top?.removeEventListener("mousemove",S)}catch{}}},[o,g,d,x,u,t]),{isMoving:g,onMouseDown:y,onMouseMove:S,onMouseUp:C,onWheel:I}}function St({src:e,isCustomPlaceholder:t,fallback:o}){const[r,c]=s.useState(t?"loading":"normal"),a=s.useRef(!1),l=r==="error";s.useEffect(()=>{let x=!0;return Ss(e).then(g=>{!g&&x&&c("error")}),()=>{x=!1}},[e]),s.useEffect(()=>{t&&!a.current?c("loading"):l&&c("normal")},[e]);const u=()=>{c("normal")};return[x=>{a.current=!1,r==="loading"&&x?.complete&&(x.naturalWidth||x.naturalHeight)&&(a.current=!0,u())},l&&o?{src:o}:{onLoad:u,src:e},r]}function Ee(e,t){const o=e.x-t.x,r=e.y-t.y;return Math.hypot(o,r)}function Ts(e,t,o,r){const c=Ee(e,o),a=Ee(t,r);if(c===0&&a===0)return[e.x,e.y];const l=c/(c+a),u=e.x+l*(t.x-e.x),p=e.y+l*(t.y-e.y);return[u,p]}function Ns(e,t,o,r,c,a,l){const{rotate:u,scale:p,x:d,y:x}=c,[g,b]=s.useState(!1),w=s.useRef({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),y=m=>{w.current={...w.current,...m}},S=m=>{if(!t)return;m.stopPropagation(),b(!0);const{touches:f=[]}=m;f.length>1?y({point1:{x:f[0].clientX,y:f[0].clientY},point2:{x:f[1].clientX,y:f[1].clientY},eventType:"touchZoom"}):y({point1:{x:f[0].clientX-d,y:f[0].clientY-x},eventType:"move"})},C=m=>{const{touches:f=[]}=m,{point1:j,point2:F,eventType:k}=w.current;if(f.length>1&&k==="touchZoom"){const h={x:f[0].clientX,y:f[0].clientY},R={x:f[1].clientX,y:f[1].clientY},[P,T]=Ts(j,F,h,R),D=Ee(h,R)/Ee(j,F);l(D,"touchZoom",P,T,!0),y({point1:h,point2:R,eventType:"touchZoom"})}else k==="move"&&(a({x:f[0].clientX-j.x,y:f[0].clientY-j.y},"move"),y({eventType:"move"}))},I=()=>{if(!o)return;if(g&&b(!1),y({eventType:"none"}),r>p)return a({x:0,y:0,scale:r},"touchZoom");const m=e.current.offsetWidth*p,f=e.current.offsetHeight*p,{left:j,top:F}=e.current.getBoundingClientRect(),k=u%180!==0,h=bt(k?f:m,k?m:f,j,F);h&&a({...h},"dragRebound")};return s.useEffect(()=>{const m=f=>{f.preventDefault()};return o&&t&&window.addEventListener("touchmove",m,{passive:!1}),()=>{window.removeEventListener("touchmove",m)}},[o,t]),{isTouching:g,onTouchStart:S,onTouchMove:C,onTouchEnd:I}}function Es(e){const{prefixCls:t,icon:o,onClick:r}=e;return s.createElement("button",{className:`${t}-close`,onClick:r},o)}function Ms(e){const{prefixCls:t,showProgress:o,current:r,count:c,showSwitch:a,classNames:l,styles:u,icons:p,image:d,transform:x,countRender:g,actionsRender:b,scale:w,minScale:y,maxScale:S,onActive:C,onFlipY:I,onFlipX:m,onRotateLeft:f,onRotateRight:j,onZoomOut:F,onZoomIn:k,onClose:h,onReset:R}=e,{left:P,right:T,prev:D,next:G,flipY:Y,flipX:_,rotateLeft:E,rotateRight:$,zoomOut:Q,zoomIn:H}=p,X=o&&s.createElement("div",{className:`${t}-progress`},g?g(r+1,c):s.createElement("bdi",null,`${r+1} / ${c}`)),N=`${t}-actions-action`,z=({type:ae,disabled:le,onClick:pe,icon:ge})=>s.createElement("div",{key:ae,className:A(N,`${N}-${ae}`,{[`${N}-disabled`]:!!le}),onClick:pe},ge),Z=a?z({icon:D??P,onClick:()=>C(-1),type:"prev",disabled:r===0}):void 0,U=a?z({icon:G??T,onClick:()=>C(1),type:"next",disabled:r===c-1}):void 0,J=z({icon:Y,onClick:I,type:"flipY"}),ne=z({icon:_,onClick:m,type:"flipX"}),O=z({icon:E,onClick:f,type:"rotateLeft"}),L=z({icon:$,onClick:j,type:"rotateRight"}),K=z({icon:Q,onClick:F,type:"zoomOut",disabled:w<=y}),re=z({icon:H,onClick:k,type:"zoomIn",disabled:w===S}),ie=s.createElement("div",{className:A(`${t}-actions`,l.actions),style:u.actions},J,ne,O,L,K,re);return s.createElement("div",{className:A(`${t}-footer`,l.footer),style:u.footer},X,b?b(ie,{icons:{prevIcon:Z,nextIcon:U,flipYIcon:J,flipXIcon:ne,rotateLeftIcon:O,rotateRightIcon:L,zoomOutIcon:K,zoomInIcon:re},actions:{onActive:C,onFlipY:I,onFlipX:m,onRotateLeft:f,onRotateRight:j,onZoomOut:F,onZoomIn:k,onReset:R,onClose:h},transform:x,current:r,total:c,image:d}):ie)}function Rs(e){const{prefixCls:t,onActive:o,current:r,count:c,icons:{left:a,right:l,prev:u,next:p}}=e,d=`${t}-switch`;return s.createElement(s.Fragment,null,s.createElement("div",{className:A(d,`${d}-prev`,{[`${d}-disabled`]:r===0}),onClick:()=>o(-1)},u??a),s.createElement("div",{className:A(d,`${d}-next`,{[`${d}-disabled`]:r===c-1}),onClick:()=>o(1)},p??l))}function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[c,a]=St({src:t,fallback:e});return se.createElement("img",Me({ref:l=>{o.current=l,c(l)}},r,a))},It=e=>{const{prefixCls:t,rootClassName:o,src:r,alt:c,imageInfo:a,fallback:l,movable:u=!0,onClose:p,open:d,afterOpenChange:x,icons:g={},closeIcon:b,getContainer:w,current:y=0,count:S=1,countRender:C,scaleStep:I=.5,minScale:m=1,maxScale:f=50,motionName:j="fade",imageRender:F,imgCommonProps:k,actionsRender:h,onTransform:R,onChange:P,classNames:T={},styles:D={},mousePosition:G,zIndex:Y}=e,_=s.useRef(),E=s.useContext($e),$=E&&S>1,Q=E&&S>=1,[H,X]=s.useState(!0),{transform:N,resetTransform:z,updateTransform:Z,dispatchZoomChange:U}=Is(_,m,f,R),{isMoving:J,onMouseDown:ne,onWheel:O}=js(_,u,d,I,N,Z,U),{isTouching:L,onTouchStart:K,onTouchMove:re,onTouchEnd:ie}=Ns(_,u,d,m,N,Z,U),{rotate:ae,scale:le}=N;s.useEffect(()=>{H||X(!0)},[H]),s.useEffect(()=>{d||z("close")},[d]);const pe=V=>{d&&(le!==1?Z({x:0,y:0,scale:1},"doubleClick"):U(ye+I,"doubleClick",V.clientX,V.clientY))},ge=se.createElement($s,Me({},k,{width:e.width,height:e.height,imgRef:_,className:`${t}-img`,alt:c,style:{transform:`translate3d(${N.x}px, ${N.y}px, 0) scale3d(${N.flipX?"-":""}${le}, ${N.flipY?"-":""}${le}, 1) rotate(${ae}deg)`,transitionDuration:(!H||L)&&"0s"},fallback:l,src:r,onWheel:O,onMouseDown:ne,onDoubleClick:pe,onTouchStart:K,onTouchMove:re,onTouchEnd:ie,onTouchCancel:ie})),Ce={url:r,alt:c,...a},Pe=()=>{U(ye+I,"zoomIn")},Fe=()=>{U(ye/(ye+I),"zoomOut")},q=()=>{Z({rotate:ae+90},"rotateRight")},De=()=>{Z({rotate:ae-90},"rotateLeft")},he=()=>{Z({flipX:!N.flipX},"flipX")},oe=()=>{Z({flipY:!N.flipY},"flipY")},ce=()=>{z("reset")},de=V=>{const ee=y+V;ee>=0&&ee<=S-1&&(X(!1),z(V<0?"prev":"next"),P?.(ee,y))},be=ht(V=>{if(d){const{keyCode:ee}=V;$&&(ee===Je.LEFT?de(-1):ee===Je.RIGHT&&de(1))}});s.useEffect(()=>{if(d)return window.addEventListener("keydown",be),()=>{window.removeEventListener("keydown",be)}},[d]);const[Oe,Se]=s.useState(!1);se.useEffect(()=>{d&&Se(!0)},[d]);const Le=V=>{V||Se(!1),x?.(V)},[Ie,Ae]=s.useState(!1);Ut(()=>{d&&Ae(!0)},[d]);const ze=({top:V})=>{V&&p?.()},ke={...D.body};return G&&(ke.transformOrigin=`${G.x}px ${G.y}px`),se.createElement(Vt,{open:Ie&&d,autoDestroy:!1,getContainer:w,autoLock:Oe,onEsc:ze},se.createElement(Kt,{motionName:j,visible:Ie&&d,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:Le},({className:V,style:ee})=>{const xe={...D.root,...ee};return Y&&(xe.zIndex=Y),se.createElement("div",{className:A(t,o,T.root,V,{[`${t}-moving`]:J}),style:xe},se.createElement("div",{className:A(`${t}-mask`,T.mask),style:D.mask,onClick:p}),se.createElement("div",{className:A(`${t}-body`,T.body),style:ke},F?F(ge,{transform:N,image:Ce,...E?{current:y}:{}}):ge),b!==!1&&b!==null&&se.createElement(Es,{prefixCls:t,icon:b===!0?g.close:b||g.close,onClick:p}),$&&se.createElement(Rs,{prefixCls:t,current:y,count:S,icons:g,onActive:de}),se.createElement(Ms,{prefixCls:t,showProgress:Q,current:y,count:S,showSwitch:$,classNames:T,styles:D,image:Ce,transform:N,icons:g,countRender:C,actionsRender:h,scale:le,minScale:m,maxScale:f,onActive:de,onFlipY:oe,onFlipX:he,onRotateLeft:De,onRotateRight:q,onZoomOut:Fe,onZoomIn:Pe,onClose:p,onReset:ce}))}))},Ue=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function Ps(e){const[t,o]=s.useState({}),r=s.useCallback((a,l)=>(o(u=>({...u,[a]:l})),()=>{o(u=>{const p={...u};return delete p[a],p})}),[]);return[s.useMemo(()=>e?e.map(a=>{if(typeof a=="string")return{data:{src:a}};const l={};return Object.keys(a).forEach(u=>{["src",...Ue].includes(u)&&(l[u]=a[u])}),{data:l}}):Object.keys(t).reduce((a,l)=>{const{canPreview:u,data:p}=t[l];return u&&a.push({data:p,id:l}),a},[]),[e,t]),r,!!e]}function Ve(){return Ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{open:p,onOpenChange:d,current:x,onChange:g,...b}=l&&typeof l=="object"?l:{},[w,y,S]=Ps(a),[C,I]=He(0,x),[m,f]=s.useState(!1),{src:j,...F}=w[C]?.data||{},[k,h]=He(!!p,p),R=ht(E=>{h(E),E!==k&&d?.(E,{current:C})}),[P,T]=s.useState(null),D=s.useCallback((E,$,Q,H)=>{const X=S?w.findIndex(N=>N.data.src===$):w.findIndex(N=>N.id===E);I(X<0?0:X),R(!0),T({x:Q,y:H}),f(!0)},[w,S]);s.useEffect(()=>{k?m||I(0):f(!1)},[k]);const G=(E,$)=>{I(E),g?.(E,$)},Y=()=>{R(!1),T(null)},_=s.useMemo(()=>({register:y,onPreview:D}),[y,D]);return s.createElement($e.Provider,{value:_},r,s.createElement(It,Ve({"aria-hidden":!k,open:k,prefixCls:e,onClose:Y,mousePosition:P,imgCommonProps:F,src:j,fallback:u,icons:c,current:C,count:w.length,onChange:G},b,{classNames:t?.popup,styles:o?.popup})))};let yt=0;function Os(e,t){const[o]=s.useState(()=>(yt+=1,String(yt))),r=s.useContext($e),c={data:t,canPreview:e};return s.useEffect(()=>{if(r)return r.register(o,c)},[]),s.useEffect(()=>{r&&r.register(o,c)},[e,t]),o}function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t="rc-image",previewPrefixCls:o=`${t}-preview`,rootClassName:r,className:c,style:a,classNames:l={},styles:u={},width:p,height:d,src:x,alt:g,placeholder:b,fallback:w,preview:y=!0,onClick:S,onError:C,...I}=e,m=s.useContext($e),f=!!y,{src:j,open:F,onOpenChange:k,cover:h,rootClassName:R,...P}=y&&typeof y=="object"?y:{},T=typeof h=="object"&&h.placement&&h.placement||"center",D=typeof h=="object"&&h.coverNode?h.coverNode:h,[G,Y]=He(!!F,F),[_,E]=s.useState(null),$=L=>{Y(L),k?.(L)},Q=()=>{$(!1)},H=b&&b!==!0,X=j??x,[N,z,Z]=St({src:x,isCustomPlaceholder:H,fallback:w}),U=s.useMemo(()=>{const L={};return Ue.forEach(K=>{e[K]!==void 0&&(L[K]=e[K])}),L},Ue.map(L=>e[L])),J=s.useMemo(()=>({...U,src:X}),[X,U]),ne=Os(f,J),O=L=>{const K=L.target.getBoundingClientRect(),re=K.x+K.width/2,ie=K.y+K.height/2;m?m.onPreview(ne,X,re,ie):(E({x:re,y:ie}),$(!0)),S?.(L)};return s.createElement(s.Fragment,null,s.createElement("div",ve({},I,{className:A(t,r,l.root,{[`${t}-error`]:Z==="error"}),onClick:f?O:S,style:{width:p,height:d,...u.root}}),s.createElement("img",ve({},U,{className:A(`${t}-img`,{[`${t}-img-placeholder`]:b===!0},l.image,c),style:{height:d,...u.image,...a},ref:N},z,{width:p,height:d,onError:C})),Z==="loading"&&s.createElement("div",{"aria-hidden":"true",className:`${t}-placeholder`},b),h!==!1&&f&&s.createElement("div",{className:A(`${t}-cover`,l.cover,`${t}-cover-${T}`),style:{display:a?.display==="none"?"none":void 0,...u.cover}},D)),!m&&f&&s.createElement(It,ve({"aria-hidden":!G,open:G,prefixCls:o,onClose:Q,mousePosition:_,src:X,alt:g,imageInfo:{width:p,height:d},fallback:w,imgCommonProps:U},P,{classNames:l?.popup,styles:u?.popup,rootClassName:A(R,r)})))};Qe.PreviewGroup=Ds;const kt=(e,t,o,r,c,a,l)=>{const[u]=qt("ImagePreview",e?.zIndex),[p,d]=Qt(e?.mask,t?.mask,`${o}-preview`);return se.useMemo(()=>{if(!e)return e;const{cover:x,getContainer:g,closeIcon:b,rootClassName:w}=e,{closeIcon:y}=t??{};return{motionName:Jt(`${o}-preview`,"fade"),...e,...l?{cover:x??l}:{},icons:a,getContainer:g??c,zIndex:u,closeIcon:b??y,rootClassName:A(r,w),mask:p,blurClassName:d.mask}},[e,t,o,r,c,l,a,u,p,d])};function Ls(e){return s.isValidElement(e)?[e,void 0]:typeof e=="boolean"||e&&typeof e=="object"?[void 0,e]:[void 0,void 0]}function Re(e){const t=s.useMemo(()=>typeof e=="boolean"?e?{}:null:e&&typeof e=="object"?e:{},[e]);return s.useMemo(()=>{if(!t)return[t,"",""];const{open:r,onOpenChange:c,cover:a,actionsRender:l,visible:u,onVisibleChange:p,rootClassName:d,maskClassName:x,mask:g,forceRender:b,destroyOnClose:w,toolbarRender:y,...S}=t;let C;c?C=c:p&&(C=(f,j)=>{const{current:F}=j||{};F!==void 0?p(f,!f,F):p(f,!f)});const[I,m]=Ls(g);return[{...S,open:r??u,onOpenChange:C,cover:a??I,mask:m,actionsRender:l??y},d,x]},[t])}const jt=e=>({position:e||"absolute",inset:0}),As=e=>{const{componentCls:t,motionDurationSlow:o,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:r,background:new we("#000").setA(.3).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${o}`},"&:hover":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:"0 0 auto 0",justifyContent:"center"},[`${t}-cover-bottom`]:{inset:"auto 0 0 0",justifyContent:"center"}}}},zs=e=>{const{motionEaseOut:t,previewCls:o,motionDurationSlow:r,componentCls:c,colorBgMask:a,marginXL:l,marginSM:u,margin:p,colorTextLightSolid:d,paddingSM:x,paddingLG:g,previewOperationHoverColor:b,previewOperationColorDisabled:w,previewOperationSize:y,zIndexPopup:S}=e,C=new we(a).setA(.1),I=C.clone().setA(.2),m={position:"absolute",color:d,backgroundColor:C.toRgbString(),borderRadius:"50%",padding:x,outline:0,border:0,cursor:"pointer",transition:`all ${r}`,display:"flex",fontSize:y,"&:hover":{backgroundColor:I.toRgbString()},"&:active":{backgroundColor:C.toRgbString()}};return{[`${c}-preview`]:{textAlign:"center",inset:0,position:"fixed",userSelect:"none",zIndex:S,[`${o}-mask`]:{inset:0,position:"absolute",background:a,backdropFilter:"blur(0px)",transition:`backdrop-filter ${r}`,[`&${c}-preview-mask-blur`]:{backdropFilter:"blur(4px)"},[`&${c}-preview-mask-hidden`]:{display:"none"}},[`${o}-body`]:{...jt(),"pointer-events":"none",display:"flex",alignItems:"center",justifyContent:"center","> *":{pointerEvents:"auto"}},[`${o}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",transition:`transform ${r} ${t} 0s`},[`&-movable ${o}-img`]:{cursor:"grab"},[`&-moving ${o}-img`]:{cursor:"grabbing"},[`${o}-close`]:{...m,top:u,insetInlineEnd:u},[`${o}-switch`]:{...m,top:"50%",transform:"translateY(-50%)","&-disabled":{"&, &:hover, &:active":{color:w,background:"transparent",cursor:"not-allowed"}},"&-prev":{insetInlineStart:u},"&-next":{insetInlineEnd:u}},[`${o}-footer`]:{position:"absolute",bottom:l,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)",gap:p},[`${o}-actions`]:{display:"flex",gap:x,padding:`0 ${ss(g)}`,backgroundColor:C.toRgbString(),borderRadius:100,fontSize:y,"&-action":{padding:x,cursor:"pointer",transition:`all ${r}`,display:"flex",[`&:not(${o}-actions-action-disabled):hover`]:{color:b},"&-disabled":{color:w,cursor:"not-allowed"}}}}}},Ys=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-placeholder`]:{...jt()}}}},_s=e=>{const{previewCls:t,motionDurationSlow:o}=e;return{[t]:{"&-fade":{transition:`opacity ${o}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:"scale(0)"},"&-active":{opacity:1,[`${t}-body`]:{transform:"scale(1)",transition:`transform ${o}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:"scale(0)",transition:`transform ${o}`}}}}}}},Xs=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new we(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new we(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new we(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),Tt=es("Image",e=>{const t=`${e.componentCls}-preview`,o=ts(e,{previewCls:t,imagePreviewSwitchSize:e.controlHeightLG});return[Ys(o),As(o),zs(o),_s(o)]},Xs),Ke={rotateLeft:s.createElement(as,null),rotateRight:s.createElement(rs,null),zoomIn:s.createElement(is,null),zoomOut:s.createElement(os,null),close:s.createElement(ns,null),left:s.createElement(We,null),right:s.createElement(Ze,null),flipX:s.createElement(et,null),flipY:s.createElement(et,{rotate:90})},Bs=({previewPrefixCls:e,preview:t,classNames:o,styles:r,...c})=>{const{getPrefixCls:a,getPopupContainer:l,direction:u,preview:p,classNames:d,styles:x}=xt("image"),g=a("image",e),b=`${g}-preview`,w=vt(g),[y,S]=Tt(g,w),C=A(y,S,w),[I,m,f]=Re(t),[j,F,k]=Re(p),h=s.useMemo(()=>({...Ke,left:u==="rtl"?s.createElement(Ze,null):s.createElement(We,null),right:u==="rtl"?s.createElement(We,null):s.createElement(Ze,null)}),[u]),R=kt(I,j,g,C,l,Ke),{mask:P,blurClassName:T}=R??{},D={...c,classNames:o,styles:r},[G,Y]=wt([d,o,{cover:A(k,f),popup:{root:A(F,m),mask:A({[`${g}-preview-mask-hidden`]:!P},T)}}],[x,r],{props:D},{popup:{_default:"root"}});return s.createElement(Qe.PreviewGroup,{preview:R,previewPrefixCls:b,icons:h,...c,classNames:G,styles:Y})},qe=e=>{const{prefixCls:t,preview:o,className:r,rootClassName:c,style:a,styles:l,classNames:u,wrapperStyle:p,fallback:d,...x}=e,{getPrefixCls:g,getPopupContainer:b,className:w,style:y,preview:S,styles:C,classNames:I,fallback:m}=xt("image"),f=g("image",t),j=vt(f),[F,k]=Tt(f,j),h=A(c,F,k,j),R=A(r,F,w),[P,T,D]=Re(o),[G,Y,_]=Re(S),E=kt(P,G,f,h,b,Ke,!0),$={...e,preview:E},Q=s.useMemo(()=>({cover:A(_,D),popup:{root:A(Y,T)}}),[T,D,Y,_]),{mask:H,blurClassName:X}=E??{},N=s.useMemo(()=>({mask:A({[`${f}-preview-mask-hidden`]:!H},X)}),[H,f,X]),z=s.useMemo(()=>[I,u,Q,{popup:N}],[I,u,Q,N]),[Z,U]=wt(z,[C,{root:p},l],{props:$},{popup:{_default:"root"}}),J={...y,...a},ne=d??m;return s.createElement(Qe,{prefixCls:f,preview:E||!1,rootClassName:h,className:R,style:J,fallback:ne,...x,classNames:Z,styles:U})};qe.PreviewGroup=Bs;function Gs(e){return W({url:"/system/file/group",method:"get",params:e})}function Hs(e){return W({url:"/system/file/group",method:"post",data:e})}function Zs(e){return W({url:`/system/file/group/${e.id}`,method:"put",data:e})}function Ws(e){return W({url:`/system/file/group/${e}`,method:"delete"})}function Us(e){return W({url:"/system/file/list",method:"get",params:e})}function Vs(e){return W({url:"/system/file/list/trashed",method:"get",params:e})}function Ks(e,t,o){const r=new FormData;return r.append("file",e),r.append("group_id",t.toString()),W({timeout:0,url:"/system/file/list/upload",method:"post",data:r,headers:{"Content-Type":"multipart/form-data"},onUploadProgress:c=>{if(o&&c.total){const a=Math.round(c.loaded*100/c.total);o(a)}}})}function qs(e){return W({url:`/system/file/list/${e}`,method:"delete"})}function Qs(e){return W({url:"/system/file/list/batch/delete",method:"delete",data:{ids:e}})}function Js(e){return W({url:`/system/file/list/force-delete/${e}`,method:"delete"})}function en(e){return W({url:"/system/file/list/batch/force-delete",method:"delete",data:{ids:e}})}function tn(e){return W({url:`/system/file/list/restore/${e}`,method:"post"})}function sn(e){return W({url:"/system/file/list/batch/restore",method:"post",data:{ids:e}})}function nn(e,t){return W({url:"/system/file/list/copy",method:"post",data:{group_id:t,ids:e}})}function on(e,t){return W({url:"/system/file/list/move",method:"post",data:{group_id:t,ids:e}})}function rn(e,t){return W({url:`/system/file/list/rename/${e}`,method:"put",data:{name:t}})}function an(){return W({url:"/system/file/list/clean/trashed",method:"delete"})}const{Title:ln,Text:cn}=Ct,Fn=()=>{const{t:e}=ls(),[t,o]=s.useState([]),[r,c]=s.useState(new Map),[a,l]=s.useState(0),[u,p]=s.useState(null),d=s.useRef(null),[x,g]=s.useState(),[b,w]=s.useState(!0),[y,S]=s.useState([]),[C,I]=s.useState([]),[m,f]=s.useState(!1),[j,F]=s.useState(!1),[k,h]=s.useState(!1),[R,P]=s.useState(0),[T,D]=s.useState({current:1,pageSize:10,total:0}),[G,Y]=s.useState(!1),[_,E]=s.useState(),[$,Q]=s.useState(),[H,X]=s.useState(0),[N,z]=s.useState(!1),[Z,U]=s.useState(null),[J,ne]=s.useState(""),[O,L]=s.useState([]),[K,re]=s.useState([]),[ie,ae]=s.useState(!1),[le,pe]=s.useState(!1),[ge,Ce]=s.useState({current:1,pageSize:10,total:0}),[Pe,Fe]=s.useState(!1),[q,De]=s.useState(null),he=async()=>{try{w(!0);const{data:i}=await Gs(x?{keywordSearch:x}:void 0),v=i.data||[];o(v);const M=new Map,ue=Ht=>{Ht.forEach(je=>{M.set(je.id,je),je.children&&ue(je.children)})};ue(v),c(M)}finally{w(!1)}},oe=async(i=1,v=20)=>{try{f(!0),L([]);const{data:M}=await Us({group_id:Number(a)||0,page:i,pageSize:v});S(M.data?.data||[]),D({current:M.data?.current_page||i,pageSize:M.data?.per_page||v,total:M.data?.total||0})}finally{f(!1)}},ce=async(i=1,v=10)=>{try{ae(!0),L([]);const{data:M}=await Vs({page:i,pageSize:v});re(M.data?.data||[]),Ce({current:M.data?.current_page||i,pageSize:M.data?.per_page||v,total:M.data?.total||0})}finally{ae(!1)}};s.useEffect(()=>{he()},[x]),s.useEffect(()=>{oe()},[a]);const de=s.useMemo(()=>{const i=v=>v.map(M=>({key:M.id,title:M.name,icon:n.jsx(tt,{}),children:M.children?i(M.children):void 0}));return x?i(t):[{key:0,title:e("sysFile.root"),icon:n.jsx(tt,{}),children:i(t)}]},[t]),be=i=>{i.length>0&&l(i[0])},Oe=i=>{p(null),d.current?.resetFields(),d.current?.setFieldsValue({parent_id:i}),d.current?.open()},Se=i=>{p(i),d.current?.setFieldsValue(i),d.current?.open()},Le=async i=>{const v=!!u;return await(v?Zs({...i,id:u.id}):Hs(i)),B.success(v?e("sysFile.saveFolderSuccess",{action:e("sysFile.actionEdit")}):e("sysFile.saveFolderSuccess",{action:e("sysFile.actionAdd")})),d.current?.close(),await he(),!0},Ie=async i=>{window.$modal?.confirm({title:e("sysFile.confirmDeleteFolder"),content:e("sysFile.deleteFolderHint"),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await Ws(i),B.success(e("sysFile.deleteFolderSuccess")),a===i&&l(0),await he()}})},Ae=async()=>{if(!C.length)return B.warning(e("sysFile.selectFileWarning"));try{h(!0);for(const i of C)await Ks(i.originFileObj,Number(a),P);B.success(e("sysFile.uploadSuccess")),F(!1),I([]),P(0),await oe()}finally{h(!1)}},ze=async i=>{window.$modal?.confirm({title:e("sysFile.confirmDelete"),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await qs(i),B.success(e("sysFile.deleteSuccess")),await oe()}})},ke=async()=>{if(!O.length)return B.warning(e("sysFile.noSelected"));window.$modal?.confirm({title:e("sysFile.confirmBatchDelete",{count:O.length}),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await Qs(O),B.success(e("sysFile.batchDeleteSuccess")),await oe()}})},V=async()=>{if(!$)return B.warning(e("sysFile.noSelected"));if(mt.isArray($)&&$.length<1)return B.warning(e("sysFile.noSelected"));_==="move"?(await on($,H),B.success(e("sysFile.moveSuccess"))):(await nn($,H),B.success(e("sysFile.moveSuccess"))),Y(!1),await oe()},ee=(i,v)=>{E(v),Q(i),Y(!0)},xe=i=>{const v=i.currentTarget.dataset.type;console.log(v,i.currentTarget.dataset);const M=O.map(ue=>Number(ue));ee(M,v)},Nt=i=>{U(i),ne(i.file_name||""),z(!0)},Et=async()=>{!Z?.id||!J.trim()||(await rn(Z.id,J.trim()),B.success(e("sysFile.renameSuccess")),z(!1),await oe())},Mt=async()=>{pe(!0),L([]),await ce()},Rt=async()=>{pe(!1),L([]),await oe()},$t=async i=>{window.$modal?.confirm({title:e("sysFile.confirmForceDelete"),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await Js(i),B.success(e("sysFile.forceDeleteSuccess")),await ce()}})},Pt=async i=>{window.$modal?.confirm({title:e("sysFile.confirmRestore"),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await tn(i),B.success(e("sysFile.restoreSuccess")),await ce()}})},Dt=async()=>{if(!O.length)return B.warning(e("sysFile.noSelected"));window.$modal?.confirm({title:e("sysFile.confirmBatchForceDelete",{count:O.length}),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await en(O),B.success(e("sysFile.batchForceDeleteSuccess")),await ce()}})},Ot=async()=>{if(!O.length)return B.warning(e("sysFile.noSelected"));window.$modal?.confirm({title:e("sysFile.confirmBatchRestore",{count:O.length}),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{await sn(O),B.success(e("sysFile.batchRestoreSuccess")),await ce()}})},Lt=async()=>{window.$modal?.confirm({title:e("sysFile.confirmEmptyTrash"),okText:e("sysFile.ok"),cancelText:e("sysFile.cancel"),onOk:async()=>{const{data:i}=await an();B.success(e("sysFile.emptyTrashSuccess",{count:i.data?.count||0})),await ce()}})},At=i=>{De(i),Fe(!0)},Ye=(i=0)=>{const v=["B","KB","MB","GB"];let M=0,ue=i;for(;ue>=1024&&M<3;)ue/=1024,M++;return`${ue.toFixed(2)} ${v[M]}`},zt=[{value:10,color:"purple",label:e("sysFile.type.image")},{value:20,color:"blue",label:e("sysFile.type.audio")},{value:30,color:"magenta",label:e("sysFile.type.video")},{value:40,color:"orange",label:e("sysFile.type.archive")},{value:50,color:"success",label:e("sysFile.type.document")},{value:99,color:"error",label:e("sysFile.type.other")}],_e=i=>{const v=zt.find(M=>M.value===i);return n.jsx(Ge,{color:v?.color,children:v?.label})},Yt=async i=>{const v=document.createElement("a");v.href=`/index.php/system/file/list/download/${i}`,document.body.appendChild(v),v.click(),document.body.removeChild(v)},_t=[{title:e("sysFile.folderName"),dataIndex:"name",valueType:"text",rules:[{required:!0,message:e("sysFile.folderNameRequired")}]},{title:e("sysFile.parentFolder"),dataIndex:"parent_id",valueType:"treeSelect",fieldProps:{treeData:de,fieldNames:{label:"title",value:"key"},disabled:!0}},{title:e("sysFile.sort"),dataIndex:"sort",valueType:"digit",rules:[{required:!0,message:e("sysFile.sortRequired")}],initialValue:0},{title:e("sysFile.describe"),dataIndex:"describe",valueType:"textarea"}],Xt=[{title:e("sysFile.fileName"),dataIndex:"file_name",ellipsis:!0,width:320,render:(i,v)=>n.jsx("a",{onClick:()=>At(v),children:i})},{title:e("sysFile.fileSize"),dataIndex:"file_size",width:80,align:"center",render:Ye,sorter:!0},{title:e("sysFile.fileType"),dataIndex:"file_type",width:80,align:"center",render:_e},{title:e("sysFile.disk"),dataIndex:"disk",width:80,align:"center",render:i=>n.jsx(Ge,{children:i})},{title:e("sysFile.createdAt"),dataIndex:"created_at",width:180,align:"center",render:i=>i?st(i).format("YYYY-MM-DD HH:mm:ss"):"-"},{title:e("sysFile.preview"),dataIndex:"preview_url",width:80,align:"center",render:i=>n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:n.jsx(qe,{preview:!1,src:i,width:36,height:36})})},{title:e("sysFile.action"),width:80,key:"action",align:"center",fixed:"right",render:(i,v)=>n.jsx(nt,{trigger:["click"],menu:{items:[{key:"download",icon:n.jsx(ds,{}),label:e("sysFile.download"),onClick:()=>Yt(v.id)},{key:"rename",icon:n.jsx(ot,{}),label:e("sysFile.rename"),onClick:()=>Nt(v)},{key:"move",icon:n.jsx(it,{}),label:e("sysFile.move"),onClick:()=>ee(v.id,"move")},{key:"copy",icon:n.jsx(rt,{}),label:e("sysFile.copy"),onClick:()=>ee(v.id,"copy")},{type:"divider"},{key:"delete",label:n.jsx("span",{style:{color:"#ff4d4f"},children:e("sysFile.delete")}),icon:n.jsx(me,{style:{color:"#ff4d4f"}}),onClick:()=>ze(v.id)}]},children:n.jsx(te,{icon:n.jsx(cs,{}),size:"small"})})}],Bt=[{title:e("sysFile.fileName"),dataIndex:"file_name",ellipsis:!0,width:180},{title:e("sysFile.fileSize"),dataIndex:"file_size",width:80,align:"center",render:Ye,sorter:!0},{title:e("sysFile.fileType"),dataIndex:"file_type",width:80,align:"center",render:_e},{title:e("sysFile.disk"),dataIndex:"disk",width:80,align:"center",render:i=>n.jsx(Ge,{children:i})},{title:e("sysFile.deletedAt"),dataIndex:"deleted_at",width:120,align:"center",render:i=>i?st(i).format("YYYY-MM-DD HH:mm:ss"):"-"},{title:e("sysFile.action"),width:80,key:"action",align:"center",fixed:"right",render:(i,v)=>n.jsxs(fe,{children:[n.jsx(Te,{title:e("sysFile.restore"),children:n.jsx(te,{size:"small",icon:n.jsx(at,{}),onClick:()=>Pt(v.id)})}),n.jsx(Te,{title:e("sysFile.forceDelete"),children:n.jsx(te,{danger:!0,size:"small",type:"primary",icon:n.jsx(me,{}),onClick:()=>$t(v.id)})})]})}],Gt=i=>n.jsx(nt,{trigger:["click"],menu:{items:[{key:"add",label:n.jsxs(fe,{children:[n.jsx(ys,{}),e("sysFile.addFolder")]}),onClick:()=>Oe(Number(i.key))},{key:"edit",label:n.jsxs(fe,{children:[n.jsx(ot,{}),e("sysFile.editFolder")]}),disabled:Number(i.key)===0,onClick:()=>r.has(i.key)&&Se(r.get(i.key))},{type:"divider"},{key:"del",danger:!0,icon:n.jsx(me,{}),disabled:Number(i.key)===0,onClick:()=>Ie(Number(i.key)),label:e("sysFile.deleteFolder")}]},children:n.jsxs(fe,{children:[n.jsx(dt,{name:"icon-wenjianjia"}),mt.isFunction(i.title)?i.title(i):i.title]})});return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-5",children:[n.jsx(ln,{level:3,children:e("sysFile.page.title")}),n.jsx(cn,{type:"secondary",children:e("sysFile.page.description")})]}),n.jsxs(us,{gutter:[16,16],children:[n.jsx(lt,{xs:24,lg:4,children:n.jsxs(ft,{title:n.jsxs(fe,{children:[n.jsx(dt,{style:{fontSize:18},name:"icon-wenjianjia"}),e("sysFile.fileFolder")]}),variant:"borderless",styles:{header:{paddingInline:16,paddingBlock:0,minHeight:48},body:{padding:16,minHeight:52}},children:[n.jsx(ct.Search,{placeholder:e("sysFile.folderSearchPlaceholder"),style:{marginBottom:16},onSearch:i=>g(i)}),n.jsx(ws,{spinning:b,description:e("sysFile.loading"),size:"small",children:n.jsx("div",{style:{minHeight:200},children:t.length>0&&n.jsx(vs,{showLine:!0,defaultExpandAll:!0,onSelect:be,treeData:de,defaultExpandedKeys:[0],selectedKeys:[a],titleRender:Gt})})})]})}),n.jsx(lt,{xs:24,lg:20,children:n.jsxs(ft,{variant:"borderless",styles:{body:{paddingBlock:16}},children:[n.jsxs(fe,{wrap:!0,style:{marginBottom:16},children:[n.jsx(te,{type:"primary",icon:n.jsx(ms,{}),children:e("sysFile.upload"),onClick:()=>F(!0)}),O.length>0&&!le&&n.jsxs(n.Fragment,{children:[n.jsx(te,{danger:!0,icon:n.jsx(me,{}),onClick:ke,children:e("sysFile.batchDelete")}),n.jsx(te,{icon:n.jsx(it,{}),"data-type":"move",onClick:xe,children:e("sysFile.batchMove")}),n.jsx(te,{icon:n.jsx(rt,{}),"data-type":"copy",onClick:xe,children:e("sysFile.batchCopy")})]}),n.jsx(Te,{title:e("sysFile.trash"),children:n.jsx(te,{icon:n.jsx(me,{}),onClick:()=>Mt(),children:e("sysFile.trash")})}),n.jsx(Te,{title:e("sysFile.refresh"),children:n.jsx(te,{icon:n.jsx(fs,{}),onClick:()=>oe()})})]}),n.jsx(pt,{columns:Xt,dataSource:y,rowKey:"id",size:"small",loading:m,pagination:{...T,onChange:oe,showSizeChanger:!0,showTotal:i=>e("sysFile.totalFiles",{total:i})},rowSelection:{selectedRowKeys:O,onChange:L},scroll:{x:1e3}})]})}),n.jsx(hs,{formRef:d,layoutType:"ModalForm",columns:_t,onFinish:Le,modalProps:{title:e(u?"sysFile.editFolderTitle":"sysFile.addFolderTitle"),onCancel:()=>d.current?.close()},trigger:n.jsx("span",{style:{display:"none"}})}),n.jsxs(ut,{title:e("sysFile.trash"),open:le,width:860,onClose:Rt,children:[n.jsxs(fe,{style:{marginBottom:20},children:[n.jsx(te,{disabled:O.length===0,type:"primary",icon:n.jsx(at,{}),onClick:Ot,children:e("sysFile.batchRestore")}),n.jsx(te,{disabled:O.length===0,icon:n.jsx(me,{}),onClick:Dt,children:e("sysFile.batchForceDelete")}),n.jsx(te,{danger:!0,type:"primary",icon:n.jsx(me,{}),onClick:Lt,children:e("sysFile.emptyTrash")})]}),n.jsx(pt,{columns:Bt,dataSource:K,rowKey:"id",size:"small",loading:ie,pagination:{...ge,onChange:ce,showSizeChanger:!0,showTotal:i=>e("sysFile.totalFiles",{total:i})},rowSelection:{selectedRowKeys:O,onChange:L},scroll:{x:800}})]}),n.jsx(Xe,{title:e("sysFile.uploadTitle"),open:j,onOk:Ae,onCancel:()=>{F(!1),I([]),P(0)},confirmLoading:k,children:n.jsxs(Be,{layout:"vertical",children:[n.jsx(Be.Item,{label:e("sysFile.selectFile"),required:!0,children:n.jsxs(Cs.Dragger,{fileList:C,onChange:({fileList:i})=>I(i),beforeUpload:()=>!1,multiple:!0,style:{borderRadius:8},children:[n.jsx("p",{className:"ant-upload-drag-icon",children:n.jsx(ps,{style:{fontSize:48,color:"#1890ff"}})}),n.jsx("p",{className:"ant-upload-text",children:e("sysFile.uploadDragText")}),n.jsx("p",{className:"ant-upload-hint",children:e("sysFile.uploadHint")})]})}),k&&n.jsx(Be.Item,{label:e("sysFile.uploadProgress"),children:n.jsx(Fs,{percent:R,status:"active"})})]})}),n.jsxs(Xe,{title:e("sysFile.renameTitle"),open:N,onOk:Et,styles:{body:{paddingBottom:16}},onCancel:()=>z(!1),children:[n.jsx("div",{style:{marginTop:16,marginBottom:16},children:e("sysFile.renameDescription")}),n.jsx(ct,{value:J,onChange:i=>ne(i.target.value),placeholder:e("sysFile.newFileNameRequired")})]}),n.jsxs(Xe,{title:e(_==="copy"?"sysFile.copyTitle":"sysFile.moveTitle"),open:G,onOk:V,styles:{body:{paddingBottom:16}},onCancel:()=>Y(!1),children:[n.jsx("div",{style:{marginTop:16,marginBottom:16},children:e(_==="copy"?"sysFile.copyDescription":"sysFile.moveDescription")}),n.jsx(xs,{value:H,onChange:X,treeData:de,fieldNames:{label:"title",value:"key"},style:{width:"100%"}})]}),n.jsx(ut,{title:e("sysFile.fileDetail"),placement:"right",width:480,open:Pe,onClose:()=>Fe(!1),children:q&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsx(qe,{src:q.preview_url,alt:q.file_name,preview:!1})}),n.jsx(gs,{}),n.jsx(bs,{title:e("sysFile.basicInfo"),column:1,items:[{key:"name",label:e("sysFile.fileName"),children:q.file_name},{key:"size",label:e("sysFile.fileSize"),children:Ye(q.file_size)},{key:"type",label:e("sysFile.fileType"),children:_e(q.file_type||10)},{key:"ext",label:e("sysFile.fileExt"),children:q.file_ext},{key:"disk",label:e("sysFile.storageMethod"),children:q.disk},{key:"path",label:e("sysFile.filePath"),children:q.file_path},{key:"group",label:e("sysFile.fileGroup"),children:r.get(q.group_id||0)?.name||e("sysFile.ungrouped")},{key:"created_at",label:e("sysFile.createdAt"),children:q.created_at},{key:"updated_at",label:e("sysFile.updatedAt"),children:q.updated_at},{key:"url",label:e("sysFile.accessUrl"),children:n.jsx(Ct.Link,{copyable:!0,children:q.file_url})}]})]})})]})]})};export{Fn as default}; diff --git a/public/assets/file-CRadmep3.js b/public/assets/file-CRadmep3.js new file mode 100644 index 0000000..d1277d9 --- /dev/null +++ b/public/assets/file-CRadmep3.js @@ -0,0 +1 @@ +import{o as e,s as t}from"./tslib.es6-DffexlHv.js";import{s as n,t as r}from"./XinForm-DX04WSwD.js";import{t as i}from"./card-BDbI8Gdq.js";import{t as a}from"./spin-D1ik486_.js";import{n as o,t as s}from"./upload-DrAEBKrg.js";import{t as c}from"./tag-Bn-IyYw0.js";import{$ as l,$r as u,A as d,At as f,Bi as p,Ca as m,Ci as h,Cn as g,Ct as _,Dn as v,Dr as y,Dt as b,E as x,Ea as S,Ei as C,Fi as w,Fn as T,H as E,In as D,It as O,Jr as k,Jt as A,Ki as j,Lt as M,Mt as N,Ni as P,Nt as F,Pt as I,Qr as L,Ri as R,St as z,Ur as B,Yr as V,Zi as H,Zr as U,_ as W,_a as ee,_i as G,ai as te,at as ne,c as re,di as ie,fr as ae,gn as K,hi as oe,hn as se,ht as ce,i as le,it as ue,jr as de,jt as fe,kr as pe,kt as me,ma as he,mi as ge,na as _e,ot as ve,pa as ye,qi as be,qt as xe,r as Se,ra as Ce,rt as we,s as Te,ti as q,wr as J,xt as Ee,y as De,ya as Y,yi as Oe,yt as ke,z as Ae,zt as je}from"./index-DThTpSPU.js";var Me={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},X=S(m()),Ne=X.createContext(null),Pe=e=>j(e).map(e=>({...e?.props,key:e.key}));function Fe(e,t,n){let r=X.useMemo(()=>t||Pe(n),[t,n]);return X.useMemo(()=>r.map(({span:t,...n})=>t===`filled`?{...n,filled:!0}:{...n,span:L(t)?t:D(e,t)}),[r,e])}function Ie(e,t){let n=[],r=[],i=!1,a=0;return e.filter(e=>e).forEach(e=>{let{filled:o,...s}=e;if(o){r.push(s),n.push(r),r=[],a=0;return}let c=t-a;a+=e.span||1,a>=t?(a>t?(i=!0,r.push({...s,span:c})):r.push(s),n.push(r),r=[],a=0):r.push(s)}),r.length>0&&n.push(r),n=n.map(e=>{let n=e.reduce((e,t)=>e+(t.span||1),0);if(n{let[n,r]=(0,X.useMemo)(()=>Ie(t,e),[t,e]);return n},Re=e=>e.children,ze=e=>{let{itemPrefixCls:t,component:n,span:r,className:i,style:a,labelStyle:o,contentStyle:s,bordered:c,label:l,content:u,colon:d,type:f,styles:m,classNames:h}=e,g=n,{classNames:_,styles:v}=X.useContext(Ne),[y,b]=V([_,h],[v,m],{props:e}),x={...o,...b.label},S={...s,...b.content};return c?X.createElement(g,{colSpan:r,style:a,className:p(i,{[`${t}-item-${f}`]:f===`label`||f===`content`,[y.label]:y.label&&f===`label`,[y.content]:y.content&&f===`content`})},U(l)&&X.createElement(`span`,{style:x},l),U(u)&&X.createElement(`span`,{style:S},u)):X.createElement(g,{className:p(`${t}-item`,i),style:a,colSpan:r},X.createElement(`div`,{className:`${t}-item-container`},U(l)&&X.createElement(`span`,{style:x,className:p(`${t}-item-label`,y.label,{[`${t}-item-no-colon`]:!d})},l),U(u)&&X.createElement(`span`,{style:S,className:p(`${t}-item-content`,y.content)},u)))};function Z(e,{colon:t,prefixCls:n,bordered:r},{component:i,type:a,showLabel:o,showContent:s,labelStyle:c,contentStyle:l,styles:u}){return e.map(({label:e,children:d,prefixCls:f=n,className:p,style:m,labelStyle:h,contentStyle:g,span:_=1,key:v,styles:y,classNames:b},x)=>typeof i==`string`?X.createElement(ze,{key:`${a}-${v||x}`,className:p,style:m,classNames:b,styles:{label:{...c,...u?.label,...h,...y?.label},content:{...l,...u?.content,...g,...y?.content}},span:_,colon:t,component:i,itemPrefixCls:f,bordered:r,label:o?e:null,content:s?d:null,type:a}):[X.createElement(ze,{key:`label-${v||x}`,className:p,style:{...c,...u?.label,...m,...h,...y?.label},span:1,colon:t,component:i[0],itemPrefixCls:f,bordered:r,label:e,type:`label`}),X.createElement(ze,{key:`content-${v||x}`,className:p,style:{...l,...u?.content,...m,...g,...y?.content},span:_*2-1,component:i[1],itemPrefixCls:f,bordered:r,content:d,type:`content`})])}var Be=e=>{let t=X.useContext(Ne),{prefixCls:n,vertical:r,row:i,index:a,bordered:o}=e;return r?X.createElement(X.Fragment,null,X.createElement(`tr`,{key:`label-${a}`,className:`${n}-row`},Z(i,e,{component:`th`,type:`label`,showLabel:!0,...t})),X.createElement(`tr`,{key:`content-${a}`,className:`${n}-row`},Z(i,e,{component:`td`,type:`content`,showContent:!0,...t}))):X.createElement(`tr`,{key:a,className:`${n}-row`},Z(i,e,{component:o?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,...t}))},Ve=e=>{let{componentCls:t,labelBg:n}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${w(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:`auto`},[`${t}-row`]:{borderBottom:`${w(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:`none`,"> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${w(e.padding)} ${w(e.paddingLG)}`,borderInlineEnd:`${w(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:`none`}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:n,"&::after":{display:`none`}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${w(e.paddingSM)} ${w(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${w(e.paddingXS)} ${w(e.padding)}`}}}}}},Q=e=>{let{componentCls:t,extraColor:n,itemPaddingBottom:r,itemPaddingEnd:i,colonMarginRight:a,colonMarginLeft:o,titleMarginBottom:s}=e;return{[t]:{...G(e),...Ve(e),"&-rtl":{direction:`rtl`},[`${t}-header`]:{display:`flex`,alignItems:`center`,marginBottom:s},[`${t}-title`]:{...Oe,flex:`auto`,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:`auto`,color:n,fontSize:e.fontSize},[`${t}-view`]:{width:`100%`,borderRadius:e.borderRadiusLG,table:{width:`100%`,tableLayout:`fixed`,borderCollapse:`collapse`}},[`${t}-row`]:{"> th, > td":{paddingBottom:r,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:`none`,"> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:`start`,"&::after":{content:`":"`,position:`relative`,top:-.5,marginInline:`${w(o)} ${w(a)}`},[`&${t}-item-no-colon::after`]:{content:`""`}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:`""`}},[`${t}-item-content`]:{display:`table-cell`,flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:`break-word`,overflowWrap:`break-word`},[`${t}-item`]:{paddingBottom:0,verticalAlign:`top`,"&-container":{display:`flex`,[`${t}-item-label`]:{display:`inline-flex`,alignItems:`baseline`},[`${t}-item-content`]:{display:`inline-flex`,alignItems:`baseline`,minWidth:`1em`}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},He=ie(`Descriptions`,e=>Q(C(e,{})),e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText})),Ue=e=>{let{prefixCls:t,title:n,extra:r,column:i,colon:a=!0,bordered:o,layout:s,children:c,className:l,rootClassName:u,style:d,size:f,labelStyle:m,contentStyle:h,styles:g,items:_,classNames:v,...y}=e,{getPrefixCls:b,direction:x,className:S,style:C,classNames:w,styles:E}=R(`descriptions`),O=b(`descriptions`,t),k=T(),A=X.useMemo(()=>L(i)?i:D(k,{...Me,...i})??3,[k,i]),j=Fe(k,_,c),M=J(f),N=Le(A,j),[P,F]=He(O),I={...e,column:A,items:j,size:M},[z,B]=V([w,v],[E,g],{props:I}),H=X.useMemo(()=>({labelStyle:m,contentStyle:h,styles:{label:B.label,content:B.content},classNames:{label:z.label,content:z.content}}),[m,h,B.label,B.content,z.label,z.content]);return X.createElement(Ne.Provider,{value:H},X.createElement(`div`,{className:p(O,S,z.root,{[`${O}-medium`]:M===`medium`||M===`middle`,[`${O}-small`]:M===`small`,[`${O}-bordered`]:!!o,[`${O}-rtl`]:x===`rtl`},l,u,P,F),style:{...C,...B.root,...d},...y},(n||r)&&X.createElement(`div`,{className:p(`${O}-header`,z.header),style:B.header},n&&X.createElement(`div`,{className:p(`${O}-title`,z.title),style:B.title},n),r&&X.createElement(`div`,{className:p(`${O}-extra`,z.extra),style:B.extra},r)),X.createElement(`div`,{className:`${O}-view`},X.createElement(`table`,null,X.createElement(`tbody`,null,N.map((e,t)=>X.createElement(Be,{key:t,index:t,colon:a,prefixCls:O,vertical:s===`vertical`,bordered:o,row:e})))))))};Ue.Item=Re;var We=X.createContext(null);function Ge(e){return new Promise(t=>{if(!e){t(!1);return}let n=document.createElement(`img`);n.onerror=()=>t(!1),n.onload=()=>t(!0),n.src=e})}function Ke(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var qe={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Je(e,t,n,r){let i=(0,X.useRef)(null),a=(0,X.useRef)([]),[o,s]=(0,X.useState)(qe),c=e=>{s(qe),H(qe,o)||r?.({transform:qe,action:e})},l=(e,t)=>{i.current===null&&(a.current=[],i.current=be(()=>{s(e=>{let n=e;return a.current.forEach(e=>{n={...n,...e}}),i.current=null,r?.({transform:n,action:t}),n})})),a.current.push({...o,...e})};return{transform:o,resetTransform:c,updateTransform:l,dispatchZoomChange:(r,i,a,s,c)=>{let{width:u,height:d,offsetWidth:f,offsetHeight:p,offsetLeft:m,offsetTop:h}=e.current,g=r,_=o.scale*r;_>n?(_=n,g=n/o.scale):_r){if(t>0)return{[e]:a};if(t<0&&ir)return{[e]:t<0?a:-a};return{}}function Xe(e,t,n,r){let{width:i,height:a}=Ke(),o=null;return e<=i&&t<=a?o={x:0,y:0}:(e>i||t>a)&&(o={...Ye(`x`,n,e,i),...Ye(`y`,r,t,a)}),o}function Ze(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,X.useState)(!1),p=(0,X.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),m=e=>{!t||e.button!==0||(e.preventDefault(),e.stopPropagation(),p.current={diffX:e.pageX-l,diffY:e.pageY-u,transformX:l,transformY:u},f(!0))},h=e=>{n&&d&&a({x:e.pageX-p.current.diffX,y:e.pageY-p.current.diffY},`move`)},g=()=>{if(n&&d){f(!1);let{transformX:t,transformY:n}=p.current;if(!(l!==t&&u!==n))return;let r=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:d}=e.current.getBoundingClientRect(),m=s%180!=0,h=Xe(m?i:r,m?r:i,o,d);h&&a({...h},`dragRebound`)}};return(0,X.useEffect)(()=>{if(t){window.addEventListener(`mouseup`,g,!1),window.addEventListener(`mousemove`,h,!1);try{window.top!==window.self&&(window.top.addEventListener(`mouseup`,g,!1),window.top.addEventListener(`mousemove`,h,!1))}catch(e){`${e}`}}return()=>{window.removeEventListener(`mouseup`,g),window.removeEventListener(`mousemove`,h);try{window.top?.removeEventListener(`mouseup`,g),window.top?.removeEventListener(`mousemove`,h)}catch{}}},[n,d,l,u,s,t]),{isMoving:d,onMouseDown:m,onMouseMove:h,onMouseUp:g,onWheel:e=>{if(!n||e.deltaY==0)return;let t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),o(i,`wheel`,e.clientX,e.clientY)}}}function Qe({src:e,isCustomPlaceholder:t,fallback:n}){let[r,i]=(0,X.useState)(t?`loading`:`normal`),a=(0,X.useRef)(!1),o=r===`error`;(0,X.useEffect)(()=>{let t=!0;return Ge(e).then(e=>{!e&&t&&i(`error`)}),()=>{t=!1}},[e]),(0,X.useEffect)(()=>{t&&!a.current?i(`loading`):o&&i(`normal`)},[e]);let s=()=>{i(`normal`)};return[e=>{a.current=!1,r===`loading`&&e?.complete&&(e.naturalWidth||e.naturalHeight)&&(a.current=!0,s())},o&&n?{src:n}:{onLoad:s,src:e},r]}function $e(e,t){let n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function et(e,t,n,r){let i=$e(e,n),a=$e(t,r);if(i===0&&a===0)return[e.x,e.y];let o=i/(i+a);return[e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)]}function tt(e,t,n,r,i,a,o){let{rotate:s,scale:c,x:l,y:u}=i,[d,f]=(0,X.useState)(!1),p=(0,X.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:`none`}),m=e=>{p.current={...p.current,...e}};return(0,X.useEffect)(()=>{let e=e=>{e.preventDefault()};return n&&t&&window.addEventListener(`touchmove`,e,{passive:!1}),()=>{window.removeEventListener(`touchmove`,e)}},[n,t]),{isTouching:d,onTouchStart:e=>{if(!t)return;e.stopPropagation(),f(!0);let{touches:n=[]}=e;n.length>1?m({point1:{x:n[0].clientX,y:n[0].clientY},point2:{x:n[1].clientX,y:n[1].clientY},eventType:`touchZoom`}):m({point1:{x:n[0].clientX-l,y:n[0].clientY-u},eventType:`move`})},onTouchMove:e=>{let{touches:t=[]}=e,{point1:n,point2:r,eventType:i}=p.current;if(t.length>1&&i===`touchZoom`){let e={x:t[0].clientX,y:t[0].clientY},i={x:t[1].clientX,y:t[1].clientY},[a,s]=et(n,r,e,i);o($e(e,i)/$e(n,r),`touchZoom`,a,s,!0),m({point1:e,point2:i,eventType:`touchZoom`})}else i===`move`&&(a({x:t[0].clientX-n.x,y:t[0].clientY-n.y},`move`),m({eventType:`move`}))},onTouchEnd:()=>{if(!n)return;if(d&&f(!1),m({eventType:`none`}),r>c)return a({x:0,y:0,scale:r},`touchZoom`);let t=e.current.offsetWidth*c,i=e.current.offsetHeight*c,{left:o,top:l}=e.current.getBoundingClientRect(),u=s%180!=0,p=Xe(u?i:t,u?t:i,o,l);p&&a({...p},`dragRebound`)}}}function nt(e){let{prefixCls:t,icon:n,onClick:r,className:i,style:a}=e;return X.createElement(`button`,{className:p(`${t}-close`,i),style:a,onClick:r},n)}function rt(e){let{prefixCls:t,showProgress:n,current:r,count:i,showSwitch:a,classNames:o,styles:s,icons:c,image:l,transform:u,countRender:d,actionsRender:f,scale:m,minScale:h,maxScale:g,onActive:_,onFlipY:v,onFlipX:y,onRotateLeft:b,onRotateRight:x,onZoomOut:S,onZoomIn:C,onClose:w,onReset:T}=e,{left:E,right:D,prev:O,next:k,flipY:A,flipX:j,rotateLeft:M,rotateRight:N,zoomOut:P,zoomIn:F}=c,I=n&&X.createElement(`div`,{className:`${t}-progress`},d?d(r+1,i):X.createElement(`bdi`,null,`${r+1} / ${i}`)),L=`${t}-actions-action`,R=({type:e,disabled:t,onClick:n,icon:r})=>X.createElement(`button`,{type:`button`,key:e,className:p(L,`${L}-${e}`,{[`${L}-disabled`]:!!t}),onClick:n,disabled:!!t,"aria-label":e},r),z=a?R({icon:O??E,onClick:()=>_(-1),type:`prev`,disabled:r===0}):void 0,B=a?R({icon:k??D,onClick:()=>_(1),type:`next`,disabled:r===i-1}):void 0,V=R({icon:A,onClick:v,type:`flipY`}),H=R({icon:j,onClick:y,type:`flipX`}),U=R({icon:M,onClick:b,type:`rotateLeft`}),W=R({icon:N,onClick:x,type:`rotateRight`}),ee=R({icon:P,onClick:S,type:`zoomOut`,disabled:m<=h}),G=R({icon:F,onClick:C,type:`zoomIn`,disabled:m===g}),te=X.createElement(`div`,{className:p(`${t}-actions`,o.actions),style:s.actions},V,H,U,W,ee,G);return X.createElement(`div`,{className:p(`${t}-footer`,o.footer),style:s.footer},I,f?f(te,{icons:{prevIcon:z,nextIcon:B,flipYIcon:V,flipXIcon:H,rotateLeftIcon:U,rotateRightIcon:W,zoomOutIcon:ee,zoomInIcon:G},actions:{onActive:_,onFlipY:v,onFlipX:y,onRotateLeft:b,onRotateRight:x,onZoomOut:S,onZoomIn:C,onReset:T,onClose:w},transform:u,current:r,total:i,image:l}):te)}function it(e){let{prefixCls:t,onActive:n,current:r,count:i,icons:{left:a,right:o,prev:s,next:c}}=e,l=`${t}-switch`,u=r===0,d=r===i-1;return X.createElement(X.Fragment,null,X.createElement(`button`,{className:p(l,`${l}-prev`,{[`${l}-disabled`]:u}),onClick:()=>n(-1),disabled:u},s??a),X.createElement(`button`,{type:`button`,className:p(l,`${l}-next`,{[`${l}-disabled`]:d}),onClick:()=>n(1),disabled:d},c??o))}function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let[i,a]=Qe({src:t,fallback:e});return X.createElement(`img`,at({ref:e=>{n.current=e,i(e)}},r,a))},st=e=>{let{prefixCls:t,rootClassName:n,src:r,alt:i,imageInfo:a,fallback:o,movable:s=!0,onClose:c,open:l,afterOpenChange:u,maskClosable:d=!0,icons:f={},closeIcon:m,getContainer:h,current:g=0,count:_=1,countRender:v,scaleStep:y=.5,minScale:b=1,maxScale:x=50,motionName:S=`fade`,imageRender:C,imgCommonProps:w,actionsRender:T,onTransform:E,onChange:D,classNames:O={},styles:k={},mousePosition:A,zIndex:j,focusTrap:M=!0}=e,N=(0,X.useRef)(),P=(0,X.useRef)(null),F=(0,X.useRef)(null),I=(0,X.useContext)(We),L=I&&_>1,R=I&&_>=1,[z,V]=(0,X.useState)(!0),{transform:H,resetTransform:U,updateTransform:W,dispatchZoomChange:G}=Je(N,b,x,E),{isMoving:te,onMouseDown:ne,onWheel:re}=Ze(N,s,l,y,H,W,G),{isTouching:ie,onTouchStart:ae,onTouchMove:K,onTouchEnd:oe}=tt(N,s,l,b,H,W,G),{rotate:se,scale:ce}=H;(0,X.useEffect)(()=>{z||V(!0)},[z]),(0,X.useEffect)(()=>{l||U(`close`)},[l]);let le=X.createElement(ot,at({},w,{width:e.width,height:e.height,imgRef:N,className:`${t}-img`,alt:i,style:{transform:`translate3d(${H.x}px, ${H.y}px, 0) scale3d(${H.flipX?`-`:``}${ce}, ${H.flipY?`-`:``}${ce}, 1) rotate(${se}deg)`,transitionDuration:(!z||ie)&&`0s`},fallback:o,src:r,onWheel:re,onMouseDown:ne,onDoubleClick:e=>{l&&(ce===1?G(1+y,`doubleClick`,e.clientX,e.clientY):W({x:0,y:0,scale:1},`doubleClick`))},onTouchStart:ae,onTouchMove:K,onTouchEnd:oe,onTouchCancel:oe})),ue={url:r,alt:i,...a},de=()=>{G(1+y,`zoomIn`)},fe=()=>{G(1/(1+y),`zoomOut`)},pe=()=>{W({rotate:se+90},`rotateRight`)},me=()=>{W({rotate:se-90},`rotateLeft`)},ge=()=>{W({flipX:!H.flipX},`flipX`)},ve=()=>{W({flipY:!H.flipY},`flipY`)},ye=()=>{U(`reset`)},be=e=>{let t=g+e;t>=0&&t<=_-1&&(V(!1),U(e<0?`prev`:`next`),D?.(t,g))},xe=ee(e=>{if(l){let{keyCode:t}=e;L&&(t===_e.LEFT?be(-1):t===_e.RIGHT&&be(1))}});(0,X.useEffect)(()=>{if(l)return window.addEventListener(`keydown`,xe),()=>{window.removeEventListener(`keydown`,xe)}},[l]);let[Se,we]=(0,X.useState)(!1);X.useEffect(()=>{l&&we(!0)},[l]);let Te=e=>{e||(we(!1),F.current?.focus?.(),F.current=null),u?.(e)},[J,Ee]=(0,X.useState)(!1);he(()=>{l&&Ee(!0)},[l]);let De=({top:e})=>{e&&c?.()};he(()=>{l&&(F.current=document.activeElement)},[l]),Ce(M&&l&&J,()=>P.current);let Y={...k.body};return A&&(Y.transformOrigin=`${A.x}px ${A.y}px`),X.createElement(B,{open:J&&l,autoDestroy:!1,getContainer:h,autoLock:Se,onEsc:De},X.createElement(q,{motionName:S,visible:J&&l,motionAppear:!0,motionEnter:!0,motionLeave:!0,onVisibleChanged:Te},({className:e,style:r})=>{let a={...k.root,...r};return j&&(a.zIndex=j),X.createElement(`div`,{ref:P,className:p(t,n,O.root,e,{[`${t}-movable`]:s,[`${t}-moving`]:te}),style:a,role:`dialog`,"aria-modal":`true`,"aria-label":i,tabIndex:-1},X.createElement(`div`,{className:p(`${t}-mask`,O.mask),style:k.mask,onClick:d?c:void 0}),X.createElement(`div`,{className:p(`${t}-body`,O.body),style:Y},C?C(le,{transform:H,image:ue,...I?{current:g}:{}}):le),m!==!1&&m!==null&&X.createElement(nt,{prefixCls:t,icon:m===!0?f.close:m||f.close,onClick:c,className:O.close,style:k.close}),L&&X.createElement(it,{prefixCls:t,current:g,count:_,icons:f,onActive:be}),X.createElement(rt,{prefixCls:t,showProgress:R,current:g,count:_,showSwitch:L,classNames:O,styles:k,image:ue,transform:H,icons:f,countRender:v,actionsRender:T,scale:ce,minScale:b,maxScale:x,onActive:be,onFlipY:ve,onFlipX:ge,onRotateLeft:me,onRotateRight:pe,onZoomOut:fe,onZoomIn:de,onClose:c,onReset:ye}))}))},ct=[`crossOrigin`,`decoding`,`draggable`,`loading`,`referrerPolicy`,`sizes`,`srcSet`,`useMap`,`alt`,`fetchPriority`];function lt(e){let[t,n]=X.useState({}),r=X.useCallback((e,t)=>(n(n=>({...n,[e]:t})),()=>{n(t=>{let n={...t};return delete n[e],n})}),[]);return[X.useMemo(()=>e?e.map(e=>{if(typeof e==`string`)return{data:{src:e}};let t={};return Object.keys(e).forEach(n=>{[`src`,...ct].includes(n)&&(t[n]=e[n])}),{data:t}}):Object.keys(t).reduce((e,n)=>{let{canPreview:r,data:i}=t[n];return r&&e.push({data:i,id:n}),e},[]),[e,t]),r,!!e]}function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{open:c,onOpenChange:l,current:u,onChange:d,...f}=o&&typeof o==`object`?o:{},[p,m,h]=lt(a),[g,_]=ye(0,u),[v,y]=(0,X.useState)(!1),{src:b,...x}=p[g]?.data||{},[S,C]=ye(!!c,c),w=ee(e=>{C(e),e!==S&&l?.(e,{current:g})}),[T,E]=(0,X.useState)(null),D=X.useCallback((e,t,n,r)=>{let i=h?p.findIndex(e=>e.data.src===t):p.findIndex(t=>t.id===e);_(i<0?0:i),w(!0),E({x:n,y:r}),y(!0)},[p,h]);X.useEffect(()=>{S?v||_(0):y(!1)},[S]);let O=(e,t)=>{_(e),d?.(e,t)},k=()=>{w(!1),E(null)},A=X.useMemo(()=>({register:m,onPreview:D}),[m,D]);return X.createElement(We.Provider,{value:A},r,X.createElement(st,ut({"aria-hidden":!S,open:S,prefixCls:e,onClose:k,mousePosition:T,imgCommonProps:x,src:b,fallback:s,icons:i,current:g,count:p.length,onChange:O},f,{classNames:t?.popup,styles:n?.popup})))},ft=0;function pt(e,t){let[n]=X.useState(()=>(ft+=1,String(ft))),r=X.useContext(We),i={data:t,canPreview:e};return X.useEffect(()=>{if(r)return r.register(n,i)},[]),X.useEffect(()=>{r&&r.register(n,i)},[e,t]),n}function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{prefixCls:t=`rc-image`,previewPrefixCls:n=`${t}-preview`,rootClassName:r,className:i,style:a,classNames:o={},styles:s={},width:c,height:l,src:u,alt:d,placeholder:f,fallback:m,preview:h=!0,onClick:g,onError:_,onKeyDown:v,...y}=e,b=(0,X.useContext)(We),x=!!h,{src:S,open:C,onOpenChange:w,cover:T,rootClassName:E,...D}=h&&typeof h==`object`?h:{},O=typeof T==`object`&&T.placement&&T.placement||`center`,k=typeof T==`object`&&T.coverNode?T.coverNode:T,[A,j]=ye(!!C,C),[M,N]=(0,X.useState)(null),P=e=>{j(e),w?.(e)},F=()=>{P(!1)},I=f&&f!==!0,L=S??u,[R,z,B]=Qe({src:u,isCustomPlaceholder:I,fallback:m}),V=(0,X.useMemo)(()=>{let t={};return ct.forEach(n=>{e[n]!==void 0&&(t[n]=e[n])}),t},ct.map(t=>e[t])),H=pt(x,(0,X.useMemo)(()=>({...V,src:L}),[L,V])),U=e=>{let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;b?b.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0)),g?.(e)},W=e=>{if(v?.(e),x&&(e.key===`Enter`||e.key===` `)){e.preventDefault();let t=e.target.getBoundingClientRect(),n=t.x+t.width/2,r=t.y+t.height/2;b?b.onPreview(H,L,n,r):(N({x:n,y:r}),P(!0))}};return X.createElement(X.Fragment,null,X.createElement(`div`,mt({},y,{className:p(t,r,o.root,{[`${t}-error`]:B===`error`}),onClick:x?U:g,role:x?`button`:y.role,tabIndex:x&&y.tabIndex==null?0:y.tabIndex,"aria-label":x?y[`aria-label`]??d:y[`aria-label`],onKeyDown:W,style:{width:c,height:l,...s.root}}),X.createElement(`img`,mt({},V,{className:p(`${t}-img`,{[`${t}-img-placeholder`]:f===!0},o.image,i),style:{height:l,...s.image,...a},ref:R},z,{width:c,height:l,onError:_})),B===`loading`&&X.createElement(`div`,{"aria-hidden":`true`,className:`${t}-placeholder`},f),T!==!1&&x&&X.createElement(`div`,{className:p(`${t}-cover`,o.cover,`${t}-cover-${O}`),style:{display:a?.display===`none`?`none`:void 0,...s.cover}},k)),!b&&x&&X.createElement(st,mt({"aria-hidden":!A,open:A,prefixCls:n,onClose:F,mousePosition:M,src:L,alt:d,imageInfo:{width:c,height:l},fallback:m,imgCommonProps:V},D,{classNames:o?.popup,styles:s?.popup,rootClassName:p(E,r)})))};ht.PreviewGroup=dt;var gt=ht,_t=(e,t,n,r,i,a,o)=>{let[s]=pe(`ImagePreview`,e?.zIndex),[c,l,u]=de(e?.mask,t?.mask,`${n}-preview`);return X.useMemo(()=>{if(!e)return e;let{cover:d,getContainer:f,closeIcon:m,rootClassName:h}=e,{closeIcon:g}=t??{};return{motionName:y(`${n}-preview`,`fade`),...e,...o?{cover:d??o}:{},icons:a,getContainer:f??i,zIndex:s,closeIcon:m??g,rootClassName:p(r,h),mask:c,maskClosable:u,blurClassName:l.mask}},[e,t,n,r,i,o,a,s,c,u,l])};function vt(e){return u(e)&&!(0,X.isValidElement)(e)}function yt(e){return(0,X.useMemo)(()=>!e||!vt(e)?{}:typeof e.progress==`boolean`?{progressConfig:e.progress?{}:void 0}:{progressConfig:e.progress},[e])}function bt(e){return(0,X.isValidElement)(e)?[e,void 0]:typeof e==`boolean`||u(e)?[void 0,e]:[void 0,void 0]}function xt(e){let t=(0,X.useMemo)(()=>typeof e==`boolean`?e?{}:null:u(e)?e:{},[e]);return(0,X.useMemo)(()=>{if(!t)return[t,``,``];let{open:e,onOpenChange:n,cover:r,actionsRender:i,visible:a,onVisibleChange:o,rootClassName:s,maskClassName:c,mask:l,forceRender:u,destroyOnClose:d,toolbarRender:f,...p}=t,m;n?m=n:o&&(m=(e,t)=>{let{current:n}=t||{};n===void 0?o(e,!e):o(e,!e,n)});let[h,g]=bt(l);return[{...p,open:e??a,onOpenChange:m,cover:r??h,mask:g,actionsRender:i??f},s,c]},[t])}var St=new P(`antImageProgressActive`,{"0%":{backgroundPosition:`200% 0`},"100%":{backgroundPosition:`-200% 0`}}),Ct=(e,t,n,r=`translate(0%, 0%)`,i=.8)=>new P(e,{"0%":{transform:r,opacity:i},"50%":{transform:t,opacity:n},"100%":{transform:r,opacity:i}}),wt=Ct(`antImageInkFlow1`,`translate(15%, -20%) scale(1.25)`,.5),Tt=Ct(`antImageInkFlow2`,`translate(-18%, 15%) scale(0.85)`,.9,`translate(0%, 0%) scale(1.1)`,.7),Et=Ct(`antImageInkFlow3`,`translate(8%, 10%) scale(1.15)`,.8,`translate(0%, 0%) scale(0.85)`,.65),Dt=e=>({position:e||`absolute`,inset:0}),Ot=e=>{let{componentCls:t,motionDurationSlow:n,colorTextLightSolid:r}=e;return{[t]:{[`${t}-cover`]:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,color:r,background:new h(`#000`).setA(.3).toRgbString(),cursor:`pointer`,opacity:0,transition:`opacity ${n}`},"&:hover, &:focus-visible":{[`${t}-cover`]:{opacity:1}},[`${t}-cover-top`]:{inset:`0 0 auto 0`,justifyContent:`center`},[`${t}-cover-bottom`]:{inset:`auto 0 0 0`,justifyContent:`center`}}}},kt=e=>{let{componentCls:t,motionDurationMid:n,motionEaseInOut:r,progressAnimationDuration:i}=e,a={position:`absolute`,width:`150%`,height:`150%`,left:`-25%`,top:`-25%`,animationTimingFunction:r,animationIterationCount:`infinite`,pointerEvents:`none`,willChange:`transform, opacity`};return{[`${t}-progress-wrapper`]:{position:`relative`,display:`inline-block`,overflow:`hidden`,borderRadius:`inherit`,backgroundColor:e.colorBgBase,backdropFilter:`blur(8px)`,[`${t}-progress-ink-1`]:{...a,background:`radial-gradient(ellipse 65% 55% at 25% 30%, rgba(100, 180, 255, 0.98) 0%, transparent 55%)`,animationName:wt,animationDuration:i,filter:`blur(40px)`,"&::before":{content:`""`,...a,background:`radial-gradient(ellipse 60% 65% at 75% 45%, rgba(180, 140, 255, 0.95) 0%, transparent 50%)`,animationName:Tt,animationDuration:`calc(${i} + 2s)`,animationDelay:`-1s`,filter:`blur(45px)`},"&::after":{content:`""`,...a,background:`radial-gradient(ellipse 55% 50% at 50% 70%, rgba(100, 220, 220, 0.9) 0%, transparent 45%)`,animationName:Et,animationDuration:`calc(${i} + 0.5s)`,animationDelay:`-2s`,filter:`blur(38px)`}},[`${t}-progress-ink-2`]:{...a,background:`radial-gradient(ellipse 45% 40% at 60% 20%, rgba(255, 150, 200, 0.88) 0%, transparent 45%)`,animationName:Et,animationDuration:`calc(${i} + 1.5s)`,animationDelay:`-3s`,filter:`blur(42px)`,"&::before":{content:`""`,...a,background:`radial-gradient(ellipse 50% 55% at 20% 75%, rgba(160, 190, 255, 0.88) 0%, transparent 50%)`,animationName:wt,animationDuration:`calc(${i} + 2.5s)`,animationDelay:`-2.5s`,filter:`blur(35px)`}},[`${t}-progress-content`]:{position:`absolute`,top:`50%`,left:0,transform:`translateY(-50%)`,display:`flex`,flexDirection:`column`,alignItems:`center`,width:`100%`,paddingInline:e.paddingLG,textAlign:`center`,fontSize:e.fontSize,color:e.colorTextSecondary,zIndex:1},[`${t}-progress-rail`]:{width:`100%`,height:6,marginTop:e.marginSM,backgroundColor:`rgba(255, 255, 255, 0.5)`,borderRadius:e.borderRadiusXS,overflow:`hidden`,backdropFilter:`blur(4px)`,"&::before":{content:`""`,display:`block`,height:`100%`,width:`var(--progress-percent, 0%)`,background:`linear-gradient(90deg, rgba(120, 170, 255, 0.85) 0%, rgba(160, 150, 245, 0.85) 40%, rgba(130, 200, 220, 0.85) 60%, rgba(120, 170, 255, 0.85) 100%)`,backgroundSize:`200% 100%`,borderRadius:e.borderRadiusXS/2,transition:`width ${n} ease`,animationName:St,animationDuration:i,animationTimingFunction:`linear`,animationIterationCount:`infinite`}},[`${t}-progress-indicator`]:{marginTop:e.marginXS}}}},At=e=>{let{motionEaseOut:t,previewCls:n,motionDurationSlow:r,componentCls:i,colorBgMask:a,marginXL:o,marginSM:s,margin:c,colorTextLightSolid:l,paddingSM:u,paddingLG:d,previewOperationHoverColor:f,previewOperationColorDisabled:p,previewOperationSize:m,zIndexPopup:g}=e,_=new h(a).setA(.1),v=_.clone().setA(.2),y={position:`absolute`,color:l,backgroundColor:_.toRgbString(),borderRadius:`50%`,padding:u,outline:0,border:0,cursor:`pointer`,transition:`all ${r}`,display:`flex`,fontSize:m,"&:hover":{backgroundColor:v.toRgbString()},"&:active":{backgroundColor:_.toRgbString()},"&:focus-visible":ge(e)};return{[`${i}-preview`]:{textAlign:`center`,inset:0,position:`fixed`,userSelect:`none`,zIndex:g,[`${n}-mask`]:{inset:0,position:`absolute`,background:a,backdropFilter:`blur(0px)`,transition:`backdrop-filter ${r}`,[`&${i}-preview-mask-blur`]:{backdropFilter:`blur(4px)`},[`&${i}-preview-mask-hidden`]:{display:`none`}},[`${n}-body`]:{...Dt(),"pointer-events":`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,"> *":{pointerEvents:`auto`}},[`${n}-img`]:{maxWidth:`100%`,maxHeight:`70%`,verticalAlign:`middle`,transform:`scale3d(1, 1, 1)`,transition:`transform ${r} ${t} 0s`},[`&-movable ${n}-img`]:{cursor:`grab`},[`&-moving ${n}-img`]:{cursor:`grabbing`},[`${n}-close`]:{...y,top:s,insetInlineEnd:s},[`${n}-switch`]:{...y,top:`50%`,transform:`translateY(-50%)`,"&-disabled":{"&, &:hover, &:active":{color:p,background:`transparent`,cursor:`not-allowed`}},"&-prev":{insetInlineStart:s},"&-next":{insetInlineEnd:s}},[`${n}-footer`]:{position:`absolute`,bottom:o,left:{_skip_check_:!0,value:`50%`},display:`flex`,flexDirection:`column`,alignItems:`center`,color:e.previewOperationColor,transform:`translateX(-50%)`,gap:c},[`${n}-actions`]:{display:`flex`,gap:u,padding:`0 ${w(d)}`,backgroundColor:_.toRgbString(),borderRadius:100,fontSize:m,"&-action":{color:`inherit`,background:`transparent`,border:0,font:`inherit`,padding:u,cursor:`pointer`,transition:`all ${r}`,display:`flex`,[`&:not(${n}-actions-action-disabled):hover`]:{color:f},"&:focus-visible":ge(e),"&-disabled":{color:p,cursor:`not-allowed`}}}}}},jt=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,display:`inline-block`,...oe(e),[`${t}-img`]:{width:`100%`,height:`auto`,verticalAlign:`middle`},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:`url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')`,backgroundRepeat:`no-repeat`,backgroundPosition:`center center`,backgroundSize:`30%`},[`${t}-placeholder`]:{...Dt()}}}},Mt=e=>{let{previewCls:t,motionDurationSlow:n}=e;return{[t]:{"&-fade":{transition:`opacity ${n}`,"&-enter, &-appear":{opacity:0,[`${t}-body`]:{transform:`scale(0)`},"&-active":{opacity:1,[`${t}-body`]:{transform:`scale(1)`,transition:`transform ${n}`}}},"&-leave":{opacity:1,"&-active":{opacity:0,[`${t}-body`]:{transform:`scale(0)`,transition:`transform ${n}`}}}}}}},Nt=ie(`Image`,e=>{let t=C(e,{previewCls:`${e.componentCls}-preview`,imagePreviewSwitchSize:e.controlHeightLG});return[jt(t),Ot(t),kt(t),At(t),Mt(t)]},e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new h(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new h(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new h(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5,progressAnimationDuration:`3s`})),Pt={rotateLeft:X.createElement(F,null),rotateRight:X.createElement(N,null),zoomIn:X.createElement(f,null),zoomOut:X.createElement(me,null),close:X.createElement(te,null),left:X.createElement(g,null),right:X.createElement(ae,null),flipX:X.createElement(fe,null),flipY:X.createElement(fe,{rotate:90})},Ft=({previewPrefixCls:e,preview:t,classNames:n,styles:r,...i})=>{let{getPrefixCls:a,getPopupContainer:o,direction:s,preview:c,classNames:l,styles:u}=R(`image`),d=a(`image`,e),f=`${d}-preview`,m=k(d),[h,_]=Nt(d,m),v=p(h,_,m),[y,b,x]=xt(t),[S,C,w]=xt(c),T=X.useMemo(()=>({...Pt,left:s===`rtl`?X.createElement(ae,null):X.createElement(g,null),right:s===`rtl`?X.createElement(g,null):X.createElement(ae,null)}),[s]),E=_t(y,S,d,v,o,Pt),{mask:D,blurClassName:O}=E??{},A={...i,classNames:n,styles:r},[j,M]=V([l,n,{cover:p(w,x),popup:{root:p(C,b),mask:p({[`${d}-preview-mask-hidden`]:!D},O)}}],[u,r],{props:A},{popup:{_default:`root`}});return X.createElement(gt.PreviewGroup,{preview:E,previewPrefixCls:f,icons:T,...i,classNames:j,styles:M})},It={position:`absolute`,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,border:0},Lt=e=>{let{prefixCls:t,percent:n,render:r,classNames:i,styles:a,rootClassName:o,rootStyle:s,width:c,height:l}=e,u=L(n)&&Number.isFinite(n),d=u?Math.max(0,Math.min(100,Math.round(n))):0,f=u?{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d,"aria-label":`${d}%`}:{"aria-busy":!0},m=u?X.createElement(`div`,{className:p(`${t}-progress-rail`,i?.rail),style:{...a?.rail,"--progress-percent":`${d}%`}}):null,h=r?r(m,d):X.createElement(X.Fragment,null,m,u&&X.createElement(`div`,{className:p(`${t}-progress-indicator`,i?.indicator),style:a?.indicator},`${d}%`));return X.createElement(`div`,{className:p(t,`${t}-progress-wrapper`,i?.root,o),style:{width:c,height:l,...s,...a?.root},...f},!u&&X.createElement(`span`,{role:`status`,"aria-live":`polite`,style:It},`Loading`),X.createElement(`div`,{className:`${t}-progress-ink-1`}),X.createElement(`div`,{className:`${t}-progress-ink-2`}),X.createElement(`div`,{className:p(`${t}-progress-content`,i?.content),style:a?.content},h))},Rt=e=>{let{prefixCls:t,preview:n,className:r,rootClassName:i,style:a,styles:o,classNames:s,wrapperStyle:c,fallback:l,placeholder:u,...d}=e,{getPrefixCls:f,getPopupContainer:m,className:h,style:g,preview:_,styles:v,classNames:y,fallback:b}=R(`image`),x=f(`image`,t),S=k(x),[C,w]=Nt(x,S),T=p(i,C,w,S),E=p(r,C,h),[D,O,A]=xt(n),[j,M,N]=xt(_),P=_t(D,j,x,T,m,Pt,!0),F={...e,preview:P},I=X.useMemo(()=>({cover:p(N,A),popup:{root:p(M,O)}}),[O,A,M,N]),{mask:L,blurClassName:z}=P??{},B=X.useMemo(()=>({mask:p({[`${x}-preview-mask-hidden`]:!L},z)}),[L,x,z]),[H,U]=V(X.useMemo(()=>[y,s,I,{popup:B}],[y,s,I,B]),[v,{root:c},o],{props:F},{popup:{_default:`root`},placeholder:{}}),W={...g,...a},ee=l??b,{progressConfig:G}=yt(u),te=G!==void 0,{percent:ne,render:re}=G||{},ie=H?.placeholder?.progress,ae=U?.placeholder?.progress,{width:K,height:oe,src:se,...ce}=d,le=vt(u)?void 0:u,ue=le&&!se,de=ue?e=>le:re;return te||ue?X.createElement(Lt,{prefixCls:x,percent:ne,render:de,classNames:ie,styles:ae,rootClassName:p(T,E),rootStyle:{...W,...U?.root},width:K,height:oe}):X.createElement(gt,{prefixCls:x,preview:P||!1,rootClassName:T,className:E,style:W,fallback:ee,placeholder:le,width:K,height:oe,src:se,...ce,classNames:H,styles:U})};Rt.PreviewGroup=Ft;var $=Te();function zt(e){return Y({url:`/system/file/group`,method:`get`,params:e})}function Bt(e){return Y({url:`/system/file/group`,method:`post`,data:e})}function Vt(e){return Y({url:`/system/file/group/${e.id}`,method:`put`,data:e})}function Ht(e){return Y({url:`/system/file/group/${e}`,method:`delete`})}function Ut(e){return Y({url:`/system/file/list`,method:`get`,params:e})}function Wt(e){return Y({url:`/system/file/list/trashed`,method:`get`,params:e})}function Gt(e,t,n){let r=new FormData;return r.append(`file`,e),r.append(`group_id`,t.toString()),Y({timeout:0,url:`/system/file/list/upload`,method:`post`,data:r,headers:{"Content-Type":`multipart/form-data`},onUploadProgress:e=>{n&&e.total&&n(Math.round(e.loaded*100/e.total))}})}function Kt(e){return Y({url:`/system/file/list/${e}`,method:`delete`})}function qt(e){return Y({url:`/system/file/list/batch/delete`,method:`delete`,data:{ids:e}})}function Jt(e){return Y({url:`/system/file/list/force-delete/${e}`,method:`delete`})}function Yt(e){return Y({url:`/system/file/list/batch/force-delete`,method:`delete`,data:{ids:e}})}function Xt(e){return Y({url:`/system/file/list/restore/${e}`,method:`post`})}function Zt(e){return Y({url:`/system/file/list/batch/restore`,method:`post`,data:{ids:e}})}function Qt(e,t){return Y({url:`/system/file/list/copy`,method:`post`,data:{group_id:t,ids:e}})}function $t(e,t){return Y({url:`/system/file/list/move`,method:`post`,data:{group_id:t,ids:e}})}function en(e,t){return Y({url:`/system/file/list/rename/${e}`,method:`put`,data:{name:t}})}function tn(){return Y({url:`/system/file/list/clean/trashed`,method:`delete`})}var nn=S(se(),1),rn=Se(),{Title:an,Text:on}=we,sn=()=>{let{t:u}=re(),[f,p]=(0,X.useState)([]),[m,h]=(0,X.useState)(new Map),[g,y]=(0,X.useState)(0),[S,C]=(0,X.useState)(null),w=(0,X.useRef)(null),[T,D]=(0,X.useState)(),[k,j]=(0,X.useState)(!0),[N,P]=(0,X.useState)([]),[F,L]=(0,X.useState)([]),[R,B]=(0,X.useState)(!1),[V,H]=(0,X.useState)(!1),[U,ee]=(0,X.useState)(!1),[G,te]=(0,X.useState)(0),[ie,ae]=(0,X.useState)({current:1,pageSize:10,total:0}),[oe,se]=(0,X.useState)(!1),[de,fe]=(0,X.useState)(),[pe,me]=(0,X.useState)(),[he,ge]=(0,X.useState)(0),[_e,ye]=(0,X.useState)(!1),[be,Se]=(0,X.useState)(null),[Ce,Te]=(0,X.useState)(``),[q,J]=(0,X.useState)([]),[Y,Oe]=(0,X.useState)([]),[Me,Ne]=(0,X.useState)(!1),[Pe,Fe]=(0,X.useState)(!1),[Ie,Le]=(0,X.useState)({current:1,pageSize:10,total:0}),[Re,ze]=(0,X.useState)(!1),[Z,Be]=(0,X.useState)(null),Ve=async()=>{try{j(!0);let{data:e}=await zt(T?{keywordSearch:T}:void 0),t=e.data||[];p(t);let n=new Map,r=e=>{e.forEach(e=>{n.set(e.id,e),e.children&&r(e.children)})};r(t),h(n)}finally{j(!1)}},Q=async(e=1,t=20)=>{try{B(!0),J([]);let{data:n}=await Ut({group_id:Number(g)||0,page:e,pageSize:t});P(n.data?.data||[]),ae({current:n.data?.current_page||e,pageSize:n.data?.per_page||t,total:n.data?.total||0})}finally{B(!1)}},He=async(e=1,t=10)=>{try{Ne(!0),J([]);let{data:n}=await Wt({page:e,pageSize:t});Oe(n.data?.data||[]),Le({current:n.data?.current_page||e,pageSize:n.data?.per_page||t,total:n.data?.total||0})}finally{Ne(!1)}};(0,X.useEffect)(()=>{Ve()},[T]),(0,X.useEffect)(()=>{Q()},[g]);let We=(0,X.useMemo)(()=>{let e=t=>t.map(t=>({key:t.id,title:t.name,icon:(0,$.jsx)(ce,{}),children:t.children?e(t.children):void 0}));return T?e(f):[{key:0,title:u(`system.file.root`),icon:(0,$.jsx)(ce,{}),children:e(f)}]},[f]),Ge=e=>{e.length>0&&y(e[0])},Ke=e=>{C(null),w.current?.resetFields(),w.current?.setFieldsValue({parent_id:e}),w.current?.open()},qe=e=>{C(e),w.current?.setFieldsValue(e),w.current?.open()},Je=async e=>{let t=!!S;return await(t?Vt({...e,id:S.id}):Bt(e)),_.success(t?u(`system.file.saveFolderSuccess`,{action:u(`system.file.actionEdit`)}):u(`system.file.saveFolderSuccess`,{action:u(`system.file.actionAdd`)})),w.current?.close(),await Ve(),!0},Ye=async e=>{window.$modal?.confirm({title:u(`system.file.confirmDeleteFolder`),content:u(`system.file.deleteFolderHint`),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Ht(e),_.success(u(`system.file.deleteFolderSuccess`)),g===e&&y(0),await Ve()}})},Xe=async()=>{if(!F.length)return _.warning(u(`system.file.selectFileWarning`));try{ee(!0);for(let e of F)await Gt(e.originFileObj,Number(g),te);_.success(u(`system.file.uploadSuccess`)),H(!1),L([]),te(0),await Q()}finally{ee(!1)}},Ze=async e=>{window.$modal?.confirm({title:u(`system.file.confirmDelete`),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Kt(e),_.success(u(`system.file.deleteSuccess`)),await Q()}})},Qe=async()=>{if(!q.length)return _.warning(u(`system.file.noSelected`));window.$modal?.confirm({title:u(`system.file.confirmBatchDelete`,{count:q.length}),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await qt(q),_.success(u(`system.file.batchDeleteSuccess`)),await Q()}})},$e=async()=>{if(!pe||(0,rn.isArray)(pe)&&pe.length<1)return _.warning(u(`system.file.noSelected`));de===`move`?(await $t(pe,he),_.success(u(`system.file.moveSuccess`))):(await Qt(pe,he),_.success(u(`system.file.moveSuccess`))),se(!1),await Q()},et=(e,t)=>{fe(t),me(e),se(!0)},tt=e=>{let t=e.currentTarget.dataset.type;console.log(t,e.currentTarget.dataset),et(q.map(e=>Number(e)),t)},nt=e=>{Se(e),Te(e.file_name||``),ye(!0)},rt=async()=>{!be?.id||!Ce.trim()||(await en(be.id,Ce.trim()),_.success(u(`system.file.renameSuccess`)),ye(!1),await Q())},it=async()=>{Fe(!0),J([]),await He()},at=async()=>{Fe(!1),J([]),await Q()},ot=async e=>{window.$modal?.confirm({title:u(`system.file.confirmForceDelete`),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Jt(e),_.success(u(`system.file.forceDeleteSuccess`)),await He()}})},st=async e=>{window.$modal?.confirm({title:u(`system.file.confirmRestore`),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Xt(e),_.success(u(`system.file.restoreSuccess`)),await He()}})},ct=async()=>{if(!q.length)return _.warning(u(`system.file.noSelected`));window.$modal?.confirm({title:u(`system.file.confirmBatchForceDelete`,{count:q.length}),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Yt(q),_.success(u(`system.file.batchForceDeleteSuccess`)),await He()}})},lt=async()=>{if(!q.length)return _.warning(u(`system.file.noSelected`));window.$modal?.confirm({title:u(`system.file.confirmBatchRestore`,{count:q.length}),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{await Zt(q),_.success(u(`system.file.batchRestoreSuccess`)),await He()}})},ut=async()=>{window.$modal?.confirm({title:u(`system.file.confirmEmptyTrash`),okText:u(`system.file.ok`),cancelText:u(`system.file.cancel`),onOk:async()=>{let{data:e}=await tn();_.success(u(`system.file.emptyTrashSuccess`,{count:e.data?.count||0})),await He()}})},dt=e=>{Be(e),ze(!0)},ft=(e=0)=>{let t=[`B`,`KB`,`MB`,`GB`],n=0,r=e;for(;r>=1024&&n<3;)r/=1024,n++;return`${r.toFixed(2)} ${t[n]}`},pt=[{value:10,color:`purple`,label:u(`system.file.type.image`)},{value:20,color:`blue`,label:u(`system.file.type.audio`)},{value:30,color:`magenta`,label:u(`system.file.type.video`)},{value:40,color:`orange`,label:u(`system.file.type.archive`)},{value:50,color:`success`,label:u(`system.file.type.document`)},{value:99,color:`error`,label:u(`system.file.type.other`)}],mt=e=>{let t=pt.find(t=>t.value===e);return(0,$.jsx)(c,{color:t?.color,children:t?.label})},ht=async e=>{let t=document.createElement(`a`);t.href=`/index.php/system/file/list/download/${e}`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},gt=[{title:u(`system.file.folderName`),dataIndex:`name`,valueType:`text`,rules:[{required:!0,message:u(`system.file.folderNameRequired`)}]},{title:u(`system.file.parentFolder`),dataIndex:`parent_id`,valueType:`treeSelect`,fieldProps:{treeData:We,fieldNames:{label:`title`,value:`key`},disabled:!0}},{title:u(`system.file.sort`),dataIndex:`sort`,valueType:`digit`,rules:[{required:!0,message:u(`system.file.sortRequired`)}],initialValue:0},{title:u(`system.file.describe`),dataIndex:`describe`,valueType:`textarea`}],_t=[{title:u(`system.file.fileName`),dataIndex:`file_name`,ellipsis:!0,width:320,render:(e,t)=>(0,$.jsx)(`a`,{onClick:()=>dt(t),children:e})},{title:u(`system.file.fileSize`),dataIndex:`file_size`,width:80,align:`center`,render:ft,sorter:!0},{title:u(`system.file.fileType`),dataIndex:`file_type`,width:80,align:`center`,render:mt},{title:u(`system.file.disk`),dataIndex:`disk`,width:80,align:`center`,render:e=>(0,$.jsx)(c,{children:e})},{title:u(`system.file.createdAt`),dataIndex:`created_at`,width:180,align:`center`,render:e=>e?(0,nn.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`},{title:u(`system.file.preview`),dataIndex:`preview_url`,width:80,align:`center`,render:e=>(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(Rt,{preview:!1,src:e,width:36,height:36})})},{title:u(`system.file.action`),width:80,key:`action`,align:`center`,fixed:`right`,render:(e,t)=>(0,$.jsx)(O,{trigger:[`click`],menu:{items:[{key:`download`,icon:(0,$.jsx)(l,{}),label:u(`system.file.download`),onClick:()=>ht(t.id)},{key:`rename`,icon:(0,$.jsx)(ne,{}),label:u(`system.file.rename`),onClick:()=>nt(t)},{key:`move`,icon:(0,$.jsx)(x,{}),label:u(`system.file.move`),onClick:()=>et(t.id,`move`)},{key:`copy`,icon:(0,$.jsx)(ue,{}),label:u(`system.file.copy`),onClick:()=>et(t.id,`copy`)},{type:`divider`},{key:`delete`,label:(0,$.jsx)(`span`,{style:{color:`#ff4d4f`},children:u(`system.file.delete`)}),icon:(0,$.jsx)(ve,{style:{color:`#ff4d4f`}}),onClick:()=>Ze(t.id)}]},children:(0,$.jsx)(K,{icon:(0,$.jsx)(d,{}),size:`small`})})}],vt=[{title:u(`system.file.fileName`),dataIndex:`file_name`,ellipsis:!0,width:180},{title:u(`system.file.fileSize`),dataIndex:`file_size`,width:80,align:`center`,render:ft,sorter:!0},{title:u(`system.file.fileType`),dataIndex:`file_type`,width:80,align:`center`,render:mt},{title:u(`system.file.disk`),dataIndex:`disk`,width:80,align:`center`,render:e=>(0,$.jsx)(c,{children:e})},{title:u(`system.file.deletedAt`),dataIndex:`deleted_at`,width:120,align:`center`,render:e=>e?(0,nn.default)(e).format(`YYYY-MM-DD HH:mm:ss`):`-`},{title:u(`system.file.action`),width:80,key:`action`,align:`center`,fixed:`right`,render:(e,t)=>(0,$.jsxs)(M,{children:[(0,$.jsx)(v,{title:u(`system.file.restore`),children:(0,$.jsx)(K,{size:`small`,icon:(0,$.jsx)(De,{}),onClick:()=>st(t.id)})}),(0,$.jsx)(v,{title:u(`system.file.forceDelete`),children:(0,$.jsx)(K,{danger:!0,size:`small`,type:`primary`,icon:(0,$.jsx)(ve,{}),onClick:()=>ot(t.id)})})]})}];return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`mb-5`,children:[(0,$.jsx)(an,{level:3,children:u(`system.file.page.title`)}),(0,$.jsx)(on,{type:`secondary`,children:u(`system.file.page.description`)})]}),(0,$.jsxs)(ke,{gutter:[16,16],children:[(0,$.jsx)(A,{xs:24,lg:4,children:(0,$.jsxs)(i,{title:(0,$.jsxs)(M,{children:[(0,$.jsx)(le,{style:{fontSize:18},name:`icon-wenjianjia`}),u(`system.file.fileFolder`)]}),variant:`borderless`,styles:{header:{paddingInline:16,paddingBlock:0,minHeight:48},body:{padding:16,minHeight:52}},children:[(0,$.jsx)(b.Search,{placeholder:u(`system.file.folderSearchPlaceholder`),style:{marginBottom:16},onSearch:e=>D(e)}),(0,$.jsx)(a,{spinning:k,description:u(`system.file.loading`),size:`small`,children:(0,$.jsx)(`div`,{style:{minHeight:200},children:f.length>0&&(0,$.jsx)(t,{showLine:!0,defaultExpandAll:!0,onSelect:Ge,treeData:We,defaultExpandedKeys:[0],selectedKeys:[g],titleRender:e=>(0,$.jsx)(O,{trigger:[`click`],menu:{items:[{key:`add`,label:(0,$.jsxs)(M,{children:[(0,$.jsx)(Ae,{}),u(`system.file.addFolder`)]}),onClick:()=>Ke(Number(e.key))},{key:`edit`,label:(0,$.jsxs)(M,{children:[(0,$.jsx)(ne,{}),u(`system.file.editFolder`)]}),disabled:Number(e.key)===0,onClick:()=>m.has(e.key)&&qe(m.get(e.key))},{type:`divider`},{key:`del`,danger:!0,icon:(0,$.jsx)(ve,{}),disabled:Number(e.key)===0,onClick:()=>Ye(Number(e.key)),label:u(`system.file.deleteFolder`)}]},children:(0,$.jsxs)(M,{children:[(0,$.jsx)(le,{name:`icon-wenjianjia`}),(0,rn.isFunction)(e.title)?e.title(e):e.title]})})})})})]})}),(0,$.jsx)(A,{xs:24,lg:20,children:(0,$.jsxs)(i,{variant:`borderless`,styles:{body:{paddingBlock:16}},children:[(0,$.jsxs)(M,{wrap:!0,style:{marginBottom:16},children:[(0,$.jsx)(K,{type:`primary`,icon:(0,$.jsx)(W,{}),children:u(`system.file.upload`),onClick:()=>H(!0)}),q.length>0&&!Pe&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(K,{danger:!0,icon:(0,$.jsx)(ve,{}),onClick:Qe,children:u(`system.file.batchDelete`)}),(0,$.jsx)(K,{icon:(0,$.jsx)(x,{}),"data-type":`move`,onClick:tt,children:u(`system.file.batchMove`)}),(0,$.jsx)(K,{icon:(0,$.jsx)(ue,{}),"data-type":`copy`,onClick:tt,children:u(`system.file.batchCopy`)})]}),(0,$.jsx)(v,{title:u(`system.file.trash`),children:(0,$.jsx)(K,{icon:(0,$.jsx)(ve,{}),onClick:()=>it(),children:u(`system.file.trash`)})}),(0,$.jsx)(v,{title:u(`system.file.refresh`),children:(0,$.jsx)(K,{icon:(0,$.jsx)(Ee,{}),onClick:()=>Q()})})]}),(0,$.jsx)(e,{columns:_t,dataSource:N,rowKey:`id`,size:`small`,loading:R,pagination:{...ie,onChange:Q,showSizeChanger:!0,showTotal:e=>u(`system.file.totalFiles`,{total:e})},rowSelection:{selectedRowKeys:q,onChange:J},scroll:{x:1e3}})]})}),(0,$.jsx)(r,{formRef:w,layoutType:`ModalForm`,columns:gt,onFinish:Je,modalProps:{title:u(S?`system.file.editFolderTitle`:`system.file.addFolderTitle`),onCancel:()=>w.current?.close()},trigger:(0,$.jsx)(`span`,{style:{display:`none`}})}),(0,$.jsxs)(je,{title:u(`system.file.trash`),open:Pe,width:860,onClose:at,children:[(0,$.jsxs)(M,{style:{marginBottom:20},children:[(0,$.jsx)(K,{disabled:q.length===0,type:`primary`,icon:(0,$.jsx)(De,{}),onClick:lt,children:u(`system.file.batchRestore`)}),(0,$.jsx)(K,{disabled:q.length===0,icon:(0,$.jsx)(ve,{}),onClick:ct,children:u(`system.file.batchForceDelete`)}),(0,$.jsx)(K,{danger:!0,type:`primary`,icon:(0,$.jsx)(ve,{}),onClick:ut,children:u(`system.file.emptyTrash`)})]}),(0,$.jsx)(e,{columns:vt,dataSource:Y,rowKey:`id`,size:`small`,loading:Me,pagination:{...Ie,onChange:He,showSizeChanger:!0,showTotal:e=>u(`system.file.totalFiles`,{total:e})},rowSelection:{selectedRowKeys:q,onChange:J},scroll:{x:800}})]}),(0,$.jsx)(z,{title:u(`system.file.uploadTitle`),open:V,onOk:Xe,onCancel:()=>{H(!1),L([]),te(0)},confirmLoading:U,children:(0,$.jsxs)(I,{layout:`vertical`,children:[(0,$.jsx)(I.Item,{label:u(`system.file.selectFile`),required:!0,children:(0,$.jsxs)(s.Dragger,{fileList:F,onChange:({fileList:e})=>L(e),beforeUpload:()=>!1,multiple:!0,style:{borderRadius:8},children:[(0,$.jsx)(`p`,{className:`ant-upload-drag-icon`,children:(0,$.jsx)(E,{style:{fontSize:48,color:`#1890ff`}})}),(0,$.jsx)(`p`,{className:`ant-upload-text`,children:u(`system.file.uploadDragText`)}),(0,$.jsx)(`p`,{className:`ant-upload-hint`,children:u(`system.file.uploadHint`)})]})}),U&&(0,$.jsx)(I.Item,{label:u(`system.file.uploadProgress`),children:(0,$.jsx)(o,{percent:G,status:`active`})})]})}),(0,$.jsxs)(z,{title:u(`system.file.renameTitle`),open:_e,onOk:rt,styles:{body:{paddingBottom:16}},onCancel:()=>ye(!1),children:[(0,$.jsx)(`div`,{style:{marginTop:16,marginBottom:16},children:u(`system.file.renameDescription`)}),(0,$.jsx)(b,{value:Ce,onChange:e=>Te(e.target.value),placeholder:u(`system.file.newFileNameRequired`)})]}),(0,$.jsxs)(z,{title:u(de===`copy`?`system.file.copyTitle`:`system.file.moveTitle`),open:oe,onOk:$e,styles:{body:{paddingBottom:16}},onCancel:()=>se(!1),children:[(0,$.jsx)(`div`,{style:{marginTop:16,marginBottom:16},children:u(de===`copy`?`system.file.copyDescription`:`system.file.moveDescription`)}),(0,$.jsx)(n,{value:he,onChange:ge,treeData:We,fieldNames:{label:`title`,value:`key`},style:{width:`100%`}})]}),(0,$.jsx)(je,{title:u(`system.file.fileDetail`),placement:`right`,width:480,open:Re,onClose:()=>ze(!1),children:Z&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`},children:(0,$.jsx)(Rt,{src:Z.preview_url,alt:Z.file_name,preview:!1})}),(0,$.jsx)(xe,{}),(0,$.jsx)(Ue,{title:u(`system.file.basicInfo`),column:1,items:[{key:`name`,label:u(`system.file.fileName`),children:Z.file_name},{key:`size`,label:u(`system.file.fileSize`),children:ft(Z.file_size)},{key:`type`,label:u(`system.file.fileType`),children:mt(Z.file_type||10)},{key:`ext`,label:u(`system.file.fileExt`),children:Z.file_ext},{key:`disk`,label:u(`system.file.storageMethod`),children:Z.disk},{key:`path`,label:u(`system.file.filePath`),children:Z.file_path},{key:`group`,label:u(`system.file.fileGroup`),children:m.get(Z.group_id||0)?.name||u(`system.file.ungrouped`)},{key:`created_at`,label:u(`system.file.createdAt`),children:Z.created_at},{key:`updated_at`,label:u(`system.file.updatedAt`),children:Z.updated_at},{key:`url`,label:u(`system.file.accessUrl`),children:(0,$.jsx)(we.Link,{copyable:!0,children:Z.file_url})}]})]})})]})]})};export{sn as default}; \ No newline at end of file diff --git a/public/assets/first-CE-aqGGa.js b/public/assets/first-CE-aqGGa.js deleted file mode 100644 index cf08a3a..0000000 --- a/public/assets/first-CE-aqGGa.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s,y as i,a,C as e,S as l,B as r}from"./index-B-sDl1ER.js";import{C as t}from"./index-CO5DzGxy.js";const x=()=>s.jsxs("div",{children:[s.jsxs(t,{style:{marginBottom:16},children:[s.jsx(i,{items:[{title:"多级菜单"},{title:"二级页面"}]}),s.jsx("h2",{style:{marginTop:16,marginBottom:0},children:"二级页面"})]}),s.jsxs(a,{gutter:[16,16],children:[s.jsx(e,{span:24,children:s.jsx(t,{style:{height:200}})}),s.jsx(e,{span:16,children:s.jsx(t,{style:{height:200}})}),s.jsx(e,{span:8,children:s.jsx(t,{style:{height:200}})})]}),s.jsx(t,{style:{marginTop:16},children:s.jsxs(l,{children:[s.jsx(r,{children:"重置"}),s.jsx(r,{type:"primary",children:"提交"})]})})]});export{x as default}; diff --git a/public/assets/fix-header-Chn14uO2.js b/public/assets/fix-header-Chn14uO2.js deleted file mode 100644 index 7822807..0000000 --- a/public/assets/fix-header-Chn14uO2.js +++ /dev/null @@ -1 +0,0 @@ -import{R as T,j as e,T as B,$ as R,S as i,B as l,Y as C,x as A,_ as n,a0 as g,a as u,C as x,a1 as j,D as h,A as b,F as p,a2 as v,I as k,i as w}from"./index-B-sDl1ER.js";import{C as c}from"./index-CO5DzGxy.js";import{F as a}from"./index-Bc7ikhKh.js";import{T as d}from"./index-C9m5qSM4.js";import{D as t}from"./index-VkcAtM9X.js";import{B as L}from"./index-CFsVFAkS.js";import{S as $,T as q}from"./Timeline-BM8lZv8J.js";const{Title:y,Text:s,Paragraph:D}=B,{TextArea:F}=k,Q=()=>{const[o,I]=T.useState("1"),z=[{time:"2026-01-01 14:30:00",approver:"王总",role:"总经理",status:"approved",statusText:"已通过",comment:"同意该采购申请,请采购部门尽快落实。",avatar:"W"},{time:"2026-01-01 11:20:00",approver:"李经理",role:"财务经理",status:"approved",statusText:"已通过",comment:"预算充足,财务审批通过。",avatar:"L"},{time:"2026-01-01 10:15:00",approver:"赵主管",role:"部门主管",status:"approved",statusText:"已通过",comment:"该采购申请合理,同意提交上级审批。",avatar:"Z"},{time:"2025-12-31 16:45:00",approver:"张三",role:"申请人",status:"submitted",statusText:"已提交",comment:"因公司业务需要,申请采购以下办公设备。",avatar:"Z"}],f=[{name:'MacBook Pro 16"',quantity:5,price:25999,total:129995},{name:'Dell 显示器 27"',quantity:10,price:2999,total:29990},{name:"人体工学椅",quantity:10,price:1899,total:18990},{name:"会议摄像头",quantity:2,price:3999,total:7998}],S=f.reduce((r,m)=>r+m.total,0);return e.jsxs("div",{children:[e.jsx(c,{style:{marginBottom:16,backgroundColor:"#fff"},children:e.jsxs(a,{justify:"space-between",align:"center",style:{marginBottom:12},children:[e.jsxs("div",{children:[e.jsxs(y,{level:3,style:{margin:0},children:[e.jsx(R,{style:{marginRight:8}}),"采购审批申请"]}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"申请单号: PR2025123100001 · 创建时间: 2025-12-31 16:45:32"})]}),e.jsxs(i,{children:[e.jsx(l,{icon:e.jsx(C,{}),children:"打印"}),e.jsx(l,{icon:e.jsx(A,{}),children:"导出"}),e.jsx(l,{type:"primary",icon:e.jsx(n,{}),children:"审批通过"}),e.jsx(l,{danger:!0,icon:e.jsx(g,{}),children:"驳回"})]})]})}),e.jsxs(c,{style:{marginBottom:16,backgroundColor:"#fff"},tabList:[{label:e.jsxs("span",{children:[e.jsx(j,{})," 审批详情"]}),key:"1"},{label:e.jsxs("span",{children:[e.jsx(w,{})," 审批进度"]}),key:"2"},{label:e.jsxs("span",{children:[e.jsx(v,{})," 审批意见"]}),key:"3"}],activeTabKey:o,onTabChange:I,children:[o==="1"&&e.jsxs(u,{gutter:[20,20],children:[e.jsxs(x,{xs:24,lg:16,children:[e.jsxs("div",{style:{marginBottom:16},children:[e.jsxs(a,{justify:"space-between",align:"center",style:{marginBottom:16},children:[e.jsx(y,{level:5,style:{margin:0},children:"申请信息"}),e.jsx(d,{color:"success",icon:e.jsx(n,{}),children:"审批通过"})]}),e.jsxs(t,{column:{xs:1,sm:2},bordered:!0,children:[e.jsx(t.Item,{label:"申请单号",children:"PR2025123100001"}),e.jsx(t.Item,{label:"申请状态",children:e.jsx(L,{status:"success",text:"已通过"})}),e.jsx(t.Item,{label:"申请人",children:"张三"}),e.jsx(t.Item,{label:"申请部门",children:"技术研发部"}),e.jsx(t.Item,{label:"联系电话",children:"138****8888"}),e.jsx(t.Item,{label:"邮箱",children:"zhangsan@example.com"}),e.jsx(t.Item,{label:"申请时间",children:"2025-12-31 16:45:32"}),e.jsx(t.Item,{label:"完成时间",children:"2026-01-01 14:30:00"}),e.jsx(t.Item,{label:"申请类型",children:e.jsx(d,{color:"blue",children:"办公设备采购"})}),e.jsx(t.Item,{label:"紧急程度",children:e.jsx(d,{color:"orange",children:"普通"})}),e.jsx(t.Item,{label:"预算编号",children:"BUD-2026-Q1-001"}),e.jsx(t.Item,{label:"成本中心",children:"CC-RD-001"}),e.jsx(t.Item,{label:"申请事由",span:2,children:"因公司业务扩展,技术研发部新增10名员工,需采购相应办公设备以满足日常工作需求。"})]})]}),e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(y,{level:5,style:{marginBottom:16},children:"采购明细"}),e.jsx("div",{style:{overflowX:"auto"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{backgroundColor:"#fafafa"},children:[e.jsx("th",{style:{padding:"12px",textAlign:"left",border:"1px solid #f0f0f0"},children:"物品名称"}),e.jsx("th",{style:{padding:"12px",textAlign:"center",border:"1px solid #f0f0f0"},children:"数量"}),e.jsx("th",{style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0"},children:"单价(¥)"}),e.jsx("th",{style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0"},children:"小计(¥)"})]})}),e.jsx("tbody",{children:f.map((r,m)=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"12px",border:"1px solid #f0f0f0"},children:r.name}),e.jsx("td",{style:{padding:"12px",textAlign:"center",border:"1px solid #f0f0f0"},children:r.quantity}),e.jsx("td",{style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0"},children:r.price.toLocaleString()}),e.jsx("td",{style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0"},children:r.total.toLocaleString()})]},m))}),e.jsx("tfoot",{children:e.jsxs("tr",{style:{backgroundColor:"#fafafa",fontWeight:600},children:[e.jsx("td",{colSpan:3,style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0"},children:"合计金额:"}),e.jsxs("td",{style:{padding:"12px",textAlign:"right",border:"1px solid #f0f0f0",color:"#f5222d",fontSize:16},children:["¥",S.toLocaleString()]})]})})]})})]}),e.jsxs("div",{children:[e.jsx(y,{level:5,style:{marginBottom:16},children:"附件材料"}),e.jsxs(i,{direction:"vertical",style:{width:"100%"},children:[e.jsxs(a,{justify:"space-between",align:"center",children:[e.jsxs(i,{children:[e.jsx(j,{style:{fontSize:16,color:"#1677ff"}}),e.jsx(s,{children:"采购申请表.pdf"}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"(2.3 MB)"})]}),e.jsx(l,{type:"link",size:"small",children:"下载"})]}),e.jsx(h,{style:{margin:"8px 0"}}),e.jsxs(a,{justify:"space-between",align:"center",children:[e.jsxs(i,{children:[e.jsx(j,{style:{fontSize:16,color:"#1677ff"}}),e.jsx(s,{children:"设备报价单.xlsx"}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"(1.8 MB)"})]}),e.jsx(l,{type:"link",size:"small",children:"下载"})]}),e.jsx(h,{style:{margin:"8px 0"}}),e.jsxs(a,{justify:"space-between",align:"center",children:[e.jsxs(i,{children:[e.jsx(j,{style:{fontSize:16,color:"#1677ff"}}),e.jsx(s,{children:"预算说明文档.docx"}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"(856 KB)"})]}),e.jsx(l,{type:"link",size:"small",children:"下载"})]})]})]})]}),e.jsxs(x,{xs:24,lg:8,children:[e.jsxs(c,{title:"申请人信息",style:{marginBottom:16},children:[e.jsxs(a,{align:"center",style:{marginBottom:16},children:[e.jsx(b,{size:48,style:{backgroundColor:"#1677ff"},children:"张三"}),e.jsxs("div",{style:{marginLeft:12},children:[e.jsx(s,{strong:!0,children:"张三"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"技术研发部 · 高级工程师"})]})]}),e.jsx(h,{style:{margin:"12px 0"}}),e.jsxs(t,{column:1,size:"small",children:[e.jsx(t.Item,{label:"员工编号",children:"EMP202301001"}),e.jsx(t.Item,{label:"联系电话",children:"138****8888"}),e.jsx(t.Item,{label:"电子邮箱",children:"zhangsan@example.com"}),e.jsx(t.Item,{label:"所属部门",children:"技术研发部"}),e.jsx(t.Item,{label:"直属领导",children:"赵主管"})]})]}),e.jsx(c,{title:"审批流程",children:e.jsx($,{direction:"vertical",current:3,items:[{title:"申请人提交",description:e.jsxs("div",{children:[e.jsx(s,{children:"张三 · 技术研发部"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"2025-12-31 16:45"})]}),status:"finish",icon:e.jsx(n,{})},{title:"部门审批",description:e.jsxs("div",{children:[e.jsx(s,{children:"赵主管 · 部门主管"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"2026-01-01 10:15"}),e.jsx("br",{}),e.jsx(d,{color:"success",style:{marginTop:4},children:"已通过"})]}),status:"finish",icon:e.jsx(n,{})},{title:"财务审批",description:e.jsxs("div",{children:[e.jsx(s,{children:"李经理 · 财务经理"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"2026-01-01 11:20"}),e.jsx("br",{}),e.jsx(d,{color:"success",style:{marginTop:4},children:"已通过"})]}),status:"finish",icon:e.jsx(n,{})},{title:"总经理审批",description:e.jsxs("div",{children:[e.jsx(s,{children:"王总 · 总经理"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"2026-01-01 14:30"}),e.jsx("br",{}),e.jsx(d,{color:"success",style:{marginTop:4},children:"已通过"})]}),status:"finish",icon:e.jsx(n,{})}]})})]})]}),o==="2"&&e.jsx(q,{style:{maxWidth:600,paddingTop:20},mode:"left",items:z.map(r=>({color:r.status==="approved"?"green":"blue",label:e.jsx(s,{type:"secondary",children:r.time}),children:e.jsxs(c,{size:"small",style:{marginBottom:8},children:[e.jsxs(a,{align:"center",style:{marginBottom:8},children:[e.jsx(b,{style:{backgroundColor:r.status==="approved"?"#52c41a":"#1677ff"},children:r.avatar}),e.jsxs("div",{style:{marginLeft:12},children:[e.jsx(s,{strong:!0,children:r.approver}),e.jsxs(s,{type:"secondary",style:{marginLeft:8,fontSize:12},children:["(",r.role,")"]}),e.jsx("br",{}),e.jsx(d,{color:r.status==="approved"?"success":"processing",style:{marginTop:4},children:r.statusText})]})]}),e.jsx(D,{type:"secondary",style:{marginBottom:0,paddingLeft:60,fontSize:13},children:r.comment})]})}))}),o==="3"&&e.jsxs(u,{gutter:[16,16],children:[e.jsx(x,{xs:24,lg:16,children:e.jsx(c,{title:"填写审批意见",children:e.jsxs(p,{layout:"vertical",children:[e.jsx(p.Item,{label:"审批结果",required:!0,children:e.jsxs(i,{children:[e.jsx(l,{type:"primary",icon:e.jsx(n,{}),size:"large",children:"通过"}),e.jsx(l,{danger:!0,icon:e.jsx(g,{}),size:"large",children:"驳回"}),e.jsx(l,{icon:e.jsx(v,{}),size:"large",children:"转审"})]})}),e.jsx(p.Item,{label:"审批意见",required:!0,children:e.jsx(F,{rows:6,placeholder:"请输入您的审批意见...",maxLength:500,showCount:!0})}),e.jsx(p.Item,{children:e.jsxs(i,{children:[e.jsx(l,{type:"primary",size:"large",children:"提交审批意见"}),e.jsx(l,{size:"large",children:"保存草稿"})]})})]})})}),e.jsx(x,{xs:24,lg:8,children:e.jsxs(c,{title:"审批提示",children:[e.jsxs(i,{direction:"vertical",style:{width:"100%"},children:[e.jsx(s,{type:"secondary",children:"• 请仔细核对申请信息和采购明细"}),e.jsx(s,{type:"secondary",children:"• 审批意见将发送给申请人和相关人员"}),e.jsx(s,{type:"secondary",children:"• 审批通过后将自动流转至下一审批节点"}),e.jsx(s,{type:"secondary",children:"• 驳回后申请人可修改后重新提交"}),e.jsx(s,{type:"secondary",children:"• 转审可将审批任务转交给其他人员"})]}),e.jsx(h,{}),e.jsx(s,{strong:!0,children:"审批时限"}),e.jsx("br",{}),e.jsx(s,{type:"secondary",style:{fontSize:12},children:"请在 2026-01-03 前完成审批"})]})})]})]})]})};export{Q as default}; diff --git a/public/assets/flex-Chz2_RPk.js b/public/assets/flex-Chz2_RPk.js new file mode 100644 index 0000000..6178547 --- /dev/null +++ b/public/assets/flex-Chz2_RPk.js @@ -0,0 +1 @@ +import{Ar as e,Bi as t,Ca as n,Ea as r,Ei as i,Li as a,Rt as o,Yi as s,Zr as c,di as l}from"./index-DThTpSPU.js";var u=r(n()),d=[`wrap`,`nowrap`,`wrap-reverse`],f=[`flex-start`,`flex-end`,`start`,`end`,`center`,`space-between`,`space-around`,`space-evenly`,`stretch`,`normal`,`left`,`right`],p=[`center`,`start`,`end`,`flex-start`,`flex-end`,`self-start`,`self-end`,`baseline`,`normal`,`stretch`],m=(e,t)=>{let n=t.wrap===!0?`wrap`:t.wrap;return{[`${e}-wrap-${n}`]:n&&d.includes(n)}},h=(e,t)=>{let n={};return p.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},g=(e,t)=>{let n={};return f.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n},_=(e,n)=>t({...m(e,n),...h(e,n),...g(e,n)}),v=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,margin:0,padding:0,"&-vertical":{flexDirection:`column`},"&-rtl":{direction:`rtl`},"&:empty":{display:`none`}}}},y=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},b=e=>{let{componentCls:t}=e,n={};return d.forEach(e=>{n[`${t}-wrap-${e}`]={flexWrap:e}}),n},x=e=>{let{componentCls:t}=e,n={};return p.forEach(e=>{n[`${t}-align-${e}`]={alignItems:e}}),n},S=e=>{let{componentCls:t}=e,n={};return f.forEach(e=>{n[`${t}-justify-${e}`]={justifyContent:e}}),n},C=l(`Flex`,e=>{let{paddingXS:t,padding:n,paddingLG:r}=e,a=i(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[v(a),y(a),b(a),x(a),S(a)]},()=>({}),{resetStyle:!1}),w=u.forwardRef((n,r)=>{let{prefixCls:i,rootClassName:l,className:d,style:f,flex:p,gap:m,vertical:h,orientation:g,component:v=`div`,children:y,...b}=n,{flex:x,direction:S,getPrefixCls:w}=u.useContext(a),T=w(`flex`,i),[E,D]=C(T),[,O]=e(g,h??x?.vertical),k=t(d,l,x?.className,T,E,D,_(T,{...n,vertical:O}),{[`${T}-rtl`]:S===`rtl`,[`${T}-gap-${m}`]:o(m),[`${T}-vertical`]:O}),A={...x?.style,...f};return c(p)&&(A.flex=p),c(m)&&!o(m)&&(A.gap=m),u.createElement(v,{ref:r,className:k,style:A,...s(b,[`justify`,`wrap`,`align`])},y)});export{w as t}; \ No newline at end of file diff --git a/public/assets/icon-selector-Bry1jSXk.js b/public/assets/icon-selector-Bry1jSXk.js deleted file mode 100644 index 02e0e51..0000000 --- a/public/assets/icon-selector-Bry1jSXk.js +++ /dev/null @@ -1 +0,0 @@ -import{r as l,j as e,T as d,S as p,w as t,D as o}from"./index-B-sDl1ER.js";import{I as r,X as u}from"./index-duCmqVUU.js";import{C as a}from"./index-CO5DzGxy.js";import"./index-BZjcF0yn.js";import"./tslib.es6-BaFViOhq.js";import"./index-D3yl9SWR.js";import"./progress-C__thZ4V.js";import"./index-C9m5qSM4.js";import"./Table-B11dzOaz.js";import"./index-CeRfFUxJ.js";import"./index-DmtjhyJb.js";const{Title:h,Paragraph:j,Text:i}=d,X=()=>{const[n,c]=l.useState(""),m=l.useRef(void 0),x=[{dataIndex:"systemName",title:"系统名称",valueType:"text",rules:[{required:!0,message:"请输入系统名称"}],fieldProps:{placeholder:"请输入系统名称"}},{dataIndex:"systemIcon",title:"系统图标",rules:[{required:!0,message:"请选择系统图标"}],fieldRender:()=>e.jsx(r,{placeholder:"请选择系统图标"})},{dataIndex:"description",title:"系统描述",valueType:"textarea",fieldProps:{placeholder:"请输入系统描述",rows:4}}];return e.jsxs("div",{children:[e.jsxs(d,{style:{margin:"12px 0 24px 0"},children:[e.jsx(h,{level:2,children:"图标选择器组件示例"}),e.jsx(j,{children:"基于 Ant Design Select + Modal + Tabs 封装的图标选择器组件,支持多分类图标选择。"})]}),e.jsxs(p,{direction:"vertical",size:"large",style:{width:"100%"},children:[e.jsxs(a,{title:"独立使用",bordered:!0,children:[e.jsx(i,{children:"基础用法:"}),e.jsx("div",{className:"mt-2",children:e.jsx(r,{value:n,onChange:s=>{c(s||""),s?t.success(`选中图标: ${s}`):t.info("已清空图标")},placeholder:"请选择图标"})}),e.jsx(o,{}),e.jsx(i,{children:"禁用状态:"}),e.jsx("div",{className:"mt-2",children:e.jsx(r,{value:"HomeOutlined",disabled:!0,placeholder:"禁用状态"})}),e.jsx(o,{}),e.jsx(i,{children:"只读状态:"}),e.jsx("div",{className:"mt-2",children:e.jsx(r,{value:"SettingOutlined",readonly:!0,placeholder:"只读状态"})}),e.jsx(i,{type:"secondary",className:"mt-2 block text-sm",children:"只读模式下不能打开选择弹窗,但可以清空"})]}),e.jsx(a,{title:"在 XinForm 中使用",bordered:!0,children:e.jsx(u,{formRef:m,columns:x,onFinish:async s=>(console.log("XinForm 提交:",s),t.success("提交成功!"),t.info(`系统图标: ${s.systemIcon}`),!0),submitter:{submitText:"提交表单",render:s=>s.submit}})})]})]})};export{X as default}; diff --git a/public/assets/image-uploader-BPDdWUpW.js b/public/assets/image-uploader-BPDdWUpW.js deleted file mode 100644 index e534cfa..0000000 --- a/public/assets/image-uploader-BPDdWUpW.js +++ /dev/null @@ -1 +0,0 @@ -import{F as l,r as c,j as e,T as d,S as g,B as m}from"./index-B-sDl1ER.js";import{I as a}from"./index-BZjcF0yn.js";import{C as p}from"./index-CO5DzGxy.js";import"./tslib.es6-BaFViOhq.js";import"./index-D3yl9SWR.js";import"./progress-C__thZ4V.js";const{Title:h,Paragraph:j}=d,C=()=>{const[t]=l.useForm(),[i,o]=c.useState(null),[r,n]=c.useState([]),x=async()=>{try{const s=await t.validateFields();console.log("Form values:",s),console.log("Single image:",i),console.log("Multiple images:",r)}catch(s){console.error("Validation failed:",s)}},u=()=>{t.resetFields(),o(null),n([])};return e.jsxs("div",{children:[e.jsxs(d,{style:{margin:"12px 0 24px 0"},children:[e.jsx(h,{level:2,children:"图片上传组件示例"}),e.jsx(j,{children:"基于 Ant Design Upload 封装的图片上传组件,支持图片剪裁、多张图片上传、尺寸限制、禁用状态等。"})]}),e.jsx(p,{title:"基础用法",style:{marginBottom:24},children:e.jsxs(l,{form:t,layout:"vertical",children:[e.jsx(l.Item,{label:"单张图片上传",name:"avatar",extra:"支持单张图片上传,最大 5MB,尺寸不超过 1920x1080",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",value:i,onChange:s=>o(s)})}),e.jsx(l.Item,{label:"多张图片上传",name:"gallery",extra:"支持最多 5 张图片上传",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"multiple",maxCount:5,value:r,onChange:s=>n(s)})}),e.jsx(l.Item,{children:e.jsxs(g,{children:[e.jsx(m,{type:"primary",onClick:x,children:"提交"}),e.jsx(m,{onClick:u,children:"重置"})]})})]})}),e.jsx(p,{title:"高级配置",style:{marginBottom:24},children:e.jsxs(l,{layout:"vertical",children:[e.jsx(l.Item,{label:"自定义尺寸限制",extra:"限制图片尺寸为 800x600,大小不超过 2MB",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",maxWidth:800,maxHeight:600,maxSize:2})}),e.jsx(l.Item,{label:"裁剪功能 - 自由裁剪",extra:"启用裁剪功能,可自由调整裁剪区域",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",croppable:!0})}),e.jsx(l.Item,{label:"裁剪功能 - 1:1 正方形",extra:"固定 1:1 比例裁剪,适合头像上传",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",croppable:!0,cropperOptions:{aspect:1}})}),e.jsx(l.Item,{label:"裁剪功能 - 圆形裁剪",extra:"圆形裁剪模式,适合头像上传",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",croppable:!0,cropperOptions:{cropShape:"round",aspect:1}})}),e.jsx(l.Item,{label:"裁剪功能 - 16:9 宽屏",extra:"固定 16:9 比例裁剪,适合横幅图片",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",croppable:!0,cropperOptions:{aspect:16/9}})}),e.jsx(l.Item,{label:"禁用状态",children:e.jsx(a,{action:"/sys/file/list/upload/image",mode:"single",disabled:!0})})]})})]})};export{C as default}; diff --git a/public/assets/index-B-sDl1ER.js b/public/assets/index-B-sDl1ER.js deleted file mode 100644 index f6bcae6..0000000 --- a/public/assets/index-B-sDl1ER.js +++ /dev/null @@ -1,326 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/analysis-BO3IE-J4.js","assets/tslib.es6-BaFViOhq.js","assets/index-CO5DzGxy.js","assets/index-CeRfFUxJ.js","assets/Table-B11dzOaz.js","assets/index-DmtjhyJb.js","assets/index-C9m5qSM4.js","assets/index-S1dQ7QE3.js","assets/monitor-D14Jvfho.js","assets/workplace-vTGxhfQ1.js","assets/index-CFsVFAkS.js","assets/icon-selector-Bry1jSXk.js","assets/index-duCmqVUU.js","assets/index-BZjcF0yn.js","assets/index-D3yl9SWR.js","assets/progress-C__thZ4V.js","assets/image-uploader-BPDdWUpW.js","assets/user-selector-Bf4m-hi5.js","assets/xin-form-CcQ8xq2p.js","assets/xin-table-SsTJg5qL.js","assets/index-rMui37zI.js","assets/index-CkiGQ3z2.js","assets/index-Bc7ikhKh.js","assets/403-D_RpddD3.js","assets/index-CwBuiwuD.js","assets/404-nJtFVjOX.js","assets/500-bhOU7TY_.js","assets/first-CE-aqGGa.js","assets/second-BzkscI87.js","assets/third-rWpa1lfh.js","assets/base-layout-DQ91AFp0.js","assets/index-VkcAtM9X.js","assets/descriptions-7UvHFHcf.js","assets/Timeline-BM8lZv8J.js","assets/fix-header-Chn14uO2.js","assets/fail-BHtOA_db.js","assets/info-6rLhG2_3.js","assets/success-CVvPs_8f.js","assets/warning-DK6ICCsI.js","assets/dept-DXcViZXZ.js","assets/useAuth-BOs-nzG0.js","assets/index-BPV0ygaW.js","assets/index-CUwz3zP2.js","assets/item-Du51lIrU.js","assets/file-B4x3U0bn.js","assets/info-CTM73LVB.js","assets/mail-CyS6Gfyv.js","assets/role-BeZ3fBY0.js","assets/rule-C6i2u_mD.js","assets/setting-CV7SVDYb.js","assets/storage-hWfzGhh2.js","assets/user-DaIHvCk0.js","assets/profile-D0iHbJ6r.js"])))=>i.map(i=>d[i]); -function yW(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();var Qf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function z7(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dm={exports:{}},Z8={};var WP;function wW(){if(WP)return Z8;WP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var d in s)d!=="key"&&(l[d]=s[d])}else l=s;return s=l.ref,{$$typeof:t,type:r,key:c,ref:s!==void 0?s:null,props:l}}return Z8.Fragment=e,Z8.jsx=n,Z8.jsxs=n,Z8}var GP;function OW(){return GP||(GP=1,dm.exports=wW()),dm.exports}var pe=OW(),fm={exports:{}},J8={},hm={exports:{}},mm={};var XP;function xW(){return XP||(XP=1,(function(t){function e(N,U){var K=N.length;N.push(U);e:for(;0>>1,te=N[Z];if(0>>1;Zs(J,K))ses(ie,J)?(N[Z]=ie,N[se]=K,Z=se):(N[Z]=J,N[W]=K,Z=W);else if(ses(ie,K))N[Z]=ie,N[se]=K,Z=se;else break e}}return U}function s(N,U){var K=N.sortIndex-U.sortIndex;return K!==0?K:N.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var m=[],h=[],v=1,b=null,y=3,O=!1,w=!1,S=!1,C=!1,z=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function H(N){for(var U=n(h);U!==null;){if(U.callback===null)r(h);else if(U.startTime<=N)r(h),U.sortIndex=U.expirationTime,e(m,U);else break;U=n(h)}}function j(N){if(S=!1,H(N),!w)if(n(m)!==null)w=!0,_||(_=!0,X());else{var U=n(h);U!==null&&q(j,U.startTime-N)}}var _=!1,P=-1,L=5,V=-1;function D(){return C?!0:!(t.unstable_now()-VN&&D());){var Z=b.callback;if(typeof Z=="function"){b.callback=null,y=b.priorityLevel;var te=Z(b.expirationTime<=N);if(N=t.unstable_now(),typeof te=="function"){b.callback=te,H(N),U=!0;break t}b===n(m)&&r(m),H(N)}else r(m);b=n(m)}if(b!==null)U=!0;else{var B=n(h);B!==null&&q(j,B.startTime-N),U=!1}}break e}finally{b=null,y=K,O=!1}U=void 0}}finally{U?X():_=!1}}}var X;if(typeof T=="function")X=function(){T(F)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,Y=Q.port2;Q.port1.onmessage=F,X=function(){Y.postMessage(null)}}else X=function(){z(F,0)};function q(N,U){P=z(function(){N(t.unstable_now())},U)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125Z?(N.sortIndex=K,e(h,N),n(m)===null&&N===n(h)&&(S?(M(P),P=-1):S=!0,q(j,K-Z))):(N.sortIndex=te,e(m,N),w||O||(w=!0,_||(_=!0,X()))),N},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(N){var U=y;return function(){var K=y;y=U;try{return N.apply(this,arguments)}finally{y=K}}}})(mm)),mm}var KP;function SW(){return KP||(KP=1,hm.exports=xW()),hm.exports}var gm={exports:{}},dn={};var YP;function $W(){if(YP)return dn;YP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function O(B){return B===null||typeof B!="object"?null:(B=y&&B[y]||B["@@iterator"],typeof B=="function"?B:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function z(B,W,J){this.props=B,this.context=W,this.refs=C,this.updater=J||w}z.prototype.isReactComponent={},z.prototype.setState=function(B,W){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,W,"setState")},z.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=z.prototype;function T(B,W,J){this.props=B,this.context=W,this.refs=C,this.updater=J||w}var H=T.prototype=new M;H.constructor=T,S(H,z.prototype),H.isPureReactComponent=!0;var j=Array.isArray;function _(){}var P={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function V(B,W,J){var se=J.ref;return{$$typeof:t,type:B,key:W,ref:se!==void 0?se:null,props:J}}function D(B,W){return V(B.type,W,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function X(B){var W={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(J){return W[J]})}var Q=/\/+/g;function Y(B,W){return typeof B=="object"&&B!==null&&B.key!=null?X(""+B.key):W.toString(36)}function q(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(_,_):(B.status="pending",B.then(function(W){B.status==="pending"&&(B.status="fulfilled",B.value=W)},function(W){B.status==="pending"&&(B.status="rejected",B.reason=W)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function N(B,W,J,se,ie){var le=typeof B;(le==="undefined"||le==="boolean")&&(B=null);var ce=!1;if(B===null)ce=!0;else switch(le){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(B.$$typeof){case t:case e:ce=!0;break;case v:return ce=B._init,N(ce(B._payload),W,J,se,ie)}}if(ce)return ie=ie(B),ce=se===""?"."+Y(B,0):se,j(ie)?(J="",ce!=null&&(J=ce.replace(Q,"$&/")+"/"),N(ie,W,J,"",function(fe){return fe})):ie!=null&&(F(ie)&&(ie=D(ie,J+(ie.key==null||B&&B.key===ie.key?"":(""+ie.key).replace(Q,"$&/")+"/")+ce)),W.push(ie)),1;ce=0;var he=se===""?".":se+":";if(j(B))for(var Oe=0;Oe"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),pm.exports=CW(),pm.exports}var kP;function zW(){if(kP)return J8;kP=1;var t=SW(),e=WH(),n=RB();function r(o){var i="https://react.dev/errors/"+o;if(1te||(o.current=Z[te],Z[te]=null,te--)}function J(o,i){te++,Z[te]=o.current,o.current=i}var se=B(null),ie=B(null),le=B(null),ce=B(null);function he(o,i){switch(J(le,i),J(ie,o),J(se,null),i.nodeType){case 9:case 11:o=(o=i.documentElement)&&(o=o.namespaceURI)?k1(o):0;break;default:if(o=i.tagName,i=i.namespaceURI)i=k1(i),o=_a(i,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}W(se),J(se,o)}function Oe(){W(se),W(ie),W(le)}function fe(o){o.memoizedState!==null&&J(ce,o);var i=se.current,u=_a(i,o.type);i!==u&&(J(ie,o),J(se,u))}function ye(o){ie.current===o&&(W(se),W(ie)),ce.current===o&&(W(ce),Rc._currentValue=K)}var ve,xe;function Re(o){if(ve===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);ve=i&&i[1]||"",xe=-1)":-1x||me[g]!==He[x]){var We=` -`+me[g].replace(" at new "," at ");return o.displayName&&We.includes("")&&(We=We.replace("",o.displayName)),We}while(1<=g&&0<=x);break}}}finally{$e=!1,Error.prepareStackTrace=u}return(u=o?o.displayName||o.name:"")?Re(u):""}function Me(o,i){switch(o.tag){case 26:case 27:case 5:return Re(o.type);case 16:return Re("Lazy");case 13:return o.child!==i&&i!==null?Re("Suspense Fallback"):Re("Suspense");case 19:return Re("SuspenseList");case 0:case 15:return _e(o.type,!1);case 11:return _e(o.type.render,!1);case 1:return _e(o.type,!0);case 31:return Re("Activity");default:return""}}function Pe(o){try{var i="",u=null;do i+=Me(o,u),u=o,o=o.return;while(o);return i}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}var Ae=Object.prototype.hasOwnProperty,ht=t.unstable_scheduleCallback,Ve=t.unstable_cancelCallback,Ze=t.unstable_shouldYield,st=t.unstable_requestPaint,mt=t.unstable_now,Ot=t.unstable_getCurrentPriorityLevel,zt=t.unstable_ImmediatePriority,pt=t.unstable_UserBlockingPriority,ct=t.unstable_NormalPriority,yt=t.unstable_LowPriority,ut=t.unstable_IdlePriority,tt=t.log,dt=t.unstable_setDisableYieldValue,ft=null,nt=null;function Ye(o){if(typeof tt=="function"&&dt(o),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(ft,o)}catch{}}var Pt=Math.clz32?Math.clz32:vn,en=Math.log,It=Math.LN2;function vn(o){return o>>>=0,o===0?32:31-(en(o)/It|0)|0}var Ft=256,Ct=262144,$t=4194304;function Vt(o){var i=o&42;if(i!==0)return i;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Jt(o,i,u){var g=o.pendingLanes;if(g===0)return 0;var x=0,R=o.suspendedLanes,A=o.pingedLanes;o=o.warmLanes;var k=g&134217727;return k!==0?(g=k&~R,g!==0?x=Vt(g):(A&=k,A!==0?x=Vt(A):u||(u=k&~o,u!==0&&(x=Vt(u))))):(k=g&~R,k!==0?x=Vt(k):A!==0?x=Vt(A):u||(u=g&~o,u!==0&&(x=Vt(u)))),x===0?0:i!==0&&i!==x&&(i&R)===0&&(R=x&-x,u=i&-i,R>=u||R===32&&(u&4194048)!==0)?i:x}function lt(o,i){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&i)===0}function gt(o,i){switch(o){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vt(){var o=$t;return $t<<=1,($t&62914560)===0&&($t=4194304),o}function rt(o){for(var i=[],u=0;31>u;u++)i.push(o);return i}function Ne(o,i){o.pendingLanes|=i,i!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Ge(o,i,u,g,x,R){var A=o.pendingLanes;o.pendingLanes=u,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=u,o.entangledLanes&=u,o.errorRecoveryDisabledLanes&=u,o.shellSuspendCounter=0;var k=o.entanglements,me=o.expirationTimes,He=o.hiddenUpdates;for(u=A&~u;0"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Mt=/[\n"\\]/g;function nn(o){return o.replace(Mt,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Es(o,i,u,g,x,R,A,k){o.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?o.type=A:o.removeAttribute("type"),i!=null?A==="number"?(i===0&&o.value===""||o.value!=i)&&(o.value=""+or(i)):o.value!==""+or(i)&&(o.value=""+or(i)):A!=="submit"&&A!=="reset"||o.removeAttribute("value"),i!=null?Ll(o,A,or(i)):u!=null?Ll(o,A,or(u)):g!=null&&o.removeAttribute("value"),x==null&&R!=null&&(o.defaultChecked=!!R),x!=null&&(o.checked=x&&typeof x!="function"&&typeof x!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.name=""+or(k):o.removeAttribute("name")}function Pl(o,i,u,g,x,R,A,k){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(o.type=R),i!=null||u!=null){if(!(R!=="submit"&&R!=="reset"||i!=null)){Ho(o);return}u=u!=null?""+or(u):"",i=i!=null?""+or(i):u,k||i===o.value||(o.value=i),o.defaultValue=i}g=g??x,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=k?o.checked:!!g,o.defaultChecked=!!g,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(o.name=A),Ho(o)}function Ll(o,i,u){i==="number"&&Wi(o.ownerDocument)===o||o.defaultValue===""+u||(o.defaultValue=""+u)}function ss(o,i,u,g){if(o=o.options,i){i={};for(var x=0;x"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c0=!1;if(Ts)try{var Zc={};Object.defineProperty(Zc,"passive",{get:function(){c0=!0}}),window.addEventListener("test",Zc,Zc),window.removeEventListener("test",Zc,Zc)}catch{c0=!1}var li=null,u0=null,Zn=null;function nr(){if(Zn)return Zn;var o,i=u0,u=i.length,g,x="value"in li?li.value:li.textContent,R=x.length;for(o=0;o=Yi),nd=" ",n2=!1;function r2(o,i){switch(o){case"keyup":return td.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rd(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Qi=!1;function Wa(o,i){switch(o){case"compositionend":return rd(i);case"keypress":return i.which!==32?null:(n2=!0,nd);case"textInput":return o=i.data,o===nd&&n2?null:o;default:return null}}function g0(o,i){if(Qi)return o==="compositionend"||!t2&&r2(o,i)?(o=nr(),Zn=u0=li=null,Qi=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:u,offset:i-o};o=g}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=od(u)}}function id(o,i){return o&&i?o===i?!0:o&&o.nodeType===3?!1:i&&i.nodeType===3?id(o,i.parentNode):"contains"in o?o.contains(i):o.compareDocumentPosition?!!(o.compareDocumentPosition(i)&16):!1:!1}function ld(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var i=Wi(o.document);i instanceof o.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)o=i.contentWindow;else break;i=Wi(o.document)}return i}function O0(o){var i=o&&o.nodeName&&o.nodeName.toLowerCase();return i&&(i==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||i==="textarea"||o.contentEditable==="true")}var Nl=Ts&&"documentMode"in document&&11>=document.documentMode,Se=null,qe=null,Ie=null,jt=!1;function rn(o,i,u){var g=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;jt||Se==null||Se!==Wi(g)||(g=Se,"selectionStart"in g&&O0(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Ie&&Fl(Ie,g)||(Ie=g,g=Y1(qe,"onSelect"),0>=A,x-=A,ls=1<<32-Pt(i)+x|u<fn?(zn=_t,_t=null):zn=_t.sibling;var Bn=je(ze,_t,Te[fn],Ke);if(Bn===null){_t===null&&(_t=zn);break}o&&_t&&Bn.alternate===null&&i(ze,_t),we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn,_t=zn}if(fn===Te.length)return u(ze,_t),Tn&&Ka(ze,fn),At;if(_t===null){for(;fnfn?(zn=_t,_t=null):zn=_t.sibling;var Vi=je(ze,_t,Bn.value,Ke);if(Vi===null){_t===null&&(_t=zn);break}o&&_t&&Vi.alternate===null&&i(ze,_t),we=R(Vi,we,fn),Vn===null?At=Vi:Vn.sibling=Vi,Vn=Vi,_t=zn}if(Bn.done)return u(ze,_t),Tn&&Ka(ze,fn),At;if(_t===null){for(;!Bn.done;fn++,Bn=Te.next())Bn=Qe(ze,Bn.value,Ke),Bn!==null&&(we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn);return Tn&&Ka(ze,fn),At}for(_t=g(_t);!Bn.done;fn++,Bn=Te.next())Bn=Fe(_t,ze,fn,Bn.value,Ke),Bn!==null&&(o&&Bn.alternate!==null&&_t.delete(Bn.key===null?fn:Bn.key),we=R(Bn,we,fn),Vn===null?At=Bn:Vn.sibling=Bn,Vn=Bn);return o&&_t.forEach(function(um){return i(ze,um)}),Tn&&Ka(ze,fn),At}function er(ze,we,Te,Ke){if(typeof Te=="object"&&Te!==null&&Te.type===S&&Te.key===null&&(Te=Te.props.children),typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case O:e:{for(var At=Te.key;we!==null;){if(we.key===At){if(At=Te.type,At===S){if(we.tag===7){u(ze,we.sibling),Ke=x(we,Te.props.children),Ke.return=ze,ze=Ke;break e}}else if(we.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===L&&Vo(At)===we.type){u(ze,we.sibling),Ke=x(we,Te.props),Bo(Ke,Te),Ke.return=ze,ze=Ke;break e}u(ze,we);break}else i(ze,we);we=we.sibling}Te.type===S?(Ke=el(Te.props.children,ze.mode,Ke,Te.key),Ke.return=ze,ze=Ke):(Ke=h2(Te.type,Te.key,Te.props,null,ze.mode,Ke),Bo(Ke,Te),Ke.return=ze,ze=Ke)}return A(ze);case w:e:{for(At=Te.key;we!==null;){if(we.key===At)if(we.tag===4&&we.stateNode.containerInfo===Te.containerInfo&&we.stateNode.implementation===Te.implementation){u(ze,we.sibling),Ke=x(we,Te.children||[]),Ke.return=ze,ze=Ke;break e}else{u(ze,we);break}else i(ze,we);we=we.sibling}Ke=i1(Te,ze.mode,Ke),Ke.return=ze,ze=Ke}return A(ze);case L:return Te=Vo(Te),er(ze,we,Te,Ke)}if(q(Te))return Lt(ze,we,Te,Ke);if(X(Te)){if(At=X(Te),typeof At!="function")throw Error(r(150));return Te=At.call(Te),Xt(ze,we,Te,Ke)}if(typeof Te.then=="function")return er(ze,we,tc(Te),Ke);if(Te.$$typeof===T)return er(ze,we,bo(ze,Te),Ke);va(ze,Te)}return typeof Te=="string"&&Te!==""||typeof Te=="number"||typeof Te=="bigint"?(Te=""+Te,we!==null&&we.tag===6?(u(ze,we.sibling),Ke=x(we,Te),Ke.return=ze,ze=Ke):(u(ze,we),Ke=Wl(Te,ze.mode,Ke),Ke.return=ze,ze=Ke),A(ze)):u(ze,we)}return function(ze,we,Te,Ke){try{Ya=0;var At=er(ze,we,Te,Ke);return ec=null,At}catch(_t){if(_t===kl||_t===d1)throw _t;var Vn=na(29,_t,null,ze.mode);return Vn.lanes=Ke,Vn.return=ze,Vn}}}var vi=yd(!0),E0=yd(!1),wo=!1;function us(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function w2(o,i){o=o.updateQueue,i.updateQueue===o&&(i.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function bi(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ao(o,i,u){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(Nn&2)!==0){var x=g.pending;return x===null?i.next=i:(i.next=x.next,x.next=i),g.pending=i,i=o1(o),x0(o,null,u),i}return ki(o,g,i,u),o1(o)}function f1(o,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194048)!==0)){var g=i.lanes;g&=o.pendingLanes,u|=g,i.lanes=u,at(o,u)}}function O2(o,i){var u=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,u===g)){var x=null,R=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};R===null?x=R=A:R=R.next=A,u=u.next}while(u!==null);R===null?x=R=i:R=R.next=i}else x=R=i;u={baseState:g.baseState,firstBaseUpdate:x,lastBaseUpdate:R,shared:g.shared,callbacks:g.callbacks},o.updateQueue=u;return}o=u.lastBaseUpdate,o===null?u.firstBaseUpdate=i:o.next=i,u.lastBaseUpdate=i}var Ur=!1;function sl(){if(Ur){var o=Jl;if(o!==null)throw o}}function nc(o,i,u,g){Ur=!1;var x=o.updateQueue;wo=!1;var R=x.firstBaseUpdate,A=x.lastBaseUpdate,k=x.shared.pending;if(k!==null){x.shared.pending=null;var me=k,He=me.next;me.next=null,A===null?R=He:A.next=He,A=me;var We=o.alternate;We!==null&&(We=We.updateQueue,k=We.lastBaseUpdate,k!==A&&(k===null?We.firstBaseUpdate=He:k.next=He,We.lastBaseUpdate=me))}if(R!==null){var Qe=x.baseState;A=0,We=He=me=null,k=R;do{var je=k.lane&-536870913,Fe=je!==k.lane;if(Fe?(Cn&je)===je:(g&je)===je){je!==0&&je===Zl&&(Ur=!0),We!==null&&(We=We.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Lt=o,Xt=k;je=i;var er=u;switch(Xt.tag){case 1:if(Lt=Xt.payload,typeof Lt=="function"){Qe=Lt.call(er,Qe,je);break e}Qe=Lt;break e;case 3:Lt.flags=Lt.flags&-65537|128;case 0:if(Lt=Xt.payload,je=typeof Lt=="function"?Lt.call(er,Qe,je):Lt,je==null)break e;Qe=b({},Qe,je);break e;case 2:wo=!0}}je=k.callback,je!==null&&(o.flags|=64,Fe&&(o.flags|=8192),Fe=x.callbacks,Fe===null?x.callbacks=[je]:Fe.push(je))}else Fe={lane:je,tag:k.tag,payload:k.payload,callback:k.callback,next:null},We===null?(He=We=Fe,me=Qe):We=We.next=Fe,A|=je;if(k=k.next,k===null){if(k=x.shared.pending,k===null)break;Fe=k,k=Fe.next,Fe.next=null,x.lastBaseUpdate=Fe,x.shared.pending=null}}while(!0);We===null&&(me=Qe),x.baseState=me,x.firstBaseUpdate=He,x.lastBaseUpdate=We,R===null&&(x.shared.lanes=0),zi|=A,o.lanes=A,o.memoizedState=Qe}}function Fo(o,i){if(typeof o!="function")throw Error(r(191,o));o.call(i)}function x2(o,i){var u=o.callbacks;if(u!==null)for(o.callbacks=null,o=0;oR?R:8;var A=N.T,k={};N.T=k,dc(o,!1,i,u);try{var me=x(),He=N.S;if(He!==null&&He(k,me),me!==null&&typeof me=="object"&&typeof me.then=="function"){var We=Ch(me,g);uc(o,i,We,no(o))}else uc(o,i,g,no(o))}catch(Qe){uc(o,i,{then:function(){},status:"rejected",reason:Qe},no())}finally{U.p=R,A!==null&&k.types!==null&&(A.types=k.types),N.T=A}}function P2(){}function Oi(o,i,u,g){if(o.tag!==5)throw Error(r(476));var x=W0(o).queue;Td(o,x,i,K,u===null?P2:function(){return G0(o),u(g)})}function W0(o){var i=o.memoizedState;if(i!==null)return i;i={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:K},next:null};var u={};return i.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:u},next:null},o.memoizedState=i,o=o.alternate,o!==null&&(o.memoizedState=i),i}function G0(o){var i=W0(o);i.next===null&&(i=o.alternate.memoizedState),uc(o,i.next.queue,{},no())}function X0(){return ra(Rc)}function K0(){return Tr().memoizedState}function ll(){return Tr().memoizedState}function O1(o){for(var i=o.return;i!==null;){switch(i.tag){case 24:case 3:var u=no();o=bi(u);var g=Ao(i,o,u);g!==null&&(La(g,i,u),f1(g,i,u)),i={cache:_o()},o.payload=i;return}i=i.return}}function Mh(o,i,u){var g=no();u={lane:g,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},x1(o)?S1(i,u):(u=f2(o,i,u,g),u!==null&&(La(u,o,g),L2(u,i,g)))}function Y0(o,i,u){var g=no();uc(o,i,u,g)}function uc(o,i,u,g){var x={lane:g,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(x1(o))S1(i,x);else{var R=o.alternate;if(o.lanes===0&&(R===null||R.lanes===0)&&(R=i.lastRenderedReducer,R!==null))try{var A=i.lastRenderedState,k=R(A,u);if(x.hasEagerState=!0,x.eagerState=k,wr(k,A))return ki(o,i,x,0),ar===null&&Io(),!1}catch{}if(u=f2(o,i,x,g),u!==null)return La(u,o,g),L2(u,i,g),!0}return!1}function dc(o,i,u,g){if(g={lane:2,revertLane:ro(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},x1(o)){if(i)throw Error(r(479))}else i=f2(o,u,g,2),i!==null&&La(i,o,2)}function x1(o){var i=o.alternate;return o===cn||i!==null&&i===cn}function S1(o,i){rc=g1=!0;var u=o.pending;u===null?i.next=i:(i.next=u.next,u.next=i),o.pending=i}function L2(o,i,u){if((u&4194048)!==0){var g=i.lanes;g&=o.pendingLanes,u|=g,i.lanes=u,at(o,u)}}var xi={readContext:ra,use:ic,useCallback:gr,useContext:gr,useEffect:gr,useImperativeHandle:gr,useLayoutEffect:gr,useInsertionEffect:gr,useMemo:gr,useReducer:gr,useRef:gr,useState:gr,useDebugValue:gr,useDeferredValue:gr,useTransition:gr,useSyncExternalStore:gr,useId:gr,useHostTransitionStatus:gr,useFormState:gr,useActionState:gr,useOptimistic:gr,useMemoCache:gr,useCacheRefresh:gr};xi.useEffectEvent=gr;var Hd={readContext:ra,use:ic,useCallback:function(o,i){return da().memoizedState=[o,i===void 0?null:i],o},useContext:ra,useEffect:N0,useImperativeHandle:function(o,i,u){u=u!=null?u.concat([o]):null,Do(4194308,4,U0.bind(null,i,o),u)},useLayoutEffect:function(o,i){return Do(4194308,4,o,i)},useInsertionEffect:function(o,i){Do(4,2,o,i)},useMemo:function(o,i){var u=da();i=i===void 0?null:i;var g=o();if(il){Ye(!0);try{o()}finally{Ye(!1)}}return u.memoizedState=[g,i],g},useReducer:function(o,i,u){var g=da();if(u!==void 0){var x=u(i);if(il){Ye(!0);try{u(i)}finally{Ye(!1)}}}else x=i;return g.memoizedState=g.baseState=x,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:x},g.queue=o,o=o.dispatch=Mh.bind(null,cn,o),[g.memoizedState,o]},useRef:function(o){var i=da();return o={current:o},i.memoizedState=o},useState:function(o){o=cc(o);var i=o.queue,u=Y0.bind(null,cn,i);return i.dispatch=u,[o.memoizedState,u]},useDebugValue:j2,useDeferredValue:function(o,i){var u=da();return So(u,o,i)},useTransition:function(){var o=cc(!1);return o=Td.bind(null,cn,o.queue,!0,!1),da().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,i,u){var g=cn,x=da();if(Tn){if(u===void 0)throw Error(r(407));u=u()}else{if(u=i(),ar===null)throw Error(r(349));(Cn&127)!==0||I0(g,i,u)}x.memoizedState=u;var R={value:u,getSnapshot:i};return x.queue=R,N0(xd.bind(null,g,R,o),[o]),g.flags|=2048,ka(9,{destroy:void 0},Od.bind(null,g,R,u,i),null),u},useId:function(){var o=da(),i=ar.identifierPrefix;if(Tn){var u=po,g=ls;u=(g&~(1<<32-Pt(g)-1)).toString(32)+u,i="_"+i+"R_"+u,u=$2++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof g.is=="string"?A.createElement("select",{is:g.is}):A.createElement("select"),g.multiple?R.multiple=!0:g.size&&(R.size=g.size);break;default:R=typeof g.is=="string"?A.createElement(x,{is:g.is}):A.createElement(x)}}R[et]=i,R[xt]=g;e:for(A=i.child;A!==null;){if(A.tag===5||A.tag===6)R.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===i)break e;for(;A.sibling===null;){if(A.return===null||A.return===i)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}i.stateNode=R;e:switch(sa(R,x,g),x){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Fs(i)}}return rr(i),o8(i,i.type,o===null?null:o.memoizedProps,i.pendingProps,u),null;case 6:if(o&&i.stateNode!=null)o.memoizedProps!==g&&Fs(i);else{if(typeof g!="string"&&i.stateNode===null)throw Error(r(166));if(o=le.current,nl(i)){if(o=i.stateNode,u=i.memoizedProps,g=null,x=Lr,x!==null)switch(x.tag){case 27:case 5:g=x.memoizedProps}o[et]=i,o=!!(o.nodeValue===u||g!==null&&g.suppressHydrationWarning===!0||Of(o.nodeValue,u)),o||hi(i,!0)}else o=J1(o).createTextNode(g),o[et]=i,i.stateNode=o}return rr(i),null;case 31:if(u=i.memoizedState,o===null||o.memoizedState!==null){if(g=nl(i),u!==null){if(o===null){if(!g)throw Error(r(318));if(o=i.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[et]=i}else ee(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rr(i),o=!1}else u=mi(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=u),o=!0;if(!o)return i.flags&256?(Ea(i),i):(Ea(i),null);if((i.flags&128)!==0)throw Error(r(558))}return rr(i),null;case 13:if(g=i.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(x=nl(i),g!==null&&g.dehydrated!==null){if(o===null){if(!x)throw Error(r(318));if(x=i.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[et]=i}else ee(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rr(i),x=!1}else x=mi(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=x),x=!0;if(!x)return i.flags&256?(Ea(i),i):(Ea(i),null)}return Ea(i),(i.flags&128)!==0?(i.lanes=u,i):(u=g!==null,o=o!==null&&o.memoizedState!==null,u&&(g=i.child,x=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(x=g.alternate.memoizedState.cachePool.pool),R=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(R=g.memoizedState.cachePool.pool),R!==x&&(g.flags|=2048)),u!==o&&u&&(i.child.flags|=8192),P1(i,i.updateQueue),rr(i),null);case 4:return Oe(),o===null&&L8(i.stateNode.containerInfo),rr(i),null;case 10:return _s(i.type),rr(i),null;case 19:if(W(Mr),g=i.memoizedState,g===null)return rr(i),null;if(x=(i.flags&128)!==0,R=g.rendering,R===null)if(x)L1(g,!1);else{if(xr!==0||o!==null&&(o.flags&128)!==0)for(o=i.child;o!==null;){if(R=S2(o),R!==null){for(i.flags|=128,L1(g,!1),o=R.updateQueue,i.updateQueue=o,P1(i,o),i.subtreeFlags=0,o=u,u=i.child;u!==null;)fd(u,o),u=u.sibling;return J(Mr,Mr.current&1|2),Tn&&Ka(i,g.treeForkCount),i.child}o=o.sibling}g.tail!==null&&mt()>dl&&(i.flags|=128,x=!0,L1(g,!1),i.lanes=4194304)}else{if(!x)if(o=S2(R),o!==null){if(i.flags|=128,x=!0,o=o.updateQueue,i.updateQueue=o,P1(i,o),L1(g,!0),g.tail===null&&g.tailMode==="hidden"&&!R.alternate&&!Tn)return rr(i),null}else 2*mt()-g.renderingStartTime>dl&&u!==536870912&&(i.flags|=128,x=!0,L1(g,!1),i.lanes=4194304);g.isBackwards?(R.sibling=i.child,i.child=R):(o=g.last,o!==null?o.sibling=R:i.child=R,g.last=R)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=mt(),o.sibling=null,u=Mr.current,J(Mr,x?u&1|2:u&1),Tn&&Ka(i,g.treeForkCount),o):(rr(i),null);case 22:case 23:return Ea(i),h1(),g=i.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(i.flags|=8192):g&&(i.flags|=8192),g?(u&536870912)!==0&&(i.flags&128)===0&&(rr(i),i.subtreeFlags&6&&(i.flags|=8192)):rr(i),u=i.updateQueue,u!==null&&P1(i,u.retryQueue),u=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(u=o.memoizedState.cachePool.pool),g=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(g=i.memoizedState.cachePool.pool),g!==u&&(i.flags|=2048),o!==null&&W(ol),null;case 24:return u=null,o!==null&&(u=o.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),_s(Ir),rr(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function I1(o,i){switch(tl(i),i.tag){case 1:return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 3:return _s(Ir),Oe(),o=i.flags,(o&65536)!==0&&(o&128)===0?(i.flags=o&-65537|128,i):null;case 26:case 27:case 5:return ye(i),null;case 31:if(i.memoizedState!==null){if(Ea(i),i.alternate===null)throw Error(r(340));ee()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 13:if(Ea(i),o=i.memoizedState,o!==null&&o.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ee()}return o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 19:return W(Mr),null;case 4:return Oe(),null;case 10:return _s(i.type),null;case 22:case 23:return Ea(i),h1(),o!==null&&W(ol),o=i.flags,o&65536?(i.flags=o&-65537|128,i):null;case 24:return _s(Ir),null;case 25:return null;default:return null}}function q2(o,i){switch(tl(i),i.tag){case 3:_s(Ir),Oe();break;case 26:case 27:case 5:ye(i);break;case 4:Oe();break;case 31:i.memoizedState!==null&&Ea(i);break;case 13:Ea(i);break;case 19:W(Mr);break;case 10:_s(i.type);break;case 22:case 23:Ea(i),h1(),o!==null&&W(ol);break;case 24:_s(Ir)}}function hc(o,i){try{var u=i.updateQueue,g=u!==null?u.lastEffect:null;if(g!==null){var x=g.next;u=x;do{if((u.tag&o)===o){g=void 0;var R=u.create,A=u.inst;g=R(),A.destroy=g}u=u.next}while(u!==x)}}catch(k){Yn(i,i.return,k)}}function Ns(o,i,u){try{var g=i.updateQueue,x=g!==null?g.lastEffect:null;if(x!==null){var R=x.next;g=R;do{if((g.tag&o)===o){var A=g.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,x=i;var me=u,He=k;try{He()}catch(We){Yn(x,me,We)}}}g=g.next}while(g!==R)}}catch(We){Yn(i,i.return,We)}}function _1(o){var i=o.updateQueue;if(i!==null){var u=o.stateNode;try{x2(i,u)}catch(g){Yn(o,o.return,g)}}}function i8(o,i,u){u.props=ya(o.type,o.memoizedProps),u.state=o.memoizedState;try{u.componentWillUnmount()}catch(g){Yn(o,i,g)}}function Ta(o,i){try{var u=o.ref;if(u!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof u=="function"?o.refCleanup=u(g):u.current=g}}catch(x){Yn(o,i,x)}}function ha(o,i){var u=o.ref,g=o.refCleanup;if(u!==null)if(typeof g=="function")try{g()}catch(x){Yn(o,i,x)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){Yn(o,i,x)}else u.current=null}function Fd(o){var i=o.type,u=o.memoizedProps,g=o.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":u.autoFocus&&g.focus();break e;case"img":u.src?g.src=u.src:u.srcSet&&(g.srcset=u.srcSet)}}catch(x){Yn(o,o.return,x)}}function W2(o,i,u){try{var g=o.stateNode;qh(g,o.type,u,i),g[xt]=i}catch(x){Yn(o,o.return,x)}}function Nd(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&Yt(o.type)||o.tag===4}function l8(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||Nd(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&Yt(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function c8(o,i,u){var g=o.tag;if(g===5||g===6)o=o.stateNode,i?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(o,i):(i=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,i.appendChild(o),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Ms));else if(g!==4&&(g===27&&Yt(o.type)&&(u=o.stateNode,i=null),o=o.child,o!==null))for(c8(o,i,u),o=o.sibling;o!==null;)c8(o,i,u),o=o.sibling}function G2(o,i,u){var g=o.tag;if(g===5||g===6)o=o.stateNode,i?u.insertBefore(o,i):u.appendChild(o);else if(g!==4&&(g===27&&Yt(o.type)&&(u=o.stateNode),o=o.child,o!==null))for(G2(o,i,u),o=o.sibling;o!==null;)G2(o,i,u),o=o.sibling}function Dd(o){var i=o.stateNode,u=o.memoizedProps;try{for(var g=o.type,x=i.attributes;x.length;)i.removeAttributeNode(x[0]);sa(i,g,u),i[et]=o,i[xt]=u}catch(R){Yn(o,o.return,R)}}var Ds=!1,_r=!1,u8=!1,Ud=typeof WeakSet=="function"?WeakSet:Set,Qr=null;function jh(o,i){if(o=o.containerInfo,Z1=h3,o=ld(o),O0(o)){if("selectionStart"in o)var u={start:o.selectionStart,end:o.selectionEnd};else e:{u=(u=o.ownerDocument)&&u.defaultView||window;var g=u.getSelection&&u.getSelection();if(g&&g.rangeCount!==0){u=g.anchorNode;var x=g.anchorOffset,R=g.focusNode;g=g.focusOffset;try{u.nodeType,R.nodeType}catch{u=null;break e}var A=0,k=-1,me=-1,He=0,We=0,Qe=o,je=null;t:for(;;){for(var Fe;Qe!==u||x!==0&&Qe.nodeType!==3||(k=A+x),Qe!==R||g!==0&&Qe.nodeType!==3||(me=A+g),Qe.nodeType===3&&(A+=Qe.nodeValue.length),(Fe=Qe.firstChild)!==null;)je=Qe,Qe=Fe;for(;;){if(Qe===o)break t;if(je===u&&++He===x&&(k=A),je===R&&++We===g&&(me=A),(Fe=Qe.nextSibling)!==null)break;Qe=je,je=Qe.parentNode}Qe=Fe}u=k===-1||me===-1?null:{start:k,end:me}}else u=null}u=u||{start:0,end:0}}else u=null;for(B8={focusedElem:o,selectionRange:u},h3=!1,Qr=i;Qr!==null;)if(i=Qr,o=i.child,(i.subtreeFlags&1028)!==0&&o!==null)o.return=i,Qr=o;else for(;Qr!==null;){switch(i=Qr,R=i.alternate,o=i.flags,i.tag){case 0:if((o&4)!==0&&(o=i.updateQueue,o=o!==null?o.events:null,o!==null))for(u=0;u title"))),sa(R,g,u),R[et]=o,$n(R),g=R;break e;case"link":var A=Lf("link","href",x).get(g+(u.href||""));if(A){for(var k=0;ker&&(A=er,er=Xt,Xt=A);var ze=sd(k,Xt),we=sd(k,er);if(ze&&we&&(Fe.rangeCount!==1||Fe.anchorNode!==ze.node||Fe.anchorOffset!==ze.offset||Fe.focusNode!==we.node||Fe.focusOffset!==we.offset)){var Te=Qe.createRange();Te.setStart(ze.node,ze.offset),Fe.removeAllRanges(),Xt>er?(Fe.addRange(Te),Fe.extend(we.node,we.offset)):(Te.setEnd(we.node,we.offset),Fe.addRange(Te))}}}}for(Qe=[],Fe=k;Fe=Fe.parentNode;)Fe.nodeType===1&&Qe.push({element:Fe,left:Fe.scrollLeft,top:Fe.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;ku?32:u,N.T=null,u=w8,w8=null;var R=Ei,A=Ws;if(qr=0,vc=Ei=null,Ws=0,(Nn&6)!==0)throw Error(r(331));var k=Nn;if(Nn|=4,Zd(R.current),Kd(R,R.current,A,u),Nn=k,X1(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(ft,R)}catch{}return!0}finally{U.p=x,N.T=g,z8(o,i)}}function E8(o,i,u){i=Xa(u,i),i=k0(o.stateNode,i,2),o=Ao(o,i,2),o!==null&&(Ne(o,2),gs(o))}function Yn(o,i,u){if(o.tag===3)E8(o,o,u);else for(;i!==null;){if(i.tag===3){E8(i,o,u);break}else if(i.tag===1){var g=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(Ri===null||!Ri.has(g))){o=Xa(u,o),u=fs(2),g=Ao(i,u,2),g!==null&&(V2(u,g,i,o),Ne(g,2),gs(g));break}}i=i.return}}function M8(o,i,u){var g=o.pingCache;if(g===null){g=o.pingCache=new Ih;var x=new Set;g.set(i,x)}else x=g.get(i),x===void 0&&(x=new Set,g.set(i,x));x.has(u)||(p8=!0,x.add(u),o=Ah.bind(null,o,i,u),i.then(o,o))}function Ah(o,i,u){var g=o.pingCache;g!==null&&g.delete(i),o.pingedLanes|=o.suspendedLanes&u,o.warmLanes&=~u,ar===o&&(Cn&u)===u&&(xr===4||xr===3&&(Cn&62914560)===Cn&&300>mt()-N1?(Nn&2)===0&&bc(o,0):v8|=u,pc===Cn&&(pc=0)),gs(o)}function G1(o,i){i===0&&(i=vt()),o=is(o,i),o!==null&&(Ne(o,i),gs(o))}function e3(o){var i=o.memoizedState,u=0;i!==null&&(u=i.retryLane),G1(o,u)}function Fh(o,i){var u=0;switch(o.tag){case 31:case 13:var g=o.stateNode,x=o.memoizedState;x!==null&&(u=x.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(i),G1(o,u)}function Nh(o,i){return ht(o,i)}var wc=null,fl=null,T8=!1,t3=!1,H8=!1,Mi=0;function gs(o){o!==fl&&o.next===null&&(fl===null?wc=fl=o:fl=fl.next=o),t3=!0,T8||(T8=!0,Uh())}function X1(o,i){if(!H8&&t3){H8=!0;do for(var u=!1,g=wc;g!==null;){if(o!==0){var x=g.pendingLanes;if(x===0)var R=0;else{var A=g.suspendedLanes,k=g.pingedLanes;R=(1<<31-Pt(42|o)+1)-1,R&=x&~(A&~k),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(u=!0,gf(g,R))}else R=Cn,R=Jt(g,g===ar?R:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(R&3)===0||lt(g,R)||(u=!0,gf(g,R));g=g.next}while(u);H8=!1}}function Dh(){ff()}function ff(){t3=T8=!1;var o=0;Mi!==0&&Wh()&&(o=Mi);for(var i=mt(),u=null,g=wc;g!==null;){var x=g.next,R=hf(g,i);R===0?(g.next=null,u===null?wc=x:u.next=x,x===null&&(fl=u)):(u=g,(o!==0||(R&3)!==0)&&(t3=!0)),g=x}qr!==0&&qr!==5||X1(o),Mi!==0&&(Mi=0)}function hf(o,i){for(var u=o.suspendedLanes,g=o.pingedLanes,x=o.expirationTimes,R=o.pendingLanes&-62914561;0k)break;var We=me.transferSize,Qe=me.initiatorType;We&&V8(Qe)&&(me=me.responseEnd,A+=We*(me"u"?null:document;function Tf(o,i,u){var g=ji;if(g&&typeof i=="string"&&i){var x=nn(i);x='link[rel="'+o+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),Mf.has(x)||(Mf.add(x),o={rel:o,crossOrigin:u,href:i},g.querySelector(x)===null&&(i=g.createElement("link"),sa(i,"link",o),$n(i),g.head.appendChild(i)))}}function D8(o){Ks.D(o),Tf("dns-prefetch",o,null)}function Zh(o,i){Ks.C(o,i),Tf("preconnect",o,i)}function Jh(o,i,u){Ks.L(o,i,u);var g=ji;if(g&&o&&i){var x='link[rel="preload"][as="'+nn(i)+'"]';i==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+nn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+nn(u.imageSizes)+'"]')):x+='[href="'+nn(o)+'"]';var R=x;switch(i){case"style":R=xc(o);break;case"script":R=$c(o)}Co.has(R)||(o=b({rel:"preload",href:i==="image"&&u&&u.imageSrcSet?void 0:o,as:i},u),Co.set(R,o),g.querySelector(x)!==null||i==="style"&&g.querySelector(Sc(R))||i==="script"&&g.querySelector(Cc(R))||(i=g.createElement("link"),sa(i,"link",o),$n(i),g.head.appendChild(i)))}}function kh(o,i){Ks.m(o,i);var u=ji;if(u&&o){var g=i&&typeof i.as=="string"?i.as:"script",x='link[rel="modulepreload"][as="'+nn(g)+'"][href="'+nn(o)+'"]',R=x;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=$c(o)}if(!Co.has(R)&&(o=b({rel:"modulepreload",href:o},i),Co.set(R,o),u.querySelector(x)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Cc(R)))return}g=u.createElement("link"),sa(g,"link",o),$n(g),u.head.appendChild(g)}}}function Zr(o,i,u){Ks.S(o,i,u);var g=ji;if(g&&o){var x=Mn(g).hoistableStyles,R=xc(o);i=i||"default";var A=x.get(R);if(!A){var k={loading:0,preload:null};if(A=g.querySelector(Sc(R)))k.loading=5;else{o=b({rel:"stylesheet",href:o,"data-precedence":i},u),(u=Co.get(R))&&U8(o,u);var me=A=g.createElement("link");$n(me),sa(me,"link",o),me._p=new Promise(function(He,We){me.onload=He,me.onerror=We}),me.addEventListener("load",function(){k.loading|=1}),me.addEventListener("error",function(){k.loading|=2}),k.loading|=4,l3(A,i,g)}A={type:"stylesheet",instance:A,count:1,state:k},x.set(R,A)}}}function Va(o,i){Ks.X(o,i);var u=ji;if(u&&o){var g=Mn(u).hoistableScripts,x=$c(o),R=g.get(x);R||(R=u.querySelector(Cc(x)),R||(o=b({src:o,async:!0},i),(i=Co.get(x))&&c3(o,i),R=u.createElement("script"),$n(R),sa(R,"link",o),u.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(x,R))}}function em(o,i){Ks.M(o,i);var u=ji;if(u&&o){var g=Mn(u).hoistableScripts,x=$c(o),R=g.get(x);R||(R=u.querySelector(Cc(x)),R||(o=b({src:o,async:!0,type:"module"},i),(i=Co.get(x))&&c3(o,i),R=u.createElement("script"),$n(R),sa(R,"link",o),u.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(x,R))}}function Hf(o,i,u,g){var x=(x=le.current)?i3(x):null;if(!x)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(i=xc(u.href),u=Mn(x).hoistableStyles,g=u.get(i),g||(g={type:"style",instance:null,count:0,state:null},u.set(i,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){o=xc(u.href);var R=Mn(x).hoistableStyles,A=R.get(o);if(A||(x=x.ownerDocument||x,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(o,A),(R=x.querySelector(Sc(o)))&&!R._p&&(A.instance=R,A.state.loading=5),Co.has(o)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Co.set(o,u),R||tm(x,o,u,A.state))),i&&g===null)throw Error(r(528,""));return A}if(i&&g!==null)throw Error(r(529,""));return null;case"script":return i=u.async,u=u.src,typeof u=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=$c(u),u=Mn(x).hoistableScripts,g=u.get(i),g||(g={type:"script",instance:null,count:0,state:null},u.set(i,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function xc(o){return'href="'+nn(o)+'"'}function Sc(o){return'link[rel="stylesheet"]['+o+"]"}function jf(o){return b({},o,{"data-precedence":o.precedence,precedence:null})}function tm(o,i,u,g){o.querySelector('link[rel="preload"][as="style"]['+i+"]")?g.loading=1:(i=o.createElement("link"),g.preload=i,i.addEventListener("load",function(){return g.loading|=1}),i.addEventListener("error",function(){return g.loading|=2}),sa(i,"link",u),$n(i),o.head.appendChild(i))}function $c(o){return'[src="'+nn(o)+'"]'}function Cc(o){return"script[async]"+o}function Pf(o,i,u){if(i.count++,i.instance===null)switch(i.type){case"style":var g=o.querySelector('style[data-href~="'+nn(u.href)+'"]');if(g)return i.instance=g,$n(g),g;var x=b({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),$n(g),sa(g,"style",x),l3(g,u.precedence,o),i.instance=g;case"stylesheet":x=xc(u.href);var R=o.querySelector(Sc(x));if(R)return i.state.loading|=4,i.instance=R,$n(R),R;g=jf(u),(x=Co.get(x))&&U8(g,x),R=(o.ownerDocument||o).createElement("link"),$n(R);var A=R;return A._p=new Promise(function(k,me){A.onload=k,A.onerror=me}),sa(R,"link",g),i.state.loading|=4,l3(R,u.precedence,o),i.instance=R;case"script":return R=$c(u.src),(x=o.querySelector(Cc(R)))?(i.instance=x,$n(x),x):(g=u,(x=Co.get(R))&&(g=b({},u),c3(g,x)),o=o.ownerDocument||o,x=o.createElement("script"),$n(x),sa(x,"link",g),o.head.appendChild(x),i.instance=x);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(g=i.instance,i.state.loading|=4,l3(g,u.precedence,o));return i.instance}function l3(o,i,u){for(var g=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=g.length?g[g.length-1]:null,R=x,A=0;A title"):null)}function nm(o,i,u){if(u===1||i.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(o=i.disabled,typeof i.precedence=="string"&&o==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function _f(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function zc(o,i,u,g){if(u.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=xc(g.href),R=i.querySelector(Sc(x));if(R){i=R._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(o.count++,o=u3.bind(o),i.then(o,o)),u.state.loading|=4,u.instance=R,$n(R);return}R=i.ownerDocument||i,g=jf(g),(x=Co.get(x))&&U8(g,x),R=R.createElement("link"),$n(R);var A=R;A._p=new Promise(function(k,me){A.onload=k,A.onerror=me}),sa(R,"link",g),u.instance=R}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(u,i),(i=u.state.preload)&&(u.state.loading&3)===0&&(o.count++,u=u3.bind(o),i.addEventListener("load",u),i.addEventListener("error",u))}}var q8=0;function rm(o,i){return o.stylesheets&&o.count===0&&f3(o,o.stylesheets),0q8?50:800)+i);return o.unsuspend=u,function(){o.unsuspend=null,clearTimeout(g),clearTimeout(x)}}:null}function u3(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)f3(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var d3=null;function f3(o,i){o.stylesheets=null,o.unsuspend!==null&&(o.count++,d3=new Map,i.forEach(Vf,o),d3=null,u3.call(o))}function Vf(o,i){if(!(i.state.loading&4)){var u=d3.get(o);if(u)var g=u.get(null);else{u=new Map,d3.set(o,u);for(var x=o.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),fm.exports=zW(),fm.exports}var EB=RW();const EW=z7(EB),MW="modulepreload",TW=function(t){return"/"+t},tL={},An=function(e,n,r){let s=Promise.resolve();if(n&&n.length>0){let m=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=m(n.map(h=>{if(h=TW(h),h in tL)return;tL[h]=!0;const v=h.endsWith(".css"),b=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const y=document.createElement("link");if(y.rel=v?"stylesheet":MW,v||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),v)return new Promise((O,w)=>{y.addEventListener("load",O),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return s.then(c=>{for(const d of c||[])d.status==="rejected"&&l(d.reason);return e().catch(l)})};var a=WH();const ae=z7(a),MB=yW({__proto__:null,default:ae},[a]);var TB=t=>{throw TypeError(t)},HW=(t,e,n)=>e.has(t)||TB("Cannot "+n),vm=(t,e,n)=>(HW(t,e,"read from private field"),n?n.call(t):e.get(t)),jW=(t,e,n)=>e.has(t)?TB("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),nL="popstate";function rL(t){return typeof t=="object"&&t!=null&&"pathname"in t&&"search"in t&&"hash"in t&&"state"in t&&"key"in t}function PW(t={}){function e(r,s){let l=s.state?.masked,{pathname:c,search:d,hash:m}=l||r.location;return I6("",{pathname:c,search:d,hash:m},s.state&&s.state.usr||null,s.state&&s.state.key||"default",l?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,s){return typeof s=="string"?s:Ni(s)}return IW(e,n,null,t)}function xn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ar(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function LW(){return Math.random().toString(36).substring(2,10)}function aL(t,e){return{usr:t.state,key:t.key,idx:e,masked:t.unstable_mask?{pathname:t.pathname,search:t.search,hash:t.hash}:void 0}}function I6(t,e,n=null,r,s){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Rl(e):e,state:n,key:e&&e.key||r||LW(),unstable_mask:s}}function Ni({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Rl(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function IW(t,e,n,r={}){let{window:s=document.defaultView,v5Compat:l=!1}=r,c=s.history,d="POP",m=null,h=v();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function v(){return(c.state||{idx:null}).idx}function b(){d="POP";let C=v(),z=C==null?null:C-h;h=C,m&&m({action:d,location:S.location,delta:z})}function y(C,z){d="PUSH";let M=rL(C)?C:I6(S.location,C,z);h=v()+1;let T=aL(M,h),H=S.createHref(M.unstable_mask||M);try{c.pushState(T,"",H)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(H)}l&&m&&m({action:d,location:S.location,delta:1})}function O(C,z){d="REPLACE";let M=rL(C)?C:I6(S.location,C,z);h=v();let T=aL(M,h),H=S.createHref(M.unstable_mask||M);c.replaceState(T,"",H),l&&m&&m({action:d,location:S.location,delta:0})}function w(C){return HB(C)}let S={get action(){return d},get location(){return t(s,c)},listen(C){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(nL,b),m=C,()=>{s.removeEventListener(nL,b),m=null}},createHref(C){return e(s,C)},createURL:w,encodeLocation(C){let z=w(C);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:y,replace:O,go(C){return c.go(C)}};return S}function HB(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),xn(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:Ni(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var f6,oL=class{constructor(t){if(jW(this,f6,new Map),t)for(let[e,n]of t)this.set(e,n)}get(t){if(vm(this,f6).has(t))return vm(this,f6).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,e){vm(this,f6).set(t,e)}};f6=new WeakMap;var _W=new Set(["lazy","caseSensitive","path","id","index","children"]);function VW(t){return _W.has(t)}var BW=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function AW(t){return BW.has(t)}function FW(t){return t.index===!0}function _6(t,e,n=[],r={},s=!1){return t.map((l,c)=>{let d=[...n,String(c)],m=typeof l.id=="string"?l.id:d.join("-");if(xn(l.index!==!0||!l.children,"Cannot specify children on an index route"),xn(s||!r[m],`Found a route id collision on id "${m}". Route id's must be globally unique within Data Router usages`),FW(l)){let h={...l,id:m};return r[m]=sL(h,e(h)),h}else{let h={...l,id:m,children:void 0};return r[m]=sL(h,e(h)),l.children&&(h.children=_6(l.children,e,d,r,s)),h}})}function sL(t,e){return Object.assign(t,{...e,...typeof e.lazy=="object"&&e.lazy!=null?{lazy:{...t.lazy,...e.lazy}}:{}})}function Lc(t,e,n="/"){return h6(t,e,n,!1)}function h6(t,e,n,r){let s=typeof e=="string"?Rl(e):e,l=Os(s.pathname||"/",n);if(l==null)return null;let c=jB(t);DW(c);let d=null;for(let m=0;d==null&&m{let v={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(r)&&m)return;xn(v.relativePath.startsWith(r),`Absolute route path "${v.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(r.length)}let b=ks([r,v.relativePath]),y=n.concat(v);c.children&&c.children.length>0&&(xn(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),jB(c.children,e,y,b,m)),!(c.path==null&&!c.index)&&e.push({path:b,score:YW(b,c.index),routesMeta:y})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))l(c,d);else for(let m of PB(c.path))l(c,d,!0,m)}),e}function PB(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let c=PB(r.join("/")),d=[];return d.push(...c.map(m=>m===""?l:[l,m].join("/"))),s&&d.push(...c),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function DW(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:QW(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var UW=/^:[\w-]+$/,qW=3,WW=2,GW=1,XW=10,KW=-2,iL=t=>t==="*";function YW(t,e){let n=t.split("/"),r=n.length;return n.some(iL)&&(r+=KW),e&&(r+=WW),n.filter(s=>!iL(s)).reduce((s,l)=>s+(UW.test(l)?qW:l===""?GW:XW),r)}function QW(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function ZW(t,e,n=!1){let{routesMeta:r}=t,s={},l="/",c=[];for(let d=0;d{if(v==="*"){let w=d[y]||"";c=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const O=d[y];return b&&!O?h[v]=void 0:h[v]=(O||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:c,pattern:t}}function JW(t,e=!1,n=!0){Ar(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,m,h,v)=>{if(r.push({paramName:d,isOptional:m!=null}),m){let b=v.charAt(h+c.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function kW(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ar(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Os(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function eG({basename:t,pathname:e}){return e==="/"?t:ks([t,e])}var LB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,GH=t=>LB.test(t);function tG(t,e="/"){let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Rl(t):t,l;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?l=lL(n.substring(1),"/"):l=lL(n,e)):l=e,{pathname:l,search:rG(r),hash:aG(s)}}function lL(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function bm(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function IB(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function R7(t){let e=IB(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function su(t,e,n,r=!1){let s;typeof t=="string"?s=Rl(t):(s={...t},xn(!s.pathname||!s.pathname.includes("?"),bm("?","pathname","search",s)),xn(!s.pathname||!s.pathname.includes("#"),bm("#","pathname","hash",s)),xn(!s.search||!s.search.includes("#"),bm("#","search","hash",s)));let l=t===""||s.pathname==="",c=l?"/":s.pathname,d;if(c==null)d=n;else{let b=e.length-1;if(!r&&c.startsWith("..")){let y=c.split("/");for(;y[0]==="..";)y.shift(),b-=1;s.pathname=y.join("/")}d=b>=0?e[b]:"/"}let m=tG(s,d),h=c&&c!=="/"&&c.endsWith("/"),v=(l||c===".")&&n.endsWith("/");return!m.pathname.endsWith("/")&&(h||v)&&(m.pathname+="/"),m}var ks=t=>t.join("/").replace(/\/\/+/g,"/"),nG=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),rG=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,aG=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,iu=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function V6(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function lu(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _B=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function VB(t,e){let n=t;if(typeof n!="string"||!LB.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(_B)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),d=Os(c.pathname,e);c.origin===l.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{Ar(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}var Vc=Symbol("Uninstrumented");function oG(t,e){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(s=>s({id:e.id,index:e.index,path:e.path,instrument(l){let c=Object.keys(n);for(let d of c)l[d]&&n[d].push(l[d])}}));let r={};if(typeof e.lazy=="function"&&n.lazy.length>0){let s=j3(n.lazy,e.lazy,()=>{});s&&(r.lazy=s)}if(typeof e.lazy=="object"){let s=e.lazy;["middleware","loader","action"].forEach(l=>{let c=s[l],d=n[`lazy.${l}`];if(typeof c=="function"&&d.length>0){let m=j3(d,c,()=>{});m&&(r.lazy=Object.assign(r.lazy||{},{[l]:m}))}})}return["loader","action"].forEach(s=>{let l=e[s];if(typeof l=="function"&&n[s].length>0){let c=l[Vc]??l,d=j3(n[s],c,(...m)=>cL(m[0]));d&&(s==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[Vc]=c,r[s]=d)}}),e.middleware&&e.middleware.length>0&&n.middleware.length>0&&(r.middleware=e.middleware.map(s=>{let l=s[Vc]??s,c=j3(n.middleware,l,(...d)=>cL(d[0]));return c?(c[Vc]=l,c):s})),r}function sG(t,e){let n={navigate:[],fetch:[]};if(e.forEach(r=>r({instrument(s){let l=Object.keys(s);for(let c of l)s[c]&&n[c].push(s[c])}})),n.navigate.length>0){let r=t.navigate[Vc]??t.navigate,s=j3(n.navigate,r,(...l)=>{let[c,d]=l;return{to:typeof c=="number"||typeof c=="string"?c:c?Ni(c):".",...uL(t,d??{})}});s&&(s[Vc]=r,t.navigate=s)}if(n.fetch.length>0){let r=t.fetch[Vc]??t.fetch,s=j3(n.fetch,r,(...l)=>{let[c,,d,m]=l;return{href:d??".",fetcherKey:c,...uL(t,m??{})}});s&&(s[Vc]=r,t.fetch=s)}return t}function j3(t,e,n){return t.length===0?null:async(...r)=>{let s=await BB(t,n(...r),()=>e(...r),t.length-1);if(s.type==="error")throw s.value;return s.value}}async function BB(t,e,n,r){let s=t[r],l;if(s){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=BB(t,e,n,r-1),l=await c,xn(l,"Expected a result"),l.type==="error"&&l.value instanceof Error?{status:"error",error:l.value}:{status:"success",error:void 0});try{await s(d,e)}catch(m){console.error("An instrumentation function threw an error:",m)}c||await d(),await c}else try{l={type:"success",value:await n()}}catch(c){l={type:"error",value:c}}return l||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function cL(t){let{request:e,context:n,params:r,unstable_pattern:s}=t;return{request:iG(e),params:{...r},unstable_pattern:s,context:lG(n)}}function uL(t,e){return{currentUrl:Ni(t.state.location),..."formMethod"in e?{formMethod:e.formMethod}:{},..."formEncType"in e?{formEncType:e.formEncType}:{},..."formData"in e?{formData:e.formData}:{},..."body"in e?{body:e.body}:{}}}function iG(t){return{method:t.method,url:t.url,headers:{get:(...e)=>t.headers.get(...e)}}}function lG(t){if(uG(t)){let e={...t};return Object.freeze(e),e}else return{get:e=>t.get(e)}}var cG=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function uG(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null||Object.getOwnPropertyNames(e).sort().join("\0")===cG}var AB=["POST","PUT","PATCH","DELETE"],dG=new Set(AB),fG=["GET",...AB],hG=new Set(fG),FB=new Set([301,302,303,307,308]),mG=new Set([307,308]),ym={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},gG={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},k8={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pG=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),NB="remix-router-transitions",DB=Symbol("ResetLoaderData");function vG(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";xn(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],s=t.mapRouteProperties||pG,l=s;if(t.unstable_instrumentations){let re=t.unstable_instrumentations;l=ue=>({...s(ue),...oG(re.map(ge=>ge.route).filter(Boolean),ue)})}let c={},d=_6(t.routes,l,void 0,c),m,h=t.basename||"/";h.startsWith("/")||(h=`/${h}`);let v=t.dataStrategy||xG,b={...t.future},y=null,O=new Set,w=null,S=null,C=null,z=t.hydrationData!=null,M=Lc(d,t.history.location,h),T=!1,H=null,j,_;if(M==null&&!t.patchRoutesOnNavigation){let re=ws(404,{pathname:t.history.location.pathname}),{matches:ue,route:ge}=Zf(d);j=!0,_=!j,M=ue,H={[ge.id]:re}}else if(M&&!t.hydrationData&&rt(M,d,t.history.location.pathname).active&&(M=null),M)if(M.some(re=>re.route.lazy))j=!1,_=!j;else if(!M.some(re=>XH(re.route)))j=!0,_=!j;else{let re=t.hydrationData?t.hydrationData.loaderData:null,ue=t.hydrationData?t.hydrationData.errors:null,ge=M;if(ue){let Le=M.findIndex(De=>ue[De.route.id]!==void 0);ge=ge.slice(0,Le+1)}_=!1,j=ge.every(Le=>{let De=UB(Le.route,re,ue);return _=_||De.renderFallback,!De.shouldLoad})}else{j=!1,_=!j,M=[];let re=rt(null,d,t.history.location.pathname);re.active&&re.matches&&(T=!0,M=re.matches)}let P,L={historyAction:t.history.action,location:t.history.location,matches:M,initialized:j,renderFallback:_,navigation:ym,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||H,fetchers:new Map,blockers:new Map},V="POP",D=null,F=!1,X,Q=!1,Y=new Map,q=null,N=!1,U=!1,K=new Set,Z=new Map,te=0,B=-1,W=new Map,J=new Set,se=new Map,ie=new Map,le=new Set,ce=new Map,he,Oe=null;function fe(){if(y=t.history.listen(({action:re,location:ue,delta:ge})=>{if(he){he(),he=void 0;return}Ar(ce.size===0||ge!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Le=$t({currentLocation:L.location,nextLocation:ue,historyAction:re});if(Le&&ge!=null){let De=new Promise(it=>{he=it});t.history.go(ge*-1),Ct(Le,{state:"blocked",location:ue,proceed(){Ct(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:ue}),De.then(()=>t.history.go(ge))},reset(){let it=new Map(L.blockers);it.set(Le,k8),xe({blockers:it})}}),D?.resolve(),D=null;return}return Me(re,ue)}),n){FG(e,Y);let re=()=>NG(e,Y);e.addEventListener("pagehide",re),q=()=>e.removeEventListener("pagehide",re)}return L.initialized||Me("POP",L.location,{initialHydration:!0}),P}function ye(){y&&y(),q&&q(),O.clear(),X&&X.abort(),L.fetchers.forEach((re,ue)=>ft(ue)),L.blockers.forEach((re,ue)=>Ft(ue))}function ve(re){return O.add(re),()=>O.delete(re)}function xe(re,ue={}){re.matches&&(re.matches=re.matches.map(De=>{let it=c[De.route.id],et=De.route;return et.element!==it.element||et.errorElement!==it.errorElement||et.hydrateFallbackElement!==it.hydrateFallbackElement?{...De,route:it}:De})),L={...L,...re};let ge=[],Le=[];L.fetchers.forEach((De,it)=>{De.state==="idle"&&(le.has(it)?ge.push(it):Le.push(it))}),le.forEach(De=>{!L.fetchers.has(De)&&!Z.has(De)&&ge.push(De)}),[...O].forEach(De=>De(L,{deletedFetchers:ge,newErrors:re.errors??null,viewTransitionOpts:ue.viewTransitionOpts,flushSync:ue.flushSync===!0})),ge.forEach(De=>ft(De)),Le.forEach(De=>L.fetchers.delete(De))}function Re(re,ue,{flushSync:ge}={}){let Le=L.actionData!=null&&L.navigation.formMethod!=null&&Aa(L.navigation.formMethod)&&L.navigation.state==="loading"&&re.state?._isRedirect!==!0,De;ue.actionData?Object.keys(ue.actionData).length>0?De=ue.actionData:De=null:Le?De=L.actionData:De=null;let it=ue.loaderData?wL(L.loaderData,ue.loaderData,ue.matches||[],ue.errors):L.loaderData,et=L.blockers;et.size>0&&(et=new Map(et),et.forEach((bt,Ue)=>et.set(Ue,k8)));let xt=N?!1:vt(re,ue.matches||L.matches),wt=F===!0||L.navigation.formMethod!=null&&Aa(L.navigation.formMethod)&&re.state?._isRedirect!==!0;m&&(d=m,m=void 0),N||V==="POP"||(V==="PUSH"?t.history.push(re,re.state):V==="REPLACE"&&t.history.replace(re,re.state));let Xe;if(V==="POP"){let bt=Y.get(L.location.pathname);bt&&bt.has(re.pathname)?Xe={currentLocation:L.location,nextLocation:re}:Y.has(re.pathname)&&(Xe={currentLocation:re,nextLocation:L.location})}else if(Q){let bt=Y.get(L.location.pathname);bt?bt.add(re.pathname):(bt=new Set([re.pathname]),Y.set(L.location.pathname,bt)),Xe={currentLocation:L.location,nextLocation:re}}xe({...ue,actionData:De,loaderData:it,historyAction:V,location:re,initialized:!0,renderFallback:!1,navigation:ym,revalidation:"idle",restoreScrollPosition:xt,preventScrollReset:wt,blockers:et},{viewTransitionOpts:Xe,flushSync:ge===!0}),V="POP",F=!1,Q=!1,N=!1,U=!1,D?.resolve(),D=null,Oe?.resolve(),Oe=null}async function $e(re,ue){if(D?.resolve(),D=null,typeof re=="number"){D||(D=$L());let Nt=D.promise;return t.history.go(re),Nt}let ge=Rg(L.location,L.matches,h,re,ue?.fromRouteId,ue?.relative),{path:Le,submission:De,error:it}=dL(!1,ge,ue),et;ue?.unstable_mask&&(et={pathname:"",search:"",hash:"",...typeof ue.unstable_mask=="string"?Rl(ue.unstable_mask):{...L.location.unstable_mask,...ue.unstable_mask}});let xt=L.location,wt=I6(xt,Le,ue&&ue.state,void 0,et);wt={...wt,...t.history.encodeLocation(wt)};let Xe=ue&&ue.replace!=null?ue.replace:void 0,bt="PUSH";Xe===!0?bt="REPLACE":Xe===!1||De!=null&&Aa(De.formMethod)&&De.formAction===L.location.pathname+L.location.search&&(bt="REPLACE");let Ue=ue&&"preventScrollReset"in ue?ue.preventScrollReset===!0:void 0,St=(ue&&ue.flushSync)===!0,Ht=$t({currentLocation:xt,nextLocation:wt,historyAction:bt});if(Ht){Ct(Ht,{state:"blocked",location:wt,proceed(){Ct(Ht,{state:"proceeding",proceed:void 0,reset:void 0,location:wt}),$e(re,ue)},reset(){let Nt=new Map(L.blockers);Nt.set(Ht,k8),xe({blockers:Nt})}});return}await Me(bt,wt,{submission:De,pendingError:it,preventScrollReset:Ue,replace:ue&&ue.replace,enableViewTransition:ue&&ue.viewTransition,flushSync:St,callSiteDefaultShouldRevalidate:ue&&ue.unstable_defaultShouldRevalidate})}function _e(){Oe||(Oe=$L()),ct(),xe({revalidation:"loading"});let re=Oe.promise;return L.navigation.state==="submitting"?re:L.navigation.state==="idle"?(Me(L.historyAction,L.location,{startUninterruptedRevalidation:!0}),re):(Me(V||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:Q===!0}),re)}async function Me(re,ue,ge){X&&X.abort(),X=null,V=re,N=(ge&&ge.startUninterruptedRevalidation)===!0,gt(L.location,L.matches),F=(ge&&ge.preventScrollReset)===!0,Q=(ge&&ge.enableViewTransition)===!0;let Le=m||d,De=ge&&ge.overrideNavigation,it=ge?.initialHydration&&L.matches&&L.matches.length>0&&!T?L.matches:Lc(Le,ue,h),et=(ge&&ge.flushSync)===!0;if(it&&L.initialized&&!U&&TG(L.location,ue)&&!(ge&&ge.submission&&Aa(ge.submission.formMethod))){Re(ue,{matches:it},{flushSync:et});return}let xt=rt(it,Le,ue.pathname);if(xt.active&&xt.matches&&(it=xt.matches),!it){let{error:Kt,notFoundMatches:kt,route:Gt}=Vt(ue.pathname);Re(ue,{matches:kt,loaderData:{},errors:{[Gt.id]:Kt}},{flushSync:et});return}X=new AbortController;let wt=H3(t.history,ue,X.signal,ge&&ge.submission),Xe=t.getContext?await t.getContext():new oL,bt;if(ge&&ge.pendingError)bt=[Ic(it).route.id,{type:"error",error:ge.pendingError}];else if(ge&&ge.submission&&Aa(ge.submission.formMethod)){let Kt=await Pe(wt,ue,ge.submission,it,Xe,xt.active,ge&&ge.initialHydration===!0,{replace:ge.replace,flushSync:et});if(Kt.shortCircuited)return;if(Kt.pendingActionResult){let[kt,Gt]=Kt.pendingActionResult;if(ko(Gt)&&V6(Gt.error)&&Gt.error.status===404){X=null,Re(ue,{matches:Kt.matches,loaderData:{},errors:{[kt]:Gt.error}});return}}it=Kt.matches||it,bt=Kt.pendingActionResult,De=wm(ue,ge.submission),et=!1,xt.active=!1,wt=H3(t.history,wt.url,wt.signal)}let{shortCircuited:Ue,matches:St,loaderData:Ht,errors:Nt}=await Ae(wt,ue,it,Xe,xt.active,De,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,et,bt,ge&&ge.callSiteDefaultShouldRevalidate);Ue||(X=null,Re(ue,{matches:St||it,...OL(bt),loaderData:Ht,errors:Nt}))}async function Pe(re,ue,ge,Le,De,it,et,xt={}){ct();let wt=BG(ue,ge);if(xe({navigation:wt},{flushSync:xt.flushSync===!0}),it){let Ue=await Ne(Le,ue.pathname,re.signal);if(Ue.type==="aborted")return{shortCircuited:!0};if(Ue.type==="error"){if(Ue.partialMatches.length===0){let{matches:Ht,route:Nt}=Zf(d);return{matches:Ht,pendingActionResult:[Nt.id,{type:"error",error:Ue.error}]}}let St=Ic(Ue.partialMatches).route.id;return{matches:Ue.partialMatches,pendingActionResult:[St,{type:"error",error:Ue.error}]}}else if(Ue.matches)Le=Ue.matches;else{let{notFoundMatches:St,error:Ht,route:Nt}=Vt(ue.pathname);return{matches:St,pendingActionResult:[Nt.id,{type:"error",error:Ht}]}}}let Xe,bt=w5(Le,ue);if(!bt.route.action&&!bt.route.lazy)Xe={type:"error",error:ws(405,{method:re.method,pathname:ue.pathname,routeId:bt.route.id})};else{let Ue=V3(l,c,re,Le,bt,et?[]:r,De),St=await zt(re,Ue,De,null);if(Xe=St[bt.route.id],!Xe){for(let Ht of Le)if(St[Ht.route.id]){Xe=St[Ht.route.id];break}}if(re.signal.aborted)return{shortCircuited:!0}}if(g4(Xe)){let Ue;return xt&&xt.replace!=null?Ue=xt.replace:Ue=vL(Xe.response.headers.get("Location"),new URL(re.url),h,t.history)===L.location.pathname+L.location.search,await Ot(re,Xe,!0,{submission:ge,replace:Ue}),{shortCircuited:!0}}if(ko(Xe)){let Ue=Ic(Le,bt.route.id);return(xt&&xt.replace)!==!0&&(V="PUSH"),{matches:Le,pendingActionResult:[Ue.route.id,Xe,bt.route.id]}}return{matches:Le,pendingActionResult:[bt.route.id,Xe]}}async function Ae(re,ue,ge,Le,De,it,et,xt,wt,Xe,bt,Ue,St){let Ht=it||wm(ue,et),Nt=et||xt||SL(Ht),Kt=!N&&!Xe;if(De){if(Kt){let Dn=ht(Ue);xe({navigation:Ht,...Dn!==void 0?{actionData:Dn}:{}},{flushSync:bt})}let on=await Ne(ge,ue.pathname,re.signal);if(on.type==="aborted")return{shortCircuited:!0};if(on.type==="error"){if(on.partialMatches.length===0){let{matches:$r,route:or}=Zf(d);return{matches:$r,loaderData:{},errors:{[or.id]:on.error}}}let Dn=Ic(on.partialMatches).route.id;return{matches:on.partialMatches,loaderData:{},errors:{[Dn]:on.error}}}else if(on.matches)ge=on.matches;else{let{error:Dn,notFoundMatches:$r,route:or}=Vt(ue.pathname);return{matches:$r,loaderData:{},errors:{[or.id]:Dn}}}}let kt=m||d,{dsMatches:Gt,revalidatingFetchers:Mn}=fL(re,Le,l,c,t.history,L,ge,Nt,ue,Xe?[]:r,Xe===!0,U,K,le,se,J,kt,h,t.patchRoutesOnNavigation!=null,Ue,St);if(B=++te,!t.dataStrategy&&!Gt.some(on=>on.shouldLoad)&&!Gt.some(on=>on.route.middleware&&on.route.middleware.length>0)&&Mn.length===0){let on=en();return Re(ue,{matches:ge,loaderData:{},errors:Ue&&ko(Ue[1])?{[Ue[0]]:Ue[1].error}:null,...OL(Ue),...on?{fetchers:new Map(L.fetchers)}:{}},{flushSync:bt}),{shortCircuited:!0}}if(Kt){let on={};if(!De){on.navigation=Ht;let Dn=ht(Ue);Dn!==void 0&&(on.actionData=Dn)}Mn.length>0&&(on.fetchers=Ve(Mn)),xe(on,{flushSync:bt})}Mn.forEach(on=>{Ye(on.key),on.controller&&Z.set(on.key,on.controller)});let $n=()=>Mn.forEach(on=>Ye(on.key));X&&X.signal.addEventListener("abort",$n);let{loaderResults:Kr,fetcherResults:Yr}=await pt(Gt,Mn,re,Le);if(re.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",$n),Mn.forEach(on=>Z.delete(on.key));let bn=Jf(Kr);if(bn)return await Ot(re,bn.result,!0,{replace:wt}),{shortCircuited:!0};if(bn=Jf(Yr),bn)return J.add(bn.key),await Ot(re,bn.result,!0,{replace:wt}),{shortCircuited:!0};let{loaderData:Nr,errors:co}=yL(L,ge,Kr,Ue,Mn,Yr);Xe&&L.errors&&(co={...L.errors,...co});let Dt=en(),br=It(B),yr=Dt||br||Mn.length>0;return{matches:ge,loaderData:Nr,errors:co,...yr?{fetchers:new Map(L.fetchers)}:{}}}function ht(re){if(re&&!ko(re[1]))return{[re[0]]:re[1].data};if(L.actionData)return Object.keys(L.actionData).length===0?null:L.actionData}function Ve(re){return re.forEach(ue=>{let ge=L.fetchers.get(ue.key),Le=e6(void 0,ge?ge.data:void 0);L.fetchers.set(ue.key,Le)}),new Map(L.fetchers)}async function Ze(re,ue,ge,Le){Ye(re);let De=(Le&&Le.flushSync)===!0,it=m||d,et=Rg(L.location,L.matches,h,ge,ue,Le?.relative),xt=Lc(it,et,h),wt=rt(xt,it,et);if(wt.active&&wt.matches&&(xt=wt.matches),!xt){ut(re,ue,ws(404,{pathname:et}),{flushSync:De});return}let{path:Xe,submission:bt,error:Ue}=dL(!0,et,Le);if(Ue){ut(re,ue,Ue,{flushSync:De});return}let St=t.getContext?await t.getContext():new oL,Ht=(Le&&Le.preventScrollReset)===!0;if(bt&&Aa(bt.formMethod)){await st(re,ue,Xe,xt,St,wt.active,De,Ht,bt,Le&&Le.unstable_defaultShouldRevalidate);return}se.set(re,{routeId:ue,path:Xe}),await mt(re,ue,Xe,xt,St,wt.active,De,Ht,bt)}async function st(re,ue,ge,Le,De,it,et,xt,wt,Xe){ct(),se.delete(re);let bt=L.fetchers.get(re);yt(re,AG(wt,bt),{flushSync:et});let Ue=new AbortController,St=H3(t.history,ge,Ue.signal,wt);if(it){let _n=await Ne(Le,new URL(St.url).pathname,St.signal,re);if(_n.type==="aborted")return;if(_n.type==="error"){ut(re,ue,_n.error,{flushSync:et});return}else if(_n.matches)Le=_n.matches;else{ut(re,ue,ws(404,{pathname:ge}),{flushSync:et});return}}let Ht=w5(Le,ge);if(!Ht.route.action&&!Ht.route.lazy){let _n=ws(405,{method:wt.formMethod,pathname:ge,routeId:ue});ut(re,ue,_n,{flushSync:et});return}Z.set(re,Ue);let Nt=te,Kt=V3(l,c,St,Le,Ht,r,De),kt=await zt(St,Kt,De,re),Gt=kt[Ht.route.id];if(!Gt){for(let _n of Kt)if(kt[_n.route.id]){Gt=kt[_n.route.id];break}}if(St.signal.aborted){Z.get(re)===Ue&&Z.delete(re);return}if(le.has(re)){if(g4(Gt)||ko(Gt)){yt(re,pl(void 0));return}}else{if(g4(Gt))if(Z.delete(re),B>Nt){yt(re,pl(void 0));return}else return J.add(re),yt(re,e6(wt)),Ot(St,Gt,!1,{fetcherSubmission:wt,preventScrollReset:xt});if(ko(Gt)){ut(re,ue,Gt.error);return}}let Mn=L.navigation.location||L.location,$n=H3(t.history,Mn,Ue.signal),Kr=m||d,Yr=L.navigation.state!=="idle"?Lc(Kr,L.navigation.location,h):L.matches;xn(Yr,"Didn't find any matches after fetcher action");let bn=++te;W.set(re,bn);let Nr=e6(wt,Gt.data);L.fetchers.set(re,Nr);let{dsMatches:co,revalidatingFetchers:Dt}=fL($n,De,l,c,t.history,L,Yr,wt,Mn,r,!1,U,K,le,se,J,Kr,h,t.patchRoutesOnNavigation!=null,[Ht.route.id,Gt],Xe);Dt.filter(_n=>_n.key!==re).forEach(_n=>{let Rs=_n.key,Ho=L.fetchers.get(Rs),jo=e6(void 0,Ho?Ho.data:void 0);L.fetchers.set(Rs,jo),Ye(Rs),_n.controller&&Z.set(Rs,_n.controller)}),xe({fetchers:new Map(L.fetchers)});let br=()=>Dt.forEach(_n=>Ye(_n.key));Ue.signal.addEventListener("abort",br);let{loaderResults:yr,fetcherResults:on}=await pt(co,Dt,$n,De);if(Ue.signal.aborted)return;if(Ue.signal.removeEventListener("abort",br),W.delete(re),Z.delete(re),Dt.forEach(_n=>Z.delete(_n.key)),L.fetchers.has(re)){let _n=pl(Gt.data);L.fetchers.set(re,_n)}let Dn=Jf(yr);if(Dn)return Ot($n,Dn.result,!1,{preventScrollReset:xt});if(Dn=Jf(on),Dn)return J.add(Dn.key),Ot($n,Dn.result,!1,{preventScrollReset:xt});let{loaderData:$r,errors:or}=yL(L,Yr,yr,void 0,Dt,on);It(bn),L.navigation.state==="loading"&&bn>B?(xn(V,"Expected pending action"),X&&X.abort(),Re(L.navigation.location,{matches:Yr,loaderData:$r,errors:or,fetchers:new Map(L.fetchers)})):(xe({errors:or,loaderData:wL(L.loaderData,$r,Yr,or),fetchers:new Map(L.fetchers)}),U=!1)}async function mt(re,ue,ge,Le,De,it,et,xt,wt){let Xe=L.fetchers.get(re);yt(re,e6(wt,Xe?Xe.data:void 0),{flushSync:et});let bt=new AbortController,Ue=H3(t.history,ge,bt.signal);if(it){let Gt=await Ne(Le,new URL(Ue.url).pathname,Ue.signal,re);if(Gt.type==="aborted")return;if(Gt.type==="error"){ut(re,ue,Gt.error,{flushSync:et});return}else if(Gt.matches)Le=Gt.matches;else{ut(re,ue,ws(404,{pathname:ge}),{flushSync:et});return}}let St=w5(Le,ge);Z.set(re,bt);let Ht=te,Nt=V3(l,c,Ue,Le,St,r,De),kt=(await zt(Ue,Nt,De,re))[St.route.id];if(Z.get(re)===bt&&Z.delete(re),!Ue.signal.aborted){if(le.has(re)){yt(re,pl(void 0));return}if(g4(kt))if(B>Ht){yt(re,pl(void 0));return}else{J.add(re),await Ot(Ue,kt,!1,{preventScrollReset:xt});return}if(ko(kt)){ut(re,ue,kt.error);return}yt(re,pl(kt.data))}}async function Ot(re,ue,ge,{submission:Le,fetcherSubmission:De,preventScrollReset:it,replace:et}={}){ge||(D?.resolve(),D=null),ue.response.headers.has("X-Remix-Revalidate")&&(U=!0);let xt=ue.response.headers.get("Location");xn(xt,"Expected a Location header on the redirect Response"),xt=vL(xt,new URL(re.url),h,t.history);let wt=I6(L.location,xt,{_isRedirect:!0});if(n){let Nt=!1;if(ue.response.headers.has("X-Remix-Reload-Document"))Nt=!0;else if(GH(xt)){const Kt=HB(xt,!0);Nt=Kt.origin!==e.location.origin||Os(Kt.pathname,h)==null}if(Nt){et?e.location.replace(xt):e.location.assign(xt);return}}X=null;let Xe=et===!0||ue.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:bt,formAction:Ue,formEncType:St}=L.navigation;!Le&&!De&&bt&&Ue&&St&&(Le=SL(L.navigation));let Ht=Le||De;if(mG.has(ue.response.status)&&Ht&&Aa(Ht.formMethod))await Me(Xe,wt,{submission:{...Ht,formAction:xt},preventScrollReset:it||F,enableViewTransition:ge?Q:void 0});else{let Nt=wm(wt,Le);await Me(Xe,wt,{overrideNavigation:Nt,fetcherSubmission:De,preventScrollReset:it||F,enableViewTransition:ge?Q:void 0})}}async function zt(re,ue,ge,Le){let De,it={};try{De=await $G(v,re,ue,Le,ge,!1)}catch(et){return ue.filter(xt=>xt.shouldLoad).forEach(xt=>{it[xt.route.id]={type:"error",error:et}}),it}if(re.signal.aborted)return it;if(!Aa(re.method))for(let et of ue){if(De[et.route.id]?.type==="error")break;!De.hasOwnProperty(et.route.id)&&!L.loaderData.hasOwnProperty(et.route.id)&&(!L.errors||!L.errors.hasOwnProperty(et.route.id))&&et.shouldCallHandler()&&(De[et.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${et.route.id}`)})}for(let[et,xt]of Object.entries(De))if(LG(xt)){let wt=xt.result;it[et]={type:"redirect",response:EG(wt,re,et,ue,h)}}else it[et]=await RG(xt);return it}async function pt(re,ue,ge,Le){let De=zt(ge,re,Le,null),it=Promise.all(ue.map(async wt=>{if(wt.matches&&wt.match&&wt.request&&wt.controller){let bt=(await zt(wt.request,wt.matches,Le,wt.key))[wt.match.route.id];return{[wt.key]:bt}}else return Promise.resolve({[wt.key]:{type:"error",error:ws(404,{pathname:wt.path})}})})),et=await De,xt=(await it).reduce((wt,Xe)=>Object.assign(wt,Xe),{});return{loaderResults:et,fetcherResults:xt}}function ct(){U=!0,se.forEach((re,ue)=>{Z.has(ue)&&K.add(ue),Ye(ue)})}function yt(re,ue,ge={}){L.fetchers.set(re,ue),xe({fetchers:new Map(L.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function ut(re,ue,ge,Le={}){let De=Ic(L.matches,ue);ft(re),xe({errors:{[De.route.id]:ge},fetchers:new Map(L.fetchers)},{flushSync:(Le&&Le.flushSync)===!0})}function tt(re){return ie.set(re,(ie.get(re)||0)+1),le.has(re)&&le.delete(re),L.fetchers.get(re)||gG}function dt(re,ue){Ye(re,ue?.reason),yt(re,pl(null))}function ft(re){let ue=L.fetchers.get(re);Z.has(re)&&!(ue&&ue.state==="loading"&&W.has(re))&&Ye(re),se.delete(re),W.delete(re),J.delete(re),le.delete(re),K.delete(re),L.fetchers.delete(re)}function nt(re){let ue=(ie.get(re)||0)-1;ue<=0?(ie.delete(re),le.add(re)):ie.set(re,ue),xe({fetchers:new Map(L.fetchers)})}function Ye(re,ue){let ge=Z.get(re);ge&&(ge.abort(ue),Z.delete(re))}function Pt(re){for(let ue of re){let ge=tt(ue),Le=pl(ge.data);L.fetchers.set(ue,Le)}}function en(){let re=[],ue=!1;for(let ge of J){let Le=L.fetchers.get(ge);xn(Le,`Expected fetcher: ${ge}`),Le.state==="loading"&&(J.delete(ge),re.push(ge),ue=!0)}return Pt(re),ue}function It(re){let ue=[];for(let[ge,Le]of W)if(Le0}function vn(re,ue){let ge=L.blockers.get(re)||k8;return ce.get(re)!==ue&&ce.set(re,ue),ge}function Ft(re){L.blockers.delete(re),ce.delete(re)}function Ct(re,ue){let ge=L.blockers.get(re)||k8;xn(ge.state==="unblocked"&&ue.state==="blocked"||ge.state==="blocked"&&ue.state==="blocked"||ge.state==="blocked"&&ue.state==="proceeding"||ge.state==="blocked"&&ue.state==="unblocked"||ge.state==="proceeding"&&ue.state==="unblocked",`Invalid blocker state transition: ${ge.state} -> ${ue.state}`);let Le=new Map(L.blockers);Le.set(re,ue),xe({blockers:Le})}function $t({currentLocation:re,nextLocation:ue,historyAction:ge}){if(ce.size===0)return;ce.size>1&&Ar(!1,"A router only supports one blocker at a time");let Le=Array.from(ce.entries()),[De,it]=Le[Le.length-1],et=L.blockers.get(De);if(!(et&&et.state==="proceeding")&&it({currentLocation:re,nextLocation:ue,historyAction:ge}))return De}function Vt(re){let ue=ws(404,{pathname:re}),ge=m||d,{matches:Le,route:De}=Zf(ge);return{notFoundMatches:Le,route:De,error:ue}}function Jt(re,ue,ge){if(w=re,C=ue,S=ge||null,!z&&L.navigation===ym){z=!0;let Le=vt(L.location,L.matches);Le!=null&&xe({restoreScrollPosition:Le})}return()=>{w=null,C=null,S=null}}function lt(re,ue){return S&&S(re,ue.map(Le=>NW(Le,L.loaderData)))||re.key}function gt(re,ue){if(w&&C){let ge=lt(re,ue);w[ge]=C()}}function vt(re,ue){if(w){let ge=lt(re,ue),Le=w[ge];if(typeof Le=="number")return Le}return null}function rt(re,ue,ge){if(t.patchRoutesOnNavigation)if(re){if(Object.keys(re[0].params).length>0)return{active:!0,matches:h6(ue,ge,h,!0)}}else return{active:!0,matches:h6(ue,ge,h,!0)||[]};return{active:!1,matches:null}}async function Ne(re,ue,ge,Le){if(!t.patchRoutesOnNavigation)return{type:"success",matches:re};let De=re;for(;;){let it=m==null,et=m||d,xt=c;try{await t.patchRoutesOnNavigation({signal:ge,path:ue,matches:De,fetcherKey:Le,patch:(bt,Ue)=>{ge.aborted||hL(bt,Ue,et,xt,l,!1)}})}catch(bt){return{type:"error",error:bt,partialMatches:De}}finally{it&&!ge.aborted&&(d=[...d])}if(ge.aborted)return{type:"aborted"};let wt=Lc(et,ue,h),Xe=null;if(wt){if(Object.keys(wt[0].params).length===0)return{type:"success",matches:wt};if(Xe=h6(et,ue,h,!0),!(Xe&&De.lengthge.route.id===ue[Le].route.id)}function Rt(re){c={},m=_6(re,l,void 0,c)}function at(re,ue,ge=!1){let Le=m==null;hL(re,ue,m||d,c,l,ge),Le&&(d=[...d],xe({}))}return P={get basename(){return h},get future(){return b},get state(){return L},get routes(){return d},get window(){return e},initialize:fe,subscribe:ve,enableScrollRestoration:Jt,navigate:$e,fetch:Ze,revalidate:_e,createHref:re=>t.history.createHref(re),encodeLocation:re=>t.history.encodeLocation(re),getFetcher:tt,resetFetcher:dt,deleteFetcher:nt,dispose:ye,getBlocker:vn,deleteBlocker:Ft,patchRoutes:at,_internalFetchControllers:Z,_internalSetRoutes:Rt,_internalSetStateDoNotUseOrYouWillBreakYourApp(re){xe(re)}},t.unstable_instrumentations&&(P=sG(P,t.unstable_instrumentations.map(re=>re.router).filter(Boolean))),P}function bG(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Rg(t,e,n,r,s,l){let c,d;if(s){c=[];for(let h of e)if(c.push(h),h.route.id===s){d=h;break}}else c=e,d=e[e.length-1];let m=su(r||".",R7(c),Os(t.pathname,n)||t.pathname,l==="path");if(r==null&&(m.search=t.search,m.hash=t.hash),(r==null||r===""||r===".")&&d){let h=YH(m.search);if(d.route.index&&!h)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let v=new URLSearchParams(m.search),b=v.getAll("index");v.delete("index"),b.filter(O=>O).forEach(O=>v.append("index",O));let y=v.toString();m.search=y?`?${y}`:""}}return n!=="/"&&(m.pathname=eG({basename:n,pathname:m.pathname})),Ni(m)}function dL(t,e,n){if(!n||!bG(n))return{path:e};if(n.formMethod&&!VG(n.formMethod))return{path:e,error:ws(405,{method:n.formMethod})};let r=()=>({path:e,error:ws(400,{type:"invalid-body"})}),l=(n.formMethod||"get").toUpperCase(),c=YB(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Aa(l))return r();let b=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((y,[O,w])=>`${y}${O}=${w} -`,""):String(n.body);return{path:e,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:b}}}else if(n.formEncType==="application/json"){if(!Aa(l))return r();try{let b=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:b,text:void 0}}}catch{return r()}}}xn(typeof FormData=="function","FormData is not available in this environment");let d,m;if(n.formData)d=Mg(n.formData),m=n.formData;else if(n.body instanceof FormData)d=Mg(n.body),m=n.body;else if(n.body instanceof URLSearchParams)d=n.body,m=bL(d);else if(n.body==null)d=new URLSearchParams,m=new FormData;else try{d=new URLSearchParams(n.body),m=bL(d)}catch{return r()}let h={formMethod:l,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(Aa(h.formMethod))return{path:e,submission:h};let v=Rl(e);return t&&v.search&&YH(v.search)&&d.append("index",""),v.search=`?${d}`,{path:Ni(v),submission:h}}function fL(t,e,n,r,s,l,c,d,m,h,v,b,y,O,w,S,C,z,M,T,H){let j=T?ko(T[1])?T[1].error:T[1].data:void 0,_=s.createURL(l.location),P=s.createURL(m),L;if(v&&l.errors){let q=Object.keys(l.errors)[0];L=c.findIndex(N=>N.route.id===q)}else if(T&&ko(T[1])){let q=T[0];L=c.findIndex(N=>N.route.id===q)-1}let V=T?T[1].statusCode:void 0,D=V&&V>=400,F={currentUrl:_,currentParams:l.matches[0]?.params||{},nextUrl:P,nextParams:c[0].params,...d,actionResult:j,actionStatus:V},X=lu(c),Q=c.map((q,N)=>{let{route:U}=q,K=null;if(L!=null&&N>L)K=!1;else if(U.lazy)K=!0;else if(!XH(U))K=!1;else if(v){let{shouldLoad:W}=UB(U,l.loaderData,l.errors);K=W}else yG(l.loaderData,l.matches[N],q)&&(K=!0);if(K!==null)return Eg(n,r,t,X,q,h,e,K);let Z=!1;typeof H=="boolean"?Z=H:D?Z=!1:(b||_.pathname+_.search===P.pathname+P.search||_.search!==P.search||wG(l.matches[N],q))&&(Z=!0);let te={...F,defaultShouldRevalidate:Z},B=O6(q,te);return Eg(n,r,t,X,q,h,e,B,te,H)}),Y=[];return w.forEach((q,N)=>{if(v||!c.some(se=>se.route.id===q.routeId)||O.has(N))return;let U=l.fetchers.get(N),K=U&&U.state!=="idle"&&U.data===void 0,Z=Lc(C,q.path,z);if(!Z){if(M&&K)return;Y.push({key:N,routeId:q.routeId,path:q.path,matches:null,match:null,request:null,controller:null});return}if(S.has(N))return;let te=w5(Z,q.path),B=new AbortController,W=H3(s,q.path,B.signal),J=null;if(y.has(N))y.delete(N),J=V3(n,r,W,Z,te,h,e);else if(K)b&&(J=V3(n,r,W,Z,te,h,e));else{let se;typeof H=="boolean"?se=H:D?se=!1:se=b;let ie={...F,defaultShouldRevalidate:se};O6(te,ie)&&(J=V3(n,r,W,Z,te,h,e,ie))}J&&Y.push({key:N,routeId:q.routeId,path:q.path,matches:J,match:te,request:W,controller:B})}),{dsMatches:Q,revalidatingFetchers:Y}}function XH(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function UB(t,e,n){if(t.lazy)return{shouldLoad:!0,renderFallback:!0};if(!XH(t))return{shouldLoad:!1,renderFallback:!1};let r=e!=null&&t.id in e,s=n!=null&&n[t.id]!==void 0;if(!r&&s)return{shouldLoad:!1,renderFallback:!1};if(typeof t.loader=="function"&&t.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let l=!r&&!s;return{shouldLoad:l,renderFallback:l}}function yG(t,e,n){let r=!e||n.route.id!==e.route.id,s=!t.hasOwnProperty(n.route.id);return r||s}function wG(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function O6(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function hL(t,e,n,r,s,l){let c;if(t){let h=r[t];xn(h,`No route found to patch children into: routeId = ${t}`),h.children||(h.children=[]),c=h.children}else c=n;let d=[],m=[];if(e.forEach(h=>{let v=c.find(b=>qB(h,b));v?m.push({existingRoute:v,newRoute:h}):d.push(h)}),d.length>0){let h=_6(d,s,[t||"_","patch",String(c?.length||"0")],r);c.push(...h)}if(l&&m.length>0)for(let h=0;he.children?.some(s=>qB(n,s)))??!1:!1}var mL=new WeakMap,WB=({key:t,route:e,manifest:n,mapRouteProperties:r})=>{let s=n[e.id];if(xn(s,"No route found in manifest"),!s.lazy||typeof s.lazy!="object")return;let l=s.lazy[t];if(!l)return;let c=mL.get(s);c||(c={},mL.set(s,c));let d=c[t];if(d)return d;let m=(async()=>{let h=VW(t),b=s[t]!==void 0&&t!=="hasErrorBoundary";if(h)Ar(!h,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(b)Ar(!1,`Route "${s.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let y=await l();y!=null&&(Object.assign(s,{[t]:y}),Object.assign(s,r(s)))}typeof s.lazy=="object"&&(s.lazy[t]=void 0,Object.values(s.lazy).every(y=>y===void 0)&&(s.lazy=void 0))})();return c[t]=m,m},gL=new WeakMap;function OG(t,e,n,r,s){let l=n[t.id];if(xn(l,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let v=gL.get(l);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let b=(async()=>{xn(typeof t.lazy=="function","No lazy route function found");let y=await t.lazy(),O={};for(let w in y){let S=y[w];if(S===void 0)continue;let C=AW(w),M=l[w]!==void 0&&w!=="hasErrorBoundary";C?Ar(!C,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):M?Ar(!M,`Route "${l.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):O[w]=S}Object.assign(l,O),Object.assign(l,{...r(l),lazy:void 0})})();return gL.set(l,b),b.catch(()=>{}),{lazyRoutePromise:b,lazyHandlerPromise:b}}let c=Object.keys(t.lazy),d=[],m;for(let v of c){if(s&&s.includes(v))continue;let b=WB({key:v,route:t,manifest:n,mapRouteProperties:r});b&&(d.push(b),v===e&&(m=b))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:m}}async function pL(t){let e=t.matches.filter(s=>s.shouldLoad),n={};return(await Promise.all(e.map(s=>s.resolve()))).forEach((s,l)=>{n[e[l].route.id]=s}),n}async function xG(t){return t.matches.some(e=>e.route.middleware)?GB(t,()=>pL(t)):pL(t)}function GB(t,e){return SG(t,e,r=>{if(_G(r))throw r;return r},jG,n);function n(r,s,l){if(l)return Promise.resolve(Object.assign(l.value,{[s]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(h=>h.route.id===s),0),Math.max(c.findIndex(h=>h.shouldCallHandler()),0)),m=Ic(c,c[d].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:r}})}}}async function SG(t,e,n,r,s){let{matches:l,request:c,params:d,context:m,unstable_pattern:h}=t,v=l.flatMap(y=>y.route.middleware?y.route.middleware.map(O=>[y.route.id,O]):[]);return await XB({request:c,params:d,context:m,unstable_pattern:h},v,e,n,r,s)}async function XB(t,e,n,r,s,l,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let m=e[c];if(!m)return await n();let[h,v]=m,b,y=async()=>{if(b)throw new Error("You may only call `next()` once per middleware");try{return b={value:await XB(t,e,n,r,s,l,c+1)},b.value}catch(O){return b={value:await l(O,h,b)},b.value}};try{let O=await v(t,y),w=O!=null?r(O):void 0;return s(w)?w:b?w??b.value:(b={value:await y()},b.value)}catch(O){return await l(O,h,b)}}function KB(t,e,n,r,s){let l=WB({key:"middleware",route:r.route,manifest:e,mapRouteProperties:t}),c=OG(r.route,Aa(n.method)?"action":"loader",e,t,s);return{middleware:l,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Eg(t,e,n,r,s,l,c,d,m=null,h){let v=!1,b=KB(t,e,n,s,l);return{...s,_lazyPromises:b,shouldLoad:d,shouldRevalidateArgs:m,shouldCallHandler(y){return v=!0,m?typeof h=="boolean"?O6(s,{...m,defaultShouldRevalidate:h}):typeof y=="boolean"?O6(s,{...m,defaultShouldRevalidate:y}):O6(s,m):d},resolve(y){let{lazy:O,loader:w,middleware:S}=s.route,C=v||d||y&&!Aa(n.method)&&(O||w),z=S&&S.length>0&&!w&&!O;return C&&(Aa(n.method)||!z)?CG({request:n,unstable_pattern:r,match:s,lazyHandlerPromise:b?.handler,lazyRoutePromise:b?.route,handlerOverride:y,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function V3(t,e,n,r,s,l,c,d=null){return r.map(m=>m.route.id!==s.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:KB(t,e,n,m,l),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Eg(t,e,n,lu(r),m,l,c,!0,d))}async function $G(t,e,n,r,s,l){n.some(h=>h._lazyPromises?.middleware)&&await Promise.all(n.map(h=>h._lazyPromises?.middleware));let c={request:e,unstable_pattern:lu(n),params:n[0].params,context:s,matches:n},m=await t({...c,fetcherKey:r,runClientMiddleware:h=>{let v=c;return GB(v,()=>h({...v,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return m}async function CG({request:t,unstable_pattern:e,match:n,lazyHandlerPromise:r,lazyRoutePromise:s,handlerOverride:l,scopedContext:c}){let d,m,h=Aa(t.method),v=h?"action":"loader",b=y=>{let O,w=new Promise((z,M)=>O=M);m=()=>O(),t.signal.addEventListener("abort",m);let S=z=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${n.route.id}]`)):y({request:t,unstable_pattern:e,params:n.params,context:c},...z!==void 0?[z]:[]),C=(async()=>{try{return{type:"data",result:await(l?l(M=>S(M)):S())}}catch(z){return{type:"error",result:z}}})();return Promise.race([C,w])};try{let y=h?n.route.action:n.route.loader;if(r||s)if(y){let O,[w]=await Promise.all([b(y).catch(S=>{O=S}),r,s]);if(O!==void 0)throw O;d=w}else{await r;let O=h?n.route.action:n.route.loader;if(O)[d]=await Promise.all([b(O),s]);else if(v==="action"){let w=new URL(t.url),S=w.pathname+w.search;throw ws(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(y)d=await b(y);else{let O=new URL(t.url),w=O.pathname+O.search;throw ws(404,{pathname:w})}}catch(y){return{type:"error",result:y}}finally{m&&t.signal.removeEventListener("abort",m)}return d}async function zG(t){let e=t.headers.get("Content-Type");return e&&/\bapplication\/json\b/.test(e)?t.body==null?null:t.json():t.text()}async function RG(t){let{result:e,type:n}=t;if(KH(e)){let r;try{r=await zG(e)}catch(s){return{type:"error",error:s}}return n==="error"?{type:"error",error:new iu(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}:{type:"data",data:r,statusCode:e.status,headers:e.headers}}return n==="error"?xL(e)?e.data instanceof Error?{type:"error",error:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:HG(e),statusCode:V6(e)?e.status:void 0,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"error",error:e,statusCode:V6(e)?e.status:void 0}:xL(e)?{type:"data",data:e.data,statusCode:e.init?.status,headers:e.init?.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function EG(t,e,n,r,s){let l=t.headers.get("Location");if(xn(l,"Redirects returned/thrown from loaders/actions must have a Location header"),!GH(l)){let c=r.slice(0,r.findIndex(d=>d.route.id===n)+1);l=Rg(new URL(e.url),c,s,l),t.headers.set("Location",l)}return t}function vL(t,e,n,r){let s=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(GH(t)){let l=t,c=l.startsWith("//")?new URL(e.protocol+l):new URL(l);if(s.includes(c.protocol))throw new Error("Invalid redirect location");let d=Os(c.pathname,n)!=null;if(c.origin===e.origin&&d)return c.pathname+c.search+c.hash}try{let l=r.createURL(t);if(s.includes(l.protocol))throw new Error("Invalid redirect location")}catch{}return t}function H3(t,e,n,r){let s=t.createURL(YB(e)).toString(),l={signal:n};if(r&&Aa(r.formMethod)){let{formMethod:c,formEncType:d}=r;l.method=c.toUpperCase(),d==="application/json"?(l.headers=new Headers({"Content-Type":d}),l.body=JSON.stringify(r.json)):d==="text/plain"?l.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?l.body=Mg(r.formData):l.body=r.formData}return new Request(s,l)}function Mg(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function bL(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function MG(t,e,n,r=!1,s=!1){let l={},c=null,d,m=!1,h={},v=n&&ko(n[1])?n[1].error:void 0;return t.forEach(b=>{if(!(b.route.id in e))return;let y=b.route.id,O=e[y];if(xn(!g4(O),"Cannot handle redirect results in processLoaderData"),ko(O)){let w=O.error;if(v!==void 0&&(w=v,v=void 0),c=c||{},s)c[y]=w;else{let S=Ic(t,y);c[S.route.id]==null&&(c[S.route.id]=w)}r||(l[y]=DB),m||(m=!0,d=V6(O.error)?O.error.status:500),O.headers&&(h[y]=O.headers)}else l[y]=O.data,O.statusCode&&O.statusCode!==200&&!m&&(d=O.statusCode),O.headers&&(h[y]=O.headers)}),v!==void 0&&n&&(c={[n[0]]:v},n[2]&&(l[n[2]]=void 0)),{loaderData:l,errors:c,statusCode:d||200,loaderHeaders:h}}function yL(t,e,n,r,s,l){let{loaderData:c,errors:d}=MG(e,n,r);return s.filter(m=>!m.matches||m.matches.some(h=>h.shouldLoad)).forEach(m=>{let{key:h,match:v,controller:b}=m;if(b&&b.signal.aborted)return;let y=l[h];if(xn(y,"Did not find corresponding fetcher result"),ko(y)){let O=Ic(t.matches,v?.route.id);d&&d[O.route.id]||(d={...d,[O.route.id]:y.error}),t.fetchers.delete(h)}else if(g4(y))xn(!1,"Unhandled fetcher revalidation redirect");else{let O=pl(y.data);t.fetchers.set(h,O)}}),{loaderData:c,errors:d}}function wL(t,e,n,r){let s=Object.entries(e).filter(([,l])=>l!==DB).reduce((l,[c,d])=>(l[c]=d,l),{});for(let l of n){let c=l.route.id;if(!e.hasOwnProperty(c)&&t.hasOwnProperty(c)&&l.route.loader&&(s[c]=t[c]),r&&r.hasOwnProperty(c))break}return s}function OL(t){return t?ko(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function Ic(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Zf(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function ws(t,{pathname:e,routeId:n,method:r,type:s,message:l}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&e&&n?d=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:s==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${n}" does not match URL "${e}"`):t===404?(c="Not Found",d=`No route matches URL "${e}"`):t===405&&(c="Method Not Allowed",r&&e&&n?d=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new iu(t||500,c,new Error(d),!0)}function Jf(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,s]=e[n];if(g4(s))return{key:r,result:s}}}function YB(t){let e=typeof t=="string"?Rl(t):t;return Ni({...e,hash:""})}function TG(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function HG(t){return new iu(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function jG(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([e,n])=>typeof e=="string"&&PG(n))}function PG(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function LG(t){return KH(t.result)&&FB.has(t.result.status)}function ko(t){return t.type==="error"}function g4(t){return(t&&t.type)==="redirect"}function xL(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function KH(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function IG(t){return FB.has(t)}function _G(t){return KH(t)&&IG(t.status)&&t.headers.has("Location")}function VG(t){return hG.has(t.toUpperCase())}function Aa(t){return dG.has(t.toUpperCase())}function YH(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function w5(t,e){let n=typeof e=="string"?Rl(e).search:e.search;if(t[t.length-1].route.index&&YH(n||""))return t[t.length-1];let r=IB(t);return r[r.length-1]}function SL(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:l,json:c}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(l!=null)return{formMethod:e,formAction:n,formEncType:r,formData:l,json:void 0,text:void 0};if(c!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:c,text:void 0}}}function wm(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function BG(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function e6(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function AG(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function pl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function FG(t,e){try{let n=t.sessionStorage.getItem(NB);if(n){let r=JSON.parse(n);for(let[s,l]of Object.entries(r||{}))l&&Array.isArray(l)&&e.set(s,new Set(l||[]))}}catch{}}function NG(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(NB,JSON.stringify(n))}catch(r){Ar(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function $L(){let t,e,n=new Promise((r,s)=>{t=async l=>{r(l);try{await n}catch{}},e=async l=>{s(l);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var I4=a.createContext(null);I4.displayName="DataRouter";var cu=a.createContext(null);cu.displayName="DataRouterState";var QB=a.createContext(!1);function DG(){return a.useContext(QB)}var QH=a.createContext({isTransitioning:!1});QH.displayName="ViewTransition";var ZB=a.createContext(new Map);ZB.displayName="Fetchers";var UG=a.createContext(null);UG.displayName="Await";var as=a.createContext(null);as.displayName="Navigation";var E7=a.createContext(null);E7.displayName="Location";var ai=a.createContext({outlet:null,matches:[],isDataRoute:!1});ai.displayName="Route";var ZH=a.createContext(null);ZH.displayName="RouteError";var JB="REACT_ROUTER_ERROR",qG="REDIRECT",WG="ROUTE_ERROR_RESPONSE";function GG(t){if(t.startsWith(`${JB}:${qG}:{`))try{let e=JSON.parse(t.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function XG(t){if(t.startsWith(`${JB}:${WG}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new iu(e.status,e.statusText,e.data)}catch{}}function KG(t,{relative:e}={}){xn(Y3(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:r}=a.useContext(as),{hash:s,pathname:l,search:c}=uu(t,{relative:e}),d=l;return n!=="/"&&(d=l==="/"?n:ks([n,l])),r.createHref({pathname:d,search:c,hash:s})}function Y3(){return a.useContext(E7)!=null}function os(){return xn(Y3(),"useLocation() may be used only in the context of a component."),a.useContext(E7).location}var kB="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function eA(t){a.useContext(as).static||a.useLayoutEffect(t)}function Gc(){let{isDataRoute:t}=a.useContext(ai);return t?cX():YG()}function YG(){xn(Y3(),"useNavigate() may be used only in the context of a component.");let t=a.useContext(I4),{basename:e,navigator:n}=a.useContext(as),{matches:r}=a.useContext(ai),{pathname:s}=os(),l=JSON.stringify(R7(r)),c=a.useRef(!1);return eA(()=>{c.current=!0}),a.useCallback((m,h={})=>{if(Ar(c.current,kB),!c.current)return;if(typeof m=="number"){n.go(m);return}let v=su(m,JSON.parse(l),s,h.relative==="path");t==null&&e!=="/"&&(v.pathname=v.pathname==="/"?e:ks([e,v.pathname])),(h.replace?n.replace:n.push)(v,h.state,h)},[e,n,l,s,t])}var QG=a.createContext(null);function ZG(t){let e=a.useContext(ai).outlet;return a.useMemo(()=>e&&a.createElement(QG.Provider,{value:t},e),[e,t])}function uu(t,{relative:e}={}){let{matches:n}=a.useContext(ai),{pathname:r}=os(),s=JSON.stringify(R7(n));return a.useMemo(()=>su(t,JSON.parse(s),r,e==="path"),[t,s,r,e])}function JG(t,e,n){xn(Y3(),"useRoutes() may be used only in the context of a component.");let{navigator:r}=a.useContext(as),{matches:s}=a.useContext(ai),l=s[s.length-1],c=l?l.params:{},d=l?l.pathname:"/",m=l?l.pathnameBase:"/",h=l&&l.route;{let C=h&&h.path||"";nA(d,!h||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${d}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let v=os(),b;b=v;let y=b.pathname||"/",O=y;if(m!=="/"){let C=m.replace(/^\//,"").split("/");O="/"+y.replace(/^\//,"").split("/").slice(C.length).join("/")}let w=Lc(t,{pathname:O});return Ar(h||w!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Ar(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),rX(w&&w.map(C=>Object.assign({},C,{params:Object.assign({},c,C.params),pathname:ks([m,r.encodeLocation?r.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:ks([m,r.encodeLocation?r.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),s,n)}function kG(){let t=lX(),e=V6(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:l},"ErrorBoundary")," or"," ",a.createElement("code",{style:l},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},e),n?a.createElement("pre",{style:s},n):null,c)}var eX=a.createElement(kG,null),tA=class extends a.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=XG(t.digest);n&&(t=n)}let e=t!==void 0?a.createElement(ai.Provider,{value:this.props.routeContext},a.createElement(ZH.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?a.createElement(tX,{error:t},e):e}};tA.contextType=QB;var Om=new WeakMap;function tX({children:t,error:e}){let{basename:n}=a.useContext(as);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=GG(e.digest);if(r){let s=Om.get(e);if(s)throw s;let l=VB(r.location,n);if(_B&&!Om.get(e))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Om.set(e,c),c}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return t}function nX({routeContext:t,match:e,children:n}){let r=a.useContext(I4);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),a.createElement(ai.Provider,{value:t},n)}function rX(t,e=[],n){let r=n?.state;if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let v=s.findIndex(b=>b.route.id&&l?.[b.route.id]!==void 0);xn(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,v+1))}let c=!1,d=-1;if(n&&r){c=r.renderFallback;for(let v=0;v=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let m=n?.onError,h=r&&m?(v,b)=>{m(v,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:lu(r.matches),errorInfo:b})}:void 0;return s.reduceRight((v,b,y)=>{let O,w=!1,S=null,C=null;r&&(O=l&&b.route.id?l[b.route.id]:void 0,S=b.route.errorElement||eX,c&&(d<0&&y===0?(nA("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,C=null):d===y&&(w=!0,C=b.route.hydrateFallbackElement||null)));let z=e.concat(s.slice(0,y+1)),M=()=>{let T;return O?T=S:w?T=C:b.route.Component?T=a.createElement(b.route.Component,null):b.route.element?T=b.route.element:T=v,a.createElement(nX,{match:b,routeContext:{outlet:v,matches:z,isDataRoute:r!=null},children:T})};return r&&(b.route.ErrorBoundary||b.route.errorElement||y===0)?a.createElement(tA,{location:r.location,revalidation:r.revalidation,component:S,error:O,children:M(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:h}):M()},null)}function JH(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function aX(t){let e=a.useContext(I4);return xn(e,JH(t)),e}function oX(t){let e=a.useContext(cu);return xn(e,JH(t)),e}function sX(t){let e=a.useContext(ai);return xn(e,JH(t)),e}function kH(t){let e=sX(t),n=e.matches[e.matches.length-1];return xn(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function iX(){return kH("useRouteId")}function lX(){let t=a.useContext(ZH),e=oX("useRouteError"),n=kH("useRouteError");return t!==void 0?t:e.errors?.[n]}function cX(){let{router:t}=aX("useNavigate"),e=kH("useNavigate"),n=a.useRef(!1);return eA(()=>{n.current=!0}),a.useCallback(async(s,l={})=>{Ar(n.current,kB),n.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:e,...l}))},[t,e])}var CL={};function nA(t,e,n){!e&&!CL[t]&&(CL[t]=!0,Ar(!1,n))}var zL={};function RL(t,e){!t&&!zL[e]&&(zL[e]=!0,console.warn(e))}var uX="useOptimistic",EL=MB[uX],dX=()=>{};function fX(t){return EL?EL(t):[t,dX]}function hX(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ar(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(e,{element:a.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ar(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(e,{hydrateFallbackElement:a.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ar(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(e,{errorElement:a.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),e}var mX=["HydrateFallback","hydrateFallbackElement"],gX=class{constructor(){this.status="pending",this.promise=new Promise((t,e)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",e(n))}})}};function pX({router:t,flushSync:e,onError:n,unstable_useTransitions:r}){r=DG()||r;let[l,c]=a.useState(t.state),[d,m]=fX(l),[h,v]=a.useState(),[b,y]=a.useState({isTransitioning:!1}),[O,w]=a.useState(),[S,C]=a.useState(),[z,M]=a.useState(),T=a.useRef(new Map),H=a.useCallback((L,{deletedFetchers:V,newErrors:D,flushSync:F,viewTransitionOpts:X})=>{D&&n&&Object.values(D).forEach(Y=>n(Y,{location:L.location,params:L.matches[0]?.params??{},unstable_pattern:lu(L.matches)})),L.fetchers.forEach((Y,q)=>{Y.data!==void 0&&T.current.set(q,Y.data)}),V.forEach(Y=>T.current.delete(Y)),RL(F===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Q=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(RL(X==null||Q,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!Q){e&&F?e(()=>c(L)):r===!1?c(L):a.startTransition(()=>{r===!0&&m(Y=>ML(Y,L)),c(L)});return}if(e&&F){e(()=>{S&&(O?.resolve(),S.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let Y=t.window.document.startViewTransition(()=>{e(()=>c(L))});Y.finished.finally(()=>{e(()=>{w(void 0),C(void 0),v(void 0),y({isTransitioning:!1})})}),e(()=>C(Y));return}S?(O?.resolve(),S.skipTransition(),M({state:L,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(v(L),y({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[t.window,e,S,O,r,m,n]);a.useLayoutEffect(()=>t.subscribe(H),[t,H]),a.useEffect(()=>{b.isTransitioning&&!b.flushSync&&w(new gX)},[b]),a.useEffect(()=>{if(O&&h&&t.window){let L=h,V=O.promise,D=t.window.document.startViewTransition(async()=>{r===!1?c(L):a.startTransition(()=>{r===!0&&m(F=>ML(F,L)),c(L)}),await V});D.finished.finally(()=>{w(void 0),C(void 0),v(void 0),y({isTransitioning:!1})}),C(D)}},[h,O,t.window,r,m]),a.useEffect(()=>{O&&h&&d.location.key===h.location.key&&O.resolve()},[O,S,d.location,h]),a.useEffect(()=>{!b.isTransitioning&&z&&(v(z.state),y({isTransitioning:!0,flushSync:!1,currentLocation:z.currentLocation,nextLocation:z.nextLocation}),M(void 0))},[b.isTransitioning,z]);let j=a.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:L=>t.navigate(L),push:(L,V,D)=>t.navigate(L,{state:V,preventScrollReset:D?.preventScrollReset}),replace:(L,V,D)=>t.navigate(L,{replace:!0,state:V,preventScrollReset:D?.preventScrollReset})}),[t]),_=t.basename||"/",P=a.useMemo(()=>({router:t,navigator:j,static:!1,basename:_,onError:n}),[t,j,_,n]);return a.createElement(a.Fragment,null,a.createElement(I4.Provider,{value:P},a.createElement(cu.Provider,{value:d},a.createElement(ZB.Provider,{value:T.current},a.createElement(QH.Provider,{value:b},a.createElement(OX,{basename:_,location:d.location,navigationType:d.historyAction,navigator:j,unstable_useTransitions:r},a.createElement(vX,{routes:t.routes,future:t.future,state:d,isStatic:!1,onError:n})))))),null)}function ML(t,e){return{...t,navigation:e.navigation.state!=="idle"?e.navigation:t.navigation,revalidation:e.revalidation!=="idle"?e.revalidation:t.revalidation,actionData:e.navigation.state!=="submitting"?e.actionData:t.actionData,fetchers:e.fetchers}}var vX=a.memo(bX);function bX({routes:t,future:e,state:n,isStatic:r,onError:s}){return JG(t,void 0,{state:n,isStatic:r,onError:s})}function yX({to:t,replace:e,state:n,relative:r}){xn(Y3()," may be used only in the context of a component.");let{static:s}=a.useContext(as);Ar(!s," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:l}=a.useContext(ai),{pathname:c}=os(),d=Gc(),m=su(t,R7(l),c,r==="path"),h=JSON.stringify(m);return a.useEffect(()=>{d(JSON.parse(h),{replace:e,state:n,relative:r})},[d,h,r,e,n]),null}function wX(t){return ZG(t.context)}function OX({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){xn(!Y3(),"You cannot render a inside another . You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),m=a.useMemo(()=>({basename:d,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[d,s,l,c]);typeof n=="string"&&(n=Rl(n));let{pathname:h="/",search:v="",hash:b="",state:y=null,key:O="default",unstable_mask:w}=n,S=a.useMemo(()=>{let C=Os(h,d);return C==null?null:{location:{pathname:C,search:v,hash:b,state:y,key:O,unstable_mask:w},navigationType:r}},[d,h,v,b,y,O,r,w]);return Ar(S!=null,` is not able to match the URL "${h}${v}${b}" because it does not start with the basename, so the won't render anything.`),S==null?null:a.createElement(as.Provider,{value:m},a.createElement(E7.Provider,{children:e,value:S}))}var O5="get",x5="application/x-www-form-urlencoded";function M7(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function xX(t){return M7(t)&&t.tagName.toLowerCase()==="button"}function SX(t){return M7(t)&&t.tagName.toLowerCase()==="form"}function $X(t){return M7(t)&&t.tagName.toLowerCase()==="input"}function CX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function zX(t,e){return t.button===0&&(!e||e==="_self")&&!CX(t)}function Tg(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function RX(t,e){let n=Tg(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(l=>{n.append(s,l)})}),n}var kf=null;function EX(){if(kf===null)try{new FormData(document.createElement("form"),0),kf=!1}catch{kf=!0}return kf}var MX=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xm(t){return t!=null&&!MX.has(t)?(Ar(!1,`"${t}" is not a valid \`encType\` for \`
    \`/\`\` and will default to "${x5}"`),null):t}function TX(t,e){let n,r,s,l,c;if(SX(t)){let d=t.getAttribute("action");r=d?Os(d,e):null,n=t.getAttribute("method")||O5,s=xm(t.getAttribute("enctype"))||x5,l=new FormData(t)}else if(xX(t)||$X(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a