@templmf/temp-solf-lmf 0.0.94 → 0.0.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/new/@antv/component@2.1.11/es2022/component.mjs +15 -0
  2. package/new/@antv/component@2.1.11/es2022/esm/animation.mjs +3 -0
  3. package/new/@antv/component@2.1.11/es2022/esm/core.mjs +3 -0
  4. package/new/@antv/component@2.1.11/es2022/esm/ui/axis/utils.mjs +3 -0
  5. package/new/@antv/component@2.1.11/es2022/esm/util/layout.mjs +3 -0
  6. package/new/@antv/g-canvas@2.0.0/es2022/g-canvas.mjs +20 -0
  7. package/new/@antv/g-lite@2.7.0/es2022/g-lite.mjs +22 -0
  8. package/new/@antv/g-math@3.1.0/es2022/g-math.mjs +17 -0
  9. package/new/@antv/g-plugin-dragndrop@2.1.1/es2022/g-plugin-dragndrop.mjs +18 -0
  10. package/new/@antv/g@6.3.1/es2022/g.mjs +24 -0
  11. package/new/bubblesets-js@^2.3.4 +3 -0
  12. package/new/html2canvas@1.4.1/es2022/html2canvas.mjs +30 -0
  13. package/new/html2canvas@v1.4.1 +3 -0
  14. package/new/svg-path-parser@1.1.0/es2022/svg-path-parser.mjs +4 -0
  15. package/new/svg-path-parser@^1.1.0 +3 -0
  16. package/new/tslib@2.8.1/es2022/tslib.mjs +3 -0
  17. package/new/tslib@^2.0.0 +3 -0
  18. package/package.json +1 -1
  19. package/@antv/algorithm@0.1.26/es2022/algorithm.mjs +0 -3
  20. package/@antv/component@2.1.7/es2022/component.mjs +0 -15
  21. package/@antv/event-emitter@0.1.3/es2022/event-emitter.mjs +0 -3
  22. package/@antv/g-canvas@2.0.48/es2022/g-canvas.mjs +0 -18
  23. package/@antv/g-plugin-dragndrop@2.0.38/es2022/g-plugin-dragndrop.mjs +0 -18
  24. package/@antv/g6 +0 -13
  25. package/@antv/g6@5.1.1/es2022/g6.mjs +0 -125
  26. package/@antv/g@6.1.28/es2022/g.mjs +0 -15
  27. package/@antv/graphlib@2.0.4/es2022/graphlib.mjs +0 -3
  28. package/@antv/hierarchy@0.7.1/es2022/hierarchy.mjs +0 -3
  29. package/@antv/layout@2.0.0/es2022/layout.mjs +0 -20
  30. package/@antv/util@3.3.11/es2022/util.mjs +0 -3
  31. package/bubblesets-js@2.3.4/es2022/bubblesets-js.mjs +0 -4
  32. package/echarts +0 -8
  33. package/echarts@6.0.0/es2022/echarts.mjs +0 -3
  34. package/echarts@6.0.0/es2022/lib/chart/bar/install.mjs +0 -3
  35. package/echarts@6.0.0/es2022/lib/chart/bar/installPictorialBar.mjs +0 -3
  36. package/echarts@6.0.0/es2022/lib/chart/boxplot/install.mjs +0 -3
  37. package/echarts@6.0.0/es2022/lib/chart/candlestick/install.mjs +0 -3
  38. package/echarts@6.0.0/es2022/lib/chart/chord/install.mjs +0 -3
  39. package/echarts@6.0.0/es2022/lib/chart/custom/install.mjs +0 -3
  40. package/echarts@6.0.0/es2022/lib/chart/effectScatter/install.mjs +0 -3
  41. package/echarts@6.0.0/es2022/lib/chart/funnel/install.mjs +0 -3
  42. package/echarts@6.0.0/es2022/lib/chart/gauge/install.mjs +0 -3
  43. package/echarts@6.0.0/es2022/lib/chart/graph/install.mjs +0 -3
  44. package/echarts@6.0.0/es2022/lib/chart/heatmap/install.mjs +0 -3
  45. package/echarts@6.0.0/es2022/lib/chart/line/install.mjs +0 -3
  46. package/echarts@6.0.0/es2022/lib/chart/lines/install.mjs +0 -3
  47. package/echarts@6.0.0/es2022/lib/chart/map/install.mjs +0 -3
  48. package/echarts@6.0.0/es2022/lib/chart/parallel/install.mjs +0 -3
  49. package/echarts@6.0.0/es2022/lib/chart/pie/install.mjs +0 -3
  50. package/echarts@6.0.0/es2022/lib/chart/radar/install.mjs +0 -3
  51. package/echarts@6.0.0/es2022/lib/chart/sankey/install.mjs +0 -3
  52. package/echarts@6.0.0/es2022/lib/chart/scatter/install.mjs +0 -3
  53. package/echarts@6.0.0/es2022/lib/chart/sunburst/install.mjs +0 -3
  54. package/echarts@6.0.0/es2022/lib/chart/themeRiver/install.mjs +0 -3
  55. package/echarts@6.0.0/es2022/lib/chart/tree/install.mjs +0 -3
  56. package/echarts@6.0.0/es2022/lib/chart/treemap/install.mjs +0 -3
  57. package/echarts@6.0.0/es2022/lib/export/charts.mjs +0 -3
  58. package/echarts@6.0.0/es2022/lib/export/components.mjs +0 -3
  59. package/echarts@6.0.0/es2022/lib/export/core.mjs +0 -3
  60. package/echarts@6.0.0/es2022/lib/export/features.mjs +0 -3
  61. package/echarts@6.0.0/es2022/lib/export/renderers.mjs +0 -3
  62. package/echarts@6.0.0/es2022/lib/extension.mjs +0 -3
  63. package/runtime-core.mjs +0 -29
@@ -1,15 +0,0 @@
1
- /* esm.sh - @antv/component@2.1.7 */
2
- var vi=Object.defineProperty;var zs=Object.getOwnPropertyDescriptor;var Hs=Object.getOwnPropertyNames;var Rs=Object.prototype.hasOwnProperty;var mi=(i,r)=>{for(var t in r)vi(i,t,{get:r[t],enumerable:!0})},di=(i,r,t,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Hs(r))!Rs.call(i,n)&&n!==t&&vi(i,n,{get:()=>r[n],enumerable:!(e=zs(r,n))||e.enumerable});return i},B=(i,r,t)=>(di(i,r,"default"),t&&di(t,r,"default"));var cr={};mi(cr,{Axis:()=>ie,BBox:()=>W,Breadcrumb:()=>ka,Button:()=>Sa,Category:()=>Kn,Checkbox:()=>xs,CircleCrosshair:()=>ms,Continuous:()=>ei,Layout:()=>oi,LineCrosshair:()=>vs,Marker:()=>H,Navigator:()=>Jr,PRIMILTIVE_ATTRIBUTES:()=>dn,PolygonCrosshair:()=>gs,Poptip:()=>Qr,Scrollbar:()=>Fa,Select:()=>lr,Selection:()=>gn,Slider:()=>be,Sparkline:()=>Wr,Switch:()=>us,Tag:()=>jt,Timebar:()=>hi,Timeline:()=>Ao,Tooltip:()=>ss,add:()=>Rt,addPrefix:()=>Ir,applyStyleSheet:()=>Hr,applyToText:()=>ue,arrayInterpolate:()=>fn,catmullRom2Bezier:()=>Er,classNames:()=>Y,copyAttributes:()=>Nr,createOffscreenGroup:()=>vr,createTempText:()=>ji,deepAssign:()=>M,defined:()=>gr,degToRad:()=>yt,distance:()=>Ft,ellipsisIt:()=>Jt,formatTime:()=>rt,getCallbackValue:()=>K,getEventPos:()=>Ht,getFont:()=>Ie,getLocalBBox:()=>De,getMask:()=>xn,getPrimitiveAttributes:()=>Fe,getRenderBBox:()=>wi,getShapeSpace:()=>Or,getTimeDiff:()=>Ki,getTimeScale:()=>$i,getTimeStart:()=>Ji,getTranslate:()=>_n,groupBy:()=>Lr,hide:()=>j,ifNegative:()=>Hi,ifPositive:()=>Ri,ifShow:()=>X,inRange:()=>tt,interpolate:()=>ce,intersection:()=>kr,isHorizontal:()=>Mr,isInOffscreenGroup:()=>mr,isPrimitiveAttribute:()=>vn,isVertical:()=>Yi,keyframeInterpolate:()=>Tr,lineLen:()=>He,max:()=>Ot,maybeAppend:()=>lt,measureTextWidth:()=>br,mid:()=>Wi,min:()=>Bt,multi:()=>Fi,normalize:()=>fe,numberInterpolate:()=>pn,objectInterpolate:()=>hn,omit:()=>Re,parseDate:()=>de,parseHTML:()=>Bi,parseHeightFromHTML:()=>Fr,parsePosition:()=>Gt,parseSeriesAttr:()=>I,path2marker:()=>bn,percentTransform:()=>ve,radToDeg:()=>Ne,removePrefix:()=>Ve,renderExtDo:()=>it,renderHtmlExtDo:()=>_r,replaceChildren:()=>je,rotate:()=>Pr,sampling:()=>Br,scale:()=>at,scaleToPixel:()=>Dt,select:()=>w,setMockMeasureTextWidth:()=>Li,show:()=>vt,splitStyle:()=>et,stringToHTML:()=>cn,sub:()=>pe,subStyleProps:()=>L,superStyleProps:()=>ot,svg2marker:()=>Ui,textOf:()=>ze,throttle:()=>Xi,timer:()=>Qi,toKNotation:()=>zi,toLowercaseFirstLetter:()=>yn,toPrecision:()=>Wt,toScientificNotation:()=>Ii,toThousands:()=>Ni,toUppercaseFirstLetter:()=>he,transpose:()=>Rr,traverse:()=>Me,vertical:()=>Cr,visibility:()=>le,wrapIt:()=>xr});import{__assign as An,__extends as Tl,__read as Pl}from"/tslib?target=es2022";import{isNil as Cl}from"/@antv/util@^3.3.10?target=es2022";import{Component as El}from"./esm/core.mjs";import{Circle as pr}from"/@antv/g@^6.1.11?target=es2022";import{CustomElement as zf}from"/@antv/g@^6.1.11?target=es2022";import{DisplayObject as fr}from"/@antv/g@^6.1.11?target=es2022";import{Ellipse as gi}from"/@antv/g@^6.1.11?target=es2022";import{Group as U}from"/@antv/g@^6.1.11?target=es2022";import{HTML as hr}from"/@antv/g@^6.1.11?target=es2022";import{Image as yi}from"/@antv/g@^6.1.11?target=es2022";import{Line as dr}from"/@antv/g@^6.1.11?target=es2022";import{Path as se}from"/@antv/g@^6.1.11?target=es2022";import{Polygon as bi}from"/@antv/g@^6.1.11?target=es2022";import{Polyline as xi}from"/@antv/g@^6.1.11?target=es2022";import{Rect as _t}from"/@antv/g@^6.1.11?target=es2022";import{__assign as _i,__extends as js,__rest as Ys}from"/tslib?target=es2022";import{Text as Us}from"/@antv/g@^6.1.11?target=es2022";import{__extends as Fs,__read as Ws,__spreadArray as Ds}from"/tslib?target=es2022";import{ElementEvent as Vs}from"/@antv/g@^6.1.11?target=es2022";function Me(i,r){r(i),i.children&&i.children.forEach(function(t){t&&Me(t,r)})}function vt(i){le(i,!0)}function j(i){le(i,!1)}function le(i,r){var t=r?"visible":"hidden";Me(i,function(e){e.attr("visibility",t)})}var Gs=(function(i){Fs(r,i);function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(this,Ds([],Ws(t),!1))||this;return n.isMutationObserved=!0,n.addEventListener(Vs.INSERTED,function(){j(n)}),n}return r})(U);function vr(i){var r=i.appendChild(new Gs({class:"offscreen"}));return j(r),r}function mr(i){for(var r=i;r;){if(r.className==="offscreen")return!0;r=r.parent}return!1}var Et=(function(i){js(r,i);function r(t){t===void 0&&(t={});var e=t.style,n=Ys(t,["style"]);return i.call(this,_i({style:_i({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},n))||this}return Object.defineProperty(r.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=vr(this)),this._offscreen},enumerable:!1,configurable:!0}),r.prototype.disconnectedCallback=function(){var t;(t=this._offscreen)===null||t===void 0||t.destroy()},r})(Us);var k={};mi(k,{BBox:()=>W,PRIMILTIVE_ATTRIBUTES:()=>dn,Selection:()=>gn,add:()=>Rt,addPrefix:()=>Ir,applyStyleSheet:()=>Hr,applyToText:()=>ue,arrayInterpolate:()=>fn,catmullRom2Bezier:()=>Er,classNames:()=>Y,copyAttributes:()=>Nr,createOffscreenGroup:()=>vr,createTempText:()=>ji,deepAssign:()=>M,defined:()=>gr,degToRad:()=>yt,distance:()=>Ft,ellipsisIt:()=>Jt,formatTime:()=>rt,getCallbackValue:()=>K,getEventPos:()=>Ht,getFont:()=>Ie,getLocalBBox:()=>De,getMask:()=>xn,getPrimitiveAttributes:()=>Fe,getRenderBBox:()=>wi,getShapeSpace:()=>Or,getTimeDiff:()=>Ki,getTimeScale:()=>$i,getTimeStart:()=>Ji,getTranslate:()=>_n,groupBy:()=>Lr,hide:()=>j,ifNegative:()=>Hi,ifPositive:()=>Ri,ifShow:()=>X,inRange:()=>tt,interpolate:()=>ce,intersection:()=>kr,isHorizontal:()=>Mr,isInOffscreenGroup:()=>mr,isPrimitiveAttribute:()=>vn,isVertical:()=>Yi,keyframeInterpolate:()=>Tr,lineLen:()=>He,max:()=>Ot,maybeAppend:()=>lt,measureTextWidth:()=>br,mid:()=>Wi,min:()=>Bt,multi:()=>Fi,normalize:()=>fe,numberInterpolate:()=>pn,objectInterpolate:()=>hn,omit:()=>Re,parseDate:()=>de,parseHTML:()=>Bi,parseHeightFromHTML:()=>Fr,parsePosition:()=>Gt,parseSeriesAttr:()=>I,path2marker:()=>bn,percentTransform:()=>ve,radToDeg:()=>Ne,removePrefix:()=>Ve,renderExtDo:()=>it,renderHtmlExtDo:()=>_r,replaceChildren:()=>je,rotate:()=>Pr,sampling:()=>Br,scale:()=>at,scaleToPixel:()=>Dt,select:()=>w,setMockMeasureTextWidth:()=>Li,show:()=>vt,splitStyle:()=>et,stringToHTML:()=>cn,sub:()=>pe,subStyleProps:()=>L,superStyleProps:()=>ot,svg2marker:()=>Ui,textOf:()=>ze,throttle:()=>Xi,timer:()=>Qi,toKNotation:()=>zi,toLowercaseFirstLetter:()=>yn,toPrecision:()=>Wt,toScientificNotation:()=>Ii,toThousands:()=>Ni,toUppercaseFirstLetter:()=>he,transpose:()=>Rr,traverse:()=>Me,vertical:()=>Cr,visibility:()=>le,wrapIt:()=>xr});function yt(i){return i*Math.PI/180}function Ne(i){return Number((i*180/Math.PI).toPrecision(5))}import{__read as Si}from"/tslib?target=es2022";var W=(function(){function i(r,t,e,n){r===void 0&&(r=0),t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=r,this.y=t,this.width=e,this.height=n}return Object.defineProperty(i.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),i.fromRect=function(r){return new i(r.x,r.y,r.width,r.height)},i.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},i.prototype.isPointIn=function(r,t){return r>=this.left&&r<=this.right&&t>=this.top&&t<=this.bottom},i})();function wi(i){var r=i.getRenderBounds(),t=Si(r.min,2),e=t[0],n=t[1],a=Si(r.max,2),o=a[0],s=a[1],l=o-e,u=s-n;return new W(e,n,l,u)}import{__read as Xs,__spreadArray as qs}from"/tslib?target=es2022";import{isFunction as Zs}from"/@antv/util@^3.3.10?target=es2022";function K(i,r){return Zs(i)?i.apply(void 0,qs([],Xs(r),!1)):i}import{__read as Ks}from"/tslib?target=es2022";var Y=function(i,r){var t=function(n){return"".concat(r,"-").concat(n)},e=Object.fromEntries(Object.entries(i).map(function(n){var a=Ks(n,2),o=a[0],s=a[1],l=t(s);return[o,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(e,{prefix:t}),e};import{__read as $s}from"/tslib?target=es2022";import{isPlainObject as Ai,isArray as Js}from"/@antv/util@^3.3.10?target=es2022";var Qs=5,ki=function(i,r,t,e){t===void 0&&(t=0),e===void 0&&(e=Qs),Object.entries(r).forEach(function(n){var a=$s(n,2),o=a[0],s=a[1],l=i;Object.prototype.hasOwnProperty.call(r,o)&&(s?Ai(s)?(Ai(i[o])||(l[o]={}),t<e?ki(i[o],s,t+1,e):l[o]=r[o]):Js(s)?(l[o]=[],l[o]=l[o].concat(s)):l[o]=s:l[o]=s)})},M=function(i){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var e=0;e<r.length;e+=1)ki(i,r[e]);return i};var gr=function(i){return i!==void 0&&i!=null&&!Number.isNaN(i)};import{runtime as tl}from"/@antv/g@^6.1.11?target=es2022";import{memoize as el}from"/@antv/util@^3.3.10?target=es2022";var yr,un;function Li(i){un=i}var br=el(function(i,r){var t=r.fontSize,e=r.fontFamily,n=r.fontWeight,a=r.fontStyle,o=r.fontVariant;return un?un(i,t):(yr||(yr=tl.offscreenCanvasCreator.getOrCreateContext(void 0)),yr.font=[a,o,n,"".concat(t,"px"),e].join(" "),yr.measureText(i).width)},function(i,r){return[i,Object.values(r||Ie(i)).join()].join("")},4096),Ie=function(i){var r=i.style.fontFamily||"sans-serif",t=i.style.fontWeight||"normal",e=i.style.fontStyle||"normal",n=i.style.fontVariant,a=i.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:r,fontWeight:t,fontStyle:e,fontVariant:n}};function ze(i){return i.nodeName==="text"?i:i.nodeName==="g"&&i.children.length===1&&i.children[0].nodeName==="text"?i.children[0]:null}function ue(i,r){var t=ze(i);t&&t.attr(r)}function Jt(i,r,t){t===void 0&&(t="..."),ue(i,{wordWrap:!0,wordWrapWidth:r,maxLines:1,textOverflow:t})}function xr(i,r,t,e){t===void 0&&(t=2),e===void 0&&(e="top"),ue(i,{wordWrap:!0,wordWrapWidth:r,maxLines:t,textBaseline:e})}function Ht(i){var r=i.canvas,t=i.touches,e=i.offsetX,n=i.offsetY;if(r){var a=r.x,o=r.y;return[a,o]}if(t){var s=t[0],l=s.clientX,u=s.clientY;return[l,u]}return e&&n?[e,n]:[0,0]}import{__assign as Ti}from"/tslib?target=es2022";import{isNumber as Pi,isString as Ci}from"/@antv/util@^3.3.10?target=es2022";function it(i){return typeof i=="function"?i():Ci(i)||Pi(i)?new Et({style:{text:String(i)}}):i}function _r(i,r){return typeof i=="function"?i():Ci(i)||Pi(i)?new hr({style:Ti(Ti({},r),{innerHTML:String(i)})}):i}import{__read as Sr}from"/tslib?target=es2022";function wr(i,r,t,e,n,a){return(i===r||Math.min(i,r)<=n&&n<=Math.max(i,r))&&(t===e||Math.min(t,e)<=a&&a<=Math.max(t,e))}function Ar(i,r,t){var e=i;(!i.length||r<i[0]||r===i[0]&&t<i[1])&&(e[0]=r,e[1]=t)}function kr(i,r,t,e){var n=Sr(i,2),a=n[0],o=n[1],s=Sr(r,2),l=s[0],u=s[1],c=Sr(t,2),p=c[0],f=c[1],h=Sr(e,2),d=h[0],v=h[1],m=[];if((v-f)*(l-a)===(u-o)*(d-p))(u-o)*(p-a)===(f-o)*(l-a)&&(wr(a,l,o,u,p,f)&&Ar(m,p,f),wr(a,l,o,u,d,v)&&Ar(m,d,v),wr(p,d,f,v,a,o)&&Ar(m,a,o),wr(p,d,f,v,l,u)&&Ar(m,l,u));else{var g=(p*(v-f)+o*(d-p)-f*(d-p)-a*(v-f))/((l-a)*(v-f)-(d-p)*(u-o)),y=(a*(u-o)+f*(l-a)-o*(l-a)-p*(u-o))/((d-p)*(u-o)-(l-a)*(v-f));g>=0&&g<=1&&y>=0&&y<=1&&(m[0]=a+g*(l-a),m[1]=o+g*(u-o))}return m}import{__read as Ei}from"/tslib?target=es2022";function He(i,r){var t=Ei(i,2),e=t[0],n=t[1],a=Ei(r,2),o=a[0],s=a[1];return Math.pow(Math.pow(e-o,2)+Math.pow(n-s,2),.5)}function Lr(i,r){return i.reduce(function(t,e){return(t[e[r]]=t[e[r]]||[]).push(e),t},{})}function cn(i){var r=document.createElement("div");return r.innerHTML=i,r.firstChild}function Bi(i){return typeof i=="string"?cn(i):i}function X(i,r,t,e,n){return e===void 0&&(e=!0),n===void 0&&(n=function(a){a.node().removeChildren()}),i?t(r):(e&&n(r),null)}function tt(i,r,t,e,n){return e===void 0&&(e=!0),n===void 0&&(n=!1),e&&i===r||n&&i===t?!0:i>r&&i<t}import{__read as Oi}from"/tslib?target=es2022";var pn=function(i,r){return function(t){return i*(1-t)+r*t}};function fn(i,r){var t=r?r.length:0,e=i?Math.min(t,i.length):0;return function(n){var a=new Array(e),o=new Array(t),s=0;for(s=0;s<e;++s)a[s]=ce(i[s],r[s]);for(;s<t;++s)o[s]=r[s];for(s=0;s<e;++s)o[s]=a[s](n);return o}}function hn(i,r){i===void 0&&(i={}),r===void 0&&(r={});var t={},e={};return Object.entries(r).forEach(function(n){var a=Oi(n,2),o=a[0],s=a[1];o in i?t[o]=ce(i[o],s):e[o]=s}),function(n){return Object.entries(t).forEach(function(a){var o=Oi(a,2),s=o[0],l=o[1];return e[s]=l(n)}),e}}function ce(i,r){return typeof i=="number"&&typeof r=="number"?pn(i,r):Array.isArray(i)&&Array.isArray(r)?fn(i,r):typeof i=="object"&&typeof r=="object"?hn(i,r):(function(t){return i})}import{__assign as rl}from"/tslib?target=es2022";function Tr(i,r,t,e){if(!e)return i.attr("__keyframe_data__",t),null;var n=e.duration,a=n===void 0?0:n,o=ce(r,t),s=Math.ceil(+a/16),l=new Array(s).fill(0).map(function(u,c,p){return{__keyframe_data__:o(c/(p.length-1))}});return i.animate(l,rl({fill:"both"},e))}B(k,yv);import*as yv from"./esm/util/layout.mjs";import{__read as Mi}from"/tslib?target=es2022";function at(i,r){return[i[0]*r,i[1]*r]}function Rt(i,r){return[i[0]+r[0],i[1]+r[1]]}function pe(i,r){return[i[0]-r[0],i[1]-r[1]]}function Bt(i,r){return[Math.min(i[0],r[0]),Math.min(i[1],r[1])]}function Ot(i,r){return[Math.max(i[0],r[0]),Math.max(i[1],r[1])]}function Ft(i,r){return Math.sqrt(Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2))}function fe(i){if(i[0]===0&&i[1]===0)return[0,0];var r=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2));return[i[0]/r,i[1]/r]}function Pr(i,r,t){var e=Mi(i,2),n=e[0],a=e[1],o=Mi(r,2),s=o[0],l=o[1],u=n-s,c=a-l,p=Math.sin(t),f=Math.cos(t);return[u*f-c*p+s,u*p+c*f+l]}function Cr(i,r){return r?[i[1],-i[0]]:[-i[1],i[0]]}function Wt(i,r){return+i.toPrecision(r)}function Ni(i){return i.toLocaleString()}function Ii(i){return i.toExponential()}function zi(i,r){return r===void 0&&(r=0),Math.abs(i)<1e3?String(i):"".concat(Wt(i/1e3,r).toLocaleString(),"K")}var Hi=function(i,r,t){return i<0&&Number.isFinite(i)?r:t},Ri=function(i,r,t){return i>0&&Number.isFinite(i)?r:t},Fi=function(i,r){return i*r},Wi=function(i,r){return i/2+(r||0)/2};function Re(i,r){var t={},e=Array.isArray(r)?r:[r];for(var n in i)e.includes(n)||(t[n]=i[n]);return t}import{__read as Di}from"/tslib?target=es2022";function nl(i,r,t,e){var n,a=[],o=!!e,s,l,u=[1/0,1/0],c=[-1/0,-1/0],p,f,h;if(o){n=Di(e,2),u=n[0],c=n[1];for(var d=0,v=i.length;d<v;d+=1){var m=i[d];u=Bt(u,m),c=Ot(c,m)}}for(var d=0,g=i.length;d<g;d+=1){var m=i[d];if(d===0&&!t)h=m;else if(d===g-1&&!t)f=m,a.push(h),a.push(f);else{var y=[d?d-1:g-1,d-1][t?0:1];s=i[y],l=i[t?(d+1)%g:d+1];var b=[0,0];b=pe(l,s),b=at(b,r);var _=Ft(m,s),x=Ft(m,l),S=_+x;S!==0&&(_/=S,x/=S);var A=at(b,-_),T=at(b,x);f=Rt(m,A),p=Rt(m,T),p=Bt(p,Ot(l,m)),p=Ot(p,Bt(l,m)),A=pe(p,m),A=at(A,-_/x),f=Rt(m,A),f=Bt(f,Ot(s,m)),f=Ot(f,Bt(s,m)),T=pe(m,f),T=at(T,x/_),p=Rt(m,T),o&&(f=Ot(f,u),f=Bt(f,c),p=Ot(p,u),p=Bt(p,c)),a.push(h),a.push(f),h=p}}return t&&a.push(a.shift()),a}function Er(i,r,t){var e;r===void 0&&(r=!1),t===void 0&&(t=[[0,0],[1,1]]);for(var n=!!r,a=[],o=0,s=i.length;o<s;o+=2)a.push([i[o],i[o+1]]);for(var l=nl(a,.4,n,t),u=a.length,c=[],p,f,h,o=0;o<u-1;o+=1)p=l[o*2],f=l[o*2+1],h=a[o+1],c.push(["C",p[0],p[1],f[0],f[1],h[0],h[1]]);return n&&(p=l[u],f=l[u+1],e=Di(a,1),h=e[0],c.push(["C",p[0],p[1],f[0],f[1],h[0],h[1]])),c}var dn=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function vn(i){return dn.includes(i)}function Fe(i){var r={};for(var t in i)vn(t)&&(r[t]=i[t]);return r}function Br(i,r){if(i.length<=r)return i;for(var t=Math.floor(i.length/r),e=[],n=0;n<i.length;n+=t)e.push(i[n]);return e}function Dt(i,r,t){t===void 0&&(t=!1);var e=i.getBBox(),n=e.width,a=e.height,o=r/Math.max(n,a);return t&&(i.style.transform="scale(".concat(o,")")),o}import{__classPrivateFieldGet as mn,__read as Qt,__spreadArray as We,__values as il}from"/tslib?target=es2022";import{flatten as al}from"/@antv/util@^3.3.10?target=es2022";function Vi(i,r){var t=new Map;return i.forEach(function(e){var n=r(e);t.has(n)||t.set(n,[]),t.get(n).push(e)}),t}function ol(i){throw new Error(i)}var gn=(function(){function i(n,a,o,s,l,u,c){n===void 0&&(n=null),a===void 0&&(a=null),o===void 0&&(o=null),s===void 0&&(s=null),l===void 0&&(l=[null,null,null,null,null]),u===void 0&&(u=[]),c===void 0&&(c=[]),r.add(this),this._elements=Array.from(n),this._data=a,this._parent=o,this._document=s,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=u,this._facetElements=c}i.prototype.selectAll=function(n){var a=typeof n=="string"?this._parent.querySelectorAll(n):n;return new t(a,null,this._elements[0],this._document)},i.prototype.selectFacetAll=function(n){var a=typeof n=="string"?this._parent.querySelectorAll(n):n;return new t(this._elements,null,this._parent,this._document,void 0,void 0,a)},i.prototype.select=function(n){var a=typeof n=="string"?this._parent.querySelectorAll(n)[0]||null:n;return new t([a],null,a,this._document)},i.prototype.append=function(n){var a=this,o=typeof n=="function"?n:function(){return a.createElement(n)},s=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var u=this._data[l],c=Qt(Array.isArray(u)?u:[u,null],2),p=c[0],f=c[1],h=o(p,l);h.__data__=p,f!==null&&(h.__fromElements__=f),this._parent.appendChild(h),s.push(h)}return new t(s,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var d=this._elements[l],p=d.__data__,h=o(p,l);d.appendChild(h),s.push(h)}return new t(s,null,s[0],this._document)},i.prototype.maybeAppend=function(n,a){var o=mn(this,r,"m",e).call(this,n[0]==="#"?n:"#".concat(n),a);return o.attr("id",n),o},i.prototype.maybeAppendByClassName=function(n,a){var o=n.toString(),s=mn(this,r,"m",e).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},i.prototype.maybeAppendByName=function(n,a){var o=mn(this,r,"m",e).call(this,'[name="'.concat(n,'"]'),a);return o.attr("name",n),o},i.prototype.data=function(n,a,o){var s,l;a===void 0&&(a=function(C){return C}),o===void 0&&(o=function(){return null});for(var u=[],c=[],p=new Set(this._elements),f=[],h=new Set,d=new Map(this._elements.map(function(C,E){return[a(C.__data__,E),C]})),v=new Map(this._facetElements.map(function(C,E){return[a(C.__data__,E),C]})),m=Vi(this._elements,function(C){return o(C.__data__)}),g=0;g<n.length;g++){var y=n[g],b=a(y,g),_=o(y,g);if(d.has(b)){var x=d.get(b);x.__data__=y,x.__facet__=!1,c.push(x),p.delete(x),d.delete(b)}else if(v.has(b)){var x=v.get(b);x.__data__=y,x.__facet__=!0,c.push(x),v.delete(b)}else if(m.has(b)){var S=m.get(b);f.push([y,S]);try{for(var A=(s=void 0,il(S)),T=A.next();!T.done;T=A.next()){var x=T.value;p.delete(x)}}catch(C){s={error:C}}finally{try{T&&!T.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}m.delete(b)}else if(d.has(_)){var x=d.get(_);x.__toData__?x.__toData__.push(y):x.__toData__=[y],h.add(x),p.delete(x)}else u.push(y)}var P=[new t([],u,this._parent,this._document),new t(c,null,this._parent,this._document),new t(p,null,this._parent,this._document),new t([],f,this._parent,this._document),new t(h,null,this._parent,this._document)];return new t(this._elements,null,this._parent,this._document,P)},i.prototype.merge=function(n){var a=We(We([],Qt(this._elements),!1),Qt(n._elements),!1),o=We(We([],Qt(this._transitions),!1),Qt(n._transitions),!1);return new t(a,null,this._parent,this._document,void 0,o)},i.prototype.createElement=function(n){if(this._document)return this._document.createElement(n,{});var a=t.registry[n];return a?new a:ol("Unknown node type: ".concat(n))},i.prototype.join=function(n,a,o,s,l){n===void 0&&(n=function(d){return d}),a===void 0&&(a=function(d){return d}),o===void 0&&(o=function(d){return d.remove()}),s===void 0&&(s=function(d){return d}),l===void 0&&(l=function(d){return d.remove()});var u=n(this._enter),c=a(this._update),p=o(this._exit),f=s(this._merge),h=l(this._split);return c.merge(u).merge(p).merge(f).merge(h)},i.prototype.remove=function(){for(var n=function(s){var l=a._elements[s],u=a._transitions[s];u?u.then(function(){return l.remove()}):l.remove()},a=this,o=0;o<this._elements.length;o++)n(o);return new t([],null,this._parent,this._document,void 0,this._transitions)},i.prototype.each=function(n){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;n.call(o,s,a)}return this},i.prototype.attr=function(n,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,l){a!==void 0&&(this[n]=o.call(this,s,l))})},i.prototype.style=function(n,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(l,u){a!==void 0&&(this.style[n]=s.call(this,l,u))})},i.prototype.styles=function(n,a){return n===void 0&&(n={}),a===void 0&&(a=!0),this.each(function(o,s){var l=this;Object.entries(n).forEach(function(u){var c=Qt(u,2),p=c[0],f=c[1],h=typeof f!="function"||!a?function(){return f}:f;f!==void 0&&l.attr(p,h.call(l,o,s))})})},i.prototype.update=function(n,a){a===void 0&&(a=!0);var o=typeof n!="function"||!a?function(){return n}:n;return this.each(function(s,l){n&&this.update&&this.update(o.call(this,s,l))})},i.prototype.maybeUpdate=function(n,a){a===void 0&&(a=!0);var o=typeof n!="function"||!a?function(){return n}:n;return this.each(function(s,l){n&&this.update&&this.update(o.call(this,s,l))})},i.prototype.transition=function(n){var a=this._transitions,o=new Array(this._elements.length);return this.each(function(s,l){o[l]=n.call(this,s,l)}),this._transitions=al(o),this},i.prototype.on=function(n,a){return this.each(function(){this.addEventListener(n,a)}),this},i.prototype.call=function(n){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return n.call.apply(n,We([this._parent,this],Qt(a),!1)),this},i.prototype.node=function(){return this._elements[0]},i.prototype.nodes=function(){return this._elements},i.prototype.transitions=function(){return this._transitions.filter(function(n){return!!n})},i.prototype.parent=function(){return this._parent};var r,t,e;return t=i,r=new WeakSet,e=function(a,o){var s=this._elements[0],l=s.querySelector(a);if(l)return new t([l],null,this._parent,this._document);var u=typeof o=="string"?this.createElement(o):o();return s.appendChild(u),new t([u],null,this._parent,this._document)},i.registry={g:U,rect:_t,circle:pr,path:se,text:Et,ellipse:gi,image:yi,line:dr,polygon:bi,polyline:xi,html:hr},i})();function w(i){return new gn([i],null,i,i.ownerDocument)}function lt(i,r,t){return i.querySelector(r)?w(i).select(r):w(i).append(t)}import{isNumber as sl,isArray as ll}from"/@antv/util@^3.3.10?target=es2022";function I(i){if(sl(i))return[i,i,i,i];if(ll(i)){var r=i.length;if(r===1)return[i[0],i[0],i[0],i[0]];if(r===2)return[i[0],i[1],i[0],i[1]];if(r===3)return[i[0],i[1],i[2],i[1]];if(r===4)return i}return[0,0,0,0]}import{__assign as Gi,__read as Vt,__values as ul}from"/tslib?target=es2022";function Or(i){var r=i&&i.getRenderBounds();if(!r)return{width:0,height:0};var t=r.getMax(),e=r.getMin();return{width:t[0]-e[0],height:t[1]-e[1]}}function De(i){var r=i.getLocalBounds(),t=r.min,e=r.max,n=Vt([t,e],2),a=Vt(n[0],2),o=a[0],s=a[1],l=Vt(n[1],2),u=l[0],c=l[1];return{x:o,y:s,width:u-o,height:c-s,left:o,bottom:c,top:s,right:u}}function ji(i,r){var t=w(i).append("text").node();return t.attr(Gi(Gi({},r),{visibility:"hidden"})),t}function Mr(i,r){var t=Vt(i,2),e=t[0],n=t[1],a=Vt(r,2),o=a[0],s=a[1];return e!==o&&n===s}function Yi(i,r){var t=Vt(i,2),e=t[0],n=t[1],a=Vt(r,2),o=a[0],s=a[1];return e===o&&n!==s}function Nr(i,r){var t,e,n=r.attributes;try{for(var a=ul(Object.entries(n)),o=a.next();!o.done;o=a.next()){var s=Vt(o.value,2),l=s[0],u=s[1];l!=="id"&&l!=="className"&&i.attr(l,u)}}catch(c){t={error:c}}finally{try{o&&!o.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}}function he(i){return i.toString().charAt(0).toUpperCase()+i.toString().slice(1)}function yn(i){return i.toString().charAt(0).toLowerCase()+i.toString().slice(1)}function Ir(i,r){return"".concat(r).concat(he(i))}function Ve(i,r,t){var e;t===void 0&&(t=!0);var n=r||((e=i.match(/^([a-z][a-z0-9]+)/))===null||e===void 0?void 0:e[0])||"",a=i.replace(new RegExp("^(".concat(n,")")),"");return t?yn(a):a}import{__read as Ge,__spreadArray as cl}from"/tslib?target=es2022";function Hr(i,r){Object.entries(r).forEach(function(t){var e=Ge(t,2),n=e[0],a=e[1];cl([i],Ge(i.querySelectorAll(n)),!1).filter(function(o){return o.matches(n)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(l,u){return"".concat(l).concat(u.join(":"),";")},"")}})})}var zr=function(i,r){if(!i?.startsWith(r))return!1;var t=i[r.length];return t>="A"&&t<="Z"};function L(i,r,t){t===void 0&&(t=!1);var e={};return Object.entries(i).forEach(function(n){var a=Ge(n,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(zr(o,"show")&&zr(Ve(o,"show"),r)!==t)o===Ir(r,"show")?e[o]=s:e[o.replace(new RegExp(he(r)),"")]=s;else if(!zr(o,"show")&&zr(o,r)!==t){var l=Ve(o,r);l==="filter"&&typeof s=="function"||(e[l]=s)}}}),e}function ot(i,r){return Object.entries(i).reduce(function(t,e){var n=Ge(e,2),a=n[0],o=n[1];return a.startsWith("show")?t["show".concat(r).concat(a.slice(4))]=o:t["".concat(r).concat(he(a))]=o,t},{})}function et(i,r){r===void 0&&(r=["x","y","class","className"]);var t=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],e={},n={};return Object.entries(i).forEach(function(a){var o=Ge(a,2),s=o[0],l=o[1];r.includes(s)||(t.indexOf(s)!==-1?n[s]=l:e[s]=l)}),[e,n]}import{__read as pl}from"/tslib?target=es2022";import fl from"/svg-path-parser@^1.1.0?target=es2022";function bn(i,r,t){return r===void 0&&(r=1024),t===void 0&&(t=1014),function(e,n,a){var o=fl(i);return o.map(function(s){var l=[];l.push(s.relative===!0?s.code.toLowerCase():s.code.toUpperCase());var u=[[s.x1,s.y1],[s.x2,s.y2],[s.x,s.y]];return u.forEach(function(c){var p=pl(c,2),f=p[0],h=p[1];f!==void 0&&l.push(s.relative===!0?f/r*2*a:e-a+a*2*(f/r)),h!==void 0&&l.push(s.relative===!0?h/t*2*a:n-a+a*2*(h/t))}),l})}}function Ui(i){var r=/<path\s+d="(.*?)"/i.exec(i),t=/viewBox="\d+\s+\d+\s+(\d+)\s+(\d+)"/i.exec(i);if(r===null||r.length<2)return function(){return[]};var e=1024,n=1024;return t!==null&&t.length>=3&&(Number.isNaN(parseInt(t[1],10))||(e=parseInt(t[1],10)),Number.isNaN(parseInt(t[2],10))||(n=parseInt(t[2],10))),bn(r[1],e,n)}function Xi(i,r){return i===void 0&&(i=0),r===void 0&&(r=!1),function(t,e,n){var a=n.value,o;typeof a=="function"&&(n.value=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];if(!o){var u=this;r&&a.apply(u,s),o=window.setTimeout(function(){a.apply(u,s),o=null},i)}})}}import{__read as Zi}from"/tslib?target=es2022";var qi=["year","month","day","hour","minute","second"],hl=["YYYY","MM","DD","hh","mm","ss"];function de(i){return i instanceof Date?i:new Date(i)}function xn(i){for(var r=Zi(i,2),t=r[0],e=r[1],n=qi.indexOf(t),a=qi.indexOf(e),o="",s=n;s<=a;s+=1)if(o+=hl[s],s<a){var l="-";s===2?l=" ":s>2&&(l=":"),o+=l}return o}function rt(i,r){var t={YYYY:i.getFullYear(),MM:i.getMonth()+1,DD:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds()},e=r;return Object.keys(t).forEach(function(n){var a=t[n];e=e.replace(n,n==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),e}function Ki(i,r){return de(i).getTime()-de(r).getTime()}function $i(i,r){var t=Zi([de(i),de(r)],2),e=t[0],n=t[1];return e.getFullYear()!==n.getFullYear()?"year":e.getMonth()!==n.getMonth()?"month":e.getDay()!==n.getDay()?"day":e.getHours()!==n.getHours()?"hour":e.getMinutes()!==n.getMinutes()?"minute":"second"}function Ji(i,r){var t=new Date(i),e={year:function(n){n.setMonth(0),n.setHours(0,0,0,0)},month:function(n){n.setDate(1),n.setHours(0,0,0,0)},day:function(n){return n.setHours(0,0,0,0)},hour:function(n){return n.setMinutes(0,0,0)},minute:function(n){return n.setSeconds(0,0)},second:function(n){return n.setMilliseconds(0)}};return e[r](t),rt(t,xn(["year",r]))}function Qi(i){var r=localStorage.getItem("__debug__");return function(t,e,n){var a="[".concat(e,"] ").concat(i),o=n.value;typeof o=="function"&&(n.value=function(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];r&&console.time(a),o.apply(this,s),r&&console.timeEnd(a)})}}import{__read as dl}from"/tslib?target=es2022";function _n(i,r,t){var e=i.getBBox(),n=e.width,a=e.height,o=dl([r,t].map(function(u,c){var p;return u.includes("%")?parseFloat(((p=u.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||p===void 0?void 0:p[0])||"0")/100*(c===0?n:a):u}),2),s=o[0],l=o[1];return[s,l]}function ve(i,r){if(r)try{var t=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,e=r.replace(t,function(n,a,o){return"translate(".concat(_n(i,a,o),")")});i.attr("transform",e)}catch{}}function Rr(i){var r;return((r=i[0])===null||r===void 0?void 0:r.map(function(t,e){return i.map(function(n){return n[e]})}))||[]}import{__read as vl,__spreadArray as ml}from"/tslib?target=es2022";var je=function(i,r){if(r==null){i.innerHTML="";return}i.replaceChildren?Array.isArray(r)?i.replaceChildren.apply(i,ml([],vl(r),!1)):i.replaceChildren(r):(i.innerHTML="",Array.isArray(r)?r.forEach(function(t){return i.appendChild(t)}):i.appendChild(r))};function Gt(i){return/\S+-\S+/g.test(i)?i.split("-").map(function(r){return r[0]}):i.length>2?[i[0]]:i.split("")}import{__read as gl}from"/tslib?target=es2022";var Fr=function(i){var r=new DOMParser,t=r.parseFromString(i,"text/html"),e=t.body.firstElementChild;if(console.log(e?.getClientRects(),11),!e)return 0;var n=e.getAttribute("style")||"",a=Object.fromEntries(n.split(";").map(function(m){return m.trim()}).filter(function(m){return m.includes(":")}).map(function(m){var g=gl(m.split(":").map(function(_){return _.trim()}),2),y=g[0],b=g[1];return[y.toLowerCase(),b]})),o=function(m){if(!m)return 0;var g=m.match(/([\d.]+)px/);return g?parseFloat(g[1]):0};if(a.height)return o(a.height);var s=o(a["font-size"])||16,l=a["line-height"],u;!l||l==="normal"?u=1.2*s:l.endsWith("px")?u=o(l):/^[\d.]+$/.test(l)?u=parseFloat(l)*s:u=s;var c=o(a["padding-top"]),p=o(a["padding-bottom"]);if(a.padding){var f=a.padding.split(/\s+/).map(o);f.length===1||f.length===2?(c=f[0],p=f[0]):(f.length===3||f.length===4)&&(c=f[0],p=f[2])}var h=o(a["border-top-width"]),d=o(a["border-bottom-width"]);if(a.border){var v=a.border.match(/([\d.]+)px/);v&&(h=parseFloat(v[1]),d=parseFloat(v[1]))}if(a["border-width"]){var f=a["border-width"].split(/\s+/).map(o);f.length===1||f.length===2?(h=f[0],d=f[0]):(f.length===3||f.length===4)&&(h=f[0],d=f[2])}return u+c+p+h+d};import{__assign as _l,__extends as Sl,__rest as wl}from"/tslib?target=es2022";import{isFunction as Al}from"/@antv/util@^3.3.10?target=es2022";import{Component as kl}from"./esm/core.mjs";var Ye=function(i,r,t){return[["M",i-t,r],["A",t,t,0,1,0,i+t,r],["A",t,t,0,1,0,i-t,r],["Z"]]},ta=Ye,ea=function(i,r,t){return[["M",i-t,r-t],["L",i+t,r-t],["L",i+t,r+t],["L",i-t,r+t],["Z"]]},ra=function(i,r,t){return[["M",i-t,r],["L",i,r-t],["L",i+t,r],["L",i,r+t],["Z"]]},na=function(i,r,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",i-t,r+e],["L",i,r-e],["L",i+t,r+e],["Z"]]},ia=function(i,r,t){var e=t*Math.sin(.3333333333333333*Math.PI);return[["M",i-t,r-e],["L",i+t,r-e],["L",i,r+e],["Z"]]},aa=function(i,r,t){var e=t/2*Math.sqrt(3);return[["M",i,r-t],["L",i+e,r-t/2],["L",i+e,r+t/2],["L",i,r+t],["L",i-e,r+t/2],["L",i-e,r-t/2],["Z"]]},oa=function(i,r,t){var e=t-1.5;return[["M",i-t,r-e],["L",i+t,r+e],["L",i+t,r-e],["L",i-t,r+e],["Z"]]},Sn=function(i,r,t){return[["M",i,r+t],["L",i,r-t]]},sa=function(i,r,t){return[["M",i-t,r-t],["L",i+t,r+t],["M",i+t,r-t],["L",i-t,r+t]]},la=function(i,r,t){return[["M",i-t/2,r-t],["L",i+t/2,r-t],["M",i,r-t],["L",i,r+t],["M",i-t/2,r+t],["L",i+t/2,r+t]]},ua=function(i,r,t){return[["M",i-t,r],["L",i+t,r],["M",i,r-t],["L",i,r+t]]},ca=function(i,r,t){return[["M",i-t,r],["L",i+t,r]]},wn=function(i,r,t){return[["M",i-t,r],["L",i+t,r]]},pa=wn,fa=function(i,r,t){return[["M",i-t,r],["A",t/2,t/2,0,1,1,i,r],["A",t/2,t/2,0,1,0,i+t,r]]},ha=function(i,r,t){return[["M",i-t-1,r-2.5],["L",i,r-2.5],["L",i,r+2.5],["L",i+t+1,r+2.5]]},da=function(i,r,t){return[["M",i-t-1,r+2.5],["L",i,r+2.5],["L",i,r-2.5],["L",i+t+1,r-2.5]]},va=function(i,r,t){return[["M",i-(t+1),r+2.5],["L",i-t/2,r+2.5],["L",i-t/2,r-2.5],["L",i+t/2,r-2.5],["L",i+t/2,r+2.5],["L",i+t+1,r+2.5]]};function ma(i,r){return[["M",i-5,r+2.5],["L",i-5,r],["L",i,r],["L",i,r-3],["L",i,r+3],["L",i+6.5,r+3]]}var ga=function(i,r,t){return[["M",i-t,r-t],["L",i+t,r],["L",i-t,r+t],["Z"]]},ya=function(i,r,t){var e=t,n=t*.2,a=t*.7;return[["M",i-e,r],["A",e,e,0,1,0,i+e,r],["A",e,e,0,1,0,i-e,r],["Z"],["M",i-a,r],["L",i-n,r],["M",i+n,r],["L",i+a,r],["M",i,r-a],["L",i,r-n],["M",i,r+n],["L",i,r+a]]};import{isObject as yl,isString as bl,isFunction as xl}from"/@antv/util@^3.3.10?target=es2022";function ba(i){var r="default";if(yl(i)&&i instanceof Image)r="image";else if(xl(i))r="symbol";else if(bl(i)){var t=new RegExp("data:(image|text)");i.match(t)?r="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(i)?r="url":r="symbol"}return r}function Ll(i){var r=ba(i);return["base64","url","image"].includes(r)?"image":i&&r==="symbol"?"path":null}var H=(function(i){Sl(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.render=function(t,e){var n=t.x,a=n===void 0?0:n,o=t.y,s=o===void 0?0:o,l=this.getSubShapeStyle(t),u=l.symbol,c=l.size,p=c===void 0?16:c,f=wl(l,["symbol","size"]),h=Ll(u);X(!!h,w(e),function(d){d.maybeAppendByClassName("marker",h).attr("className","marker ".concat(h,"-marker")).call(function(v){if(h==="image"){var m=p*2;v.styles({img:u,width:m,height:m,x:a-p,y:s-p})}else{var m=p/2,g=Al(u)?u:r.getSymbol(u);v.styles(_l({d:g?.(a,s,m)},f))}})})},r.MARKER_SYMBOL_MAP=new Map,r.registerSymbol=function(t,e){r.MARKER_SYMBOL_MAP.set(t,e)},r.getSymbol=function(t){return r.MARKER_SYMBOL_MAP.get(t)},r.getSymbols=function(){return Array.from(r.MARKER_SYMBOL_MAP.keys())},r})(kl);H.registerSymbol("cross",sa);H.registerSymbol("hyphen",ca);H.registerSymbol("line",Sn);H.registerSymbol("plus",ua);H.registerSymbol("tick",la);H.registerSymbol("circle",Ye);H.registerSymbol("point",ta);H.registerSymbol("bowtie",oa);H.registerSymbol("hexagon",aa);H.registerSymbol("square",ea);H.registerSymbol("diamond",ra);H.registerSymbol("triangle",na);H.registerSymbol("triangle-down",ia);H.registerSymbol("line",Sn);H.registerSymbol("dot",wn);H.registerSymbol("dash",pa);H.registerSymbol("smooth",fa);H.registerSymbol("hv",ha);H.registerSymbol("vh",da);H.registerSymbol("hvh",va);H.registerSymbol("vhv",ma);H.registerSymbol("focus",ya);function Bl(i,r,t,e,n){var a=i.getLocalBounds(),o=0,s=0;e==="start"&&(o=r),e==="center"&&(o=-a.halfExtents[0]),e==="end"&&(o=-r-a.halfExtents[0]*2),n==="top"&&(s=t+a.halfExtents[1]),n==="middle"&&(s=0),n==="bottom"&&(s=t-a.halfExtents[1]*2),i.setLocalPosition([o,s])}function Ol(i,r){var t=i.getLocalBounds();return{x:t.halfExtents[0]?t.max[0]+(r||0):i.style.x,y:t.halfExtents[1]?(t.min[1]+t.max[1])/2:i.style.y}}var jt=(function(i){Tl(r,i);function r(t){return i.call(this,t,{padding:4,spacing:4})||this}return r.prototype.render=function(t,e){var n=t.padding,a=n===void 0?0:n,o=t.marker,s=t.text,l=t.radius,u=t.spacing,c=t.align,p=t.verticalAlign,f=L(t,"label"),h=L(t,"background"),d=Pl(I(a),4),v=d[0],m=d[1],g=d[2],y=d[3],b=lt(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),_=o||{symbol:"triangle",size:0},x=lt(b,".tag-marker",function(){return new H({style:_})}).attr("className","tag-marker").update(_).node(),S=Ol(x,u),A=S.x,T=S.y;w(b).maybeAppendByClassName("tag-text",function(){return new Et}).styles(An(An({fontSize:12,text:Cl(s)?"":"".concat(s),x:A,y:T},f),{textBaseline:"middle"})).call(function(C){s||C.remove()}),Bl(b,y,v,c||"start",p||"top");var P=b.getLocalBounds();w(e).maybeAppendByClassName("tag-background","rect").styles(An({zIndex:-1,y:P.min[1]-v,x:P.min[0]-y,width:h!==null?y+m+P.halfExtents[0]*2:0,height:h!==null?v+g+P.halfExtents[1]*2:0,radius:l??2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},h))},r.tag="tag",r})(El);import{__assign as me,__extends as Ml,__read as Nl}from"/tslib?target=es2022";import{deepMix as kn,isUndefined as Il}from"/@antv/util@^3.3.10?target=es2022";import{Component as zl}from"./esm/core.mjs";var xa={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},_a={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},Ue={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};var Sa=(function(i){Ml(r,i);function r(t){var e=i.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||this;return e.state="default",e.clickEvents=function(){var n=e.attributes,a=n.onClick,o=n.state;o!=="disabled"&&a?.call(e,e)},e.mouseenterEvent=function(){var n=e.attributes.state;n!=="disabled"&&(e.state="active",e.render(e.attributes,e))},e.mouseleaveEvent=function(){var n=e.attributes.state;e.state=n,e.render(e.attributes,e)},e}return Object.defineProperty(r.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker"),n=t?e?.size||2:0;return n},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,a=t.ellipsis,o=t.width,s=t.markerSpacing;if(!a)return 1/0;var l=Il(o)?this.getStyle("button").width:o;return e?l-n*2-s-this.markerSize:l-n*2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),r.prototype.getStyle=function(t){var e=this.attributes,n=e.size,a=e.type,o=this.state,s=kn({},xa[n],_a[a][o],this.attributes.default,this.attributes[o]);return o==="disabled"&&(Object.keys(s).forEach(function(l){l in Ue&&(s[l]=Ue[l])}),Object.keys(Ue.strict).forEach(function(l){s[l]=Ue.strict[l]}),kn(s,this.attributes.disabled||{})),L(s,t)},r.prototype.render=function(t,e){var n=t.text,a=n===void 0?"":n,o=t.padding,s=o===void 0?0:o,l=t.markerSymbol,u=t.markerSpacing,c=u===void 0?0:u,p=t.x,f=p===void 0?0:p,h=t.y,d=h===void 0?0:h;e.attr({cursor:this.state==="disabled"?"not-allowed":"pointer"});var v=Nl(I(s),4),m=v[0],g=v[1],y=v[2],b=v[3],_=this.buttonHeight,x=this.getStyle("marker"),S=this.markerSize,A=me(me({},x),{symbol:l,x:f+b+S/2,y:d+_/2,size:S}),T=lt(e,".marker",function(){return new H({className:"marker",style:A})}).update({style:A}).node(),P=T.getLocalBounds(),C=this.getStyle("text");this.textShape=lt(e,".text","text").attr("className","text").styles(me(me({x:f+(S?P.max[0]+c:b),y:d+_/2},C),{text:a,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node();var E=this.textShape.getLocalBounds(),O=this.getStyle("button");w(e).maybeAppendByClassName(".background","rect").styles(me(me({zIndex:-1},O),{x:f,y:d,height:_,width:b+(S?S+c:0)+E.halfExtents[0]*2+g}))},r.prototype.update=function(t){t===void 0&&(t={}),this.attr(kn({},this.attributes,t));var e=this.attributes.state;this.state=e,this.render(this.attributes,this)},r.prototype.setState=function(t){this.update({state:t})},r.prototype.hide=function(){this.style.visibility="hidden"},r.prototype.show=function(){this.style.visibility="visible"},r.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},r.tag="button",r})(zl);import{__assign as ge,__extends as Hl,__read as Rl}from"/tslib?target=es2022";import{deepMix as wa,isNil as Aa,pick as Fl}from"/@antv/util@^3.3.10?target=es2022";import{Component as Wl}from"./esm/core.mjs";var ka=(function(i){Hl(r,i);function r(t){return i.call(this,wa({},r.defaultOptions,t))||this}return r.prototype.render=function(t,e){var n=t.x,a=t.y,o=t.items,s=t.textStyle,l=t.padding,u=l===void 0?0:l,c=t.width,p=t.separator,f=Rl(I(u),3),h=f[0],d=f[1],v=f[2],m=L(t,"tag"),g=lt(e,".container","g").styles({className:"container",x:n+v,y:a+h}),y=0,b=0;g.node().removeChildren();for(var _=function(A){var T=o[A],P=new jt({className:"breadcrumb-item",style:ge(ge(ge(ge({transform:"translate(".concat(y,", ").concat(b,")")},m),{text:Aa(T.text)?T.id:T.text}),Fl(T,["marker"])),{padding:0})});g.append(function(){return P});var C=P.getLocalBounds(),E=C.halfExtents[0]*2,O=C.halfExtents[1]*2;if(y+=E,!Aa(c)){var R=c-d;y>R&&(P.attr({transform:"translateY(".concat(b+O,")")}),y=E,b+=O)}x.bindInnerEvents(P,T);var V=p||{},D=V.spacing,Z=D===void 0?0:D,ct=V.text,dt=ct===void 0?"/":ct,pt=V.style;if(A!==o.length-1){var Q=new Et({className:"".concat(r.tag,"-separator"),id:"".concat(r.tag,"-separator-").concat(A),style:ge(ge({x:y+Z,y:b+O/2},pt),{text:dt,textAlign:"end",textBaseline:"middle"})});g.append(function(){return Q});var $t=Q.getLocalBounds();y+=$t.halfExtents[0]*2+Z}},x=this,S=0;S<o.length;S++)_(S)},r.prototype.update=function(t){this.attr(wa({},this.attributes,t)),this.render(this.attributes,this)},r.prototype.bindInnerEvents=function(t,e){var n=this.attributes,a=n.items,o=n.onClick;o&&t.addEventListener("click",function(){o.call(t,e.id,e,a)})},r.tag="breadcrumb",r.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}},r})(Wl);import{__assign as qe,__extends as ru,__read as Cn}from"/tslib?target=es2022";import{Band as nu,Linear as En}from"/@antv/scale@^0.4.16?target=es2022";import{clone as iu,isArray as au,isFunction as ou,isNumber as su}from"/@antv/util@^3.3.10?target=es2022";import{Component as lu}from"./esm/core.mjs";import{__assign as Dl,__extends as Vl,__rest as Gl}from"/tslib?target=es2022";import{deepMix as jl}from"/@antv/util@^3.3.10?target=es2022";var La=(function(i){Vl(r,i);function r(t){var e=this,n=t.style,a=Gl(t,["style"]);return e=i.call(this,jl({},{type:"column"},Dl({style:n},a)))||this,e.columnsGroup=new U({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}return r.prototype.render=function(){var t=this.attributes,e=t.columns,n=t.x,a=t.y;this.columnsGroup.style.transform="translate(".concat(n,", ").concat(a,")"),w(this.columnsGroup).selectAll(".column").data(e.flat()).join(function(o){return o.append("rect").attr("className","column").each(function(s){this.attr(s)})},function(o){return o.each(function(s){this.attr(s)})},function(o){return o.remove()})},r.prototype.update=function(t){this.attr(M({},this.attributes,t)),this.render()},r.prototype.clear=function(){this.removeChildren()},r})(fr);import{__assign as Yl,__extends as Ul,__rest as Xl}from"/tslib?target=es2022";import{deepMix as ql}from"/@antv/util@^3.3.10?target=es2022";var Ta=(function(i){Ul(r,i);function r(t){var e=this,n=t.style,a=Xl(t,["style"]);return e=i.call(this,ql({},{type:"lines"},Yl({style:n},a)))||this,e.linesGroup=e.appendChild(new U),e.areasGroup=e.appendChild(new U),e.render(),e}return r.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas,a=t.x,o=t.y;this.style.transform="translate(".concat(a,", ").concat(o,")"),e&&this.renderLines(e),n&&this.renderAreas(n)},r.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},r.prototype.update=function(t){this.attr(M({},this.attributes,t)),this.render()},r.prototype.renderLines=function(t){w(this.linesGroup).selectAll(".line").data(t).join(function(e){return e.append("path").attr("className","line").each(function(n){this.attr(n)})},function(e){return e.each(function(n){this.attr(n)})},function(e){return e.remove()})},r.prototype.renderAreas=function(t){w(this.linesGroup).selectAll(".area").data(t).join(function(e){return e.append("path").attr("className","area").each(function(n){this.attr(n)})},function(e){return e.each(function(n){this.style(n)})},function(e){return e.remove()})},r})(fr);import{__read as wt,__spreadArray as St}from"/tslib?target=es2022";import{clone as Zl,isEqual as Kl,clamp as $l}from"/@antv/util@^3.3.10?target=es2022";function Pa(i,r){var t,e=r.x,n=r.y,a=wt(n.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(t=wt([o,s],2),s=t[0],o=t[1]),i.map(function(l){var u=l.map(function(c,p){return[e.map(p),$l(n.map(c),s,o)]});return u})}function ye(i,r){r===void 0&&(r=!1);var t=r?i.length-1:0,e=i.map(function(n,a){return St([a===t?"M":"L"],wt(n),!1)});return r?e.reverse():e}function Xe(i,r){if(r===void 0&&(r=!1),i.length<=2)return ye(i);for(var t=[],e=i.length,n=0;n<e;n+=1){var a=r?i[e-n-1]:i[n];Kl(a,t.slice(-2))||t.push.apply(t,St([],wt(a),!1))}var o=Er(t,!1);return r?o.unshift(St(["M"],wt(i[e-1]),!1)):o.unshift(St(["M"],wt(i[0]),!1)),o}function Ln(i,r,t){var e=Zl(i);return e.push(["L",r,t],["L",0,t],["Z"]),e}function Ca(i,r,t,e){return i.map(function(n){return Ln(r?Xe(n):ye(n),t,e)})}function Ea(i,r,t){for(var e=[],n=i.length-1;n>=0;n-=1){var a=i[n],o=ye(a),s=void 0;if(n===0)s=Ln(o,r,t);else{var l=i[n-1],u=ye(l,!0);u[0][0]="L",s=St(St(St([],wt(o),!1),wt(u),!1),[["Z"]],!1)}e.push(s)}return e}function Ba(i,r,t){for(var e=[],n=i.length-1;n>=0;n-=1){var a=i[n],o=Xe(a),s=void 0;if(n===0)s=Ln(o,r,t);else{var l=i[n-1],u=Xe(l,!0),c=a[0];u[0][0]="L",s=St(St(St([],wt(o),!1),wt(u),!1),[St(["M"],wt(c),!1),["Z"]],!1)}e.push(s)}return e}import{__read as Jl}from"/tslib?target=es2022";import{clone as Ql,min as Oa,minBy as tu,max as Ma,maxBy as eu}from"/@antv/util@^3.3.10?target=es2022";function Tn(i){return i.length===0?[0,0]:[Oa(tu(i,function(r){return Oa(r)||0})),Ma(eu(i,function(r){return Ma(r)||0}))]}function Pn(i){for(var r=Ql(i),t=r[0].length,e=Jl([Array(t).fill(0),Array(t).fill(0)],2),n=e[0],a=e[1],o=0;o<r.length;o+=1)for(var s=r[o],l=0;l<t;l+=1)s[l]>=0?(s[l]+=n[l],n[l]=s[l]):(s[l]+=a[l],a[l]=s[l]);return r}var Wr=(function(i){ru(r,i);function r(t){return i.call(this,t,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(r.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||t?.length===0)return[[]];var e=iu(t);return su(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"data",{get:function(){return this.attributes.isStack?Pn(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"baseline",{get:function(){var t=this.scales.y,e=Cn(t.getOptions().domain||[0,0],2),n=e[0],a=e[1];return a<0?t.map(a):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"containerShape",{get:function(){var t=this.attributes,e=t.width,n=t.height;return{width:e,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,a=e.isStack,o=e.smooth;if(n!=="line")throw new Error("linesStyle can only be used in line type");var s=L(this.attributes,"area"),l=L(this.attributes,"line"),u=this.containerShape.width,c=this.data;if(c[0].length===0)return{lines:[],areas:[]};var p=this.scales,f=p.x,h=p.y,d=Pa(c,{type:"line",x:f,y:h}),v=[];if(s){var m=this.baseline;a?v=o?Ba(d,u,m):Ea(d,u,m):v=Ca(d,o,u,m)}return{lines:d.map(function(g,y){return qe({stroke:t.getColor(y),d:o?Xe(g):ye(g)},l)}),areas:v.map(function(g,y){return qe({d:g,fill:t.getColor(y)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"columnsStyle",{get:function(){var t=this,e=L(this.attributes,"column"),n=this.attributes,a=n.isStack,o=n.type,s=n.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,u=this.rawData;if(!u)return{columns:[]};a&&(u=Pn(u));var c=this.createScales(u),p=c.x,f=c.y,h=Cn(Tn(u),2),d=h[0],v=h[1],m=new En({domain:[0,v-(d>0?0:d)],range:[0,l*s]}),g=p.getBandWidth(),y=this.rawData;return{columns:u.map(function(b,_){return b.map(function(x,S){var A=g/u.length,T=function(){return{x:p.map(S)+A*_,y:x>=0?f.map(x):f.map(0),width:A,height:m.map(Math.abs(x))}},P=function(){return{x:p.map(S),y:f.map(x),width:g,height:m.map(y[_][S])}};return qe(qe({fill:t.getColor(_)},e),a?P():T())})})}},enumerable:!1,configurable:!0}),r.prototype.render=function(t,e){lt(e,".container","rect").attr("className","container").node();var n=t.type,a=t.x,o=t.y,s="spark".concat(n),l=qe({x:a,y:o},n==="line"?this.linesStyle:this.columnsStyle);w(e).selectAll(".spark").data([n]).join(function(u){return u.append(function(c){return c==="line"?new Ta({className:s,style:l}):new La({className:s,style:l})}).attr("className","spark ".concat(s))},function(u){return u.update(l)},function(u){return u.remove()})},r.prototype.getColor=function(t){var e=this.attributes.color;return au(e)?e[t%e.length]:ou(e)?e.call(null,t):e},r.prototype.createScales=function(t){var e,n,a=this.attributes,o=a.type,s=a.scale,l=a.range,u=l===void 0?[]:l,c=a.spacing,p=this.containerShape,f=p.width,h=p.height,d=Cn(Tn(t),2),v=d[0],m=d[1],g=new En({domain:[(e=u[0])!==null&&e!==void 0?e:v,(n=u[1])!==null&&n!==void 0?n:m],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new En({domain:[0,t[0].length-1],range:[0,f]}),y:g}:{type:o,x:new nu({domain:t[0].map(function(y,b){return b}),range:[0,f],paddingInner:c,paddingOuter:c/2,align:.5}),y:g}},r.tag="sparkline",r})(lu);import{__assign as q,__extends as pu,__read as Nt}from"/tslib?target=es2022";import{CustomEvent as za}from"/@antv/g@^6.1.11?target=es2022";import{clamp as fu}from"/@antv/util@^3.3.10?target=es2022";import{transition as On}from"./esm/animation.mjs";import{Component as hu}from"./esm/core.mjs";var Dr={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Vr={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Gr={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},At=Y({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider");import{__assign as Mt,__extends as Na,__read as uu,__rest as Bn}from"/tslib?target=es2022";import{Component as Ia}from"./esm/core.mjs";var Yt=Y({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),cu=(function(i){Na(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.render=function(t,e){var n=t.x,a=t.y,o=t.size,s=o===void 0?10:o,l=t.radius,u=l===void 0?s/4:l,c=t.orientation,p=Bn(t,["x","y","size","radius","orientation"]),f=s,h=f*2.4,d=w(e).maybeAppendByClassName(Yt.iconRect,"rect").styles(Mt(Mt({},p),{width:f,height:h,radius:u,x:n-f/2,y:a-h/2,transformOrigin:"center"})),v=n+1/3*f-f/2,m=n+2/3*f-f/2,g=a+1/4*h-h/2,y=a+3/4*h-h/2;d.maybeAppendByClassName("".concat(Yt.iconLine,"-1"),"line").styles(Mt({x1:v,x2:v,y1:g,y2:y},p)),d.maybeAppendByClassName("".concat(Yt.iconLine,"-2"),"line").styles(Mt({x1:m,x2:m,y1:g,y2:y},p)),c==="vertical"&&(d.node().style.transform="rotate(90)")},r})(Ia),jr=(function(i){Na(r,i);function r(t){return i.call(this,t,Gr)||this}return r.prototype.renderLabel=function(t){var e=this,n=this.attributes,a=n.x,o=n.y,s=n.showLabel,l=L(this.attributes,"label"),u=l.x,c=u===void 0?0:u,p=l.y,f=p===void 0?0:p,h=l.transform,d=l.transformOrigin,v=Bn(l,["x","y","transform","transformOrigin"]),m=uu(et(v,[]),2),g=m[0],y=m[1],b=w(t).maybeAppendByClassName(Yt.labelGroup,"g").styles(y),_=Mt(Mt({},Vr),g),x=_.text,S=Bn(_,["text"]);X(!!s,b,function(A){e.label=A.maybeAppendByClassName(Yt.label,"text").styles(Mt(Mt({},S),{x:a+c,y:o+f,transform:h,transformOrigin:d,text:"".concat(x)})),e.label.on("mousedown",function(T){T.stopPropagation()}),e.label.on("touchstart",function(T){T.stopPropagation()})})},r.prototype.renderIcon=function(t){var e=this.attributes,n=e.x,a=e.y,o=e.orientation,s=e.type,l=Mt(Mt({x:n,y:a,orientation:o},Dr),L(this.attributes,"icon")),u=this.attributes.iconShape,c=u===void 0?function(){return new cu({style:l})}:u,p=w(t).maybeAppendByClassName(Yt.iconGroup,"g");p.selectAll(Yt.icon.class).data([c]).join(function(f){return f.append(typeof c=="string"?c:function(){return c(s)}).attr("className",Yt.icon.name)},function(f){return f.update(l)},function(f){return f.remove()})},r.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},r})(Ia);var be=(function(i){pu(r,i);function r(t){var e=i.call(this,t,q(q(q({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(n){return n.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},ot(Gr,"handle")),ot(Dr,"handleIcon")),ot(Vr,"handleLabel")))||this;return e.range=[0,1],e.onDragStart=function(n){return function(a){a.stopPropagation(),e.target=n,e.prevPos=e.getOrientVal(Ht(a));var o=e.availableSpace,s=o.x,l=o.y,u=e.getBBox(),c=u.x,p=u.y;e.selectionStartPos=e.getRatio(e.prevPos-e.getOrientVal([s,l])-e.getOrientVal([+c,+p])),e.selectionWidth=0,document.addEventListener("pointermove",e.onDragging),document.addEventListener("pointerup",e.onDragEnd)}},e.onDragging=function(n){var a=e.attributes,o=a.slidable,s=a.brushable,l=a.type;n.stopPropagation();var u=e.getOrientVal(Ht(n)),c=u-e.prevPos;if(c){var p=e.getRatio(c);switch(e.target){case"start":o&&e.setValuesOffset(p);break;case"end":o&&e.setValuesOffset(0,p);break;case"selection":o&&e.setValuesOffset(p,p);break;case"track":if(!s)return;e.selectionWidth+=p,l==="range"?e.innerSetValues([e.selectionStartPos,e.selectionStartPos+e.selectionWidth].sort(),!0):e.innerSetValues([0,e.selectionStartPos+e.selectionWidth],!0);break;default:break}e.prevPos=u}},e.onDragEnd=function(){document.removeEventListener("pointermove",e.onDragging),document.removeEventListener("pointermove",e.onDragging),document.removeEventListener("pointerup",e.onDragEnd),e.target="",e.updateHandlesPosition(!1)},e.onValueChange=function(n){var a=e.attributes,o=a.onChange,s=a.type,l=s==="range"?n:n[1],u=s==="range"?e.getValues():e.getValues()[1],c=new za("valuechange",{detail:{oldValue:l,value:u}});e.dispatchEvent(c),o?.(u)},e.selectionStartPos=0,e.selectionWidth=0,e.prevPos=0,e.target="",e}return Object.defineProperty(r.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sparklineStyle",{get:function(){var t=this.attributes.orientation;if(t!=="horizontal")return null;var e=L(this.attributes,"sparkline");return q(q({zIndex:0},this.availableSpace),e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,a=Nt(this.getOrientVal([[e,n],[n,e]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.x,n=t.y,a=t.padding,o=Nt(I(a),4),s=o[0],l=o[1],u=o[2],c=o[3],p=this.shape,f=p.width,h=p.height;return{x:c,y:s,width:f-(c+l),height:h-(s+u)}},enumerable:!1,configurable:!0}),r.prototype.getValues=function(){return this.values},r.prototype.setValues=function(t,e){t===void 0&&(t=[0,0]),e===void 0&&(e=!1),this.attributes.values=t;var n=e===!1?!1:this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},r.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(At.selection.class).each(function(n,a){On(this,e[a],t)})},r.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&On(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&On(this.endHandle,this.getHandleStyle("end"),t))},r.prototype.innerSetValues=function(t,e){t===void 0&&(t=[0,0]),e===void 0&&(e=!1);var n=this.values,a=this.clampValues(t);this.attributes.values=a,this.setValues(a),e&&this.onValueChange(n)},r.prototype.renderTrack=function(t){var e=this.attributes,n=e.x,a=e.y,o=L(this.attributes,"track");this.trackShape=w(t).maybeAppendByClassName(At.track,"rect").styles(q(q({x:n,y:a},this.shape),o))},r.prototype.renderBrushArea=function(t){var e=this.attributes,n=e.x,a=e.y,o=e.brushable;this.brushArea=w(t).maybeAppendByClassName(At.brushArea,"rect").styles(q({x:n,y:a,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},r.prototype.renderSparkline=function(t){var e=this,n=this.attributes,a=n.x,o=n.y,s=n.orientation,l=w(t).maybeAppendByClassName(At.sparklineGroup,"g");X(s==="horizontal",l,function(u){var c=q(q({},e.sparklineStyle),{x:a,y:o});u.maybeAppendByClassName(At.sparkline,function(){return new Wr({style:c})}).update(c)})},r.prototype.renderHandles=function(){var t=this,e,n=this.attributes,a=n.showHandle,o=n.type,s=o==="range"?["start","end"]:["end"],l=a?s:[],u=this;(e=this.foregroundGroup)===null||e===void 0||e.selectAll(At.handle.class).data(l.map(function(c){return{type:c}}),function(c){return c.type}).join(function(c){return c.append(function(p){var f=p.type;return new jr({style:t.getHandleStyle(f)})}).each(function(p){var f=p.type;this.attr("class","".concat(At.handle.name," ").concat(f,"-handle"));var h="".concat(f,"Handle");u[h]=this,this.addEventListener("pointerdown",u.onDragStart(f))})},function(c){return c.each(function(p){var f=p.type;this.update(u.getHandleStyle(f))})},function(c){return c.each(function(p){var f=p.type,h="".concat(f,"Handle");u[h]=void 0}).remove()})},r.prototype.renderSelection=function(t){var e=this.attributes,n=e.x,a=e.y,o=e.type,s=e.selectionType;this.foregroundGroup=w(t).maybeAppendByClassName(At.foreground,"g");var l=L(this.attributes,"selection"),u=function(p){return p.style("visibility",function(f){return f.show?"visible":"hidden"}).style("cursor",function(f){return s==="select"?"grab":s==="invert"?"crosshair":"default"}).styles(q(q({},l),{transform:"translate(".concat(n,", ").concat(a,")")}))},c=this;this.foregroundGroup.selectAll(At.selection.class).data(o==="value"?[]:this.calcSelectionArea().map(function(p,f){return{style:q({},p),index:f,show:s==="select"?f===1:f!==1}}),function(p){return p.index}).join(function(p){return p.append("rect").attr("className",At.selection.name).call(u).each(function(f,h){var d=this;h===1?(c.selectionShape=w(this),this.on("pointerdown",function(v){d.attr("cursor","grabbing"),c.onDragStart("selection")(v)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){d.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){d.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){d.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(p){return p.call(u)},function(p){return p.remove()}),this.updateSelectionArea(!1),this.renderHandles()},r.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},r.prototype.clampValues=function(t,e){var n;e===void 0&&(e=4);var a=Nt(this.range,2),o=a[0],s=a[1],l=Nt(this.getValues().map(function(m){return Wt(m,e)}),2),u=l[0],c=l[1],p=Array.isArray(t)?t:[u,t??c],f=Nt((p||[u,c]).map(function(m){return Wt(m,e)}),2),h=f[0],d=f[1];if(this.attributes.type==="value")return[0,fu(d,o,s)];h>d&&(n=Nt([d,h],2),h=n[0],d=n[1]);var v=d-h;return v>s-o?[o,s]:h<o?u===o&&c===d?[o,d]:[o,v+o]:d>s?c===s&&u===h?[h,s]:[s-v,s]:[h,d]},r.prototype.calcSelectionArea=function(t){var e=Nt(this.clampValues(t),2),n=e[0],a=e[1],o=this.availableSpace,s=o.x,l=o.y,u=o.width,c=o.height;return this.getOrientVal([[{y:l,height:c,x:s,width:n*u},{y:l,height:c,x:n*u+s,width:(a-n)*u},{y:l,height:c,x:a*u,width:(1-a)*u}],[{x:s,width:u,y:l,height:n*c},{x:s,width:u,y:n*c+l,height:(a-n)*c},{x:s,width:u,y:a*c,height:(1-a)*c}]])},r.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,a=n.x,o=n.y,s=n.width,l=n.height,u=Nt(this.clampValues(),2),c=u[0],p=u[1],f=t==="start"?-e:e,h=(t==="start"?c:p)*this.getOrientVal([s,l])+f;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([l/2,h])}},r.prototype.inferTextStyle=function(t){var e=this.attributes.orientation;return e==="horizontal"?{}:t==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:t==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},r.prototype.calcHandleText=function(t){var e,n=this.attributes,a=n.type,o=n.orientation,s=n.formatter,l=n.autoFitLabel,u=L(this.attributes,"handle"),c=L(u,"label"),p=u.spacing,f=this.getHandleSize(),h=this.clampValues(),d=t==="start"?h[0]:h[1],v=s(d),m=new Et({style:q(q(q({},c),this.inferTextStyle(t)),{text:v})}),g=m.getBBox(),y=g.width,b=g.height;if(m.destroy(),!l){if(a==="value")return{text:v,x:0,y:-b-p};var _=p+f+(o==="horizontal"?y/2:0);return e={text:v},e[o==="horizontal"?"x":"y"]=t==="start"?-_:_,e}var x=0,S=0,A=this.availableSpace,T=A.width,P=A.height,C=this.calcSelectionArea()[1],E=C.x,O=C.y,R=C.width,V=C.height,D=p+f;if(o==="horizontal"){var Z=D+y/2;if(t==="start"){var ct=E-D-y;x=ct>0?-Z:Z}else{var dt=T-E-R-D>y;x=dt?Z:-Z}}else{var pt=D,Q=b+D;t==="start"?S=O-f>b?-Q:pt:S=P-(O+V)-f>b?Q:-pt}return{x,y:S,text:v}},r.prototype.getHandleLabelStyle=function(t){var e=L(this.attributes,"handleLabel");return q(q(q({},e),this.calcHandleText(t)),this.inferTextStyle(t))},r.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=L(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return q({cursor:n,shape:t,size:a},e)},r.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.x,a=e.y,o=e.showLabel,s=e.showLabelOnInteraction,l=e.orientation,u=this.calcHandlePosition(t),c=u.x,p=u.y,f=this.calcHandleText(t),h=o;return!o&&s&&(this.target?h=!0:h=!1),q(q(q({},ot(this.getHandleIconStyle(),"icon")),ot(q(q({},this.getHandleLabelStyle(t)),f),"label")),{transform:"translate(".concat(c+n,", ").concat(p+a,")"),orientation:l,showLabel:h,type:t,zIndex:3})},r.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,a=t.height;return e||Math.floor((this.getOrientVal([+a,+n])+4)/2.4)},r.prototype.getOrientVal=function(t){var e=Nt(t,2),n=e[0],a=e[1],o=this.attributes.orientation;return o==="horizontal"?n:a},r.prototype.setValuesOffset=function(t,e){e===void 0&&(e=0);var n=this.attributes.type,a=Nt(this.getValues(),2),o=a[0],s=a[1],l=n==="range"?t:0,u=[o+l,s+e].sort();this.innerSetValues(u,!0)},r.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,a=e.height;return t/this.getOrientVal([n,a])},r.prototype.dispatchCustomEvent=function(t,e,n){var a=this;t.on(e,function(o){o.stopPropagation(),a.dispatchEvent(new za(n,{detail:o}))})},r.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},r.prototype.onScroll=function(t){var e=this.attributes.scrollable;if(e){var n=t.deltaX,a=t.deltaY,o=a||n,s=this.getRatio(o);this.setValuesOffset(s,s)}},r.tag="slider",r})(hu);import{__assign as Ha,__extends as du,__read as te}from"/tslib?target=es2022";import{CustomEvent as xe}from"/@antv/g@^6.1.11?target=es2022";import{clamp as Ra}from"/@antv/util@^3.3.10?target=es2022";import{Component as vu}from"./esm/core.mjs";var Fa=(function(i){du(r,i);function r(t){var e=i.call(this,t,{x:0,y:0,isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return e.range=[0,1],e.onValueChange=function(n){var a=e.attributes.value;if(n!==a){var o={detail:{oldValue:n,value:a}};e.dispatchEvent(new xe("scroll",o)),e.dispatchEvent(new xe("valuechange",o))}},e.onTrackClick=function(n){var a=e.attributes.slidable;if(a){var o=te(e.getLocalPosition(),2),s=o[0],l=o[1],u=te(e.padding,4),c=u[0],p=u[3],f=e.getOrientVal([s+p,l+c]),h=e.getOrientVal(Ht(n)),d=(h-f)/e.trackLength;e.setValue(d,!0)}},e.onThumbMouseenter=function(n){e.dispatchEvent(new xe("thumbMouseenter",{detail:n.detail}))},e.onTrackMouseenter=function(n){e.dispatchEvent(new xe("trackMouseenter",{detail:n.detail}))},e.onThumbMouseleave=function(n){e.dispatchEvent(new xe("thumbMouseleave",{detail:n.detail}))},e.onTrackMouseleave=function(n){e.dispatchEvent(new xe("trackMouseleave",{detail:n.detail}))},e}return Object.defineProperty(r.prototype,"padding",{get:function(){var t=this.attributes.padding;return I(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){var t=this.attributes.value,e=te(this.range,2),n=e[0],a=e[1];return Ra(t,n,a)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength,a=n===void 0?e:n;return a},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=te(this.padding,4),a=n[0],o=n[1],s=n[2],l=n[3],u=te(this.getOrientVal([[e,t],[t,e]]),2),c=u[0],p=u[1];return{x:l,y:a,width:+c-(l+o),height:+p-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var a=this.availableSpace,o=a.width,s=a.height;return n||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),r.prototype.getValues=function(t){t===void 0&&(t=this.value);var e=this.attributes,n=e.viewportLength,a=e.contentLength,o=n/a,s=te(this.range,2),l=s[0],u=s[1],c=t*(u-l-o);return[c,c+o]},r.prototype.getValue=function(){return this.value},r.prototype.renderSlider=function(t){var e=this.attributes,n=e.x,a=e.y,o=e.orientation,s=e.trackSize,l=e.padding,u=e.slidable,c=L(this.attributes,"track"),p=L(this.attributes,"thumb"),f=Ha(Ha({x:n,y:a,brushable:!1,orientation:o,padding:l,selectionRadius:this.thumbRadius,showHandle:!1,slidable:u,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:s,values:this.getValues()},ot(c,"track")),ot(p,"selection"));this.slider=w(t).maybeAppendByClassName("scrollbar",function(){return new be({style:f})}).update(f).node()},r.prototype.render=function(t,e){this.renderSlider(e)},r.prototype.setValue=function(t,e){e===void 0&&(e=!1);var n=this.attributes.value,a=te(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(Ra(t,o,s)),e),this.onValueChange(n)},r.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},r.prototype.getOrientVal=function(t){var e=this.attributes.orientation;return e==="horizontal"?t[0]:t[1]},r.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},r.tag="scrollbar",r})(vu);import{__extends as Tc,__read as Le,__spreadArray as Te}from"/tslib?target=es2022";import{parseAnimationOption as So}from"./esm/animation.mjs";import{Component as Pc}from"./esm/core.mjs";import{deepMix as Wa}from"/@antv/util@^3.3.10?target=es2022";var Yr={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new se({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},wg=Wa({},Yr,{style:{type:"arc"}}),Ag=Wa({},Yr,{style:{}}),F=Y({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");import{__assign as $a,__read as Ae}from"/tslib?target=es2022";import{isFunction as Nu}from"/@antv/util@^3.3.10?target=es2022";import{__assign as Ze,__extends as mu,__read as ut,__rest as gu,__spreadArray as gt}from"/tslib?target=es2022";import{fadeOut as Da,onAnimateFinished as Va,transition as Ga}from"./esm/animation.mjs";import{Component as yu}from"./esm/core.mjs";var _e=Y({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function ja(i){return i.reduce(function(r,t,e){return r.push(gt([e===0?"M":"L"],ut(t),!1)),r},[])}function bu(i,r,t){var e=r.connect,n=e===void 0?"line":e,a=r.center;if(n==="line")return ja(i);if(!a)return[];var o=Ft(i[0],a),s=t?0:1;return i.reduce(function(l,u,c){return c===0?l.push(gt(["M"],ut(u),!1)):l.push(gt(["A",o,o,0,0,s],ut(u),!1)),l},[])}function Mn(i,r,t){return r.type==="surround"?bu(i,r,t):ja(i)}function xu(i,r,t){var e=t.type,n=t.connect,a=t.center,o=t.closed,s=o?[["Z"]]:[],l=ut([Mn(i,t),Mn(r.slice().reverse(),t,!0)],2),u=l[0],c=l[1],p=ut([i[0],r.slice(-1)[0]],2),f=p[0],h=p[1],d=function(y,b){return[u,y,c,b,s].flat()};if(n==="line"||e==="surround")return d([gt(["L"],ut(h),!1)],[gt(["L"],ut(f),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=ut([Ft(h,a),Ft(f,a)],2),m=v[0],g=v[1];return d([gt(["A",m,m,0,0,1],ut(h),!1),gt(["L"],ut(h),!1)],[gt(["A",g,g,0,0,0],ut(f),!1),gt(["L"],ut(f),!1)])}function _u(i,r,t,e){var n=t.animate,a=t.isBillboard,o=r.map(function(s,l){return{id:s.id||"grid-line-".concat(l),d:Mn(s.points,t)}});return i.selectAll(_e.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(l,u){var c=K(Fe(Ze({d:l.d},e)),[l,u,o]);this.attr(Ze({class:_e.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},c))})},function(s){return s.transition(function(l,u){var c=K(Fe(Ze({d:l.d},e)),[l,u,o]);return Ga(this,c,n.update)})},function(s){return s.transition(function(){var l=this,u=Da(this,n.exit);return Va(u,function(){return l.remove()}),u})}).transitions()}function Su(i,r,t){var e=t.animate,n=t.connect,a=t.areaFill;if(r.length<2||!a||!n)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(d){return o[d%o.length]},l=[],u=0;u<r.length-1;u++){var c=ut([r[u].points,r[u+1].points],2),p=c[0],f=c[1],h=xu(p,f,t);l.push({d:h,fill:s(u)})}return i.selectAll(_e.region.class).data(l,function(d,v){return v}).join(function(d){return d.append("path").each(function(v,m){var g=K(v,[v,m,l]);this.attr(g)}).attr("className",_e.region.name)},function(d){return d.transition(function(v,m){var g=K(v,[v,m,l]);return Ga(this,g,e.update)})},function(d){return d.transition(function(){var v=this,m=Da(this,e.exit);return Va(m,function(){return v.remove()}),m})}).transitions()}function wu(i){var r=i.data,t=r===void 0?[]:r,e=i.closed;return e?t.map(function(n){var a=n.points,o=ut(a,1),s=o[0];return Ze(Ze({},n),{points:gt(gt([],ut(a),!1),[s],!1)})}):t}var Ya=(function(i){mu(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.render=function(t,e){var n=t.type,a=t.center,o=t.areaFill,s=t.closed,l=gu(t,["type","center","areaFill","closed"]),u=wu(t),c=w(e).maybeAppendByClassName(_e.lineGroup,"g"),p=w(e).maybeAppendByClassName(_e.regionGroup,"g"),f=_u(c,u,t,l),h=Su(p,u,t);return gt(gt([],ut(f),!1),ut(h),!1)},r})(yu);import{__read as G,__spreadArray as ee}from"/tslib?target=es2022";import{get as ku}from"/@antv/util@^3.3.10?target=es2022";import{transition as Ua}from"./esm/animation.mjs";import{__read as Ur,__spreadArray as Og}from"/tslib?target=es2022";import{isFunction as Au}from"/@antv/util@^3.3.10?target=es2022";function Xr(i,r){return Object.fromEntries(Object.entries(i).map(function(t){var e=Ur(t,2),n=e[0],a=e[1];return[n,K(a,r)]}))}function Se(i,r){return r&&Au(r)?i.filter(r):i}function Nn(i,r){var t=r.startAngle,e=r.endAngle;return(e-t)*i+t}function we(i,r){if(r.type==="linear"){var t=Ur(r.startPos,2),e=t[0],n=t[1],a=Ur(r.endPos,2),o=a[0],s=a[1],l=Ur([o-e,s-n],2),u=l[0],c=l[1];return fe([u,c])}var p=yt(Nn(i,r));return[-Math.sin(p),Math.cos(p)]}function Ke(i,r,t){var e=we(i,t);return Cr(e,r!=="positive")}function Ut(i,r){return Ke(i,r.labelDirection,r)}function Lu(i,r){var t=G(r.startPos,2),e=t[0],n=t[1],a=G(r.endPos,2),o=a[0],s=a[1],l=G([o-e,s-n],2),u=l[0],c=l[1];return[e+u*i,n+c*i]}function Tu(i,r){var t=r.radius,e=G(r.center,2),n=e[0],a=e[1],o=yt(Nn(i,r));return[n+t*Math.cos(o),a+t*Math.sin(o)]}function re(i,r){return r.type==="linear"?Lu(i,r):Tu(i,r)}function $e(i){return we(0,i)[1]===0}function qr(i){return we(0,i)[0]===0}function Za(i,r){return r-i===360}function Xa(i,r,t,e,n){var a=r-i,o=G([n,n],2),s=o[0],l=o[1],u=G([yt(i),yt(r)],2),c=u[0],p=u[1],f=function(C){return[t+n*Math.cos(C),e+n*Math.sin(C)]},h=G(f(c),2),d=h[0],v=h[1],m=G(f(p),2),g=m[0],y=m[1];if(Za(i,r)){var b=(p+c)/2,_=G(f(b),2),x=_[0],S=_[1];return[["M",d,v],["A",s,l,0,1,0,x,S],["A",s,l,0,1,0,g,y]]}var A=a>180?1:0,T=i>r?0:1,P=!1;return P?"M".concat(t,",").concat(e,",L").concat(d,",").concat(v,",A").concat(s,",").concat(l,",0,").concat(A,",").concat(T,",").concat(g,",").concat(y,",L").concat(t,",").concat(e):"M".concat(d,",").concat(v,",A").concat(s,",").concat(l,",0,").concat(A,",").concat(T,",").concat(g,",").concat(y)}function Pu(i){var r=i.attributes,t=r.startAngle,e=r.endAngle,n=r.center,a=r.radius;return ee(ee([t,e],G(n),!1),[a],!1)}function Cu(i,r,t,e){var n=r.startAngle,a=r.endAngle,o=r.center,s=r.radius;return i.selectAll(F.line.class).data([{d:Xa.apply(void 0,ee(ee([n,a],G(o),!1),[s],!1))}],function(l,u){return u}).join(function(l){return l.append("path").attr("className",F.line.name).styles(r).styles({d:function(u){return u.d}})},function(l){return l.transition(function(){var u=this,c=Tr(this,Pu(this),ee(ee([n,a],G(o),!1),[s],!1),e.update);if(c){var p=function(){var f=ku(u.attributes,"__keyframe_data__");u.style.d=Xa.apply(void 0,ee([],G(f),!1))};c.onframe=p,c.onfinish=p}return c}).styles(r)},function(l){return l.remove()}).styles(t).transitions()}function Eu(i,r){var t=r.truncRange,e=r.truncShape,n=r.lineExtension}function Bu(i,r,t){t===void 0&&(t=[0,0]);var e=G([i,r,t],3),n=G(e[0],2),a=n[0],o=n[1],s=G(e[1],2),l=s[0],u=s[1],c=G(e[2],2),p=c[0],f=c[1],h=G([l-a,u-o],2),d=h[0],v=h[1],m=Math.sqrt(Math.pow(d,2)+Math.pow(v,2)),g=G([-p/m,f/m],2),y=g[0],b=g[1];return[y*d,y*v,b*d,b*v]}function qa(i){var r=G(i,2),t=G(r[0],2),e=t[0],n=t[1],a=G(r[1],2),o=a[0],s=a[1];return{x1:e,y1:n,x2:o,y2:s}}function Ou(i,r,t,e){var n=r.showTrunc,a=r.startPos,o=r.endPos,s=r.truncRange,l=r.lineExtension,u=G([a,o],2),c=G(u[0],2),p=c[0],f=c[1],h=G(u[1],2),d=h[0],v=h[1],m=G(l?Bu(a,o,l):new Array(4).fill(0),4),g=m[0],y=m[1],b=m[2],_=m[3],x=function(dt){return i.selectAll(F.line.class).data(dt,function(pt,Q){return Q}).join(function(pt){return pt.append("line").attr("className",function(Q){return"".concat(F.line.name," ").concat(Q.className)}).styles(t).transition(function(Q){return Ua(this,qa(Q.line),!1)})},function(pt){return pt.styles(t).transition(function(Q){var $t=Q.line;return Ua(this,qa($t),e.update)})},function(pt){return pt.remove()}).transitions()};if(!n||!s)return x([{line:[[p+g,f+y],[d+b,v+_]],className:F.line.name}]);var S=G(s,2),A=S[0],T=S[1],P=d-p,C=v-f,E=G([p+P*A,f+C*A],2),O=E[0],R=E[1],V=G([p+P*T,f+C*T],2),D=V[0],Z=V[1],ct=x([{line:[[p+g,f+y],[O,R]],className:F.lineFirst.name},{line:[[D,Z],[d+b,v+_]],className:F.lineSecond.name}]);return Eu(i,r),ct}function Mu(i,r,t,e){var n=t.showArrow,a=t.showTrunc,o=t.lineArrow,s=t.lineArrowOffset,l=t.lineArrowSize,u;if(r==="arc"?u=i.select(F.line.class):a?u=i.select(F.lineSecond.class):u=i.select(F.line.class),!n||!o||t.type==="arc"&&Za(t.startAngle,t.endAngle)){var c=u.node();c&&(c.style.markerEnd=void 0);return}var p=it(o);p.attr(e),Dt(p,l,!0),u.style("markerEnd",p).style("markerEndOffset",-s)}function Ka(i,r,t){var e=r.type,n,a=L(r,"line");return e==="linear"?n=Ou(i,r,Re(a,"arrow"),t):n=Cu(i,r,Re(a,"arrow"),t),Mu(i,e,r,a),n}function Iu(i,r){return Ke(i,r.gridDirection,r)}function Ja(i){var r=i.type,t=i.gridCenter;return r==="linear"?t:t||i.center}function zu(i,r){var t=r.gridLength;return i.map(function(e,n){var a=e.value,o=Ae(re(a,r),2),s=o[0],l=o[1],u=Ae(at(Iu(a,r),t),2),c=u[0],p=u[1];return{id:n,points:[[s,l],[s+c,l+p]]}})}function Hu(i,r){var t=r.gridControlAngles,e=Ja(r);if(!e)throw new Error("grid center is not provide");if(i.length<2)throw new Error("Invalid grid data");if(!t||t.length===0)throw new Error("Invalid gridControlAngles");var n=Ae(e,2),a=n[0],o=n[1];return i.map(function(s,l){var u=s.value,c=Ae(re(u,r),2),p=c[0],f=c[1],h=Ae([p-a,f-o],2),d=h[0],v=h[1],m=[];return t.forEach(function(g){var y=yt(g),b=Ae([Math.cos(y),Math.sin(y)],2),_=b[0],x=b[1],S=d*_-v*x+a,A=d*x+v*_+o;m.push([S,A])}),{points:m,id:l}})}function Qa(i,r,t,e){var n=L(t,"grid"),a=n.type,o=n.areaFill,s=Ja(t),l=Se(r,t.gridFilter),u=a==="segment"?zu(l,t):Hu(l,t),c=$a($a({},n),{center:s,areaFill:Nu(o)?l.map(function(p,f){return K(o,[p,f,l])}):o,animate:e,data:u});return i.selectAll(F.grid.class).data([1]).join(function(p){return p.append(function(){return new Ya({style:c})}).attr("className",F.grid.name)},function(p){return p.transition(function(){return this.update(c)})},function(p){return p.remove()}).transitions()}import{__assign as ao,__read as ne,__rest as ec,__spreadArray as oo}from"/tslib?target=es2022";import{get as so,isFunction as po}from"/@antv/util@^3.3.10?target=es2022";import{fadeOut as rc,onAnimateFinished as nc,onAnimatesFinished as ic,transition as ac,transitionShape as oc}from"./esm/animation.mjs";import{__read as Uu}from"/tslib?target=es2022";import{isNil as no}from"/@antv/util@^3.3.10?target=es2022";import{__read as er,__values as ju}from"/tslib?target=es2022";import{__read as In}from"/tslib?target=es2022";var Zr=(function(){function i(r,t,e,n){this.set(r,t,e,n)}return Object.defineProperty(i.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),i.prototype.rotatedPoints=function(r,t,e){var n=this,a=n.x1,o=n.y1,s=n.x2,l=n.y2,u=Math.cos(r),c=Math.sin(r),p=t-t*u+e*c,f=e-t*c-e*u,h=[[u*a-c*l+p,c*a+u*l+f],[u*s-c*l+p,c*s+u*l+f],[u*a-c*o+p,c*a+u*o+f],[u*s-c*o+p,c*s+u*o+f]];return h},i.prototype.set=function(r,t,e,n){return e<r?(this.x2=r,this.x1=e):(this.x1=r,this.x2=e),n<t?(this.y2=t,this.y1=n):(this.y1=t,this.y2=n),this},i.prototype.defined=function(r){return this[r]!==Number.MAX_VALUE&&this[r]!==-Number.MAX_VALUE},i})();function Je(i,r){var t=i.getEulerAngles()||0;i.setEulerAngles(0);var e=i.getBounds(),n=In(e.min,2),a=n[0],o=n[1],s=In(e.max,2),l=s[0],u=s[1],c=i.getBBox(),p=c.width,f=c.height,h=f,d=0,v=0,m=a,g=o,y=ze(i);if(y){h-=1.5;var b=y.style.textAlign,_=y.style.textBaseline;b==="center"?m=(a+l)/2:(b==="right"||b==="end")&&(m=l),_==="middle"?g=(o+u)/2:_==="bottom"&&(g=u)}var x=In(I(r),4),S=x[0],A=S===void 0?0:S,T=x[1],P=T===void 0?0:T,C=x[2],E=C===void 0?A:C,O=x[3],R=O===void 0?P:O,V=new Zr((d+=a)-R,(v+=o)-A,d+p+P,v+h+E);return i.setEulerAngles(t),V.rotatedPoints(yt(t),m,g)}function Qe(i,r){return r[0]<=Math.max(i[0][0],i[1][0])&&r[0]<=Math.min(i[0][0],i[1][0])&&r[1]<=Math.max(i[0][1],i[1][1])&&r[1]<=Math.min(i[0][1],i[1][1])}function tr(i,r,t){var e=(r[1]-i[1])*(t[0]-r[0])-(r[0]-i[0])*(t[1]-r[1]);return e===0?0:e<0?2:1}function Ru(i,r){var t=tr(i[0],i[1],r[0]),e=tr(i[0],i[1],r[1]),n=tr(r[0],r[1],i[0]),a=tr(r[0],r[1],i[1]);return!!(t!==e&&n!==a||t===0&&Qe(i,r[0])||e===0&&Qe(i,r[1])||n===0&&Qe(r,i[0])||a===0&&Qe(r,i[1]))}function Fu(i,r){var t=i.length;if(t<3)return!1;var e=[r,[9999,r[1]]],n=0,a=0;do{var o=[i[a],i[(a+1)%t]];if(Ru(o,e)){if(tr(o[0],r,o[1])===0)return Qe(o,r);n++}a=(a+1)%t}while(a!==0);return!!(n&1)}function Wu(i,r){return r.every(function(t){return Fu(i,t)})}function to(i,r,t){var e=i.x1,n=i.x2,a=i.y1,o=i.y2,s=[[e,a],[n,a],[n,o],[e,o]],l=Je(r,t);return Wu(s,l)}import{__read as eo,__values as Du}from"/tslib?target=es2022";function Vu(i,r){var t=eo(i,4),e=t[0],n=t[1],a=t[2],o=t[3],s=eo(r,4),l=s[0],u=s[1],c=s[2],p=s[3],f=a-e,h=o-n,d=c-l,v=p-u,m=f*v-d*h;if(m===0)return!1;var g=m>0,y=e-l,b=n-u,_=f*b-h*y;if(_<0===g)return!1;var x=d*b-v*y;return!(x<0===g||_>m===g||x>m===g)}function Gu(i,r){var t=[[i[0],i[1],i[2],i[3]],[i[2],i[3],i[4],i[5]],[i[4],i[5],i[6],i[7]],[i[6],i[7],i[0],i[1]]];return t.some(function(e){return Vu(r,e)})}function ro(i,r,t){var e,n,a=Je(i,t).flat(1),o=Je(r,t).flat(1),s=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=Du(s),u=l.next();!u.done;u=l.next()){var c=u.value;if(Gu(o,c))return!0}}catch(p){e={error:p}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}return!1}function Yu(i,r){var t=i.type,e=i.labelDirection,n=i.crossSize;if(!n)return!1;if(t==="arc"){var a=i.center,o=i.radius,s=er(a,2),l=s[0],u=s[1],c=e==="negative"?0:n,p=-o-c,f=o+c,h=er(I(r),4),d=h[0],v=h[1],m=h[2],g=h[3];return new Zr(l+p-g,u+p-d,l+f+v,u+f+m)}var y=er(i.startPos,2),b=y[0],_=y[1],x=er(i.endPos,2),S=x[0],A=x[1],T=er(qr(i)?[-r,0,r,0]:[0,r,0,-r],4),P=T[0],C=T[1],E=T[2],O=T[3],R=Ut(0,i),V=at(R,n),D=new Zr(b,_,S,A);return D.x1+=O,D.y1+=P,D.x2+=C+V[0],D.y2+=E+V[1],D}function Xt(i,r,t){var e,n,a=r.crossPadding,o=new Set,s=null,l=Yu(r,a),u=function(d){return l?to(l,d):!0},c=function(d,v){return!d||!d.firstChild?!0:!ro(d.firstChild,v.firstChild,I(t))};try{for(var p=ju(i),f=p.next();!f.done;f=p.next()){var h=f.value;u(h)?!s||c(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(d){e={error:d}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(e)throw e.error}}return Array.from(o)}function zn(i,r){return r===void 0&&(r={}),no(i)?0:typeof i=="number"?i:Math.floor(br(i,r))}function Hn(i,r,t,e){if(!(i.length<=0)){var n=r.suffix,a=n===void 0?"...":n,o=r.minLength,s=r.maxLength,l=s===void 0?1/0:s,u=r.step,c=u===void 0?" ":u,p=r.margin,f=p===void 0?[0,0,0,0]:p,h=Ie(e.getTextShape(i[0])),d=zn(c,h),v=o?zn(o,h):d,m=zn(l,h);(no(m)||m===1/0)&&(m=Math.max.apply(null,i.map(function(V){return V.getBBox().width})));for(var g=i.slice(),y=Uu(f,4),b=y[0],_=b===void 0?0:b,x=y[1],S=x===void 0?0:x,A=y[2],T=A===void 0?_:A,P=y[3],C=P===void 0?S:P,E=function(V){if(g.forEach(function(D){e.ellipsis(e.getTextShape(D),V,a)}),g=Xt(i,t,f),g.length<1)return{value:void 0}},O=m;O>v+d;O-=d){var R=E(O);if(typeof R=="object")return R.value}}}import{__read as Rn,__spreadArray as Kr}from"/tslib?target=es2022";var Xu={parity:function(i,r){var t=r.seq,e=t===void 0?2:t;return i.filter(function(n,a){return a%e?(j(n),!1):!0})}},qu=function(i){return i.filter(gr)};function Fn(i,r,t,e){var n=i.length,a=r.keepHeader,o=r.keepTail;if(!(n<=1||n===2&&a&&o)){var s=Xu.parity,l=function(b){return b.forEach(e.show),b},u=2,c=i.slice(),p=i.slice(),f=Math.min.apply(Math,Kr([1],Rn(i.map(function(b){return b.getBBox().width})),!1));if(t.type==="linear"&&($e(t)||qr(t))){var h=De(i[0]).left,d=De(i[n-1]).right,v=Math.abs(d-h)||1;u=Math.max(Math.floor(n*f/v),u)}var m,g;for(a&&(m=c.splice(0,1)[0]),o&&(g=c.splice(-1,1)[0],c.reverse()),l(c);u<i.length&&Xt(qu(g?Kr(Kr([g],Rn(p),!1),[m],!1):Kr([m],Rn(p),!1)),t,r?.margin).length;){if(g&&!m&&u%2===0){var y=c.splice(0,1);y.forEach(e.hide)}else if(g&&m){var y=c.splice(0,1);y.forEach(e.hide)}p=s(l(c),{seq:u}),u++}}}import{__values as Zu}from"/tslib?target=es2022";function Wn(i,r,t,e){var n,a,o=r.optionalAngles,s=o===void 0?[0,45,90]:o,l=r.margin,u=r.recoverWhenFailed,c=u===void 0?!0:u,p=i.map(function(g){return g.getLocalEulerAngles()}),f=function(){return Xt(i,t,l).length<1},h=function(g){return i.forEach(function(y,b){var _=Array.isArray(g)?g[b]:g;e.rotate(y,+_)})};try{for(var d=Zu(s),v=d.next();!v.done;v=d.next()){var m=v.value;if(h(m),f())return}}catch(g){n={error:g}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}c&&h(p)}import{__read as Ku,__spreadArray as $u}from"/tslib?target=es2022";function Ju(i){var r=i.type,t=i.labelDirection;return r==="linear"&&$e(i)?t==="negative"?"bottom":"top":"middle"}function Dn(i,r,t,e,n){var a,o=r.maxLines,s=o===void 0?3:o,l=r.recoverWhenFailed,u=l===void 0?!0:l,c=r.margin,p=c===void 0?[0,0,0,0]:c,f=K((a=r.wordWrapWidth)!==null&&a!==void 0?a:50,[n]),h=i.map(function(b){return b.attr("maxLines")||1}),d=Math.min.apply(Math,$u([],Ku(h),!1)),v=function(){return Xt(i,t,p).length<1},m=Ju(t),g=function(b){return i.forEach(function(_,x){var S=Array.isArray(b)?b[x]:b;e.wrap(_,f,S,m)})};if(!(d>s)){if(t.type==="linear"&&$e(t)){if(g(s),v())return}else for(var y=d;y<=s;y++)if(g(y),v())return;u&&g(h)}}var Qu=new Map([["hide",Fn],["rotate",Wn],["ellipsis",Hn],["wrap",Dn]]);function tc(i,r,t){return r.labelOverlap.length<1?!1:t==="hide"?!mr(i[0]):t==="rotate"?!i.some(function(e){var n;return!!(!((n=e.attr("transform"))===null||n===void 0)&&n.includes("rotate"))}):t==="ellipsis"||t==="wrap"?i.filter(function(e){return e.querySelector("text")}).length>=1:!0}function io(i,r,t,e){var n=r.labelOverlap,a=n===void 0?[]:n;a.length&&a.forEach(function(o){var s=o.type,l=Qu.get(s);tc(i,r,s)&&l?.(i,o,r,e,t)})}import{getFactor as sc}from"./esm/ui/axis/utils.mjs";function lo(i){for(var r=i;r<0;)r+=360;return Math.round(r%360)}function Vn(i,r){var t=ne(i,2),e=t[0],n=t[1],a=ne(r,2),o=a[0],s=a[1],l=ne([e*o+n*s,e*s-n*o],2),u=l[0],c=l[1];return Math.atan2(c,u)}function lc(i){var r=(i+360)%180;return tt(r,-90,90)||(r+=180),r}function uc(i,r,t){var e,n=t.labelAlign,a=(e=r.style.transform)===null||e===void 0?void 0:e.includes("rotate");if(a)return r.getLocalEulerAngles();var o=0,s=Ut(i.value,t),l=we(i.value,t);return n==="horizontal"?0:(n==="perpendicular"?o=Vn([1,0],s):o=Vn([l[0]<0?-1:1,0],l),lc(Ne(o)))}function fo(i,r,t){var e=t.type,n=t.labelAlign,a=Ut(i,t),o=lo(r),s=lo(Ne(Vn([1,0],a))),l="center",u="middle";return e==="linear"?[90,270].includes(s)&&o===0?(l="center",u=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?l="center":s===0?(tt(o,0,90,!1,!0)||tt(o,0,90)||tt(o,270,360))&&(l="start"):s===90?tt(o,0,90,!1,!0)?l="start":(tt(o,90,180)||tt(o,270,360))&&(l="end"):s===270?tt(o,0,90,!1,!0)?l="end":(tt(o,90,180)||tt(o,270,360))&&(l="start"):s===180&&(o===90?l="start":(tt(o,0,90)||tt(o,270,360))&&(l="end")):n==="parallel"?tt(s,0,180,!0)?u="top":u="bottom":n==="horizontal"?tt(s,90,270,!1)?l="end":(tt(s,270,360,!1)||tt(s,0,90))&&(l="start"):n==="perpendicular"&&(tt(s,90,270)?l="end":l="start"),{textAlign:l,textBaseline:u}}function cc(i,r,t){r.setLocalEulerAngles(i);var e=r.__data__.value,n=fo(e,i,t),a=r.querySelector(F.labelItem.class);a&&ho(a,n)}function uo(i,r,t){var e=t.showTick,n=t.tickLength,a=t.tickDirection,o=t.labelDirection,s=t.labelSpacing,l=r.indexOf(i),u=K(s,[i,l,r]),c=ne([Ut(i.value,t),sc(o,a)],2),p=c[0],f=c[1],h=f===1?K(e?n:0,[i,l,r]):0,d=ne(Rt(at(p,u+h),re(i.value,t)),2),v=d[0],m=d[1];return{x:v,y:m}}function pc(i,r,t,e){var n=e.labelFormatter,a=po(n)?function(){return it(K(n,[i,r,t,Ut(i.value,e)]))}:function(){return it(i.label||"")};return a}function fc(i,r,t,e){var n=e.labelRender,a=(so(e,"endPos.0",400)-so(e,"startPos.0",0))/t.length,o=po(n)?K(n,[i,r,t,Ut(i.value,e)]):i.label||"",s=Fr(o)||30;return function(){return _r(o,{width:a,height:s})}}function ho(i,r){["text","html"].includes(i.nodeName)&&i.attr(r)}function hc(i,r){io(this.node().childNodes,i,r,{hide:j,show:vt,rotate:function(t,e){cc(+e,t,i)},ellipsis:function(t,e,n){t&&Jt(t,e||1/0,n)},wrap:function(t,e,n){t&&xr(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function co(i,r,t,e,n){var a=t.indexOf(r),o=n.labelRender,s=w(i).append(o?fc(r,a,t,n):pc(r,a,t,n)).attr("className",F.labelItem.name).node(),l=ne(et(Xr(e,[r,a,t])),2),u=l[0],c=l[1],p=c.transform,f=ec(c,["transform"]);ve(s,p);var h=uc(r,s,n);return s.getLocalEulerAngles()||s.setLocalEulerAngles(h),ho(s,ao(ao({},fo(r.value,h,n)),u)),i.attr(f),s}function vo(i,r,t,e,n){var a=Se(r,t.labelFilter),o=L(t,"label"),s,l=i.selectAll(F.label.class).data(a,function(u,c){return c}).join(function(u){return u.append("g").attr("className",F.label.name).transition(function(c){co(this,c,r,o,t);var p=uo(c,r,t),f=p.x,h=p.y;return this.style.transform="translate(".concat(f,", ").concat(h,")"),null})},function(u){return u.transition(function(c){var p=this.querySelector(F.labelItem.class),f=co(this,c,r,o,t),h=oc(p,f,e.update),d=uo(c,r,t),v=d.x,m=d.y,g=ac(this,{transform:"translate(".concat(v,", ").concat(m,")")},e.update);return oo(oo([],ne(h),!1),[g],!1)})},function(u){return s=u,u.transition(function(){var c=this,p=rc(this.childNodes[0],e.exit);return nc(p,function(){return w(c).remove()}),p}),s}).transitions();return ic(l,function(){hc.call(i,t,n)}),l}import{__assign as dc,__read as ke}from"/tslib?target=es2022";import{isFunction as vc}from"/@antv/util@^3.3.10?target=es2022";import{fadeOut as mc,onAnimateFinished as gc,transition as yc}from"./esm/animation.mjs";function go(i,r){return Ke(i,r.tickDirection,r)}function bc(i,r){var t=ke(i,2),e=t[0],n=t[1];return[[0,0],[e*r,n*r]]}function xc(i,r,t,e,n){var a=n.tickLength,o=ke(bc(e,K(a,[i,r,t])),2),s=ke(o[0],2),l=s[0],u=s[1],c=ke(o[1],2),p=c[0],f=c[1];return{x1:l,x2:p,y1:u,y2:f}}function _c(i,r,t,e,n){var a=n.tickFormatter,o=go(r.value,n),s="line";return vc(a)&&(s=function(){return K(a,[r,t,e,o])}),i.append(s).attr("className",F.tickItem.name)}function Sc(i,r,t,e,n,a,o){var s=go(i.value,a),l=xc(i,r,t,s,a),u=l.x1,c=l.x2,p=l.y1,f=l.y2,h=ke(et(Xr(o,[i,r,t,s])),2),d=h[0],v=h[1];e.node().nodeName==="line"&&e.styles(dc({x1:u,x2:c,y1:p,y2:f},d)),n.attr(v),e.styles(d)}function mo(i,r,t,e,n,a){var o=_c(w(this),i,r,t,e);Sc(i,r,t,o,this,e,n);var s=ke(re(i.value,e),2),l=s[0],u=s[1];return yc(this,{transform:"translate(".concat(l,", ").concat(u,")")},a)}function yo(i,r,t,e){var n=Se(r,t.tickFilter),a=L(t,"tick");return i.selectAll(F.tick.class).data(n,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",F.tick.name).transition(function(s,l){return mo.call(this,s,l,n,t,a,!1)})},function(o){return o.transition(function(s,l){return this.removeChildren(),mo.call(this,s,l,n,t,a,e.update)})},function(o){return o.transition(function(){var s=this,l=mc(this.childNodes[0],e.exit);return gc(l,function(){return s.remove()}),l})}).transitions()}import{__assign as bo,__read as qt,__rest as wc}from"/tslib?target=es2022";import{transition as Ac}from"./esm/animation.mjs";function kc(i,r,t){var e=t.titlePosition,n=e===void 0?"lb":e,a=t.titleSpacing,o=Gt(n),s=i.node().getLocalBounds(),l=qt(s.min,2),u=l[0],c=l[1],p=qt(s.halfExtents,2),f=p[0],h=p[1],d=qt(r.node().getLocalBounds().halfExtents,2),v=d[0],m=d[1],g=qt([u+f,c+h],2),y=g[0],b=g[1],_=qt(I(a),4),x=_[0],S=_[1],A=_[2],T=_[3];if(["start","end"].includes(n)&&t.type==="linear"){var P=t.startPos,C=t.endPos,E=qt(n==="start"?[P,C]:[C,P],2),O=E[0],R=E[1],V=fe([-R[0]+O[0],-R[1]+O[1]]),D=qt(at(V,x),2),Z=D[0],ct=D[1];return{x:O[0]+Z,y:O[1]+ct}}return o.includes("t")&&(b-=h+m+x),o.includes("r")&&(y+=f+v+S),o.includes("l")&&(y-=f+v+T),o.includes("b")&&(b+=h+m+A),{x:y,y:b}}function Lc(i,r,t){var e=i.getGeometryBounds().halfExtents,n=e[1]*2;if(r==="vertical"){if(t==="left")return"rotate(-90) translate(0, ".concat(n/2,")");if(t==="right")return"rotate(-90) translate(0, -".concat(n/2,")")}return""}function xo(i,r,t,e,n){var a=L(e,"title"),o=qt(et(a),2),s=o[0],l=o[1],u=l.transform,c=l.transformOrigin,p=wc(l,["transform","transformOrigin"]);r.styles(p);var f=u||Lc(i.node(),s.direction,s.position);i.styles(bo(bo({},s),{transformOrigin:c})),ve(i.node(),f);var h=kc(w(t._offscreen||t.querySelector(F.mainGroup.class)),r,e),d=h.x,v=h.y,m=Ac(r.node(),{transform:"translate(".concat(d,", ").concat(v,")")},n);return m}function _o(i,r,t,e){var n=t.titleText;return i.selectAll(F.title.class).data([{title:n}].filter(function(a){return!!a.title}),function(a,o){return a.title}).join(function(a){return a.append(function(){return it(n)}).attr("className",F.title.name).transition(function(){return xo(w(this),i,r,t,e.enter)})},function(a){return a.transition(function(){return xo(w(this),i,r,t,e.update)})},function(a){return a.remove()}).transitions()}function wo(i,r,t,e){var n=i.showLine,a=i.showTick,o=i.showLabel,s=r.maybeAppendByClassName(F.lineGroup,"g"),l=X(n,s,function(h){return Ka(h,i,e)})||[],u=r.maybeAppendByClassName(F.tickGroup,"g"),c=X(a,u,function(h){return yo(h,t,i,e)})||[],p=r.maybeAppendByClassName(F.labelGroup,"g"),f=X(o,p,function(h){return vo(h,t,i,e,r.node())})||[];return Te(Te(Te([],Le(l),!1),Le(c),!1),Le(f),!1).filter(function(h){return!!h})}var ie=(function(i){Tc(r,i);function r(t){return i.call(this,t,Yr)||this}return r.prototype.render=function(t,e,n){var a=this,o=t.titleText,s=t.data,l=t.animate,u=t.showTitle,c=t.showGrid,p=t.dataThreshold,f=t.truncRange,h=Br(s,p).filter(function(x){var S=x.value;return!(f&&S>f[0]&&S<f[1])}),d=So(n===void 0?l:n),v=w(e).maybeAppendByClassName(F.gridGroup,"g"),m=X(c,v,function(x){return Qa(x,h,t,d)})||[],g=w(e).maybeAppendByClassName(F.mainGroup,"g");o&&(!this.initialized&&d.enter||this.initialized&&d.update)&&wo(t,w(this.offscreenGroup),h,So(!1));var y=wo(t,w(g.node()),h,d),b=w(e).maybeAppendByClassName(F.titleGroup,"g"),_=X(u,b,function(x){return _o(x,a,t,d)})||[];return Te(Te(Te([],Le(m),!1),Le(y),!1),Le(_),!1).flat().filter(function(x){return!!x})},r})(Pc);var Ao=(function(){function i(){}return i})();import{__assign as Ce,__extends as mp,__read as Yo}from"/tslib?target=es2022";import{Component as gp}from"./esm/core.mjs";import{__extends as Cc,__read as J,__rest as Ec}from"/tslib?target=es2022";import{Component as Bc}from"./esm/core.mjs";var ko=Y({text:"text"},"title");function Lo(i,r){var t=i.attributes,e=t.position,n=t.spacing,a=t.inset,o=t.text,s=i.getBBox(),l=r.getBBox(),u=Gt(e),c=J(I(o?n:0),4),p=c[0],f=c[1],h=c[2],d=c[3],v=J(I(a),4),m=v[0],g=v[1],y=v[2],b=v[3],_=J([d+f,p+h],2),x=_[0],S=_[1],A=J([b+g,m+y],2),T=A[0],P=A[1];if(u[0]==="l")return new W(s.x,s.y,l.width+s.width+x+T,Math.max(l.height+P,s.height));if(u[0]==="t")return new W(s.x,s.y,Math.max(l.width+T,s.width),l.height+s.height+S+P);var C=J([r.attributes.width||l.width,r.attributes.height||l.height],2),E=C[0],O=C[1];return new W(l.x,l.y,E+s.width+x+T,O+s.height+S+P)}function Oc(i,r){var t=Object.entries(r).reduce(function(e,n){var a=J(n,2),o=a[0],s=a[1],l=i.node().attr(o);return l||(e[o]=s),e},{});i.styles(t)}function Mc(i){var r,t,e,n,a=i,o=a.width,s=a.height,l=a.position,u=J([+o/2,+s/2],2),c=u[0],p=u[1],f=J([+c,+p,"center","middle"],4),h=f[0],d=f[1],v=f[2],m=f[3],g=Gt(l);return g.includes("l")&&(r=J([0,"start"],2),h=r[0],v=r[1]),g.includes("r")&&(t=J([+o,"end"],2),h=t[0],v=t[1]),g.includes("t")&&(e=J([0,"top"],2),d=e[0],m=e[1]),g.includes("b")&&(n=J([+s,"bottom"],2),d=n[0],m=n[1]),{x:h,y:d,textAlign:v,textBaseline:m}}var $r=(function(i){Cc(r,i);function r(t){return i.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return r.prototype.getAvailableSpace=function(){var t=this,e=this.attributes,n=e.width,a=e.height,o=e.position,s=e.spacing,l=e.inset,u=t.querySelector(ko.text.class);if(!u)return new W(0,0,+n,+a);var c=u.getBBox(),p=c.width,f=c.height,h=J(I(s),4),d=h[0],v=h[1],m=h[2],g=h[3],y=J([0,0,+n,+a],4),b=y[0],_=y[1],x=y[2],S=y[3],A=Gt(o);if(A.includes("i"))return new W(b,_,x,S);A.forEach(function(Z,ct){var dt,pt,Q,$t;Z==="t"&&(dt=J(ct===0?[f+m,+a-f-m]:[0,+a],2),_=dt[0],S=dt[1]),Z==="r"&&(pt=J([+n-p-g],1),x=pt[0]),Z==="b"&&(Q=J([+a-f-d],1),S=Q[0]),Z==="l"&&($t=J(ct===0?[p+v,+n-p-v]:[0,+n],2),b=$t[0],x=$t[1])});var T=J(I(l),4),P=T[0],C=T[1],E=T[2],O=T[3],R=J([O+C,P+E],2),V=R[0],D=R[1];return new W(b+O,_+P,x-V,S-D)},r.prototype.getBBox=function(){return this.title?this.title.getBBox():new W(0,0,0,0)},r.prototype.render=function(t,e){var n=this,a=t.width,o=t.height,s=t.position,l=t.spacing,u=Ec(t,["width","height","position","spacing"]),c=J(et(u),1),p=c[0],f=Mc(t),h=f.x,d=f.y,v=f.textAlign,m=f.textBaseline;X(!!u.text,w(e),function(g){n.title=g.maybeAppendByClassName(ko.text,"text").styles(p).call(Oc,{x:h,y:d,textAlign:v,textBaseline:m}).node()})},r})(Bc);import{__assign as op,__extends as sp,__read as st,__spreadArray as lp}from"/tslib?target=es2022";import{CustomEvent as up}from"/@antv/g@^6.1.11?target=es2022";import{noop as Xn,set as cp}from"/@antv/util@^3.3.10?target=es2022";import{Component as pp}from"./esm/core.mjs";import{__assign as To,__extends as Nc,__read as It,__rest as Ic,__spreadArray as zc}from"/tslib?target=es2022";import{ElementEvent as Po}from"/@antv/g@^6.1.11?target=es2022";import{clamp as Gn,debounce as Hc}from"/@antv/util@^3.3.10?target=es2022";import{animate as Rc,onAnimateFinished as Fc}from"./esm/animation.mjs";import{Component as Wc}from"./esm/core.mjs";var bt=Y({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),Jr=(function(i){Nc(r,i);function r(t){var e=i.call(this,t,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:ga(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(n,a){return"".concat(n,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return e.playState="idle",e.contentGroup=e.appendChild(new U({class:bt.contentGroup.name})),e.playWindow=e.contentGroup.appendChild(new U({class:bt.playWindow.name})),e.innerCurrPage=e.defaultPage,e}return Object.defineProperty(r.prototype,"defaultPage",{get:function(){var t=this.attributes.defaultPage;return Gn(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pageShape",{get:function(){var t=this.pageViews,e=It(Rr(t.map(function(p){var f=p.getBBox(),h=f.width,d=f.height;return[h,d]})).map(function(p){return Math.max.apply(Math,zc([],It(p),!1))}),2),n=e[0],a=e[1],o=this.attributes,s=o.pageWidth,l=s===void 0?n:s,u=o.pageHeight,c=u===void 0?a:u;return{pageWidth:l,pageHeight:c}},enumerable:!1,configurable:!0}),r.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(r.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),r.prototype.getBBox=function(){var t=i.prototype.getBBox.call(this),e=t.x,n=t.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,l=o.pageHeight;return new W(e,n,s+a.width,l)},r.prototype.goTo=function(t){var e=this,n=this.attributes.animate,a=this,o=a.currPage,s=a.playState,l=a.playWindow,u=a.pageViews;if(s!=="idle"||t<0||u.length<=0||t>=u.length)return null;u[o].setLocalPosition(0,0),this.prepareFollowingPage(t);var c=It(this.getFollowingPageDiff(t),2),p=c[0],f=c[1];this.playState="running";var h=Rc(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-p,", ").concat(-f,")")}],n);return Fc(h,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),h},r.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var a=t?(n-1+e)%e:Gn(n-1,0,e);return this.goTo(a)},r.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var a=t?(n+1)%e:Gn(n+1,0,e);return this.goTo(a)},r.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,a=e.pageHeight;if(!n||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(bt.clipPath,"rect").styles({width:n,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},r.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?vt(e):j(e)})},r.prototype.adjustControllerLayout=function(){var t=this,e=t.prevBtnGroup,n=t.nextBtnGroup,a=t.pageInfoGroup,o=this.attributes,s=o.orientation,l=o.controllerPadding,u=a.getBBox(),c=u.width,p=u.height,f=It(s==="horizontal"?[-180,0]:[-90,90],2),h=f[0],d=f[1];e.setLocalEulerAngles(h),n.setLocalEulerAngles(d);var v=e.getBBox(),m=v.width,g=v.height,y=n.getBBox(),b=y.width,_=y.height,x=Math.max(m,c,b),S=s==="horizontal"?{offset:[[0,0],[m/2+l,0],[m+c+l*2,0]],textAlign:"start"}:{offset:[[x/2,-g-l],[x/2,0],[x/2,_+l]],textAlign:"center"},A=It(S.offset,3),T=It(A[0],2),P=T[0],C=T[1],E=It(A[1],2),O=E[0],R=E[1],V=It(A[2],2),D=V[0],Z=V[1],ct=S.textAlign,dt=a.querySelector("text");dt&&(dt.style.textAlign=ct),e.setLocalPosition(P,C),a.setLocalPosition(O,R),n.setLocalPosition(D,Z)},r.prototype.updatePageInfo=function(){var t,e=this,n=e.currPage,a=e.pageViews,o=e.attributes.formatter;a.length<2||((t=this.pageInfoGroup.querySelector(bt.pageInfo.class))===null||t===void 0||t.attr("text",o(n+1,a.length)),this.adjustControllerLayout())},r.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=t<e?-1:1;return n==="horizontal"?[l*o,0]:[0,l*s]},r.prototype.prepareFollowingPage=function(t){var e=this,n=e.currPage,a=e.pageViews;if(this.setVisiblePages([t,n]),t!==n){var o=It(this.getFollowingPageDiff(t),2),s=o[0],l=o[1];a[t].setLocalPosition(s,l)}},r.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=this.pageViews.length>=2,u=t.maybeAppendByClassName(bt.controller,"g");if(le(u.node(),l),!!l){var c=L(this.attributes,"button"),p=L(this.attributes,"pageNum"),f=It(et(c),2),h=f[0],d=f[1],v=h.size,m=Ic(h,["size"]),g=!u.select(bt.prevBtnGroup.class).node(),y=u.maybeAppendByClassName(bt.prevBtnGroup,"g").styles(d);this.prevBtnGroup=y.node();var b=y.maybeAppendByClassName(bt.prevBtn,"path"),_=u.maybeAppendByClassName(bt.nextBtnGroup,"g").styles(d);this.nextBtnGroup=_.node();var x=_.maybeAppendByClassName(bt.nextBtn,"path");[b,x].forEach(function(A){A.styles(To(To({},m),{transformOrigin:"center"})),Dt(A.node(),v,!0)});var S=u.maybeAppendByClassName(bt.pageInfoGroup,"g");this.pageInfoGroup=S.node(),S.maybeAppendByClassName(bt.pageInfo,"text").styles(p),this.updatePageInfo(),u.node().setLocalPosition(o+n,s/2),g&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},r.prototype.render=function(t,e){var n=t.x,a=n===void 0?0:n,o=t.y,s=o===void 0?0:o;this.attr("transform","translate(".concat(a,", ").concat(s,")"));var l=w(e);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},r.prototype.bindEvents=function(){var t=this,e=Hc(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(Po.INSERTED,e),this.playWindow.addEventListener(Po.REMOVED,e)},r})(Wc);import{__read as rr}from"/tslib?target=es2022";function Co(i,r,t){var e=Math.round((i-t)/r);return t+e*r}function Dc(i,r,t){var e=1.4,n=e*t;return[["M",i-t,r-n],["L",i+t,r-n],["L",i+t,r+n],["L",i-t,r+n],["Z"]]}var Eo=1.4,Bo=.4;function Vc(i,r,t){var e=t,n=e*Eo,a=e/2,o=e/6,s=i+n*Bo;return[["M",i,r],["L",s,r+a],["L",i+n,r+a],["L",i+n,r-a],["L",s,r-a],["Z"],["M",s,r+o],["L",i+n-2,r+o],["M",s,r-o],["L",i+n-2,r-o]]}function Gc(i,r,t){var e=t,n=e*Eo,a=e/2,o=e/6,s=r+n*Bo;return[["M",i,r],["L",i-a,s],["L",i-a,r+n],["L",i+a,r+n],["L",i+a,s],["Z"],["M",i-o,s],["L",i-o,r+n-2],["M",i+o,s],["L",i+o,r+n-2]]}H.registerSymbol("hiddenHandle",Dc);H.registerSymbol("verticalHandle",Vc);H.registerSymbol("horizontalHandle",Gc);function Oo(i,r,t,e){var n;e===void 0&&(e=4);var a=rr(i,2),o=a[0],s=a[1],l=rr(r,2),u=l[0],c=l[1],p=rr(t,2),f=p[0],h=p[1],d=rr([u,c],2),v=d[0],m=d[1],g=m-v;return v>m&&(n=rr([m,v],2),v=n[0],m=n[1]),g>s-o?[o,s]:v<o?f===o&&h===m?[o,m]:[o,g+o]:m>s?h===s&&f===v?[v,s]:[s-g,s]:[v,m]}function mt(i,r,t){return i===void 0&&(i="horizontal"),i==="horizontal"?r:t}import{__assign as nr,__extends as ep,__read as ae,__rest as Un}from"/tslib?target=es2022";import{Circle as zo}from"/@antv/g@^6.1.11?target=es2022";import{isUndefined as rp}from"/@antv/util@^3.3.10?target=es2022";import{Component as np}from"./esm/core.mjs";import{__extends as Xc,__read as Pe,__rest as qc,__spreadArray as Zc}from"/tslib?target=es2022";import{deepMix as Io,isString as Kc,isElement as $c,assign as Jc,get as Qc}from"/@antv/util@^3.3.10?target=es2022";import{Component as tp}from"./esm/core.mjs";var z,Mo="component-poptip",N={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},jn=(z={},z[".".concat(N.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},z[".".concat(N.TEXT)]={"text-align":"center"},z[".".concat(N.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},z[".".concat(N.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},z[".".concat(N.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},z[".".concat(N.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},z[".".concat(N.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},z[".".concat(N.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},z[".".concat(N.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},z[".".concat(N.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},z[".".concat(N.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},z[".".concat(N.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},z[".".concat(N.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},z[".".concat(N.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},z[".".concat(N.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},z[".".concat(N.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},z["[data-position='top'] .".concat(N.ARROW)]={bottom:"-2px"},z[".".concat(N.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},z["[data-position='left'] .".concat(N.ARROW)]={right:"-2px"},z[".".concat(N.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},z["[data-position='right'] .".concat(N.ARROW)]={left:"-2px"},z[".".concat(N.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},z["[data-position='bottom'] .".concat(N.ARROW)]={top:"-2px"},z[".".concat(N.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},z["[data-position='top-left'] .".concat(N.ARROW)]={left:"10px",bottom:"-2px"},z[".".concat(N.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},z["[data-position='top-right'] .".concat(N.ARROW)]={right:"10px",bottom:"-2px"},z[".".concat(N.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},z["[data-position='left-top'] .".concat(N.ARROW)]={right:"-2px",top:"8px"},z[".".concat(N.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},z["[data-position='left-bottom'] .".concat(N.ARROW)]={right:"-2px",bottom:"8px"},z[".".concat(N.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},z["[data-position='right-top'] .".concat(N.ARROW)]={left:"-2px",top:"8px"},z[".".concat(N.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},z["[data-position='right-bottom'] .".concat(N.ARROW)]={left:"-2px",bottom:"8px"},z[".".concat(N.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},z["[data-position='bottom-left'] .".concat(N.ARROW)]={top:"-2px",left:"8px"},z[".".concat(N.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},z["[data-position='bottom-right'] .".concat(N.ARROW)]={top:"-2px",right:"8px"},z);var jc=void 0;function Yn(i,r,t,e,n,a){if(n===void 0&&(n=!1),a===void 0&&(a=!1),a)return[i,r];var o=t.getBoundingClientRect(),s=o.x,l=o.y,u=o.width,c=o.height;switch(e){case"top":return n?[s+u/2,l]:[i,l];case"left":return n?[s,l+c/2]:[s,r];case"bottom":return n?[s+u/2,l+c]:[i,l+c];case"right":return n?[s+u,l+c/2]:[s+u,r];case"top-right":case"right-top":return[s+u,l];case"left-bottom":case"bottom-left":return[s,l+c];case"right-bottom":case"bottom-right":return[s+u,l+c];case"top-left":case"left-top":default:return[s,l]}}var Yc=function(i){var r;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r||(r=i.apply(jc,t)),r}};function Uc(i){var r=i&&document.getElementById(i);return r||(r=document.createElement("div"),r.setAttribute("id",i),document.body.appendChild(r)),r}function No(i){var r=Yc(Uc)(i);return r}var Qr=(function(i){Xc(r,i);function r(t){var e=i.call(this,Io({style:{id:Mo}},r.defaultOptions,t))||this;return e.visibility="visible",e.map=new Map,e.domStyles="",e.initShape(),e.render(e.attributes,e),e}return Object.defineProperty(r.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),r.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},r.prototype.update=function(t){this.attr(Io({},this.style,t)),this.render(this.attributes,this)},r.prototype.bind=function(t,e){var n=this;if(t){var a=this.style.text,o=function(l){var u=t,c=n.style,p=a;if(e){var f=typeof e=="function"?e.call(null,l):e,h=f.html,d=f.target,v=qc(f,["html","target"]);c=Jc({},n.style,v),(d||d===!1)&&(u=d),typeof h=="string"&&(p=h)}var m=c.position,g=c.arrowPointAtCenter,y=c.follow,b=c.offset;if(u){var _=l,x=_.clientX,S=_.clientY,A=Pe(Yn(x,S,u,m,g,y),2),T=A[0],P=A[1];n.showTip(T,P,{text:p,position:m,offset:b})}else n.hideTip()},s=function(){n.hideTip()};t.addEventListener("mousemove",o),t.addEventListener("mouseleave",s),this.map.set(t,[o,s])}},r.prototype.unbind=function(t){if(this.map.has(t)){var e=Pe(this.map.get(t)||[],2),n=e[0],a=e[1];n&&t.removeEventListener("mousemove",n),a&&t.removeEventListener("mouseleave",a),this.map.delete(t)}},r.prototype.clear=function(){this.container.innerHTML=""},r.prototype.destroy=function(){var t=this,e;Zc([],Pe(this.map.keys()),!1).forEach(function(n){return t.unbind(n)}),(e=this.container)===null||e===void 0||e.remove(),i.prototype.destroy.call(this)},r.prototype.showTip=function(t,e,n){var a=Qc(n,"text");if(!(a&&typeof a!="string")&&(this.applyStyles(),t&&e&&n)){var o=n.offset,s=n.position;if(s&&this.container.setAttribute("data-position",s),this.setOffsetPosition(t,e,o),typeof a=="string"){var l=this.container.querySelector(".".concat(N.TEXT));l&&(l.innerHTML=a)}this.visibility="visible",this.container.style.visibility="visible"}},r.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},r.prototype.getContainer=function(){return this.container},r.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(N.CONTAINER).concat(t?" ".concat(t):"")},r.prototype.initShape=function(){var t=this,e=this.style.id;this.container=No(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},r.prototype.updatePoptipElement=function(){var t=this.container;this.clear();var e=this.style,n=e.id,a=e.template,o=e.text;this.container.setAttribute("id",n),this.container.className=this.getClassName();var s='<span class="'.concat(N.ARROW,'"></span>');t.innerHTML=s,Kc(a)?t.innerHTML+=a:a&&$c(a)&&t.appendChild(a),o&&(t.getElementsByClassName(N.TEXT)[0].textContent=o),this.applyStyles(),this.container.style.visibility=this.visibility},r.prototype.applyStyles=function(){var t=M({},jn,this.style.domStyles),e=Object.entries(t).reduce(function(a,o){var s=Pe(o,2),l=s[0],u=s[1],c=Object.entries(u).reduce(function(p,f){var h=Pe(f,2),d=h[0],v=h[1];return"".concat(p).concat(d,": ").concat(v,";")},"");return"".concat(a).concat(l,"{").concat(c,"}")},"");if(this.domStyles!==e){this.domStyles=e;var n=this.container.querySelector("style");n&&this.container.removeChild(n),n=document.createElement("style"),n.innerHTML=e,this.container.appendChild(n)}},r.prototype.setOffsetPosition=function(t,e,n){n===void 0&&(n=this.style.offset);var a=Pe(n,2),o=a[0],s=o===void 0?0:o,l=a[1],u=l===void 0?0:l;this.container.style.left="".concat(t+s,"px"),this.container.style.top="".concat(e+u,"px")},r.tag="poptip",r.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:jn,template:'<div class="'.concat(N.TEXT,'"></div>')}},r})(tp);var ft=Y({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),ip={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function ap(i){var r=i.querySelector(ft.marker.class);return r?r.style:{}}var Ho=(function(i){ep(r,i);function r(t){return i.call(this,t,{span:[1,1],marker:function(){return new zo({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(r.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return t?typeof t=="string"||typeof t=="number"?t!=="":typeof t=="function"?!0:t.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes,a=n.markerSize,o=n.focus,s=n.focusMarkerSize,l=t.node().getBBox(),u=l.width,c=l.height,p=e.node().getBBox(),f=p.width,h=p.height,d=o?s??12:0;return{markerWidth:a,labelWidth:u,valueWidth:f,focusWidth:d,height:Math.max(a,c,h)}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=ae(I(t),2),n=e[0],a=e[1],o=this.showValue?a:0,s=n+o;return[n/s,o/s]},enumerable:!1,configurable:!0}),r.prototype.setAttribute=function(t,e){i.prototype.setAttribute.call(this,t,e)},Object.defineProperty(r.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,a=e.width,o=this.actualSpace,s=o.markerWidth,l=o.focusWidth,u=o.height,c=this.actualSpace,p=c.labelWidth,f=c.valueWidth,h=ae(this.spacing,3),d=h[0],v=h[1],m=h[2];if(a){var g=a-n-d-v-l-m,y=ae(this.span,2),b=y[0],_=y[1];t=ae([b*g,_*g],2),p=t[0],f=t[1]}var x=s+p+f+d+v+l+m;return{width:x,height:u,markerWidth:s,labelWidth:p,valueWidth:f,focusWidth:l}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"spacing",{get:function(){var t=this.attributes,e=t.spacing,n=t.focus;if(!e)return[0,0,0];var a=ae(I(e),3),o=a[0],s=a[1],l=a[2];return[o,this.showValue?s:0,n?l:0]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,a=t.valueWidth,o=t.focusWidth,s=t.width,l=t.height,u=ae(this.spacing,3),c=u[0],p=u[1],f=u[2];return{height:l,width:s,markerWidth:e,labelWidth:n,valueWidth:a,focusWidth:o,position:[e/2,e+c,e+n+c+p,e+n+a+c+p+f+o/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scaleSize",{get:function(){var t=ap(this.markerGroup.node()),e=this.attributes,n=e.markerSize,a=e.markerStrokeWidth,o=a===void 0?t.strokeWidth:a,s=e.markerLineWidth,l=s===void 0?t.lineWidth:s,u=e.markerStroke,c=u===void 0?t.stroke:u,p=+(o||l||(c?1:0))*Math.sqrt(2),f=this.markerGroup.node().getBBox(),h=f.width,d=f.height;return(1-p/Math.max(h,d))*n},enumerable:!1,configurable:!0}),r.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,a=L(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(ft.markerGroup,"g").style("zIndex",0),X(!!n,this.markerGroup,function(){var o,s=e.markerGroup.node(),l=(o=s.childNodes)===null||o===void 0?void 0:o[0],u=typeof n=="string"?new H({style:{symbol:n},className:ft.marker.name}):n();l?u.nodeName===l.nodeName?l instanceof H?l.update(nr(nr({},a),{symbol:n})):(Nr(l,u),w(l).styles(a)):(l.remove(),w(u).attr("className",ft.marker.name).styles(a),s.appendChild(u)):(u instanceof H||w(u).attr("className",ft.marker.name).styles(a),s.appendChild(u)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]);var c=Dt(e.markerGroup.node(),e.scaleSize,!0);e.markerGroup.node().style._transform="scale(".concat(c,")")})},r.prototype.renderLabel=function(t){var e=L(this.attributes,"label"),n=e.text,a=Un(e,["text"]);this.labelGroup=t.maybeAppendByClassName(ft.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(ft.label,function(){return it(n)}).styles(a)},r.prototype.renderValue=function(t){var e=this,n=L(this.attributes,"value"),a=n.text,o=Un(n,["text"]);this.valueGroup=t.maybeAppendByClassName(ft.valueGroup,"g").style("zIndex",0),X(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(ft.value,function(){return it(a)}).styles(o)})},r.prototype.createPoptip=function(){var t=this.attributes.poptip,e=t||{},n=e.render,a=Un(e,["render"]),o=new Qr({style:M(ip,a)});return this.poptipGroup=o,o},r.prototype.bindPoptip=function(t){var e=this,n=this.attributes.poptip;if(n){var a=this.poptipGroup||this.createPoptip();a.bind(t,function(){var o=e.attributes,s=o.labelText,l=o.valueText,u=o.markerFill,c=typeof s=="string"?s:s?.attr("text"),p=typeof l=="string"?l:l?.attr("text");if(typeof n.render=="function")return{html:n.render({label:c,value:p,color:u})};var f="";return(typeof c=="string"||typeof c=="number")&&(f+='<div class="component-poptip-label">'.concat(c,"</div>")),(typeof p=="string"||typeof p=="number")&&(f+='<div class="component-poptip-value">'.concat(p,"</div>")),{html:f}})}},r.prototype.renderFocus=function(t){var e=this,n=this.attributes,a=n.focus,o=n.focusMarkerSize,s={x:0,y:0,size:o,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};rp(a)||(this.focusGroup=t.maybeAppendByClassName(ft.focusGroup,"g").style("zIndex",0),X(a,this.focusGroup,function(){var l=new H({style:nr(nr({},s),{symbol:"focus"})}),u=new zo({style:{r:s.size/2,fill:"transparent"}}),c=e.focusGroup.node();c.appendChild(u),c.appendChild(l),l.update({opacity:0}),t.node().addEventListener("pointerenter",function(){l.update({opacity:1})}),t.node().addEventListener("pointerleave",function(){l.update({opacity:0})})}))},r.prototype.renderPoptip=function(t){var e=this,n=this.attributes.poptip;if(n){var a=t.maybeAppendByClassName(ft.value,"g").node(),o=t.maybeAppendByClassName(ft.label,"g").node();[a,o].forEach(function(s){s&&e.bindPoptip(s)})}},r.prototype.renderBackground=function(t){var e=this.shape,n=e.width,a=e.height,o=L(this.attributes,"background");this.background=t.maybeAppendByClassName(ft.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(ft.background,"rect").styles(nr({width:n,height:a},o))},r.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,a=t.height,o=ae(t.position,4),s=o[0],l=o[1],u=o[2],c=o[3],p=a/2;this.markerGroup.styles({transform:"translate(".concat(s,", ").concat(p,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(p,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(c,", ").concat(p,")")}),Jt(this.labelGroup.select(ft.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(u,", ").concat(p,")")}),Jt(this.valueGroup.select(ft.value.class).node(),Math.ceil(n)))},r.prototype.render=function(t,e){var n=w(e),a=t.x,o=a===void 0?0:a,s=t.y,l=s===void 0?0:s;n.styles({transform:"translate(".concat(o,", ").concat(l,")")}),this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.renderPoptip(n),this.renderFocus(n),this.adjustLayout()},r})(np);var oe=Y({page:"item-page",navigator:"navigator",item:"item"},"items"),Ro=function(i,r,t){return t===void 0&&(t=!0),i?r(i):t},Fo=(function(i){sp(r,i);function r(t){var e=i.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Xn,mouseenter:Xn,mouseleave:Xn})||this;return e.navigatorShape=[0,0],e}return Object.defineProperty(r.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,a=t.data;if(!e&&!n)throw new Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,a.length]:[a.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,a=t.poptip,o=t.focus,s=t.focusMarkerSize,l=L(this.attributes,"item"),u=e.map(function(c,p){var f=c.id,h=f===void 0?p:f,d=c.label,v=c.value;return{id:"".concat(h),index:p,style:op({layout:n,labelText:d,valueText:v,poptip:a,focus:o,focusMarkerSize:s},Object.fromEntries(Object.entries(l).map(function(m){var g=st(m,2),y=g[0],b=g[1];return[y,K(b,[c,p,e])]})))}});return u},enumerable:!1,configurable:!0}),r.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,a=e.width,o=e.rowPadding,s=e.colPadding,l=st(this.navigatorShape,1),u=l[0],c=st(this.grid,2),p=c[0],f=c[1],h=f*p,d=0;return this.pageViews.children.map(function(v,m){var g,y,b=Math.floor(m/h),_=m%h,x=t.ifHorizontal(f,p),S=[Math.floor(_/x),_%x];n==="vertical"&&S.reverse();var A=st(S,2),T=A[0],P=A[1],C=(a-u-(f-1)*s)/f,E=v.getBBox().height,O=st([0,0],2),R=O[0],V=O[1];return n==="horizontal"?(g=st([d,T*(E+o)],2),R=g[0],V=g[1],d=P===f-1?0:d+C+s):(y=st([P*(C+s),d],2),R=y[0],V=y[1],d=T===p-1?0:d+E+o),{page:b,index:m,row:T,col:P,pageIndex:_,width:C,height:E,x:R,y:V}})},r.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,s=st(this.navigatorShape,1),l=s[0],u=st(this.grid,2),c=u[0],p=u[1],f=st([e-l,n],2),h=f[0],d=f[1],v=st([0,0,0,0,0,0,0,0],8),m=v[0],g=v[1],y=v[2],b=v[3],_=v[4],x=v[5],S=v[6],A=v[7];return this.pageViews.children.map(function(T,P){var C,E,O,R,V=T.getBBox(),D=V.width,Z=V.height,ct=S===0?0:o,dt=S+ct+D;if(dt<=h&&Ro(_,function(Q){return Q<p}))return C=st([S+ct,A,dt],3),m=C[0],g=C[1],S=C[2],{width:D,height:Z,x:m,y:g,page:y,index:P,pageIndex:b++,row:x,col:_++};E=st([x+1,0,0,A+Z+a],4),x=E[0],_=E[1],S=E[2],A=E[3];var pt=A+Z;return pt<=d&&Ro(x,function(Q){return Q<c})?(O=st([S,A,D],3),m=O[0],g=O[1],S=O[2],{width:D,height:Z,x:m,y:g,page:y,index:P,pageIndex:b++,row:x,col:_++}):(R=st([0,0,D,0,y+1,0,0,0],8),m=R[0],g=R[1],S=R[2],A=R[3],y=R[4],b=R[5],x=R[6],_=R[7],{width:D,height:Z,x:m,y:g,page:y,index:P,pageIndex:b++,row:x,col:_++})})},Object.defineProperty(r.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),r.prototype.ifHorizontal=function(t,e){var n=this.attributes.orientation;return mt(n,t,e)},r.prototype.flattenPage=function(t){t.querySelectorAll(oe.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(oe.page.class).forEach(function(e){var n=t.removeChild(e);n.destroy()})},r.prototype.renderItems=function(t){var e=this.attributes,n=e.click,a=e.mouseenter,o=e.mouseleave;this.flattenPage(t);var s=this.dispatchCustomEvent.bind(this);w(t).selectAll(oe.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(u){var c=u.style;return new Ho({style:c})}).attr("className",oe.item.name).on("click",function(){n?.(this),s("itemClick",{item:this})}).on("pointerenter",function(){a?.(this),s("itemMouseenter",{item:this})}).on("pointerleave",function(){o?.(this),s("itemMouseleave",{item:this})})},function(l){return l.each(function(u){var c=u.style;this.update(c)})},function(l){return l.remove()})},r.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,a=e.width,o=((t=this.pageViews.children[0])===null||t===void 0?void 0:t.getBBox().height)||0,s=st(this.navigatorShape,2),l=s[0],u=s[1];this.navigator.update(n==="grid"?{pageWidth:a-l,pageHeight:o-u}:{})},r.prototype.adjustLayout=function(){var t=this,e=Object.entries(Lr(this.itemsLayout,"page")).map(function(a){var o=st(a,2),s=o[0],l=o[1];return{page:s,layouts:l}}),n=lp([],st(this.navigator.getContainer().children),!1);e.forEach(function(a){var o=a.layouts,s=t.pageViews.appendChild(new U({className:oe.page.name}));o.forEach(function(l){var u=l.x,c=l.y,p=l.index,f=l.width,h=l.height,d=n[p];s.appendChild(d),cp(d,"__layout__",l),d.update({x:u,y:c,width:f,height:h})})}),this.relayoutNavigator()},r.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=L(this.attributes,"nav"),a=M({orientation:e},n),o=this;return t.selectAll(oe.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new Jr({style:a})}).attr("className",oe.navigator.name).each(function(){o.navigator=this})},function(s){return s.each(function(){this.update(a)})},function(s){return s.remove()}),this.navigator},r.prototype.getBBox=function(){return this.navigator.getBBox()},r.prototype.render=function(t,e){var n=this.attributes.data;if(!(!n||n.length===0)){var a=this.renderNavigator(w(e));this.renderItems(a.getContainer()),this.adjustLayout()}},r.prototype.dispatchCustomEvent=function(t,e){var n=new up(t,{detail:e});this.dispatchEvent(n)},r})(pp);import{__assign as qn,__extends as fp,__read as hp,__rest as dp}from"/tslib?target=es2022";import{Component as vp}from"./esm/core.mjs";var ir=Y({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Zn={showLabel:!0,formatter:function(i){return i.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},Wo=(function(i){fp(r,i);function r(t){return i.call(this,t,Zn)||this}return r.prototype.render=function(t,e){var n=w(e).maybeAppendByClassName(ir.markerGroup,"g");this.renderMarker(n);var a=w(e).maybeAppendByClassName(ir.labelGroup,"g");this.renderLabel(a)},r.prototype.renderMarker=function(t){var e=this,n=this.attributes,a=n.orientation,o=n.markerSymbol,s=o===void 0?mt(a,"horizontalHandle","verticalHandle"):o;X(!!s,t,function(l){var u=L(e.attributes,"marker"),c=qn({symbol:s},u);e.marker=l.maybeAppendByClassName(ir.marker,function(){return new H({style:c})}).update(c)})},r.prototype.renderLabel=function(t){var e=this,n=this.attributes,a=n.showLabel,o=n.orientation,s=n.spacing,l=s===void 0?0:s,u=n.formatter;X(a,t,function(c){var p,f=L(e.attributes,"label"),h=f.text,d=dp(f,["text"]),v=((p=c.select(ir.marker.class))===null||p===void 0?void 0:p.node().getBBox())||{},m=v.width,g=m===void 0?0:m,y=v.height,b=y===void 0?0:y,_=hp(mt(o,[0,b+l,"center","top"],[g+l,0,"start","middle"]),4),x=_[0],S=_[1],A=_[2],T=_[3];c.maybeAppendByClassName(ir.label,"text").styles(qn(qn({},d),{x,y:S,text:u(h).toString(),textAlign:A,textBaseline:T}))})},r})(vp);var Do={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Vo=M({},Do,{}),Go=M({},Do,ot(Zn,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),jo=.01;var nt=Y({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend");var Kn=(function(i){mp(r,i);function r(t){return i.call(this,t,Vo)||this}return r.prototype.renderTitle=function(t,e,n){var a=this.attributes,o=a.showTitle,s=a.titleText,l=L(this.attributes,"title"),u=Yo(et(l),2),c=u[0],p=u[1];this.titleGroup=t.maybeAppendByClassName(nt.titleGroup,"g").styles(p);var f=Ce(Ce({width:e,height:n},c),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(nt.title,function(){return new $r({style:f})}).update(f)},r.prototype.renderItems=function(t,e){var n=e.x,a=e.y,o=e.width,s=e.height,l=L(this.attributes,"title",!0),u=Yo(et(l),2),c=u[0],p=u[1],f=Ce(Ce({},c),{width:o,height:s,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(nt.itemsGroup,"g").styles(Ce(Ce({},p),{transform:"translate(".concat(n,", ").concat(a,")")}));var h=this;this.itemsGroup.selectAll(nt.items.class).data(["items"]).join(function(d){return d.append(function(){return new Fo({style:f})}).attr("className",nt.items.name).each(function(){h.items=w(this)})},function(d){return d.update(f)},function(d){return d.remove()})},r.prototype.adjustLayout=function(){var t=this.attributes.showTitle;if(t){var e=this.title.node().getAvailableSpace(),n=e.x,a=e.y;this.itemsGroup.node().style.transform="translate(".concat(n,", ").concat(a,")")}},Object.defineProperty(r.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,a=t.height;return e?this.title.node().getAvailableSpace():new W(0,0,n,a)},enumerable:!1,configurable:!0}),r.prototype.getBBox=function(){var t,e,n=(t=this.title)===null||t===void 0?void 0:t.node(),a=(e=this.items)===null||e===void 0?void 0:e.node();return!n||!a?i.prototype.getBBox.call(this):Lo(n,a)},r.prototype.render=function(t,e){var n=this.attributes,a=n.width,o=n.height,s=n.x,l=s===void 0?0:s,u=n.y,c=u===void 0?0:u,p=w(e);e.style.transform="translate(".concat(l,", ").concat(c,")"),this.renderTitle(p,a,o),this.renderItems(p,this.availableSpace),this.adjustLayout()},r})(gp);import{__assign as xt,__extends as Mp,__read as $,__spreadArray as ti}from"/tslib?target=es2022";import{CustomEvent as ts}from"/@antv/g@^6.1.11?target=es2022";import{Linear as es}from"/@antv/scale@^0.4.16?target=es2022";import{clamp as rs,isUndefined as Np}from"/@antv/util@^3.3.10?target=es2022";import{Component as Ip}from"./esm/core.mjs";import{__assign as Xo,__extends as yp,__read as kt,__rest as bp,__spreadArray as qo}from"/tslib?target=es2022";import{ElementEvent as xp}from"/@antv/g@^6.1.11?target=es2022";import{Component as _p}from"./esm/core.mjs";var Uo={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(i){return i.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999};var $n=Y({background:"background",labelGroup:"label-group",label:"label"},"indicator"),tn=(function(i){yp(r,i);function r(t){var e=i.call(this,t,Uo)||this;return e.point=[0,0],e.group=e.appendChild(new U({})),e.isMutationObserved=!0,e}return r.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=t.padding,a=kt(I(n),4),o=a[0],s=a[1],l=a[2],u=a[3],c=this.label.node().getLocalBounds(),p=c.min,f=c.max,h=new W(p[0]-u,p[1]-o,f[0]+s-p[0]+u,f[1]+l-p[1]+o),d=this.getPath(e,h),v=L(this.attributes,"background");this.background=w(this.group).maybeAppendByClassName($n.background,"path").styles(Xo(Xo({},v),{d})),this.group.appendChild(this.label.node())}},r.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,a=L(this.attributes,"label"),o=kt(et(a),2),s=o[0],l=o[1],u=s.text,c=bp(s,["text"]);if(this.label=w(this.group).maybeAppendByClassName($n.labelGroup,"g").styles(l),!!n){var p=this.label.maybeAppendByClassName($n.label,function(){return it(e(n))}).style("text",e(n).toString());p.selectAll("text").styles(c)}},r.prototype.adjustLayout=function(){var t=kt(this.point,2),e=t[0],n=t[1],a=this.attributes,o=a.x,s=a.y;this.group.attr("transform","translate(".concat(o-e,", ").concat(s-n,")"))},r.prototype.getPath=function(t,e){var n=this.attributes.radius,a=e.x,o=e.y,s=e.width,l=e.height,u=[["M",a+n,o],["L",a+s-n,o],["A",n,n,0,0,1,a+s,o+n],["L",a+s,o+l-n],["A",n,n,0,0,1,a+s-n,o+l],["L",a+n,o+l],["A",n,n,0,0,1,a,o+l-n],["L",a,o+n],["A",n,n,0,0,1,a+n,o],["Z"]],c={top:4,right:6,bottom:0,left:2},p=c[t],f=this.createCorner([u[p].slice(-2),u[p+1].slice(-2)]);return u.splice.apply(u,qo([p+1,1],kt(f),!1)),u[0][0]="M",u},r.prototype.createCorner=function(t,e){e===void 0&&(e=10);var n=.8,a=Mr.apply(void 0,qo([],kt(t),!1)),o=kt(t,2),s=kt(o[0],2),l=s[0],u=s[1],c=kt(o[1],2),p=c[0],f=c[1],h=kt(a?[p-l,[l,p]]:[f-u,[u,f]],2),d=h[0],v=kt(h[1],2),m=v[0],g=v[1],y=d/2,b=d/Math.abs(d),_=e*b,x=_/2,S=_*Math.sqrt(3)/2*n,A=kt([m,m+y-x,m+y,m+y+x,g],5),T=A[0],P=A[1],C=A[2],E=A[3],O=A[4];return a?(this.point=[C,u-S],[["L",T,u],["L",P,u],["L",C,u-S],["L",E,u],["L",O,u]]):(this.point=[l+S,C],[["L",l,T],["L",l,P],["L",l+S,C],["L",l,E],["L",l,O]])},r.prototype.applyVisibility=function(){var t=this.attributes.visibility;t==="hidden"?j(this):vt(this)},r.prototype.bindEvents=function(){this.label.on(xp.BOUNDS_CHANGED,this.renderBackground)},r.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},r})(_p);import{__assign as Ko,__extends as Ap,__read as Qn}from"/tslib?target=es2022";import{parseColor as kp}from"/@antv/g@^6.1.11?target=es2022";import{isFunction as Lp}from"/@antv/util@^3.3.10?target=es2022";import{Component as Tp}from"./esm/core.mjs";import{__read as Sp}from"/tslib?target=es2022";function wp(i,r){for(var t=1;t<i.length;t+=1){var e=i[t-1],n=i[t];if(r>=e&&r<=n)return[e,n]}return[r,r]}function Zo(i,r,t){var e=Array.from(r),n=i.length;return new Array(n).fill(0).reduce(function(a,o,s){var l=e[s%e.length];return a+=" ".concat(i[s],":").concat(l).concat(s<n-1?" ".concat(i[s+1],":").concat(l):"")},"l(".concat(t==="horizontal"?"0":"270",")"))}function Jn(i,r){var t=Sp(wp(i,r),2),e=t[0],n=t[1];return{tick:r>(e+n)/2?n:e,range:[e,n]}}var ar=Y({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function $o(i){var r=i.orientation,t=i.size,e=i.length;return mt(r,[e,t],[t,e])}function Jo(i){var r=i.type,t=Qn($o(i),2),e=t[0],n=t[1];return r==="size"?[["M",0,n],["L",0+e,0],["L",0+e,n],["Z"]]:[["M",0,n],["L",0,0],["L",0+e,0],["L",0+e,n],["Z"]]}function Pp(i){return Jo(i)}function Cp(i){var r=i.orientation,t=i.color,e=i.block,n=i.partition,a;if(Lp(t)){var o=20;a=new Array(o).fill(0).map(function(u,c,p){return t(c/(p.length-1))})}else a=t;var s=a.length,l=a.map(function(u){return kp(u).toString()});return s?s===1?l[0]:e?Zo(n,l,r):l.reduce(function(u,c,p){return u+=" ".concat(p/(s-1),":").concat(c)},"l(".concat(mt(r,"0","270"),")")):""}function Ep(i){var r=i.orientation,t=i.range;if(!t)return[];var e=Qn($o(i),2),n=e[0],a=e[1],o=Qn(t,2),s=o[0],l=o[1],u=mt(r,s*n,0),c=mt(r,0,s*a),p=mt(r,l*n,n),f=mt(r,a,l*a);return[["M",u,c],["L",u,f],["L",p,f],["L",p,c],["Z"]]}function Bp(i,r){var t=L(r,"track");i.maybeAppendByClassName(ar.track,"path").styles(Ko({d:Jo(r)},t))}function Op(i,r){var t=L(r,"selection"),e=Cp(r),n=i.maybeAppendByClassName(ar.selection,"path").styles(Ko({d:Pp(r),fill:e},t)),a=n.maybeAppendByClassName(ar.clipPath,"path").styles({d:Ep(r)}).node();n.style("clipPath",a)}var Qo=(function(i){Ap(r,i);function r(t){return i.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return r.prototype.render=function(t,e){var n=w(e).maybeAppendByClassName(ar.trackGroup,"g");Bp(n,t);var a=w(e).maybeAppendByClassName(ar.selectionGroup,"g");Op(a,t)},r})(Tp);function zp(i){return{min:Math.min.apply(Math,ti([],$(i.map(function(r){return r.value})),!1)),max:Math.max.apply(Math,ti([],$(i.map(function(r){return r.value})),!1))}}var ei=(function(i){Mp(r,i);function r(t){var e=i.call(this,t,Go)||this;return e.eventToOffsetScale=new es({}),e.innerRibbonScale=new es({}),e.cacheLabelBBox=null,e.cacheHandleBBox=null,e.onHovering=function(n){var a=e.attributes,o=a.data,s=a.block;n.stopPropagation();var l=e.getValueByCanvasPoint(n);if(s){var u=Jn(o.map(function(f){var h=f.value;return h}),l).range,c=e.getRealSelection(u);e.showIndicator((u[0]+u[1])/2,"".concat(c[0],"-").concat(c[1])),e.dispatchIndicated(l,u)}else{var p=e.getTickValue(l);e.showIndicator(p,"".concat(e.getRealValue(p))),e.dispatchIndicated(p)}},e.onDragStart=function(n){return function(a){a.stopPropagation(),e.attributes.slidable&&(e.target=n,e.prevValue=e.getTickValue(e.getValueByCanvasPoint(a)),document.addEventListener("mousemove",e.onDragging),document.addEventListener("touchmove",e.onDragging),document.addEventListener("mouseleave",e.onDragEnd),document.addEventListener("mouseup",e.onDragEnd),document.addEventListener("mouseup",e.onDragEnd),document.addEventListener("touchend",e.onDragEnd))}},e.onDragging=function(n){var a=e.target;e.updateMouse();var o=$(e.selection,2),s=o[0],l=o[1],u=e.getTickValue(e.getValueByCanvasPoint(n)),c=u-e.prevValue;a==="start"?s!==u&&e.updateSelection(u,l):a==="end"?l!==u&&e.updateSelection(s,u):a==="ribbon"&&c!==0&&(e.prevValue=u,e.updateSelection(c,c,!0))},e.onDragEnd=function(){e.style.cursor="pointer",document.removeEventListener("mousemove",e.onDragging),document.removeEventListener("touchmove",e.onDragging),document.removeEventListener("mouseup",e.onDragEnd),document.removeEventListener("touchend",e.onDragEnd)},e}return Object.defineProperty(r.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),r.prototype.getBBox=function(){var t=this.attributes,e=t.width,n=t.height;return new W(0,0,e,n)},r.prototype.render=function(t,e){var n=this,a=t.showLabel;this.renderTitle(w(e));var o=this.availableSpace,s=o.x,l=o.y,u=w(e).maybeAppendByClassName(nt.contentGroup,"g").styles({transform:"translate(".concat(s,", ").concat(l,")")}),c=u.maybeAppendByClassName(nt.labelGroup,"g").styles({zIndex:1});X(!!a,c,function(f){n.renderLabel(f)});var p=u.maybeAppendByClassName(nt.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=u.maybeAppendByClassName(nt.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(p),this.renderIndicator(u),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(r.prototype,"range",{get:function(){var t=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:zp(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ribbonRange",{get:function(){var t=$(this.selection,2),e=t[0],n=t[1],a=this.ribbonScale;return[a.map(e),a.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,a=this.attributes.defaultValue,o=a===void 0?[e,n]:a,s=$(o,2),l=s[0],u=s[1];return[l,u]},enumerable:!1,configurable:!0}),r.prototype.ifHorizontal=function(t,e){return mt(this.attributes.orientation,typeof t=="function"?t():t,typeof e=="function"?e():e)},r.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,a=e.titleText,o=e.width,s=e.height,l=L(this.attributes,"title"),u=xt(xt({},l),{width:o,height:s,text:a}),c=this;t.selectAll(nt.title.class).data(n?[a]:[]).join(function(p){return p.append(function(){return new $r({style:u})}).attr("className",nt.title.name).each(function(){c.title=this})},function(p){return p.update(u)},function(p){return p.each(function(){c.title=void 0}).remove()})},Object.defineProperty(r.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes,e=t.width,n=t.height;return new W(0,0,e,n)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"labelFixedSpacing",{get:function(){var t=this.attributes.showTick;return t?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,n=t.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[e][n]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"labelBBox",{get:function(){var t,e=this.attributes.showLabel;if(!e)return new W(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var n=((t=this.label.querySelector(F.labelGroup.class))===null||t===void 0?void 0:t.children.slice(-1)[0]).getBBox(),a=n.width,o=n.height;return this.cacheLabelBBox=new W(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing,a=n===void 0?0:n;if(!e)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,l=o.height,u=this.ifHorizontal(l,s)+a+this.labelFixedSpacing,c=this.ifHorizontal(s,l);return{width:s,height:l,size:u,length:c}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,l=this.labelShape,u=l.size,c=l.length,p=$(this.ifHorizontal([s,o],[o,s]),2),f=p[0],h=p[1],d=e?this.handleShape:{size:0,length:0},v=d.size,m=d.length,g=this.handleOffsetRatio,y=0,b=this.labelPosition;n?y=n:["bottom","right"].includes(b)?y=Math.min(f-u,(f-v)/g):f*(1-g)>v?y=Math.max(f-u,0):y=Math.max((f-u-v)/g,0);var _=Math.max(m,c),x=h-_,S=$(this.ifHorizontal([x,y],[y,x]),2),A=S[0],T=S[1],P=["top","left"].includes(b)?u:0,C=$(this.ifHorizontal([_/2,P],[P,_/2]),2),E=C[0],O=C[1];return new W(E,O,A,T)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),r.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,a=e.type,o=e.orientation,s=e.color,l=e.block,u=L(this.attributes,"ribbon"),c=this.range,p=c.min,f=c.max,h=this.ribbonBBox,d=h.x,v=h.y,m=this.ribbonShape,g=m.length,y=m.size,b=M({transform:"translate(".concat(d,", ").concat(v,")"),length:g,size:y,type:a,orientation:o,color:s,block:l,partition:n.map(function(_){return(_.value-p)/(f-p)}),range:this.ribbonRange},u);this.ribbon=t.maybeAppendByClassName(nt.ribbon,function(){return new Qo({style:b})}).update(b)},r.prototype.getHandleClassName=function(t){return"".concat(nt.prefix("".concat(t,"-handle")))},r.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,a=L(this.attributes,"handle"),o=$(this.selection,2),s=o[0],l=o[1],u=xt(xt({},a),{orientation:n}),c=a.shape,p=c===void 0?"slider":c,f=p==="basic"?Wo:jr,h=this;this.handlesGroup.selectAll(nt.handle.class).data(e?[{value:s,type:"start"},{value:l,type:"end"}]:[],function(d){return d.type}).join(function(d){return d.append(function(){return new f({style:u})}).attr("className",function(v){var m=v.type;return"".concat(nt.handle," ").concat(h.getHandleClassName(m))}).each(function(v){var m=v.type,g=v.value;this.update({labelText:g});var y="".concat(m,"Handle");h[y]=this,this.addEventListener("pointerdown",h.onDragStart(m))})},function(d){return d.update(u).each(function(v){var m=v.value;this.update({labelText:m})})},function(d){return d.each(function(v){var m=v.type,g="".concat(m,"Handle");h[g]=void 0}).remove()})},r.prototype.adjustHandles=function(){var t=$(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},Object.defineProperty(r.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new W(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,l=$([Math.max(e,o),Math.max(n,s)],2),u=l[0],c=l[1];return this.cacheHandleBBox=new W(0,0,u,c),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,a=$(this.ifHorizontal([n,e],[e,n]),2),o=a[0],s=a[1];return{width:e,height:n,size:o,length:s}},enumerable:!1,configurable:!0}),r.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,l=this.ribbonShape.size,u=this.getOffset(e),c=$(this.ifHorizontal([o+u,s+l*this.handleOffsetRatio],[o+l*this.handleOffsetRatio,s+u]),2),p=c[0],f=c[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();h?.update({transform:"translate(".concat(p,", ").concat(f,")"),formatter:n})},r.prototype.renderIndicator=function(t){var e=L(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(nt.indicator,function(){return new tn({})}).update(e)},Object.defineProperty(r.prototype,"labelData",{get:function(){var t=this,e=this.attributes.data;return e.reduce(function(n,a,o,s){var l,u,c=(l=a?.id)!==null&&l!==void 0?l:o.toString();if(n.push(xt(xt({},a),{id:c,index:o,type:"value",label:(u=a?.label)!==null&&u!==void 0?u:a.value.toString(),value:t.ribbonScale.map(a.value)})),o<s.length-1){var p=s[o+1],f=$([a.value,p.value],2),h=f[0],d=f[1],v=(h+d)/2;n.push(xt(xt({},a),{id:c,index:o,type:"range",range:[h,d],label:[h,d].join("~"),value:t.ribbonScale.map(v)}))}return n},[])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"labelStyle",{get:function(){var t=$(["center","middle"],2),e=t[0],n=t[1],a=this.labelPosition;return a==="top"?n="bottom":a==="bottom"?n="top":a==="left"?e="end":a==="right"&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),r.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,a=n===void 0?!1:n,o=e.labelFilter,s=e.labelFormatter,l=L(this.attributes,"tick"),u=L(this.attributes,"label"),c=u.align,p=M(xt({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),ot(l,"tick"),ot(u,"label"),{data:this.labelData}),f={tickFilter:function(d,v,m){return d?.type!=="value"?!1:o?o(d,d.index,m.filter(function(g){return g.type!=="value"})):!0},labelFilter:function(d,v,m){return d?.type!==c?!1:o?o(d,d.index,m.filter(function(g){return g.type===c})):!0},labelFormatter:s},h=xt(xt(xt({},p),f),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(nt.label,function(){return new ie({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(r.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,a=t.labelSpacing,o=t.tickLength,s=this.ribbonShape.size,l=this.labelPosition,u=this.labelFixedSpacing,c=$([0,0,0],3),p=c[0],f=c[1],h=c[2],d=o??s;return e?(h=d,f=u,n==="positive"?l==="right"?(p=d,h=d):l==="bottom"&&(p=h):n==="negative"&&(l==="top"||l==="left")&&(p=s)):n==="positive"?l==="right"?f=d:l==="bottom"&&(p=s+u,f=a):n==="negative"&&(l==="left"||l==="top")&&(f=a),{offset:p,spacing:f,tickLength:h}},enumerable:!1,configurable:!0}),r.prototype.adjustLabel=function(){var t=this.attributes.showLabel;if(t){var e=this.ribbonBBox,n=e.x,a=e.y,o=e.width,s=e.height,l=this.labelAxisStyle,u=l.offset,c=l.spacing,p=l.tickLength,f=$(this.ifHorizontal([[n,a+u],[n+o,a+u]],[[n+u,a+s],[n+u,a]]),2),h=f[0],d=f[1];this.label.update({startPos:h,endPos:d,tickLength:p,labelSpacing:c},!1)}},r.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},r.prototype.showIndicator=function(t,e){e===void 0&&(e="".concat(t));var n=this.attributes.showIndicator;if(!n||typeof t!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,l=this.ribbonBBox,u=l.x,c=l.y,p=rs(t,o,s),f=this.getOffset(p),h=this.ifHorizontal([f+u,c],[u,f+c]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:e}),vt(this.indicator.node())},r.prototype.hideIndicator=function(){j(this.indicator.node())},r.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},r.prototype.setSelection=function(t,e){this.updateSelection(t,e)},r.prototype.updateSelection=function(t,e,n){var a;n===void 0&&(n=!1);var o=$(this.selection,2),s=o[0],l=o[1],u=$([t,e],2),c=u[0],p=u[1];n&&(c+=s,p+=l);var f=this.range,h=f.min,d=f.max;a=$(Oo([h,d],[c,p],this.selection),2),c=a[0],p=a[1],this.update({defaultValue:[c,p]}),this.dispatchSelection()},Object.defineProperty(r.prototype,"step",{get:function(){var t=this.attributes.step,e=t===void 0?1:t,n=this.range,a=n.min,o=n.max;return Np(e)?Wt((o-a)*jo,0):e},enumerable:!1,configurable:!0}),r.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,a=e.block,o=this.range.min;return a?Jn(n.map(function(s){var l=s.value;return l}),t).tick:Co(t,this.step,o)},r.prototype.getValueByCanvasPoint=function(t){var e=this.range,n=e.min,a=e.max,o=$(this.ribbon.node().getPosition(),2),s=o[0],l=o[1],u=this.ifHorizontal(s,l),c=this.ifHorizontal.apply(this,ti([],$(Ht(t)),!1)),p=c-u,f=rs(this.getOffset(p,!0),n,a);return f},r.prototype.getOffset=function(t,e){e===void 0&&(e=!1);var n=this.range,a=n.min,o=n.max,s=this.ribbonShape.length,l=this.eventToOffsetScale;return l.update({domain:[a,o],range:[0,s]}),e?l.invert(t):l.map(t)},r.prototype.getRealSelection=function(t){var e=this.range.max,n=$(t,2),a=n[0],o=n[1];return this.ifHorizontal([a,o],[e-o,e-a])},r.prototype.getRealValue=function(t){var e=this.range.max;return this.ifHorizontal(t,e-t)},r.prototype.dispatchSelection=function(){var t=this.getRealSelection(this.selection),e=new ts("valuechange",{detail:{value:t}});this.dispatchEvent(e)},r.prototype.dispatchIndicated=function(t,e){var n=this,a=this.range.max,o=this.ifHorizontal(function(){return{value:t,range:e}},function(){return{value:a-t,range:e?n.getRealSelection(e):void 0}}),s=new ts("indicate",{detail:o});this.dispatchEvent(s)},r})(Ip);import{__assign as Hp,__extends as Rp,__read as or,__rest as Fp}from"/tslib?target=es2022";import{substitute as Wp,createDOM as os}from"/@antv/util@^3.3.10?target=es2022";import{Component as Dp}from"./esm/core.mjs";import{__assign as ns}from"/tslib?target=es2022";function en(i){return i===void 0&&(i=""),{CONTAINER:"".concat(i,"tooltip"),TITLE:"".concat(i,"tooltip-title"),LIST:"".concat(i,"tooltip-list"),LIST_ITEM:"".concat(i,"tooltip-list-item"),NAME:"".concat(i,"tooltip-list-item-name"),MARKER:"".concat(i,"tooltip-list-item-marker"),NAME_LABEL:"".concat(i,"tooltip-list-item-name-label"),VALUE:"".concat(i,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(i,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(i,"tooltip-crosshair-y")}}var is={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function as(i){var r;i===void 0&&(i="");var t=en(i);return r={},r[".".concat(t.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},r[".".concat(t.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(t.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(t.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(t.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(t.NAME)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(t.NAME_LABEL)]=ns({flex:1},is),r[".".concat(t.VALUE)]=ns({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},is),r[".".concat(t.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(t.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r}var ss=(function(i){Rp(r,i);function r(t){var e=this,n,a,o=(a=(n=t.style)===null||n===void 0?void 0:n.template)===null||a===void 0?void 0:a.prefixCls,s=en(o);return e=i.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(s.CONTAINER,'"></div>'),title:'<div class="'.concat(s.TITLE,'"></div>'),item:'<li class="'.concat(s.LIST_ITEM,`" data-index={index}>
3
- <span class="`).concat(s.NAME,`">
4
- <span class="`).concat(s.MARKER,`" style="background:{color}"></span>
5
- <span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
6
- </span>
7
- <span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
8
- </li>`)},style:as(o)})||this,e.timestamp=-1,e.prevCustomContentKey=e.attributes.contentKey,e.initShape(),e.render(e.attributes,e),e}return Object.defineProperty(r.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),r.prototype.getContainer=function(){return this.element},Object.defineProperty(r.prototype,"elementSize",{get:function(){var t=this.element.offsetWidth,e=this.element.offsetHeight;return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,n=t.template;return e.map(function(a,o){var s=a.name,l=s===void 0?"":s,u=a.color,c=u===void 0?"black":u,p=a.index,f=Fp(a,["name","color","index"]),h=Hp({name:l,color:c,index:p??o},f);return os(Wp(n.item,h))})},enumerable:!1,configurable:!0}),r.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},r.prototype.destroy=function(){var t;(t=this.element)===null||t===void 0||t.remove(),i.prototype.destroy.call(this)},r.prototype.show=function(t,e){var n=this;if(t!==void 0&&e!==void 0){var a=this.element.style.visibility==="hidden",o=function(){n.attributes.x=t??n.attributes.x,n.attributes.y=e??n.attributes.y,n.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},r.prototype.hide=function(t,e){t===void 0&&(t=0),e===void 0&&(e=0);var n=this.attributes.enterable;n&&this.isCursorEntered(t,e)||(this.element.style.visibility="hidden")},r.prototype.initShape=function(){var t=this.attributes.template;this.element=os(t.container),this.id&&this.element.setAttribute("id",this.id)},r.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&(typeof t=="string"?this.element.innerHTML=t:je(this.element,t))}},r.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,a=n.template,o=n.title,s=n.enterable,l=n.style,u=n.content,c=en(a.prefixCls),p=this.element;if(this.element.style.pointerEvents=s?"auto":"none",u)this.renderCustomContent();else{o?(p.innerHTML=a.title,p.getElementsByClassName(c.TITLE)[0].innerHTML=o):(e=(t=p.getElementsByClassName(c.TITLE))===null||t===void 0?void 0:t[0])===null||e===void 0||e.remove();var f=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=c.LIST,je(h,f);var d=this.element.querySelector(".".concat(c.LIST));d?d.replaceWith(h):p.appendChild(h)}Hr(p,l)},r.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,a=e.offset,o=t||n,s=o.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},u=this.elementSize,c=u.width,p=u.height,f=[-c/2,-p/2];return s.forEach(function(h){var d=or(f,2),v=d[0],m=d[1],g=or(l[h],2),y=g[0],b=g[1];f=[v+(c/2+a[0])*y,m+(p/2+a[1])*b]}),f},r.prototype.setOffsetPosition=function(t){var e=or(t,2),n=e[0],a=e[1],o=this.attributes,s=o.x,l=s===void 0?0:s,u=o.y,c=u===void 0?0:u,p=o.container,f=p.x,h=p.y;this.element.style.left="".concat(+l+f+n,"px"),this.element.style.top="".concat(+c+h+a,"px")},r.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=t===void 0?60:t,n=Date.now();this.timestamp>0&&n-this.timestamp<e||(this.timestamp=n,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},r.prototype.autoPosition=function(t){var e=or(t,2),n=e[0],a=e[1],o=this.attributes,s=o.x,l=o.y,u=o.bounding,c=o.position;if(!u)return[n,a];var p=this.element,f=p.offsetWidth,h=p.offsetHeight,d=or([+s+n,+l+a],2),v=d[0],m=d[1],g={left:"right",right:"left",top:"bottom",bottom:"top"},y=u.x,b=u.y,_=u.width,x=u.height,S={left:v<y,right:v+f>y+_,top:m<b,bottom:m+h>b+x},A=[];c.split("-").forEach(function(P){S[P]?A.push(g[P]):A.push(P)});var T=A.join("-");return this.getRelativeOffsetFromCursor(T)},r.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect(),a=n.x,o=n.y,s=n.width,l=n.height;return new W(a,o,s,l).isPointIn(t,e)}return!1},r.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){e.element.style.transition=n},10)},r.tag="tooltip",r})(Dp);import{__assign as Ee,__extends as Vp}from"/tslib?target=es2022";import{get as Gp,isEqual as jp}from"/@antv/util@^3.3.10?target=es2022";import{Component as Yp}from"./esm/core.mjs";var ri={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};var Up="#1890FF",Xp="#00000040";function ls(i,r,t){r===void 0&&(r=0),t===void 0&&(t=!0);var e=Number(i.style.height)-r*2;return{x:t?Number(i.style.width)+Number(i.style.x)-r-e:Number(i.style.x)+r,y:Number(i.style.y)+r,width:e,height:e,radius:e/2}}function qp(i,r,t,e){var n=r.width,a=r.height;return t===void 0&&(t=0),e===void 0&&(e=!0),{x:e?Number(i.x)+t:Number(i.width)+Number(i.x)-n,y:Number(i.y)+(Number(i.height)-a)/2}}var us=(function(i){Vp(r,i);function r(t){return i.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}return r.prototype.render=function(t,e){var n=this,a=t.size,o=t.spacing,s=t.disabled,l=t.checked,u=t.unCheckedChildren,c=t.checkedChildren,p=w(e).maybeAppendByClassName("switch-content","g").node(),f=p.getLocalBounds(),h=Gp(ri,a,ri.default),d=h.sizeStyle,v=h.tagStyle,m=s?"no-drop":"pointer",g=l?Up:Xp,y=d,b=l?c:u;(c||u)&&w(p).maybeAppendByClassName("switch-tag",function(){return new jt({})}).call(function(S){var A=S.node();A.update(Ee(Ee({cursor:m,backgroundStyle:null,text:!1,marker:!1},v),b));var T=A?.getLocalBounds()||{},P=T.max,C=T.min,E=P[0]-C[0]+d.radius,O=P[1]-C[1],R=Math.max(E+d.height+2,d.width);y=Ee(Ee({},d),{width:R}),A.update(qp({x:f.min[0],y:f.min[1],width:R,height:y.height},{width:E,height:O},y.radius,l))});var _=w(p).maybeAppendByClassName("switch-background","rect").styles(Ee({zIndex:(p.style.zIndex||0)-1,x:f.min[0],y:f.min[1],fill:g,cursor:m,fillOpacity:s?.4:1},y)).node(),x=w(p).maybeAppendByClassName("switch-background-stroke","rect").styles(Ee({zIndex:(p.style.zIndex||0)-2,x:f.min[0],y:f.min[1],stroke:g,lineWidth:0},y)).node();w(p).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:m}).call(function(S){var A,T,P=S.node(),C=ls(_,o,l),E=ls(_,o,!l);P.attr("x")&&!jp(C,E)&&n.checked!==l?(P.attr(E),(A=P.getAnimations()[0])===null||A===void 0||A.cancel(),(T=x.getAnimations()[0])===null||T===void 0||T.cancel(),P.animate([{x:E.x},{x:C.x}],{duration:120,fill:"both"}),x.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):P.attr(C)}),this.checked=!!l},r.tag="switch",r})(Yp);import{__assign as hs,__extends as Zp,__read as ds}from"/tslib?target=es2022";import{Component as Kp}from"./esm/core.mjs";var sr={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},cs=M({},sr,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),ps=M({},sr,{type:"circle",defaultRadius:0}),fs=M({},sr,{type:"polygon",defaultRadius:0,startAngle:0});var Be=(function(i){Zp(r,i);function r(t){return i.call(this,t,sr)||this}return Object.defineProperty(r.prototype,"localPointer",{get:function(){var t=ds(this.getPosition(),2),e=t[0],n=t[1],a=ds(this.pointer,2),o=a[0],s=a[1];return[o-e,s-n]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tagStyle",{get:function(){var t=L(this.attributes,"tag");return t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"crosshairStyle",{get:function(){var t=L(this.attributes,"line");return hs(hs({},t),{d:this.crosshairPath})},enumerable:!1,configurable:!0}),r.prototype.render=function(t,e){var n=w(e).maybeAppendByClassName(".crosshair-group","g").node();this.shapesGroup=n;var a=this.tagStyle,o=this.crosshairStyle;this.tagShape=w(n).maybeAppendByClassName("crosshair-tag",function(){return new jt({style:a})}).styles(a).node(),this.crosshairShape=w(n).maybeAppendByClassName(".crosshair-path","path").styles(o).node(),this.adjustLayout()},r.prototype.setPointer=function(t){this.pointer=t},r.tag="crosshair-base",r})(Kp);import{__extends as $p,__read as Lt}from"/tslib?target=es2022";var vs=(function(i){$p(r,i);function r(t){return i.call(this,M({},r.defaultOptions,t))||this}return Object.defineProperty(r.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=Lt(t.startPos,2),n=e[0],a=e[1],o=Lt(t.endPos,2),s=o[0],l=o[1],u=[["M",0,0],["L",s-n,l-a],["Z"]];return u},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"localPointer",{get:function(){if(!this.pointer)return this.attributes.startPos;var t=Lt(this.getPosition(),2),e=t[0],n=t[1],a=Lt(this.pointer,2),o=a[0],s=a[1];return[o-e,s-n]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isVertical",{get:function(){var t=this.attributes,e=Lt(t.startPos,2),n=e[0],a=e[1],o=Lt(t.endPos,2),s=o[0],l=o[1];return n===s&&a!==l},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"tagShapeSpace",{get:function(){var t=Or(this.tagShape),e=t.width,n=t.height;return{width:e,height:n}},enumerable:!1,configurable:!0}),r.prototype.update=function(t){i.prototype.update.call(this,t)},r.prototype.setPointer=function(t){i.prototype.setPointer.call(this,t),this.adjustPosition()},r.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},r.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},r.prototype.adjustPosition=function(){var t=Lt(this.localPointer,2),e=t[0],n=t[1],a=Lt(this.attributes.startPos,2),o=a[0],s=a[1],l=this.getOrientVal([o,n],[e,s]);this.shapesGroup.setLocalPosition(l)},r.prototype.adjustTag=function(){var t=this.attributes,e=t.tagText,n=t.tagPosition,a=Lt(t.startPos,2),o=a[0],s=a[1],l=Lt(t.endPos,2),u=l[0],c=l[1];if(!e||e===""){j(this.tagShape);return}vt(this.tagShape);var p=this.tagShapeSpace,f=p.width,h=p.height,d=Lt(this.getOrientVal({start:[-f/2,h/2],end:[u-o+f/2,h/2]},{start:[0,0],end:[0,c-s+h]})[n],2),v=d[0],m=d[1];this.tagShape.setLocalPosition(v,m)},r.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},r.tag="line-crosshair",r.defaultOptions={style:cs},r})(Be);import{__extends as Jp,__read as rn}from"/tslib?target=es2022";var ms=(function(i){Jp(r,i);function r(t){return i.call(this,M({},r.defaultOptions,t))||this}return Object.defineProperty(r.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),r.prototype.update=function(t){i.prototype.update.call(this,t)},r.prototype.setPointer=function(t){var e=rn(t,2),n=e[0],a=e[1];i.prototype.setPointer.call(this,[n,a]);var o=rn(this.localPointer,2),s=o[0],l=o[1],u=rn(this.attributes.center,2),c=u[0],p=u[1],f=this.createCirclePath(Math.pow(Math.pow(s-c,2)+Math.pow(l-p,2),.5));this.crosshairShape.attr({d:f})},r.prototype.adjustLayout=function(){j(this.tagShape)},r.prototype.createCirclePath=function(t){var e=this.attributes,n=rn(e.center,2),a=n[0],o=n[1],s=e.defaultRadius;return Ye(a,o,t||s)},r.tag="circle-crosshair",r.defaultOptions={style:ps},r})(Be);import{__extends as Qp,__read as Tt}from"/tslib?target=es2022";var gs=(function(i){Qp(r,i);function r(t){return i.call(this,M({},r.defaultOptions,t))||this}return Object.defineProperty(r.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),r.prototype.update=function(t){i.prototype.update.call(this,t)},Object.defineProperty(r.prototype,"points",{get:function(){for(var t=this.attributes,e=t.startAngle,n=t.sides,a=Math.PI*2/n,o=[1,0],s=[],l=0;l<n;l+=1)s.push(Pr(o,[0,0],e/180*Math.PI+a*l));return s},enumerable:!1,configurable:!0}),r.prototype.setPointer=function(t){var e=Tt(t,2),n=e[0],a=e[1];i.prototype.setPointer.call(this,[n,a]);var o=Tt(this.localPointer,2),s=o[0],l=o[1],u=this.attributes.center,c=Tt(this.intersection([s,l]),2),p=c[0],f=c[1];if(!(!p||!f)){var h=He(u,[s,l])/He(u,[p,f]),d=this.createPolygonPath(h);this.crosshairShape.attr({d})}},r.prototype.adjustLayout=function(){j(this.tagShape)},r.prototype.createPolygonPath=function(t){var e=this.attributes,n=e.defaultRadius,a=Tt(e.center,2),o=a[0],s=a[1],l=this.points.map(function(u,c){var p=Tt(u,2),f=p[0],h=p[1],d=Tt(at([f,h],t||n),2),v=d[0],m=d[1];return[c===0?"M":"L",o+v,s+m]});return l.push(["Z"]),l},r.prototype.intersection=function(t){for(var e,n=Tt(t,2),a=n[0],o=n[1],s=this.points,l=Tt(this.attributes.center,2),u=l[0],c=l[1],p,f,h=1;h<=s.length;h+=1){var d=Tt(s[h-1],2),v=d[0],m=d[1],g=Tt(s[h%s.length],2),y=g[0],b=g[1],_=kr([a,o],[u,c],[v+u,m+c],[y+u,b+c]);_.length!==0&&(e=Tt(_,2),p=e[0],f=e[1])}return[p,f]},r.tag="polygon-crosshair",r.defaultOptions={style:fs},r})(Be);import{__assign as Zt,__extends as ef}from"/tslib?target=es2022";import{Component as rf}from"./esm/core.mjs";var ys=ot({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),ni={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},tf=[["M",3,6],["L","5","8.5"],["L","8.5","4"]],bs={d:tf,lineWidth:1,cursor:"pointer"};function nf(i,r){var t=i.getLocalBounds();return{x:t.halfExtents[0]?t.max[0]+(r||0):i.style.x,y:t.halfExtents[1]?(t.min[1]+t.max[1])/2:i.style.y}}var xs=(function(i){ef(r,i);function r(t){return i.call(this,t,Zt({labelText:"",spacing:4,checked:!1},ys))||this}return r.prototype.render=function(t,e){var n=t.checked,a=t.spacing;this.checked=!!n;var o=lt(e,".checkbox-content","g").attr("className","checkbox-content").node(),s=L(t,"box"),l=L(t,"checked"),u=L(t,"label"),c=Zt(Zt({},this.checked?ni.selected:ni.default),s),p=Zt(Zt({},bs),l);this.checkboxBoxShape=lt(o,".checkbox-box","rect").styles(Zt({className:"checkbox-box",zIndex:(o.style.zIndex||0)-1},c)).node(),lt(this.checkboxBoxShape,".checkbox-checked","path").styles(Zt({className:"checkbox-box-checked",stroke:"#fff"},p));var f=nf(this.checkboxBoxShape,Number(a)),h=f.x,d=f.y;lt(o,".checkbox-label","text").styles(Zt({className:"checkbox-label",x:h,y:d},u))},r.tag="checkbox",r})(rf);import{__extends as af,__read as ii}from"/tslib?target=es2022";import{ElementEvent as ai}from"/@antv/g@^6.1.11?target=es2022";import{calcLayout as of}from"./esm/util/layout.mjs";var oi=(function(i){af(r,i);function r(t){var e=i.call(this,t)||this;e.layoutEvents=[ai.BOUNDS_CHANGED,ai.INSERTED,ai.REMOVED],e.$margin=I(0),e.$padding=I(0);var n=t.style||{},a=n.margin,o=a===void 0?0:a,s=n.padding,l=s===void 0?0:s;return e.margin=o,e.padding=l,e.isMutationObserved=!0,e.bindEvents(),e}return Object.defineProperty(r.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=I(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=I(t)},enumerable:!1,configurable:!0}),r.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=e===void 0?0:e,a=t.y,o=a===void 0?0:a,s=t.width,l=t.height,u=ii(this.$margin,4),c=u[0],p=u[1],f=u[2],h=u[3];return new W(n-h,o-c,s+h+p,l+c+f)},r.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,i.prototype.appendChild.call(this,t,e),t},r.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,a=ii(this.$padding,4),o=a[0],s=a[1],l=a[2],u=a[3],c=ii(this.$margin,4),p=c[0],f=c[3];return new W(u+f,o+p,e-u-s,n-o-l)},r.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(o){return!o.isConnected}))try{var t=this.attributes,e=t.x,n=t.y;this.style.transform="translate(".concat(e,", ").concat(n,")");var a=of(this.getAvailableSpace(),this.children.map(function(o){return o.getBBox()}),this.attributes);this.children.forEach(function(o,s){var l=a[s],u=l.x,c=l.y;o.style.transform="translate(".concat(u,", ").concat(c,")")})}catch{}},r.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(n){n.target&&(n.target.isMutationObserved=!0,t.layout())})})},r.prototype.attributeChangedCallback=function(t,e,n){t==="margin"?this.margin=n:t==="padding"&&(this.padding=n),this.layout()},r})(U);import{__assign as Kt,__extends as cf}from"/tslib?target=es2022";import{CustomEvent as pf}from"/@antv/g@^6.1.11?target=es2022";import{Component as ff}from"./esm/core.mjs";import{__assign as _s,__extends as sf,__read as lf}from"/tslib?target=es2022";import{Component as uf}from"./esm/core.mjs";var Ss=(function(i){sf(r,i);function r(t){var e=i.call(this,M({},r.defaultOptions,t))||this;return e.hoverColor="#f5f5f5",e.selectedColor="#e6f7ff",e.background=e.appendChild(new _t({})),e.label=e.background.appendChild(new U({})),e}return Object.defineProperty(r.prototype,"padding",{get:function(){return I(this.style.padding)},enumerable:!1,configurable:!0}),r.prototype.renderLabel=function(){var t=this.style,e=t.label,n=t.value,a=L(this.attributes,"label");w(this.label).maybeAppend(".label",function(){return it(e)}).attr("className","label").styles(a),this.label.attr("__data__",n)},r.prototype.renderBackground=function(){var t=this.label.getBBox(),e=lf(this.padding,4),n=e[0],a=e[1],o=e[2],s=e[3],l=t.width,u=t.height,c=l+s+a,p=u+n+o,f=L(this.attributes,"background"),h=this.style,d=h.width,v=d===void 0?0:d,m=h.height,g=m===void 0?0:m,y=h.selected;this.background.attr(_s(_s({},f),{width:Math.max(c,v),height:Math.max(p,g),fill:y?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(s,", ").concat((p-u)/2,")")})},r.prototype.render=function(){this.renderLabel(),this.renderBackground()},r.prototype.bindEvents=function(){var t=this;this.addEventListener("pointerenter",function(){t.style.selected||t.background.attr("fill",t.hoverColor)}),this.addEventListener("pointerleave",function(){t.style.selected||t.background.attr("fill",t.style.backgroundFill)});var e=this;this.addEventListener("click",function(){var n=t.style,a=n.label,o=n.value,s=n.onClick;s?.(o,{label:a,value:o},e)})},r.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},r})(uf);var lr=(function(i){cf(r,i);function r(t){var e,n,a=i.call(this,M({},r.defaultOptions,t))||this;a.currentValue=(e=r.defaultOptions.style)===null||e===void 0?void 0:e.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new _t({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new _t({className:"dropdown"}));var o=a.style.defaultValue;return o&&(!((n=a.style.options)===null||n===void 0)&&n.some(function(s){return s.value===o}))&&(a.currentValue=o),a}return r.prototype.setValue=function(t){this.currentValue=t,this.render()},r.prototype.getValue=function(){return this.currentValue},Object.defineProperty(r.prototype,"dropdownPadding",{get:function(){return I(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),r.prototype.renderSelect=function(){var t=this,e,n=this.style,a=n.x,o=n.y,s=n.width,l=n.height,u=n.bordered,c=n.showDropdownIcon,p=L(this.attributes,"select"),f=L(this.attributes,"placeholder");this.select.attr(Kt(Kt({x:a,y:o,width:s,height:l},p),{fill:"#fff",strokeWidth:u?1:0}));var h=this.dropdownPadding,d=10;c&&w(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(a+s-d-h[1]-h[3],", ").concat(o+l/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var v=(e=this.style.options)===null||e===void 0?void 0:e.find(function(b){return b.value===t.currentValue}),m=Kt({x:a+h[3]},f);w(this.select).selectAll(".placeholder").data(v?[]:[1]).join(function(b){return b.append("text").attr("className","placeholder").styles(m).style("y",function(){var _=this.getBBox();return o+(l-_.height)/2})},function(b){return b.styles(m)},function(b){return b.remove()});var g=L(this.attributes,"optionLabel"),y=Kt({x:a+h[3]},g);w(this.select).selectAll(".value").data(v?[v]:[]).join(function(b){return b.append(function(_){return it(_.label)}).attr("className","value").styles(y).style("y",function(){var _=this.getBBox();return o+(l-_.height)/2})},function(b){return b.styles(y)},function(b){return b.remove()})},r.prototype.renderDropdown=function(){var t=this,e,n,a=this.style,o=a.x,s=a.y,l=a.width,u=a.height,c=a.options,p=a.onSelect,f=a.open,h=L(this.attributes,"dropdown"),d=L(this.attributes,"option"),v=this.dropdownPadding;w(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(c,function(y){return y.value}).join(function(y){return y.append(function(b){return new Ss({className:"dropdown-item",style:Kt(Kt(Kt({},b),d),{width:l-v[1]-v[3],selected:b.value===t.currentValue,onClick:function(_,x,S){t.setValue(_),p?.(_,x,S),t.dispatchEvent(new pf("change",{detail:{value:_,option:x,item:S}})),j(t.dropdown)}})})}).each(function(b,_){var x,S=(x=this.parentNode)===null||x===void 0?void 0:x.children,A=S.reduce(function(T,P,C){return C<_&&(T+=P.getBBox().height),T},0);this.attr("transform","translate(".concat(v[3],", ").concat(v[0]+A,")"))})},function(y){return y.update(function(b){return{selected:b.value===t.currentValue}})},function(y){return y.remove()});var m=(n=(e=this.dropdown.getElementsByClassName("dropdown-container"))===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n.getBBox(),g=h.spacing;this.dropdown.attr(Kt({transform:"translate(".concat(o,", ").concat(s+u+g,")"),width:m.width+v[1]+v[3],height:m.height+v[0]+v[2]},h)),!f&&j(this.dropdown)},r.prototype.render=function(){this.renderSelect(),this.renderDropdown()},r.prototype.bindEvents=function(){var t=this;this.addEventListener("click",function(e){e.stopPropagation()}),this.select.addEventListener("click",function(){t.dropdown.style.visibility==="visible"?j(t.dropdown):vt(t.dropdown)}),this.addEventListener("pointerenter",function(){t.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){t.isPointerInSelect=!1}),document?.addEventListener("click",function(){t.isPointerInSelect||j(t.dropdown)})},r.defaultOptions={style:{x:0,y:0,width:140,height:32,options:[],bordered:!0,defaultValue:"",selectRadius:8,selectStroke:"#d9d9d9",showDropdownIcon:!0,placeholderText:"\u8BF7\u9009\u62E9",placeholderFontSize:12,placeholderTextBaseline:"top",placeholderFill:"#c2c2c2",dropdownFill:"#fff",dropdownStroke:"#d9d9d9",dropdownRadius:8,dropdownShadowBlur:4,dropdownShadowColor:"rgba(0, 0, 0, 0.08)",dropdownPadding:8,dropdownSpacing:10,optionPadding:[8,12],optionFontSize:12,optionTextBaseline:"top",optionBackgroundFill:"#fff",optionBackgroundRadius:4,optionLabelFontSize:12,optionLabelTextBaseline:"top"}},r})(ff);import{__assign as Oe,__extends as Pf,__read as zt,__rest as Cf,__spreadArray as fi}from"/tslib?target=es2022";import{clamp as Is}from"/@antv/util@^3.3.10?target=es2022";import{Component as Ef}from"./esm/core.mjs";import{__assign as ui,__extends as wf,__read as ci,__spreadArray as Cs}from"/tslib?target=es2022";import{Component as Af}from"./esm/core.mjs";import{__assign as si,__extends as ht,__read as Pt,__rest as hf,__spreadArray as df}from"/tslib?target=es2022";import{clamp as vf,omit as mf}from"/@antv/util@^3.3.10?target=es2022";import{Component as ws}from"./esm/core.mjs";var Ct=(function(i){ht(r,i);function r(t){var e=i.call(this,M({},{style:{backgroundOpacity:r.backgroundOpacities.default}},r.defaultOptions,t))||this;return e.showBackground=!0,e.background=e.appendChild(new _t({})),e.icon=e.appendChild(new U({})),e}return Object.defineProperty(r.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"padding",{get:function(){return I(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"iconSize",{get:function(){var t=this.attributes.size,e=Pt(this.padding,4),n=e[0],a=e[1],o=e[2],s=e[3];return Math.max(t-Math.max(s+a,n+o),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),r.prototype.renderBackground=function(){var t=this.attributes,e=t.x,n=t.y,a=t.size,o=a/2,s=L(this.attributes,"background");this.background.attr(si({x:e-o,y:n-o,width:a,height:a},s))},r.prototype.showIndicator=function(){if(this.label){var t=this.attributes.size,e=this.background.getBBox(),n=e.x,a=e.y;this.indicator.update({x:n+t/2,y:a-5,labelText:this.label,visibility:"visible"})}},r.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},r.prototype.connectedCallback=function(){var t;i.prototype.connectedCallback.call(this);var e=this.attributes.size,n=this.background.getBBox(),a=n.x,o=n.y,s=(t=this.ownerDocument)===null||t===void 0?void 0:t.defaultView;s&&(this.indicator=s.appendChild(new tn({style:{x:a+e/2,y:o-e/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},r.prototype.disconnectedCallback=function(){this.indicator.destroy()},r.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},r.prototype.bindEvents=function(){var t=this,e=this.attributes.onClick;if(this.addEventListener("click",function(){e?.(t)}),this.showBackground){var n=function(){return t.background.attr({opacity:r.backgroundOpacities.default})},a=function(){return t.background.attr({opacity:r.backgroundOpacities.hover})},o=function(){return t.background.attr({opacity:r.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){a(),t.showIndicator()}),this.addEventListener("pointerleave",function(){n(),t.hideIndicator()}),this.addEventListener("pointerdown",function(){o()}),this.addEventListener("pointerup",function(){n()})}},r.tag="IconBase",r.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},r.backgroundOpacities={default:0,hover:.8,active:1},r})(ws);var ur=function(i,r){return r===void 0&&(r="#565758"),new se({style:{fill:r,d:"M ".concat(i,",").concat(i," L -").concat(i,",0 L ").concat(i,",-").concat(i," Z"),transformOrigin:"center"}})},As=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return r.prototype.arcPath=function(t,e,n){var a=Pt([n,n],2),o=a[0],s=a[1],l=function(v){return[t+n*Math.cos(v),e+n*Math.sin(v)]},u=Pt(l(-5/4*Math.PI),2),c=u[0],p=u[1],f=Pt(l(1/4*Math.PI),2),h=f[0],d=f[1];return"M".concat(c,",").concat(p,",A").concat(o,",").concat(s,",0,1,1,").concat(h,",").concat(d)},Object.defineProperty(r.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this.iconSize,s=this.lineWidth,l=s+.5;w(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:s,d:this.arcPath(e,n,o/2-s),markerStart:ur(l,a)})},r})(Ct);var ks=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this.iconSize,s=o/2,l=o/2/Math.pow(3,.5),u=[[e,n],[e,n-l],[e-s,n],[e,n+l],[e,n],[e+s,n-l],[e+s,n+l],[e,n]];w(this.icon).maybeAppend(".backward","polygon").styles({points:u,fill:a})},r})(Ct);var Ls=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this.iconSize,s=o/2,l=o/2/Math.pow(3,.5),u=[[e,n],[e,n-l],[e+s,n],[e,n+l],[e,n],[e-s,n-l],[e-s,n+l],[e,n]];w(this.icon).maybeAppend(".forward","polygon").styles({points:u,fill:a})},r})(Ct);var gf=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this.iconSize,s=o/3*Math.pow(3,.5)*.8,l=[[e+s,n],[e-s/2,n-o/2*.8],[e-s/2,n+o/2*.8],[e+s,n]];w(this.icon).maybeAppend(".play","polygon").styles({points:l,fill:a})},r})(Ct);var yf=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this.iconSize,s=o/3,l=[[e-s,n-o/2],[e-s,n+o/2],[e-s/2,n+o/2],[e-s/2,n-o/2],[e-s,n-o/2],[e+s/2,n-o/2],[e+s/2,n+o/2],[e+s,n+o/2],[e+s,n-o/2]];w(this.icon).maybeAppend(".pause","polygon").styles({points:l,fill:a})},r})(Ct);var bf=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this,s=o.iconSize,l=o.lineWidth,u=l;w(this.icon).maybeAppend(".left-line","line").styles({x1:e-s/2,y1:n-s/2,x2:e-s/2,y2:n+s/2,stroke:a,lineWidth:l}),w(this.icon).maybeAppend(".right-line","line").styles({x1:e+s/2,y1:n-s/2,x2:e+s/2,y2:n+s/2,stroke:a,lineWidth:l}),w(this.icon).maybeAppend(".left-arrow","line").styles({x1:e,y1:n,x2:e-s/2+u*2,y2:n,stroke:a,lineWidth:l,markerEnd:ur(l*2,a)}),w(this.icon).maybeAppend(".right-arrow","line").styles({x1:e,y1:n,x2:e+s/2-u*2,y2:n,stroke:a,lineWidth:l,markerEnd:ur(l*2,a)})},r})(Ct);var xf=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this,s=o.iconSize,l=o.lineWidth;w(this.icon).maybeAppend(".line","line").styles({x1:e,y1:n-s/2,x2:e,y2:n+s/2,stroke:a,lineWidth:l});var u=l;w(this.icon).maybeAppend(".left-arrow","line").styles({x1:e-s/2-u*2,y1:n,x2:e-u*2,y2:n,stroke:a,lineWidth:l,markerEnd:ur(l*2,a)}),w(this.icon).maybeAppend(".right-arrow","line").styles({x1:e+s/2+u*2,y1:n,x2:e+u*2,y2:n,stroke:a,lineWidth:l,markerEnd:ur(l*2,a)})},r})(Ct);var Ts=function(i){return[[-i/2,-i/2],[-i/2,i/2],[i/2,i/2]]},_f=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this,s=o.iconSize,l=o.lineWidth,u=l,c=(s-u*2-l)/4,p=(s-u*2-l)/2,f=Pt([e-s/2+u,n+s/2-u*2],2),h=f[0],d=f[1];w(this.icon).maybeAppend(".coordinate","polyline").styles({points:Ts(s).map(function(v){var m=Pt(v,2),g=m[0],y=m[1];return[g+e,y+n]}),stroke:a,lineWidth:l}),w(this.icon).maybeAppend(".line","polyline").styles({points:[[h,d],[h+c,d-p],[h+c*2,d],[h+c*4,d-p*2]],stroke:a,lineWidth:l})},r})(Ct);var Sf=(function(i){ht(r,i);function r(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.data,e=this.attributes,n=e.x,a=e.y,o=e.color,s=this,l=s.iconSize,u=s.lineWidth,c=u,p=(l-c)/t.length,f=(l-c*2)/4,h=Pt([n-l/2+c*2,a+l/2-c],2),d=h[0],v=h[1];w(this.icon).maybeAppend(".coordinate","polyline").styles({points:Ts(l).map(function(m){var g=Pt(m,2),y=g[0],b=g[1];return[y+n,b+a]}),stroke:o,lineWidth:u}),w(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(m,g){return{value:m,index:g}})).join(function(m){return m.append("line").attr("className","column").style("x1",function(g){var y=g.index;return d+p*y}).style("y1",v).style("x2",function(g){var y=g.index;return d+p*y}).style("y2",function(g){var y=g.value;return v-f*y}).styles({y1:v,stroke:o,lineWidth:u})})},r})(Ct);var Ps=(function(i){ht(r,i);function r(t){var e=i.call(this,M({},{style:{color:"#d8d9d9"}},t))||this;return e.showBackground=!1,e}return r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.color,o=this,s=o.iconSize,l=o.lineWidth;w(this.icon).maybeAppend(".split","line").styles({x1:e,y1:n-s/2,x2:e,y2:n+s/2,stroke:a,lineWidth:l})},r})(Ct);var nn=(function(i){ht(r,i);function r(){var t=i.apply(this,df([],Pt(arguments),!1))||this;return t.showBackground=!1,t}return Object.defineProperty(r.prototype,"padding",{get:function(){return I(0)},enumerable:!1,configurable:!0}),r.prototype.renderIcon=function(){var t=this.iconSize,e=this.attributes,n=e.x,a=e.y,o=e.speed,s=o===void 0?1:o,l=mf(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),u=vf(t,20,1/0),c=20,p=si(si({},l),{x:n-u/2,y:a-c/2,width:u,height:c,defaultValue:s,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:t/5,placeholderFontSize:t/2,optionPadding:0,optionLabelFontSize:t/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});w(this.icon).maybeAppend(".speed",function(){return new lr({style:p})}).attr("className","speed").each(function(){this.update(p)})},r.tag="SpeedSelect",r})(Ct);var li=(function(i){ht(r,i);function r(t){var e=i.call(this,t)||this;return e.icon=e.appendChild(new U({})),e.currentType=e.attributes.type,e}return r.prototype.getType=function(){return this.currentType},r.prototype.render=function(){var t=this,e=this.attributes,n=e.onChange,a=hf(e,["onChange"]);w(this.icon).selectAll(".icon").data([this.currentType]).join(function(o){return o.append(function(s){var l,u=(l=t.toggles.find(function(c){var p=Pt(c,1),f=p[0];return f===s}))===null||l===void 0?void 0:l[1];if(!u)throw new Error("Invalid type: ".concat(s));return new u({})}).attr("className","icon").styles(a,!1).update({})},function(o){return o.styles({restStyles:a}).update({})},function(o){return o.remove()})},r.prototype.bindEvents=function(){var t=this,e=this.attributes.onChange;this.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation();var a=(t.toggles.findIndex(function(s){var l=Pt(s,1),u=l[0];return u===t.currentType})+1)%t.toggles.length,o=t.toggles[a][0];e?.(t.currentType),t.currentType=o,t.render()})},r.tag="ToggleIcon",r})(ws);var an=(function(i){ht(r,i);function r(t){var e=i.call(this,M({},{style:{type:"play"}},t))||this;return e.toggles=[["play",gf],["pause",yf]],e}return r})(li);var on=(function(i){ht(r,i);function r(t){var e=i.call(this,M({},{style:{type:"range"}},t))||this;return e.toggles=[["range",bf],["value",xf]],e}return r})(li);var sn=(function(i){ht(r,i);function r(t){var e=i.call(this,M({},{style:{type:"column"}},t))||this;return e.toggles=[["line",_f],["column",Sf]],e}return r})(li);var kf={reset:As,speed:nn,backward:ks,playPause:an,forward:Ls,selectionType:on,chartType:sn,split:Ps},Es=(function(i){wf(r,i);function r(t){var e=i.call(this,M({},r.defaultOptions,t))||this;return e.background=e.appendChild(new _t({})),e.functions=e.appendChild(new U({})),e}return Object.defineProperty(r.prototype,"padding",{get:function(){return I(this.attributes.padding)},enumerable:!1,configurable:!0}),r.prototype.renderBackground=function(){var t=this.style,e=t.x,n=t.y,a=t.width,o=t.height,s=L(this.attributes,"background");this.background.attr(ui({x:e,y:n,width:a,height:o},s))},r.prototype.renderFunctions=function(){var t=this,e,n=this.attributes,a=n.functions,o=n.iconSize,s=n.iconSpacing,l=n.x,u=n.y,c=n.width,p=n.height,f=n.align,h=ci(this.padding,4),d=h[1],v=h[3],m=a.reduce(function(b,_){return b.length&&_.length?b.concat.apply(b,Cs(["split"],ci(_),!1)):b.concat.apply(b,Cs([],ci(_),!1))},[]),g=m.length*(o+s)-s,y={left:v+o/2,center:(c-g)/2+o/2,right:c-g-v-d+o/2}[f]||0;(e=this.speedSelect)===null||e===void 0||e.destroy(),this.functions.removeChildren(),m.forEach(function(b,_){var x,S=kf[b],A={x:l+_*(o+s)+y,y:u+p/2,size:o};if(S===nn?(A.speed=t.attributes.speed,A.onSelect=function(P){return t.handleFunctionChange(b,{value:P})}):[an,on,sn].includes(S)?(A.onChange=function(P){return t.handleFunctionChange(b,{value:P})},S===an&&(A.type=t.attributes.state==="play"?"pause":"play"),S===on&&(A.type=t.attributes.selectionType==="range"?"value":"range"),S===sn&&(A.type=t.attributes.chartType==="line"?"column":"line")):A.onClick=function(){return t.handleFunctionChange(b,{value:b})},S===nn){var T=(x=t.ownerDocument)===null||x===void 0?void 0:x.defaultView;T&&(t.speedSelect=new S({style:ui(ui({},A),{zIndex:100})}),T.appendChild(t.speedSelect))}else t.functions.appendChild(new S({style:A}))})},r.prototype.disconnectedCallback=function(){var t;i.prototype.disconnectedCallback.call(this),(t=this.speedSelect)===null||t===void 0||t.destroy()},r.prototype.render=function(){this.renderBackground(),this.renderFunctions()},r.prototype.handleFunctionChange=function(t,e){var n=this.attributes.onChange;n?.(t,e)},r.defaultOptions={style:{x:0,y:0,width:300,height:40,padding:0,align:"center",iconSize:25,iconSpacing:0,speed:1,state:"pause",chartType:"line",selectionType:"range",backgroundFill:"#fbfdff",backgroundStroke:"#ebedf0",functions:[["reset","speed"],["backward","playPause","forward"],["selectionType","chartType"]]}},r})(Af);import{__assign as ln,__extends as Bs}from"/tslib?target=es2022";import{Component as Lf}from"./esm/core.mjs";var Os=(function(i){Bs(r,i);function r(t){var e=i.call(this,M({},r.defaultOptions,t))||this;return e.bindEvents(),e}return r.prototype.bindEvents=function(){var t=this;this.addEventListener("mouseenter",function(){t.attr("lineWidth",Math.ceil(+(t.style.r||0)/2))}),this.addEventListener("mouseleave",function(){t.attr("lineWidth",0)})},r.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},r})(pr);var Ms=(function(i){Bs(r,i);function r(t){return i.call(this,M({},r.defaultOptions,t))||this}return r.prototype.renderBackground=function(){var t=this.attributes,e=t.x,n=t.y,a=t.width,o=t.height,s=L(this.attributes,"background");w(this).maybeAppend("background","rect").attr("className","background").styles(ln({x:e-a/2,y:n-o/2,width:a,height:o},s))},r.prototype.renderIcon=function(){var t=this.attributes,e=t.x,n=t.y,a=t.iconSize,o=L(this.attributes,"icon"),s=1,l=a/2;w(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles(ln({x1:e-s,y1:n-l,x2:e-s,y2:n+l},o)),w(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles(ln({x1:e+s,y1:n-l,x2:e+s,y2:n+l},o))},r.prototype.renderBorder=function(){var t=this.attributes,e=t.x,n=t.y,a=t.width,o=t.height,s=t.type,l=L(this.attributes,"border"),u=s==="start"?+a/2:-a/2;w(this).maybeAppend("border","line").attr("className","border").styles(ln({x1:u+e,y1:n-o/2,x2:u+e,y2:n+o/2},l))},r.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},r.defaultOptions={style:{x:0,y:0,width:10,height:50,iconSize:10,type:"start",backgroundFill:"#fff",backgroundFillOpacity:.5,iconStroke:"#9a9a9a",iconLineWidth:1,borderStroke:"#e8e8e8",borderLineWidth:1}},r})(Lf);function Ns(i,r){return typeof i=="number"?pi(i):Tf(i,r)}function Tf(i,r){var t=new Date(i);switch(r){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(t.getHours())&&t.getMinutes()===0?rt(t,`HH:mm
9
- YYYY-MM-DD`):rt(t,"HH:mm");case"half-day":return t.getHours()<12?`AM
10
- `.concat(rt(t,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(t.getDate())?rt(t,`DD
11
- YYYY-MM`):rt(t,"DD");case"week":return t.getDate()<=7?rt(t,`DD
12
- YYYY-MM`):rt(t,"DD");case"month":return[0,6].includes(t.getMonth())?rt(t,`MM\u6708
13
- YYYY`):rt(t,"MM\u6708");case"season":return[0].includes(t.getMonth())?rt(t,`MM\u6708
14
- YYYY`):rt(t,"MM\u6708");case"year":return rt(t,"YYYY");default:return rt(t,"YYYY-MM-DD HH:mm")}}function pi(i){var r=String(Math.floor(i/3600)).padStart(2,"0"),t=String(Math.floor(i%3600/60)).padStart(2,"0"),e=String(Math.floor(i%60)).padStart(2,"0");return i<3600?"".concat(t,":").concat(e):"".concat(r,":").concat(t,":").concat(e)}var hi=(function(i){Pf(r,i);function r(t){var e=i.call(this,M({},r.defaultOptions,t))||this;e.axis=e.appendChild(new ie({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),e.timeline=e.appendChild(new be({style:{onChange:function(p){e.handleSliderChange(p)}}})),e.controller=e.appendChild(new Es({})),e.states={},e.handleSliderChange=function(p){var f=(function(){var h=e.states.values;return Array.isArray(h)?fi([],zt(h),!1):h})();e.setBySliderValues(p),e.dispatchOnChange(f)};var n=e.attributes,a=n.selectionType,o=n.chartType,s=n.speed,l=n.state,u=n.playMode,c=n.values;return e.states={chartType:o,playMode:u,selectionType:a,speed:s,state:l},e.setByTimebarValues(c),e}return Object.defineProperty(r.prototype,"data",{get:function(){var t=this.attributes.data,e=function(n,a){return n.time<a.time?-1:n.time>a.time?1:0};return t.sort(e)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"space",{get:function(){var t=this.attributes,e=t.x,n=t.y,a=t.width,o=t.height,s=t.type,l=t.controllerHeight,u=Is(+o-l,0,+o),c=new W(e,n+ +o-l,+a,l),p,f=0;s==="chart"?(f=35,p=new W(e,n+u-f,+a,f)):p=new W;var h=s==="time"?10:u,d=new W(e,n+(s==="time"?u:u-h),+a,h-f);return{axisBBox:p,controllerBBox:c,timelineBBox:d}},enumerable:!1,configurable:!0}),r.prototype.setBySliderValues=function(t){var e,n,a=this.data,o=zt(Array.isArray(t)?t:[0,t],2),s=o[0],l=o[1],u=a.length,c=a[Math.floor(s*u)],p=a[Math.ceil(l*u)-(Array.isArray(t)?0:1)];this.states.values=[(e=c?.time)!==null&&e!==void 0?e:a[0].time,(n=p?.time)!==null&&n!==void 0?n:1/0]},r.prototype.setByTimebarValues=function(t){var e,n,a,o=this.data,s=zt(Array.isArray(t)?t:[void 0,t],2),l=s[0],u=s[1],c=o.find(function(f){var h=f.time;return h===l}),p=o.find(function(f){var h=f.time;return h===u});this.states.values=[(e=c?.time)!==null&&e!==void 0?e:(n=o[0])===null||n===void 0?void 0:n.time,(a=p?.time)!==null&&a!==void 0?a:1/0]},r.prototype.setByIndex=function(t){var e,n,a,o,s=this.data,l=zt(t,2),u=l[0],c=l[1];this.states.values=[(n=(e=s[u])===null||e===void 0?void 0:e.time)!==null&&n!==void 0?n:s[0].time,(o=(a=this.data[c])===null||a===void 0?void 0:a.time)!==null&&o!==void 0?o:1/0]},Object.defineProperty(r.prototype,"sliderValues",{get:function(){var t=this.states,e=t.values,n=t.selectionType,a=zt(Array.isArray(e)?e:[void 0,e],2),o=a[0],s=a[1],l=this.data,u=l.length,c=n==="value",p=function(){var h=l.findIndex(function(d){var v=d.time;return v===o});return c?0:h>-1?h/u:0},f=function(){if(s===1/0)return 1;var h=l.findIndex(function(d){var v=d.time;return v===s});return h>-1?h/u:c?.5:1};return[p(),f()]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"values",{get:function(){var t=this.states,e=t.values,n=t.selectionType,a=zt(Array.isArray(e)?e:[this.data[0].time,e],2),o=a[0],s=a[1];return n==="value"?s:[o,s]},enumerable:!1,configurable:!0}),r.prototype.getDatumByRatio=function(t){var e=this.data,n=e.length,a=Math.floor(t*(n-1));return e[a]},Object.defineProperty(r.prototype,"chartHandleIconShape",{get:function(){var t=this.states.selectionType,e=this.space.timelineBBox.height;return t==="range"?function(n){return new Ms({style:{type:n,height:e,iconSize:e/6}})}:function(){return new dr({style:{x1:0,y1:-e/2,x2:0,y2:e/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),r.prototype.getChartStyle=function(t){var e=this,n=t.x,a=t.y,o=t.width,s=t.height,l=this.states,u=l.selectionType,c=l.chartType,p=this.data,f=this.attributes,h=f.type,d=f.labelFormatter,v=L(this.attributes,"chart"),m=v.type,g=Cf(v,["type"]),y=u==="range";if(h==="time")return Oe({handleIconShape:function(){return new Os({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:y?-15:0,autoFitLabel:y,handleSpacing:y?-15:0,trackFill:"#edeeef",trackLength:o,trackOpacity:.5,trackRadius:s/2,trackSize:s/2,type:u,values:this.sliderValues,formatter:function(x){if(d)return d(x);var S=e.getDatumByRatio(x).time;return typeof S=="number"?pi(S):rt(S,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(n,", ").concat(a,")"),zIndex:1},g);var b=u==="range"?5:0,_=p.map(function(x){var S=x.value;return S});return Oe({handleIconOffset:b,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:_,sparklineType:c,sparklineScale:.8,trackLength:o,trackSize:s,type:u,values:this.sliderValues,transform:"translate(".concat(n,", ").concat(a,")"),zIndex:1},g)},r.prototype.renderChart=function(t){t===void 0&&(t=this.space.timelineBBox),this.timeline.update(this.getChartStyle(t))},r.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},r.prototype.getAxisStyle=function(t){var e=this.data,n=this.attributes,a=n.interval,o=n.labelFormatter,s=L(this.attributes,"axis"),l=t.x,u=t.y,c=t.width,p=fi(fi([],zt(e),!1),[{time:0}],!1).map(function(h,d,v){var m=h.time;return{label:"".concat(m),value:d/(v.length-1),time:m}}),f=Oe({startPos:[l,u],endPos:[l+c,u],data:p,labelFilter:function(h,d){return d<p.length-1},labelFormatter:function(h){var d=h.time;return o?o(d):Ns(d,a)}},s);return f},r.prototype.renderAxis=function(t){t===void 0&&(t=this.space.axisBBox);var e=this.attributes.type;e==="chart"&&this.axis.update(this.getAxisStyle(t))},r.prototype.renderController=function(t){t===void 0&&(t=this.space.controllerBBox);var e=this.attributes.type,n=this.states,a=n.state,o=n.speed,s=n.selectionType,l=n.chartType,u=L(this.attributes,"controller"),c=this,p=Oe(Oe(Oe({},t),{iconSize:20,speed:o,state:a,selectionType:s,chartType:l,onChange:function(f,h){var d=h.value;switch(f){case"reset":c.internalReset();break;case"speed":c.handleSpeedChange(d);break;case"backward":c.internalBackward();break;case"playPause":d==="play"?c.internalPlay():c.internalPause();break;case"forward":c.internalForward();break;case"selectionType":c.handleSelectionTypeChange(d);break;case"chartType":c.handleChartTypeChange(d);break;default:break}}}),u);e==="time"&&(p.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(p)},r.prototype.dispatchOnChange=function(t){var e=this.data,n=this.attributes.onChange,a=this.states,o=a.values,s=a.selectionType,l=zt(o,2),u=l[0],c=l[1],p=c===1/0?e.at(-1).time:c,f=s==="range"?[u,p]:p,h=function(d,v){return Array.isArray(d)?Array.isArray(v)?d[0]===v[0]&&(d[1]===v[1]||d[1]===1/0||v[1]===1/0):!1:Array.isArray(v)?!1:d===v};(!t||!h(t,f))&&n?.(s==="range"?[u,p]:p)},r.prototype.internalReset=function(t){var e,n,a=this.states.selectionType;this.internalPause(),this.setBySliderValues(a==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),t||((n=(e=this.attributes)===null||e===void 0?void 0:e.onReset)===null||n===void 0||n.call(e),this.dispatchOnChange())},r.prototype.reset=function(){this.internalReset()},r.prototype.moveSelection=function(t,e){var n=this.data,a=n.length,o=this.states,s=o.values,l=o.selectionType,u=o.playMode,c=zt(s,2),p=c[0],f=c[1],h=n.findIndex(function(b){var _=b.time;return _===p}),d=n.findIndex(function(b){var _=b.time;return _===f});d===-1&&(d=a);var v=t==="backward"?-1:1,m;l==="range"?u==="acc"?(m=[h,d+v],v===-1&&h===d&&(m=[h,a])):m=[h+v,d+v]:m=[h,d+v];var g=function(b){var _=zt(b.sort(function(T,P){return T-P}),2),x=_[0],S=_[1],A=function(T){return Is(T,0,a)};return S>a?l==="value"?[0,0]:u==="acc"?[A(x),A(x)]:[0,A(S-x)]:x<0?u==="acc"?[0,A(S)]:[A(x+a-S),a]:[A(x),A(S)]},y=g(m);return this.setByIndex(y),this.updateSelection(),y},r.prototype.internalBackward=function(t){var e,n,a=this.moveSelection("backward",t);return t||((n=(e=this.attributes)===null||e===void 0?void 0:e.onBackward)===null||n===void 0||n.call(e),this.dispatchOnChange()),a},r.prototype.backward=function(){this.internalBackward()},r.prototype.internalPlay=function(t){var e=this,n,a,o=this.data,s=this.attributes.loop,l=this.states.speed,u=l===void 0?1:l;this.playInterval=window.setInterval(function(){var c=e.internalForward();c[1]===o.length&&!s&&(e.internalPause(),e.renderController())},1e3/u),this.states.state="play",!t&&((a=(n=this.attributes)===null||n===void 0?void 0:n.onPlay)===null||a===void 0||a.call(n))},r.prototype.play=function(){this.internalPlay()},r.prototype.internalPause=function(t){var e,n;clearInterval(this.playInterval),this.states.state="pause",!t&&((n=(e=this.attributes)===null||e===void 0?void 0:e.onPause)===null||n===void 0||n.call(e))},r.prototype.pause=function(){this.internalPause()},r.prototype.internalForward=function(t){var e,n,a=this.moveSelection("forward",t);return t||((n=(e=this.attributes)===null||e===void 0?void 0:e.onForward)===null||n===void 0||n.call(e),this.dispatchOnChange()),a},r.prototype.forward=function(){this.internalForward()},r.prototype.handleSpeedChange=function(t){var e,n;this.states.speed=t;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(n=(e=this.attributes)===null||e===void 0?void 0:e.onSpeedChange)===null||n===void 0||n.call(e,t)},r.prototype.handleSelectionTypeChange=function(t){var e,n;this.states.selectionType=t,this.renderChart(),(n=(e=this.attributes)===null||e===void 0?void 0:e.onSelectionTypeChange)===null||n===void 0||n.call(e,t)},r.prototype.handleChartTypeChange=function(t){var e,n;this.states.chartType=t,this.renderChart(),(n=(e=this.attributes)===null||e===void 0?void 0:e.onChartTypeChange)===null||n===void 0||n.call(e,t)},r.prototype.render=function(){var t=this.space,e=t.axisBBox,n=t.controllerBBox,a=t.timelineBBox;this.renderController(n),this.renderAxis(e),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},r.prototype.destroy=function(){i.prototype.destroy.call(this),this.internalPause(!0)},r.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},r})(Ef);B(cr,k);export{ie as Axis,W as BBox,ka as Breadcrumb,Sa as Button,Kn as Category,xs as Checkbox,ms as CircleCrosshair,ei as Continuous,oi as Layout,vs as LineCrosshair,H as Marker,Jr as Navigator,dn as PRIMILTIVE_ATTRIBUTES,gs as PolygonCrosshair,Qr as Poptip,Fa as Scrollbar,lr as Select,gn as Selection,be as Slider,Wr as Sparkline,us as Switch,jt as Tag,hi as Timebar,Ao as Timeline,ss as Tooltip,Rt as add,Ir as addPrefix,Hr as applyStyleSheet,ue as applyToText,fn as arrayInterpolate,Er as catmullRom2Bezier,Y as classNames,Nr as copyAttributes,vr as createOffscreenGroup,ji as createTempText,M as deepAssign,gr as defined,yt as degToRad,Ft as distance,Jt as ellipsisIt,rt as formatTime,K as getCallbackValue,Ht as getEventPos,Ie as getFont,De as getLocalBBox,xn as getMask,Fe as getPrimitiveAttributes,wi as getRenderBBox,Or as getShapeSpace,Ki as getTimeDiff,$i as getTimeScale,Ji as getTimeStart,_n as getTranslate,Lr as groupBy,j as hide,Hi as ifNegative,Ri as ifPositive,X as ifShow,tt as inRange,ce as interpolate,kr as intersection,Mr as isHorizontal,mr as isInOffscreenGroup,vn as isPrimitiveAttribute,Yi as isVertical,Tr as keyframeInterpolate,He as lineLen,Ot as max,lt as maybeAppend,br as measureTextWidth,Wi as mid,Bt as min,Fi as multi,fe as normalize,pn as numberInterpolate,hn as objectInterpolate,Re as omit,de as parseDate,Bi as parseHTML,Fr as parseHeightFromHTML,Gt as parsePosition,I as parseSeriesAttr,bn as path2marker,ve as percentTransform,Ne as radToDeg,Ve as removePrefix,it as renderExtDo,_r as renderHtmlExtDo,je as replaceChildren,Pr as rotate,Br as sampling,at as scale,Dt as scaleToPixel,w as select,Li as setMockMeasureTextWidth,vt as show,et as splitStyle,cn as stringToHTML,pe as sub,L as subStyleProps,ot as superStyleProps,Ui as svg2marker,ze as textOf,Xi as throttle,Qi as timer,zi as toKNotation,yn as toLowercaseFirstLetter,Wt as toPrecision,Ii as toScientificNotation,Ni as toThousands,he as toUppercaseFirstLetter,Rr as transpose,Me as traverse,Cr as vertical,le as visibility,xr as wrapIt};
15
- //# sourceMappingURL=component.mjs.map
@@ -1,3 +0,0 @@
1
- /* esm.sh - @antv/event-emitter@0.1.3 */
2
- var p="*",g=(function(){function o(){this._events={}}return o.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},o.prototype.once=function(t,e){return this.on(t,e,!0)},o.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var s=this._events[t]||[],c=this._events[p]||[],f=function(a){for(var h=a.length,i=0;i<h;i++)if(a[i]){var v=a[i],l=v.callback,u=v.once;u&&(a.splice(i,1),a.length===0&&delete e._events[t],h--,i--),l.apply(e,n)}};f(s),f(c)},o.prototype.off=function(t,e){if(!t)this._events={};else if(!e)delete this._events[t];else{for(var n=this._events[t]||[],r=n.length,s=0;s<r;s++)n[s].callback===e&&(n.splice(s,1),r--,s--);n.length===0&&delete this._events[t]}return this},o.prototype.getEvents=function(){return this._events},o})(),_=g;export{_ as default};
3
- //# sourceMappingURL=event-emitter.mjs.map