@tachybase/plugin-block-charts 0.23.8

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 (115) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/README.md +88 -0
  3. package/client.d.ts +3 -0
  4. package/client.js +65 -0
  5. package/dist/client/block/ChartBlock.d.ts +2 -0
  6. package/dist/client/block/ChartBlockDesigner.d.ts +2 -0
  7. package/dist/client/block/ChartBlockInitializer.d.ts +4 -0
  8. package/dist/client/block/ChartDataProvider.d.ts +16 -0
  9. package/dist/client/block/formatters.d.ts +15 -0
  10. package/dist/client/block/index.d.ts +3 -0
  11. package/dist/client/block/transformers.d.ts +10 -0
  12. package/dist/client/chart/antd/GroupedTable.d.ts +6 -0
  13. package/dist/client/chart/antd/antd.d.ts +7 -0
  14. package/dist/client/chart/antd/index.d.ts +5 -0
  15. package/dist/client/chart/antd/statistic.d.ts +7 -0
  16. package/dist/client/chart/antd/table.d.ts +6 -0
  17. package/dist/client/chart/chart.d.ts +77 -0
  18. package/dist/client/chart/configs.d.ts +79 -0
  19. package/dist/client/chart/g2plot/AntChart.d.ts +2 -0
  20. package/dist/client/chart/g2plot/bar.d.ts +6 -0
  21. package/dist/client/chart/g2plot/configs.d.ts +40 -0
  22. package/dist/client/chart/g2plot/dualAxes.d.ts +7 -0
  23. package/dist/client/chart/g2plot/g2plot.d.ts +10 -0
  24. package/dist/client/chart/g2plot/index.d.ts +3 -0
  25. package/dist/client/chart/g2plot/pie.d.ts +7 -0
  26. package/dist/client/chart/group.d.ts +32 -0
  27. package/dist/client/configure/ChartConfigProvider.d.ts +18 -0
  28. package/dist/client/configure/ChartConfigure.d.ts +18 -0
  29. package/dist/client/configure/FilterDynamicComponent.d.ts +2 -0
  30. package/dist/client/configure/index.d.ts +2 -0
  31. package/dist/client/configure/schemas/configure.d.ts +4 -0
  32. package/dist/client/filter/CollectionFieldInitializer.d.ts +2 -0
  33. package/dist/client/filter/FilterActionInitializers.d.ts +15 -0
  34. package/dist/client/filter/FilterBlockDesigner.d.ts +2 -0
  35. package/dist/client/filter/FilterBlockInitializer.d.ts +3 -0
  36. package/dist/client/filter/FilterBlockProvider.d.ts +2 -0
  37. package/dist/client/filter/FilterCheckbox.d.ts +2 -0
  38. package/dist/client/filter/FilterForm.d.ts +2 -0
  39. package/dist/client/filter/FilterItemDesigner.d.ts +2 -0
  40. package/dist/client/filter/FilterItemInitializers.d.ts +7 -0
  41. package/dist/client/filter/FilterProvider.d.ts +30 -0
  42. package/dist/client/filter/FilterVariableInput.d.ts +2 -0
  43. package/dist/client/filter/index.d.ts +6 -0
  44. package/dist/client/filter/utils.d.ts +59 -0
  45. package/dist/client/hooks/filter.d.ts +225 -0
  46. package/dist/client/hooks/index.d.ts +4 -0
  47. package/dist/client/hooks/query.d.ts +52 -0
  48. package/dist/client/hooks/transformer.d.ts +12 -0
  49. package/dist/client/hooks/useDateVariable.d.ts +14 -0
  50. package/dist/client/hooks/useUserVariable.d.ts +8 -0
  51. package/dist/client/hooks/useVariableOptions.d.ts +10 -0
  52. package/dist/client/index.d.ts +13 -0
  53. package/dist/client/index.js +234 -0
  54. package/dist/client/locale/index.d.ts +3 -0
  55. package/dist/client/renderer/ChartRenderer.d.ts +4 -0
  56. package/dist/client/renderer/ChartRendererProvider.d.ts +49 -0
  57. package/dist/client/renderer/index.d.ts +2 -0
  58. package/dist/client/utils.d.ts +44 -0
  59. package/dist/externalVersion.js +18 -0
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.js +39 -0
  62. package/dist/locale/en-US.json +89 -0
  63. package/dist/locale/ko_KR.json +85 -0
  64. package/dist/locale/zh-CN.json +90 -0
  65. package/dist/node_modules/fs-extra/LICENSE +15 -0
  66. package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +161 -0
  67. package/dist/node_modules/fs-extra/lib/copy/copy.js +177 -0
  68. package/dist/node_modules/fs-extra/lib/copy/index.js +7 -0
  69. package/dist/node_modules/fs-extra/lib/empty/index.js +39 -0
  70. package/dist/node_modules/fs-extra/lib/ensure/file.js +66 -0
  71. package/dist/node_modules/fs-extra/lib/ensure/index.js +23 -0
  72. package/dist/node_modules/fs-extra/lib/ensure/link.js +64 -0
  73. package/dist/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
  74. package/dist/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
  75. package/dist/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
  76. package/dist/node_modules/fs-extra/lib/fs/index.js +140 -0
  77. package/dist/node_modules/fs-extra/lib/index.js +1 -0
  78. package/dist/node_modules/fs-extra/lib/json/index.js +16 -0
  79. package/dist/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  80. package/dist/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  81. package/dist/node_modules/fs-extra/lib/json/output-json.js +12 -0
  82. package/dist/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  83. package/dist/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
  84. package/dist/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
  85. package/dist/node_modules/fs-extra/lib/move/index.js +7 -0
  86. package/dist/node_modules/fs-extra/lib/move/move-sync.js +55 -0
  87. package/dist/node_modules/fs-extra/lib/move/move.js +59 -0
  88. package/dist/node_modules/fs-extra/lib/output-file/index.js +31 -0
  89. package/dist/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  90. package/dist/node_modules/fs-extra/lib/remove/index.js +17 -0
  91. package/dist/node_modules/fs-extra/lib/util/stat.js +158 -0
  92. package/dist/node_modules/fs-extra/lib/util/utimes.js +36 -0
  93. package/dist/node_modules/fs-extra/package.json +1 -0
  94. package/dist/node_modules/koa-compose/index.js +1 -0
  95. package/dist/node_modules/koa-compose/package.json +1 -0
  96. package/dist/server/actions/formatter.d.ts +4 -0
  97. package/dist/server/actions/formatter.js +67 -0
  98. package/dist/server/actions/query.d.ts +8 -0
  99. package/dist/server/actions/query.js +320 -0
  100. package/dist/server/index.d.ts +1 -0
  101. package/dist/server/index.js +33 -0
  102. package/dist/server/migrations/20230926211750-rename-charttype.d.ts +5 -0
  103. package/dist/server/migrations/20230926211750-rename-charttype.js +51 -0
  104. package/dist/server/plugin.d.ts +13 -0
  105. package/dist/server/plugin.js +83 -0
  106. package/dist/server/services/sql-loader.d.ts +10 -0
  107. package/dist/server/services/sql-loader.js +134 -0
  108. package/dist/server/sqls/view_load_function.sql +17 -0
  109. package/dist/server/utils/multiprocess.d.ts +2 -0
  110. package/dist/server/utils/multiprocess.js +38 -0
  111. package/dist/swagger/index.d.ts +8 -0
  112. package/dist/swagger/index.js +29 -0
  113. package/package.json +44 -0
  114. package/server.d.ts +3 -0
  115. package/server.js +65 -0
@@ -0,0 +1,234 @@
1
+ (function(Oe,Y){typeof exports=="object"&&typeof module!="undefined"?Y(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("react"),require("@tachybase/components"),require("@tachybase/schema"),require("@ant-design/icons"),require("antd"),require("lodash"),require("react-i18next"),require("ahooks"),require("dayjs"),require("@tachybase/utils/client")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","@tachybase/components","@tachybase/schema","@ant-design/icons","antd","lodash","react-i18next","ahooks","dayjs","@tachybase/utils/client"],Y):(Oe=typeof globalThis!="undefined"?globalThis:Oe||self,Y(Oe["@tachybase/plugin-block-charts"]={},Oe["@tachybase/client"],Oe.jsxRuntime,Oe.react,Oe["@tachybase/components"],Oe["@tachybase/schema"],Oe["@ant-design/icons"],Oe.antd,Oe.lodash,Oe["react-i18next"],Oe.ahooks,Oe.dayjs,Oe["@tachybase/utils"]))})(this,function(Oe,Y,G,K,It,he,Sr,Me,B,rs,Bi,Cn,dl){"use strict";var c0e=Object.defineProperty,u0e=Object.defineProperties;var f0e=Object.getOwnPropertyDescriptors;var B0=Object.getOwnPropertySymbols;var C8=Object.prototype.hasOwnProperty,T8=Object.prototype.propertyIsEnumerable;var e_=(Oe,Y)=>(Y=Symbol[Oe])?Y:Symbol.for("Symbol."+Oe),d0e=Oe=>{throw TypeError(Oe)},Pn=Math.pow,t_=(Oe,Y,G)=>Y in Oe?c0e(Oe,Y,{enumerable:!0,configurable:!0,writable:!0,value:G}):Oe[Y]=G,se=(Oe,Y)=>{for(var G in Y||(Y={}))C8.call(Y,G)&&t_(Oe,G,Y[G]);if(B0)for(var G of B0(Y))T8.call(Y,G)&&t_(Oe,G,Y[G]);return Oe},_e=(Oe,Y)=>u0e(Oe,f0e(Y));var L8=(Oe,Y)=>{var G={};for(var K in Oe)C8.call(Oe,K)&&Y.indexOf(K)<0&&(G[K]=Oe[K]);if(Oe!=null&&B0)for(var K of B0(Oe))Y.indexOf(K)<0&&T8.call(Oe,K)&&(G[K]=Oe[K]);return G};var mi=(Oe,Y,G)=>t_(Oe,typeof Y!="symbol"?Y+"":Y,G);var $r=(Oe,Y,G)=>new Promise((K,It)=>{var he=B=>{try{Me(G.next(B))}catch(rs){It(rs)}},Sr=B=>{try{Me(G.throw(B))}catch(rs){It(rs)}},Me=B=>B.done?K(B.value):Promise.resolve(B.value).then(he,Sr);Me((G=G.apply(Oe,Y)).next())}),h0e=function(Oe,Y){this[0]=Oe,this[1]=Y};var N8=Oe=>{var Y=Oe[e_("asyncIterator")],G=!1,K,It={};return Y==null?(Y=Oe[e_("iterator")](),K=he=>It[he]=Sr=>Y[he](Sr)):(Y=Y.call(Oe),K=he=>It[he]=Sr=>{if(G){if(G=!1,he==="throw")throw Sr;return Sr}return G=!0,{done:!1,value:new h0e(new Promise(Me=>{var B=Y[he](Sr);B instanceof Object||d0e("Object expected"),Me(B)}),1)}}),It[e_("iterator")]=()=>It,K("next"),"throw"in Y?K("throw"):It.throw=he=>{throw he},"return"in Y&&K("return"),It};function U8(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const n_="block-charts";function Ve(e){return Y.i18n.t(e,{ns:[n_,"core"]})}function mt(){return rs.useTranslation([n_,"core"],{nsMode:"fallback"})}class X8{constructor(){mi(this,"charts",new Map)}setGroup(t,n){this.charts.set(t,n)}addGroup(t,n){if(this.charts.has(t))throw new Error(`[data-visualization] Chart group "${t}" already exists`);this.setGroup(t,n)}add(t,n){var r;this.charts.has(t)||this.setGroup(t,[]),(r=this.charts.get(t))==null||r.push(n)}getChartTypes(){const t=[];this.charts.forEach((r,i)=>{const a=r.map(o=>({key:`${i}.${o.name}`,label:Ve(o.title),value:`${i}.${o.name}`}));t.push({label:Ve(i),children:a})});const n=t.findIndex(r=>r.label===Ve("Built-in"));if(n>-1){const[r]=t.splice(n,1);t.unshift(r)}return t}getCharts(){const t={};return this.charts.forEach((n,r)=>{n.forEach(i=>{t[`${r}.${i.name}`]=i})}),t}getChart(t){return this.getCharts()[t]}}const r_=()=>Y.usePlugin(R0).charts.getChartTypes(),q8=()=>{var t,n,r;return(r=(n=(t=r_()[0])==null?void 0:t.children)==null?void 0:n[0])==null?void 0:r.value},i_=()=>Y.usePlugin(R0).charts.getCharts(),K8=e=>Y.usePlugin(R0).charts.getChart(e),Y0={datetime:[{label:Ve("YYYY"),value:"YYYY"},{label:Ve("MM"),value:"MM"},{label:Ve("DD"),value:"DD"},{label:Ve("YYYY-MM"),value:"YYYY-MM"},{label:Ve("YYYY-MM-DD"),value:"YYYY-MM-DD"},{label:Ve("YYYY-MM-DD hh:mm"),value:"YYYY-MM-DD hh:mm"},{label:Ve("YYYY-MM-DD hh:mm:ss"),value:"YYYY-MM-DD hh:mm:ss"}],date:[{label:Ve("YYYY"),value:"YYYY"},{label:Ve("MM"),value:"MM"},{label:Ve("DD"),value:"DD"},{label:Ve("YYYY-MM"),value:"YYYY-MM"},{label:Ve("YYYY-MM-DD"),value:"YYYY-MM-DD"}],time:[{label:Ve("hh:mm:ss"),value:"hh:mm:ss"},{label:Ve("hh:mm"),value:"hh:mm"},{label:Ve("hh"),value:"hh"}]},Z8=K.createContext(null),W0={didCatch:!1,error:null};let a_=class extends K.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=W0}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:a,reason:"imperative-api"}),this.setState(W0)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;if(r&&n.error!==null&&Q8(t.resetKeys,i)){var a,o;(a=(o=this.props).onReset)===null||a===void 0||a.call(o,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(W0)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:o}=this.state;let s=t;if(a){const l={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(l);else if(r)s=K.createElement(r,l);else if(i!==void 0)s=i;else throw o}return K.createElement(Z8.Provider,{value:{didCatch:a,error:o,resetErrorBoundary:this.resetErrorBoundary}},s)}};function Q8(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const hl=K.createContext({});hl.displayName="ChartDataContext";const J8=e=>{const[t,n]=K.useState({}),r=Bi.useMemoizedFn((a,{dataSource:o,collection:s,service:l,query:c})=>{n(u=>_e(se({},u),{[a]:{dataSource:o,collection:s,service:l,query:c}}))}),i=Bi.useMemoizedFn(a=>{n(o=>_e(se({},o),{[a]:void 0}))});return G.jsx(hl.Provider,{value:{charts:t,addChart:r,removeChart:i},children:e.children})},o_=(e,t={})=>{const{collection:n}=e;return{type:"void","x-decorator":"ChartRendererProvider","x-decorator-props":e,"x-acl-action":`${n}:list`,"x-designer":"ChartRenderer.Designer","x-component":"CardItem","x-component-props":{size:"small"},"x-initializer":"charts:addBlock",properties:{[he.uid()]:{type:"void","x-component":"ChartRenderer","x-component-props":t}}}},ru=e=>{let t,n;return Array.isArray(e)?e.length===1?n=e[0]:e.length>1&&([t,n]=e):n=e,{target:t,name:n,alias:t?`${t}.${n}`:n}},Jd=(e,t)=>{var a,o;const{target:n,name:r}=ru(t);return n?(o=(a=e.find(s=>s.name===n))==null?void 0:a.targetFields)==null?void 0:o.find(s=>s.name===r):e.find(s=>s.name===r)},pl=(e,t)=>{const n=s=>s.map(l=>{const c=Jd(e,l.field);return _e(se({},c),{key:l.alias||(c==null?void 0:c.key),label:l.alias||(c==null?void 0:c.label),value:l.alias||(c==null?void 0:c.value)})}),r=t.measures||[],i=t.dimensions||[];return[...new Map([...n(r),...n(i)].map(s=>[s.value,s])).values()]},e6=(e,t,n)=>{const r=(i,a)=>{var l;const o=(l=i.uiSchema)==null?void 0:l.enum;if(!o||!Array.isArray(o))return a;const s=o.find(c=>c.value===a);return he.Schema.compile((s==null?void 0:s.label)||a,n)};return t.map(i=>{const a={};return Object.entries(i).forEach(([o,s])=>{const l=e.find(c=>c.value===o);if(!l){a[o]=s;return}switch(l.interface){case"select":case"radioGroup":a[o]=r(l,s);break;default:a[o]=s}}),a})},G0=e=>{if(typeof e=="object"&&e!==null)if(Array.isArray(e)){const t=e.map(n=>G0(n)).filter(Boolean);return t.length>0?t:null}else{const t={};for(const n in e){const r=G0(e[n]);r!=null&&!(typeof r=="object"&&Object.keys(r).length===0)&&(t[n]=r)}return Object.keys(t).length>0?t:null}else if(typeof e=="string"&&e.startsWith("{{$nFilter.")&&e.endsWith("}}"))return null;return e},t6=(e,t)=>{const n=t.split(".");let r=B.get(e,n.slice(0,-1).join("."));return Array.isArray(r)?r=r.map(i=>B.get(i,n.slice(-1)[0])):r=B.get(r,n.slice(-1)[0]),r},n6=e=>({boolean:"Checkbox",integer:"InputNumber",bigInt:"InputNumber",double:"InputNumber",decimal:"InputNumber",date:"DatePicker",string:"Input"})[e],r6=e=>({boolean:"boolean",integer:"integer",bigInt:"integer",double:"number",decimal:"number",date:"datetime",string:"input"})[e],zr=K.createContext({});zr.displayName="ChartFilterContext";const i6=e=>{const[t,n]=K.useState(!1),[r,i]=K.useState(!1),[a,o]=K.useState({}),[s,l]=K.useState({collapsed:!1,row:1}),[c,u]=K.useState(),f=Bi.useMemoizedFn((g,y)=>{o(m=>_e(se({},m),{[g]:se(se({},m[g]||{}),y)}))}),d=Bi.useMemoizedFn(g=>{o(y=>{const m=se({},y);return m[g]=void 0,m})}),h=Bi.useMemoizedFn(u),p=Bi.useMemoizedFn(i),v=({collapsed:g,row:y})=>{l(m=>({collapsed:g!==void 0?g:m.collapsed,row:y!==void 0?y:m.row}))};return K.useEffect(()=>n(!0),[]),G.jsx(zr.Provider,{value:{ready:t,enabled:r,setEnabled:p,fields:a,setField:f,removeField:d,collapse:s,setCollapse:v,form:c,setForm:h},children:e.children})},bi=K.createContext({});bi.displayName="ChartRendererContext";const s_=e=>{const{query:t,config:n,collection:r,transform:i,dataSource:a=Y.DEFAULT_DATA_SOURCE_KEY}=e,{addChart:o}=K.useContext(hl),{ready:s,form:l,enabled:c}=K.useContext(zr),{getFilter:u,hasFilter:f,appendFilter:d}=as(),h=he.useFieldSchema(),p=Y.useAPIClient(),[v,g]=K.useState(10),y=se({pageSize:v,setPageSize:g},n),m=Y.useRequest((b,x,w,O)=>new Promise((_,S)=>{var M;if(!(x&&((M=w==null?void 0:w.measures)!=null&&M.length))||c&&!l)return _(void 0);const k=u(),E=!O&&f({dataSource:b,collection:x,query:w},k)?d({dataSource:b,collection:x,query:w},k):w;p.request({url:"charts:query",method:"POST",data:_e(se({uid:h==null?void 0:h["x-uid"],dataSource:b,collection:x},E),{filter:G0(E.filter),dimensions:((w==null?void 0:w.dimensions)||[]).map(P=>{const A=se({},P);if(P.format&&!P.alias){const{alias:L}=ru(P.field);A.alias=L}return A}),measures:((w==null?void 0:w.measures)||[]).map(P=>{const A=se({},P);if(P.aggregation&&!P.alias){const{alias:L}=ru(P.field);A.alias=L}return A})})}).then(P=>{var A;_((A=P==null?void 0:P.data)==null?void 0:A.data)}).finally(()=>{!O&&(h!=null&&h["x-uid"])&&o(h==null?void 0:h["x-uid"],{dataSource:b,collection:x,service:m,query:w})}).catch(S)}),{defaultParams:[a,r,t],ready:s&&(!c||!!l)});return G.jsx(Y.CollectionManagerProvider,{dataSource:a,children:G.jsx(Y.MaybeCollectionProvider,{collection:r,children:G.jsx(Me.ConfigProvider,{card:{style:{boxShadow:"none"}},children:G.jsx(bi.Provider,{value:{dataSource:a,collection:r,config:y,transform:i,service:m,query:t},children:e.children})})})})},{Paragraph:a6,Text:o6}=Me.Typography,H0=e=>{const{t}=mt(),n=K.useContext(bi),{config:r,transform:i,dataSource:a,collection:o,service:s,data:l}=n,c=is(a,o),u=c_(l,a,o),f=(r==null?void 0:r.general)||{},d=(r==null?void 0:r.advanced)||{},h=Y.useAPIClient(),p=K8(r==null?void 0:r.chartType),v=h.auth.getLocale(),g=m6(i,v),y=p==null?void 0:p.getProps({data:u,general:f,advanced:d,fieldProps:Object.keys(u[0]||{}).reduce((b,x)=>{if(!b[x]){const w=Jd(c,x.split(".")),O=g[x];b[x]={label:(w==null?void 0:w.label)||x,transformer:O,interface:w==null?void 0:w.interface}}return b},{}),ctx:n}),m=p==null?void 0:p.Component;return p?!(u&&u.length)&&!s.loading?G.jsx(Me.Empty,{image:Me.Empty.PRESENTED_IMAGE_SIMPLE,description:t("No data")}):G.jsx(Me.Spin,{spinning:s.loading,children:G.jsx(a_,{onError:b=>{var x;(x=window==null?void 0:window.Sentry)==null||x.captureException(b),console.error(b)},FallbackComponent:s6,children:G.jsx(m,se({},y))})}):G.jsx(Me.Empty,{image:Me.Empty.PRESENTED_IMAGE_SIMPLE,description:t("Please configure chart")})};H0.Designer=function(){const{t}=mt(),{setVisible:n,setCurrent:r}=K.useContext(Yi),{removeChart:i}=K.useContext(hl),{service:a}=K.useContext(bi),o=he.useField(),s=he.useFieldSchema(),{insertAdjacent:l}=Y.useDesignable(),c=Y.useDataSource(),{name:u,title:f}=Y.useCollection_deprecated();return G.jsxs(Y.GeneralSchemaDesigner,{disableInitializer:!0,title:f||u,children:[G.jsx(Y.SchemaSettingsItem,{title:"Configure",onClick:()=>$r(this,null,function*(){r({schema:s,field:o,dataSource:c.key,collection:u,service:a,data:a.data}),n(!0)}),children:t("Configure")},"configure"),G.jsx(Y.SchemaSettingsItem,{title:"Duplicate",onClick:()=>l("afterEnd",Y.gridRowColWrap(o_(s==null?void 0:s["x-decorator-props"]))),children:t("Duplicate")},"duplicate"),G.jsx(Y.SchemaSettingsBlockTitleItem,{}),G.jsx(Y.SchemaSettingsDivider,{}),G.jsx(Y.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"},confirm:{onOk:()=>{i(s["x-uid"])}}})]})};const s6=({error:e})=>{const{t}=mt();return G.jsx("div",{style:{backgroundColor:"white"},children:G.jsx(Me.Result,{status:"error",title:t("Render Failed"),subTitle:t("Please check the configuration."),children:G.jsx(a6,{copyable:!0,children:G.jsx(o6,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center"},children:e.message})})})})},iu=e=>{const{current:t}=K.useContext(Yi),{dataSource:n=e||Y.DEFAULT_DATA_SOURCE_KEY,collection:r}=t||{},i=Y.useDataSourceManager(),a=i.getDataSource(n),o=i.collectionFieldInterfaceManager;return{cm:a==null?void 0:a.collectionManager,fim:o,collection:r}},l6=e=>(e||[]).filter(n=>n.interface).map(n=>{var r;return _e(se({},n),{key:n.name,label:((r=n.uiSchema)==null?void 0:r.title)||n.name,value:n.name})}),is=(e,t)=>{const{t:n}=rs.useTranslation(),{cm:r,fim:i,collection:a}=iu(e),o=r.getCollectionFields(t||a),s=l6(o);return K.useMemo(()=>s.map(l=>{var d,h,p,v;const c=(d=i.getFieldInterface(l.interface))==null?void 0:d.filterable,u=he.Schema.compile(((h=l.uiSchema)==null?void 0:h.title)||l.name,{t:n});if(!(c&&(c!=null&&c.nested||(p=c==null?void 0:c.children)!=null&&p.length)))return _e(se({},l),{label:u});let f=[];if(c!=null&&c.nested){const g=(r.getCollectionFields(l.target)||[]).filter(y=>y.interface).map(y=>{var m;return _e(se({},y),{key:`${l.name}.${y.name}`,label:`${u} / ${he.Schema.compile(((m=y.uiSchema)==null?void 0:m.title)||y.name,{t:n})}`,value:`${l.name}.${y.name}`})});f=[...f,...g]}if((v=c==null?void 0:c.children)!=null&&v.length){const g=c.children.map(y=>{var m;return _e(se({},y),{key:`${l.name}.${y.name}`,label:`${u} / ${he.Schema.compile(((m=y.schema)==null?void 0:m.title)||y.title||y.name,{t:n})}`,value:`${l.name}.${y.name}`})});f=[...f,...g]}return _e(se({},l),{label:u,targetFields:f})}),[s])},l_=e=>t=>{const n=t.query("query").get("value")||{},r=pl(e,n);t.dataSource=r},c6=e=>t=>{var a;const n=t.query(".field").get("value");if(!n){t.dataSource=[];return}let r=[];switch((a=Jd(e,n))==null?void 0:a.interface){case"datetime":case"createdAt":case"updatedAt":r=Y0.datetime;break;case"date":r=Y0.date;break;case"time":r=Y0.time;break;default:r=[]}t.dataSource=r},u6=()=>{const{t:e}=rs.useTranslation(),t=Y.useDataSourceManager(),{parseAction:n}=Y.useACLRoleContext(),i=t.getAllCollections({filterCollection:a=>n(`${a.name}:list`)}).filter(({key:a,isDBInstance:o})=>a===Y.DEFAULT_DATA_SOURCE_KEY||o).map(({key:a,displayName:o,collections:s})=>({value:a,label:o,children:s.map(l=>({value:l.name,label:l.title}))}));return K.useMemo(()=>he.Schema.compile(i,{t:e}),[i])},f6=(e,t)=>n=>{const r=n.query("query").get("value")||{},{measures:i=[]}=r;if(!i.some(s=>s.aggregation)){n.componentProps.fieldNames={label:"title",value:"name",children:"children"},n.dataSource=e;return}const o=pl(t,r);n.componentProps.fieldNames={},n.dataSource=o},d6=(e,t)=>n=>{const r=n.query("query").get("value")||{},{measures:i=[]}=r,a=i.some(u=>u.aggregation);let o=e;const s=[];a?(o=pl(t,r),o.forEach(u=>{s.push(u.value)})):o.forEach(u=>{const f=u.children||[];f.length||s.push(u.value||u.name),f.forEach(d=>{s.push(`${u.name}.${d.name}`)})});const c=(n.value||[]).reduce((u,f)=>{const{alias:d}=ru(f.field);return(!f.field||s.includes(d))&&u.push(f),u},[]);n.setValue(c)},c_=(e,t,n)=>{var c;const{t:r}=mt(),{service:i,query:a}=K.useContext(bi),o=is(t,n),s=he.useForm(),l=pl(o,((c=s==null?void 0:s.values)==null?void 0:c.query)||a);return e6(l,(i==null?void 0:i.data)||e||[],{t:r})},h6=(e,t,n=2,r=[])=>{const{cm:i,fim:a,collection:o}=iu(e),l=i.getCollectionFields(t||o).filter(d=>!r.includes(d.interface)),c=(d,h,p)=>{var x;if(!d.interface)return;const v=a.getFieldInterface(d.interface);if(!(v!=null&&v.filterable))return;const{nested:g,children:y}=v.filterable,m=p?`${p}.${d.name}`:d.name,b=_e(se({},d),{name:d.name,title:((x=d==null?void 0:d.uiSchema)==null?void 0:x.title)||d.name,schema:d==null?void 0:d.uiSchema,key:m});if(!(d.target&&h>n)){if(h>n)return b;if(y!=null&&y.length&&(b.children=y.map(w=>_e(se({},w),{key:`${d.name}.${w.name}`}))),g){const w=i.getCollectionFields(d.target).filter(_=>!r.includes(_.interface)),O=u(w,h+1,d.name).filter(Boolean);b.children=b.children||[],b.children.push(...O)}return b}},u=(d,h,p)=>{const v=[];return d.forEach(g=>{const y=c(g,h,p);y&&v.push(y)}),v};return u(l,1)},p6=(e,t)=>{const{cm:n,fim:r,collection:i}=iu(e);return K.useMemo(()=>{const a=n.getCollectionFields(t||i),o=(c,u)=>{var g,y;if(!c.interface)return;const f=r.getFieldInterface(c.interface);if(!(f!=null&&f.filterable))return;const{nested:d,children:h,operators:p}=f.filterable,v={name:c.name,title:((g=c==null?void 0:c.uiSchema)==null?void 0:g.title)||c.name,schema:c==null?void 0:c.uiSchema,operators:((y=p==null?void 0:p.filter)==null?void 0:y.call(p,m=>!(m!=null&&m.visible)||m.visible(c)))||[],interface:c.interface};if(!(c.target&&u>2)){if(u>2)return v;if(h!=null&&h.length&&(v.children=h),d){const m=n.getCollectionFields(c.target),b=s(m,u+1).filter(Boolean);v.children=v.children||[],v.children.push(...b)}return v}},s=(c,u)=>{const f=[];return c.forEach(d=>{const h=o(d,u);h&&f.push(h)}),f};return s(a,1)},[t,n,r])},au={datetime:{YYYY:e=>Cn(e).format("YYYY"),MM:e=>Cn(e).format("MM"),DD:e=>Cn(e).format("DD"),"YYYY-MM":e=>Cn(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Cn(e).format("YYYY-MM-DD"),"YYYY-MM-DD hh:mm":e=>Cn(e).format("YYYY-MM-DD hh:mm"),"YYYY-MM-DD hh:mm:ss":e=>Cn(e).format("YYYY-MM-DD hh:mm:ss")},date:{YYYY:e=>Cn(e).format("YYYY"),MM:e=>Cn(e).format("MM"),DD:e=>Cn(e).format("DD"),"YYYY-MM":e=>Cn(e).format("YYYY-MM"),"YYYY-MM-DD":e=>Cn(e).format("YYYY-MM-DD")},time:{"hh:mm:ss":e=>Cn(e).format("hh:mm:ss"),"hh:mm":e=>Cn(e).format("hh:mm"),hh:e=>Cn(e).format("hh")},number:{Percent:e=>new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),Currency:(e,t="en-US")=>{const n={"zh-CN":"CNY","en-US":"USD","ja-JP":"JPY","ko-KR":"KRW","pt-BR":"BRL","ru-RU":"RUB","tr-TR":"TRY","es-ES":"EUR"}[t];return new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e)},CurrencyNegative:(e,t="en-US")=>{const n={"zh-CN":"CNY","en-US":"USD","ja-JP":"JPY","ko-KR":"KRW","pt-BR":"BRL","ru-RU":"RUB","tr-TR":"TRY","es-ES":"EUR"}[t];return e&&(e=-e),new Intl.NumberFormat(t,{style:"currency",currency:n}).format(e)},Exponential:e=>(+e).toExponential(),Abbreviation:(e,t="en-US")=>new Intl.NumberFormat(t,{notation:"compact"}).format(e),Decimal:{TwoDigits:e=>new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(e),ThreeDigits:e=>new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:3,maximumFractionDigits:3}).format(e),FourDigits:e=>new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:4,maximumFractionDigits:4}).format(e)}},array:{title:e=>G.jsxs(Me.Popover,{content:G.jsx(Me.Space,{children:e.map(t=>G.jsx(Me.Tag,{children:t},t))}),children:[G.jsx(Me.Space,{children:e.slice(0,2).map(t=>G.jsx(Me.Tag,{children:t},t))}),e.length>2?"...":""]})}},v6=e=>t=>{const n=t.query(".field").get("value"),r=t.query("query").get("value")||{},a=pl(e,r).find(f=>f.value===n),o=Object.keys(au);t.dataSource=o.map(f=>({label:Ve(f),value:f}));const s={createdAt:"datetime",updatedAt:"datetime",double:"number",integer:"number",percent:"number"},l=a==null?void 0:a.interface,c=a==null?void 0:a.type,u=s[l]||s[c]||c;if(o.includes(u)){t.setState({value:u,disabled:!0});return}t.setState({disabled:!1})},g6=e=>{const t=e.query(".type").get("value");if(!t){e.dataSource=[];return}const n=Object.keys(au[t]||{}).map(r=>({label:Ve(r),value:r}));e.dataSource=n},y6=e=>{const t=e.query(".type").get("value"),n=e.query(".format").get("value");if(!n||!t||n!="Decimal")e.dataSource=[];else{const r=Object.keys(au[t][n]||{}).map(i=>({label:Ve(i),value:i}));e.dataSource=r}},m6=(e,t="en-US")=>(e||[]).filter(n=>{if(n.format)if(n.format=="Decimal"){if(n.specific)return n.field&&n.type&&n.format&&n.specific}else return n.field&&n.type&&n.format}).reduce((n,r)=>{const i=r.specific?au[r.type][r.format][r.specific]:au[r.type][r.format];return i&&(n[r.field]=a=>i(a,t)),n},{});function ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var b6=function(t){return x6(t)&&!w6(t)};function x6(e){return!!e&&typeof e=="object"}function w6(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||S6(e)}var O6=typeof Symbol=="function"&&Symbol.for,_6=O6?Symbol.for("react.element"):60103;function S6(e){return e.$$typeof===_6}function k6(e){return Array.isArray(e)?[]:{}}function su(e,t){return t.clone!==!1&&t.isMergeableObject(e)?vl(k6(e),e,t):e}function E6(e,t,n){return e.concat(t).map(function(r){return su(r,n)})}function M6(e,t){if(!t.customMerge)return vl;var n=t.customMerge(e);return typeof n=="function"?n:vl}function A6(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function u_(e){return Object.keys(e).concat(A6(e))}function f_(e,t){try{return t in e}catch(n){return!1}}function P6(e,t){return f_(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function C6(e,t,n){var r={};return n.isMergeableObject(e)&&u_(e).forEach(function(i){r[i]=su(e[i],n)}),u_(t).forEach(function(i){P6(e,i)||(f_(e,i)&&n.isMergeableObject(t[i])?r[i]=M6(i,n)(e[i],t[i],n):r[i]=su(t[i],n))}),r}function vl(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||E6,n.isMergeableObject=n.isMergeableObject||b6,n.cloneUnlessOtherwiseSpecified=su;var r=Array.isArray(t),i=Array.isArray(e),a=r===i;return a?r?n.arrayMerge(e,t,n):C6(e,t,n):su(t,n)}vl.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return vl(r,i,n)},{})};var T6=vl,L6=T6;const N6=ou(L6),I6=()=>({title:'{{t("Options")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"object","x-decorator":"ArrayItems.Item",properties:{space:{type:"void","x-component":"Space",properties:{label:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option label")}}'},required:!0},value:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Option value")}}'},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:"Add","x-component":"ArrayItems.Addition"}}}),V0=(e,t)=>{const n={type:"boolean","x-content":'{{ t("Show time") }}',"x-decorator":"FormItem","x-component":"Checkbox"},r={type:"string",title:'{{t("Date format")}}',"x-component":"Radio.Group","x-decorator":"FormItem",default:"YYYY-MM-DD",enum:[{label:'{{t("Year/Month/Day")}}',value:"YYYY/MM/DD"},{label:'{{t("Year-Month-Day")}}',value:"YYYY-MM-DD"},{label:'{{t("Day/Month/Year")}}',value:"DD/MM/YYYY"}]},i=I6();return{DatePicker:{type:"object",properties:{dateFormat:r,showTime:n}},"DatePicker.RangePicker":{type:"object",properties:{dateFormat:r,showTime:n}},Select:{type:"object",properties:{mode:{type:"string",enum:[{label:'{{ t("Single select") }}',value:""},{label:'{{ t("Multiple select") }}',value:"multiple"}],"x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:""}},options:i}},"Checkbox.Group":{type:"object",properties:{options:i}},"Radio.Group":{type:"object",properties:{options:i}},AssociationCascader:{type:"object",properties:{collection:{type:"string",title:'{{t("Field collection")}}',"x-decorator":"FormItem","x-component":"Select",enum:t},associationField:{type:"string",title:'{{t("Field Association")}}',"x-visible":!1,"x-decorator":"FormItem","x-component":"Select","x-reactions":{dependencies:["component",".collection"],fulfill:{schema:{"x-visible":"{{$deps[0]=== 'AssociationCascader' && $deps[1]}}",enum:"{{useCollectionField($deps[1])}}"}}}}}}}[e]},j6=(e,t)=>{if(!e)return e;if(Cn.isDayjs(e))return t.showTime||(e=e.startOf("day")),dl.moment2str(e,t);if(Array.isArray(e)&&e.length&&Cn.isDayjs(e[0])){let n=e[0],r=e[1];return t.showTime&&(n=n.startOf("day"),r=r.endOf("day")),[n.toISOString(),r.toISOString()]}return e},d_=(e,t)=>$r(this,null,function*(){const n=e.initialValue;if(!(typeof n=="string"&&(n==null?void 0:n.startsWith("{{$"))&&(n==null?void 0:n.endsWith("}}")))||!t)e.setValue(n),e.setInitialValue(n);else{e.loading=!0;const i=yield t.parseVariable(n),a=j6(i,e.componentProps);e.setValue(a),e.setInitialValue(a),e.loading=!1}}),eh="-",lu=(e,t)=>e?`${e}${eh}${t}`:t,h_=e=>{const[t,n]=e.split(eh);return n?{dataSource:t,fieldName:n}:{dataSource:Y.DEFAULT_DATA_SOURCE_KEY,fieldName:t}},U0=(e,t,n)=>he.Schema.isSchemaInstance(e)?e.reduceProperties((r,i)=>{let a=i[t];if(a.includes(eh)||(a=`${Y.DEFAULT_DATA_SOURCE_KEY}${eh}${a}`),a===n)return i;if(i["x-component"]!=="Action.Container"&&i["x-component"]!=="AssociationField.Viewer"){const o=U0(i,t,n);if(o)return o}return r}):null,X0=()=>{const{charts:e}=K.useContext(hl),t=K.useMemo(()=>Object.values(e).filter(i=>i).reduce((i,a)=>{var l;const{dataSource:o,collection:s}=a;return(l=i[o])!=null&&l.includes(s)||(i[o]=[...i[o]||[],s]),i},{}),[e]),n=K.useMemo(()=>Object.keys(t).length>1,[t]),r=K.useCallback((i,a)=>{var o;return((o=t[i])==null?void 0:o.includes(a))||!1},[t]);return{chartCollections:t,showDataSource:n,getIsChartCollectionExists:r}},as=()=>{const e=Y.useDataSourceManager(),{charts:t}=K.useContext(hl),{fieldSchema:n}=Y.useActionContext(),r=n==null?void 0:n["x-action"],{fields:i,form:a}=K.useContext(zr),o=({dataSource:h,collection:p,cm:v,fim:g})=>{const y=v.getCollectionFields(p.name),m=(_,S,k,E)=>{var I,C,j,D,F;const M=((I=_.uiSchema)==null?void 0:I.title)||_.name,P=g.getFieldInterface(_.interface),A=(j=(C=P==null?void 0:P.filterable)==null?void 0:C.operators)==null?void 0:j[0],L=v.getCollection(_.target);S=S?`${S} / ${M}`:M;let N={type:"string",title:S,name:`${k}.${_.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-component":"CollectionField","x-decorator":"ChartFilterFormItem","x-data-source":h,"x-collection-field":`${E}.${_.name}`,"x-component-props":_e(se({},(D=_.uiSchema)==null?void 0:D["x-component-props"]),{"filter-operator":A})};if(_.interface==="formula"){const R=n6(_.dataType)||"Input";N=_e(se({},N),{"x-component":R})}return["oho","o2m"].includes(_.interface)&&B.set(N,"x-component-props.useOriginalFilter",!0),{key:`${k}.${_.name}`,name:_.name,type:"item",title:((F=_==null?void 0:_.uiSchema)==null?void 0:F.title)||_.name,Component:"CollectionFieldInitializer",find:U0,remove:(R,z)=>{z(R,{breakRemoveOn:{"x-component":"Grid"}})},schemaInitialize:R=>{var z;(z=P==null?void 0:P.schemaInitialize)==null||z.call(P,R,{field:_,block:"FilterForm",readPretty:a.readPretty,action:r,targetCollection:L})},schema:N}},b=(_,S,k,E)=>{var N;const M=((N=_.uiSchema)==null?void 0:N.title)||_.name;S=S?`${S} / ${M}`:M;const P=_.operators[0];let A=_e(se({type:"string",name:`${k}.${_.name}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-data-source":h,"x-collection-field":`${E}.${_.name}`},_.schema),{title:S,"x-component-props":{"filter-operator":P}});return P!=null&&P.noValue&&(A=_e(se({},A),{"x-component":"ChartFilterCheckbox","x-component-props":_e(se({},A["x-component-props"]),{content:he.Schema.compile(P.label,{t:Y.i18n.t})})})),{key:`${k}.${_.name}`,name:_.name,type:"item",title:_.title||_.name,Component:"CollectionFieldInitializer",find:U0,remove:(T,I)=>{I(T,{breakRemoveOn:{"x-component":"Grid"}})},schema:A}},x=(_,S,k,E,M)=>{var I,C,j;if(!_.interface||_.isForeignKey)return;const P=g.getFieldInterface(_.interface);if(!(P!=null&&P.filterable))return;const{nested:A,children:L}=P.filterable,N=((I=_.uiSchema)==null?void 0:I.title)||_.name,T=m(_,k,E,M);if(!(_.target&&S>2)){if(k=k?`${k} / ${N}`:N,L!=null&&L.length&&!["chinaRegion","createdBy","updatedBy","attachment"].includes(_.interface)){const D=L.map(F=>b(F,k,`${E}.${_.name}`,`${M}.${_.name}`));return{key:`${E}.${_.name}`,name:_.name,type:"subMenu",title:((C=_==null?void 0:_.uiSchema)==null?void 0:C.title)||_.name,children:D}}if(!S||S>2)return T;if(A){const F=v.getCollectionFields(_.target).map(R=>x(R,S+1,"",`${E}.${_.name}`,`${M}.${_.name}`));return{key:`${E}.${_.name}`,name:_.name,type:"subMenu",title:((j=_==null?void 0:_.uiSchema)==null?void 0:j.title)||_.name,children:F.filter(Boolean)}}return T}},w=[],O=[];return y.forEach(_=>{const S=_.interface,k=x(_,0,"",lu(h,p.name),p.name);if(k&&w.push(k),["m2o"].includes(S)){const E=x(_,1,"",lu(h,p.name),p.name);E&&O.push(E)}}),O.length&&w.push({name:"divider",type:"divider"},{name:"displayAssociationFields",type:"itemGroup",title:Y.i18n.t("Display association fields"),children:O}),w},s=()=>{const h=(a==null?void 0:a.values)||{},p={};return Object.entries(i).filter(([v,g])=>g).forEach(([v,g])=>{const{operator:y}=g||{},{dataSource:m,fieldName:b}=h_(v);let x=b;const _=e.getDataSource(m).collectionManager.getCollectionField(x);if(_!=null&&_.target){const P=_.targetKey||"id";x=`${x}.${P}`,v=`${v}.${P}`}const[S,...k]=x.split("."),E=t6(h,v),M=(y==null?void 0:y.value)||"$eq";if(S!=="custom"){const P=lu(m,S);p[P]=p[P]||{$and:[]};const A={};B.set(A,k.join("."),{[M]:E}),p[P].$and.push(A)}else p[S]=p[S]||{},p[S][`$nFilter.${k.join(".")}`]=E}),p},l=(h,p)=>{if(!h)return!1;const{dataSource:v,collection:g,query:y}=h,{parameters:m}=dl.parse(y.filter||"");return p[lu(v,g)]||p.custom&&(m==null?void 0:m.find(({key:b})=>B.has(p.custom,b)))},c=(h,p)=>{const{dataSource:v,collection:g,query:y}=h;let m=se({},y);const b=se({},m.filter||{});let x={};const w=dl.parse(b),{parameters:O}=w;return p.custom&&(O!=null&&O.find(_=>p.custom[_.key]))&&(x=w(p.custom)),x=N6(b,x),m=_e(se({},m),{filter:{$and:[x,p[lu(v,g)]]}}),m},u=()=>$r(this,null,function*(){const h=s(),p=Object.values(t).filter(v=>l(v,h)).map(v=>()=>$r(this,null,function*(){const{dataSource:g,service:y,collection:m}=v;return yield y.runAsync(g,m,c(v,h),!0)}));return yield Promise.all(p.map(v=>v()))}),f=()=>$r(this,null,function*(){const h=Object.values(t).filter(p=>p).map(p=>()=>$r(this,null,function*(){const{service:v,dataSource:g,collection:y,query:m}=p;yield v.runAsync(g,y,m,!0)}));yield Promise.all(h.map(p=>p()))}),d=Bi.useMemoizedFn(h=>h.split(" / ").map(p=>Y.i18n.t(he.Schema.compile(p,{t:Y.i18n.t}))).join(" / "));return{filter:u,refresh:f,getChartFilterFields:o,getFilter:s,hasFilter:l,appendFilter:c,getTranslatedTitle:d}},D6=()=>{const{t:e}=mt(),t=Bi.useMemoizedFn(e),{enabled:n,fields:r}=K.useContext(zr),i=Object.entries(r).filter(([o,s])=>o.startsWith("custom.")&&s).map(([o,{title:s}])=>{const l=o.replace(/^custom\./,"");return{key:l,value:l,label:s}}),a=K.useMemo(()=>({label:t("Current filter"),value:"$nFilter",key:"$nFilter",children:i}),[i,t]);return!n||!i.length?null:a},p_=()=>{const{t:e}=mt(),{chartCollections:t}=X0(),n=Y.useDataSourceManager(),r=n.collectionFieldInterfaceManager,{values:i}=v_(),a=(o,s,l)=>{var d,h,p;if(!s.interface)return;const c=r.getFieldInterface(s.interface);if(!(c!=null&&c.filterable))return;const{nested:u}=c.filterable,f={value:s.name,label:e(((d=s==null?void 0:s.uiSchema)==null?void 0:d.title)||s.name)};if(!(s.target&&l>2)){if(l>2)return f;if(u){const g=o.getCollectionFields(s.target).map(y=>a(o,y,l+1));return{value:s.name,label:e(((h=s==null?void 0:s.uiSchema)==null?void 0:h.title)||s.name),children:g.filter(y=>y)}}if(!(!i.includes((p=s.uiSchema)==null?void 0:p["x-component"])&&!i.includes(s.interface)))return f}};return K.useMemo(()=>Object.entries(t).map(([s,l])=>{const c=n.getDataSource(s);return{value:s,label:he.Schema.compile(c.displayName,{t:e}),children:l.map(u=>{const f=c.collectionManager,d=f.getCollection(u),p=f.getCollectionFields(u).map(v=>a(f,v,1)).filter(v=>v);return{value:u,label:he.Schema.compile(d.title,{t:e}),children:p}})}}),[t])},v_=()=>{const{t:e}=mt(),t=[{label:e("Input"),value:"Input"},{label:e("Number"),value:"InputNumber"},{label:e("Date"),value:"DatePicker"},{label:e("Date range"),value:"DatePicker.RangePicker"},{label:e("Time"),value:"TimePicker"},{label:e("Time range"),value:"TimePicker.RangePicker"},{label:e("Select"),value:"Select"},{label:e("Radio group"),value:"Radio.Group"},{label:e("Checkbox group"),value:"Checkbox.Group"},{label:e("AssociationCascader"),value:"AssociationCascader"}];return{options:t,values:t.map(n=>n.value)}},F6=(e,t)=>{const{t:n}=mt(),r=Y.useDataSourceManager(),{showDataSource:i}=X0();return K.useMemo(()=>{var p;const a=r.getDataSource(e);if(!a)return;const o=a.collectionManager;if(!t)return;const{fieldName:s}=h_(t),[l,...c]=s.split(".");if(!(c!=null&&c.length))return;const u=o.getCollection(l);let f=l,d,h=he.Schema.compile(u==null?void 0:u.title,{t:n});for(;f&&c.length>0;){const v=c.shift();d=o.getCollectionField(`${f}.${v}`);const g=((p=d==null?void 0:d.uiSchema)==null?void 0:p.title)||(d==null?void 0:d.name);g&&(h+=` / ${he.Schema.compile(g,{t:n})}`),d!=null&&d.target?f=d.target:f=null}return i?`${he.Schema.compile(a.displayName,{t:n})} > ${h}`:h},[t,e,i])},R6=()=>{const e=he.useField(),{operator:t,schema:n}=e.data||{},{currentUserSettings:r}=Y.useCurrentUserVariable({collectionField:{uiSchema:n},uiSchema:n}),{datetimeSettings:i}=Y.useDatetimeVariable({operator:t,schema:n}),a=D6(),o=K.useMemo(()=>[r,i,a].filter(Boolean),[i,r,a]);return!t||!n?[]:o},Yi=K.createContext({visible:!0});Yi.displayName="ChartConfigContext";const $6=e=>{var s;const{insertAdjacent:t}=Y.useDesignable(),[n,r]=K.useState(!1),[i,a]=K.useState({}),{token:o}=Me.theme.useToken();return G.jsxs(Yi.Provider,{value:{visible:n,setVisible:r,current:i,setCurrent:a},children:[G.jsx("div",{className:Y.css`
2
+ .ant-card {
3
+ border: ${o.lineWidth}px ${o.lineType} ${o.colorBorderSecondary};
4
+ }
5
+ `,children:e.children}),G.jsx(s_,_e(se({},(s=i.field)==null?void 0:s.decoratorProps),{children:G.jsx(xi,{insert:(l,c)=>t("beforeEnd",l,c)})}))]})};function z6(e){const{value:t,onChange:n,renderSchemaComponent:r}=e,i=R6();return G.jsx(Y.Variable.Input,{value:t,onChange:n,scope:i,children:r()})}const th=(e={},t={})=>_e(se({type:"array","x-decorator":"FormItem","x-component":"ArrayItems"},t),{items:{type:"object",properties:{space:{type:"void","x-component":"Space",properties:_e(se({sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"}},e),{remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}})}}},properties:{add:{type:"void",title:'{{t("Add field")}}',"x-component":"ArrayItems.Addition"}}}),B6=e=>({type:"void",properties:{config:{type:"object",properties:{chartType:{type:"string",title:'{{t("Chart type")}}',"x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Please select a chart type.")}}'},enum:"{{ chartTypes }}"},[he.uid()]:{type:"void",properties:{general:e}},[he.uid()]:{type:"void",properties:{advanced:{type:"json",title:'{{t("JSON config")}}',"x-decorator":"FormItem","x-decorator-props":{extra:Ve("Same properties set in the form above will be overwritten by this JSON config.")},"x-component":"Input.JSON","x-component-props":{autoSize:{minRows:3}}}}},reference:{type:"string","x-reactions":{dependencies:[".chartType"],fulfill:{schema:{"x-content":"{{ getReference($deps[0]) }}"}}}}}}}}),Y6={type:"void",properties:{settings:{type:"void",properties:{collection:{title:'{{t("Collection")}}',type:"string","x-decorator":"FormItem","x-component":"Cascader",enum:"{{ collectionOptions }}","x-component-props":{onChange:"{{ onCollectionChange }}",placeholder:'{{t("Collection")}}'}}}},query:{type:"object",properties:{builder:{type:"void",properties:{collapse:{type:"void","x-decorator":"FormItem","x-component":"FormCollapse","x-component-props":{formCollapse:"{{formCollapse}}"},properties:{pane1:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Ve("Measures"),key:"measures"},properties:{measures:th({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},aggregation:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Aggregation")}}'},enum:[{label:'{{t("Sum")}}',value:"sum"},{label:'{{t("Count")}}',value:"count"},{label:'{{t("Avg")}}',value:"avg"},{label:'{{t("Max")}}',value:"max"},{label:'{{t("Min")}}',value:"min"},{label:"array_agg",value:"array_agg"}]},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{required:!0,"x-component-props":{style:{overflow:"auto"}}})}},pane2:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Ve("Dimensions"),key:"dimensions"},properties:{dimensions:th({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}',fieldNames:{label:"title",value:"name",children:"children"}},enum:"{{ fieldOptions }}",required:!0},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}',style:{maxWidth:"120px"}},"x-reactions":"{{ useFormatterOptions }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},alias:{type:"string","x-decorator":"FormItem","x-component":"Input","x-component-props":{placeholder:'{{t("Alias")}}',style:{minWidth:"100px"}}}},{"x-component-props":{style:{overflow:"auto"}}})}},pane3:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Ve("Filter"),key:"filter"},properties:{filter:{type:"object","x-decorator":"FormItem","x-decorator-props":{style:{overflow:"auto"}},enum:"{{ filterOptions }}","x-component":"Filter","x-component-props":{dynamicComponent:"FilterDynamicComponent"}}}},pane4:{type:"void","x-component":"FormCollapse.CollapsePanel","x-component-props":{header:Ve("Sort"),key:"sort"},properties:{orders:th({field:{type:"string","x-decorator":"FormItem","x-component":"Cascader","x-component-props":{placeholder:'{{t("Field")}}'},"x-reactions":"{{ useOrderOptions }}",required:!0},order:{type:"string","x-decorator":"FormItem","x-component":"Radio.Group","x-component-props":{defaultValue:"ASC",optionType:"button",style:{width:"128px"}},enum:["ASC","DESC"]}},{"x-reactions":"{{ useOrderReaction }}","x-component-props":{style:{overflow:"auto"}}})}}}},limit:{title:'{{t("Limit")}}',type:"number","x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:2e3,min:1,style:{width:"100px"}}}}},cache:{type:"object",properties:{enabled:{type:"boolean",title:'{{t("Enable cache")}}',"x-decorator":"FormItem","x-component":"Switch"},ttl:{type:"number",title:'{{t("TTL (second)")}}',"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{defaultValue:60,min:1,style:{width:"100px"}}}}}}}}},W6={type:"void",properties:{transform:th({field:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Field")}}',style:{maxWidth:"100px"}},"x-reactions":"{{ useChartFields }}"},type:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Type")}}'},"x-reactions":"{{ useFieldTypeOptions }}"},format:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}'},"x-reactions":"{{ useTransformers }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"},specific:{type:"string","x-decorator":"FormItem","x-component":"Select","x-component-props":{placeholder:'{{t("Format")}}'},"x-reactions":"{{ useTransformersDecimal }}","x-visible":"{{ $self.dataSource && $self.dataSource.length }}"}},{"x-decorator-props":{style:{width:"50%"}}})}},{Paragraph:p0e,Text:G6}=Me.Typography,xi=e=>{const{t}=mt(),{service:n}=K.useContext(bi),{visible:r,setVisible:i,current:a}=K.useContext(Yi),{schema:o,field:s,dataSource:l,collection:c,initialValues:u}=a||{},{dn:f}=Y.useDesignable(),{modal:d}=Me.App.useApp(),{insert:h}=e,p=i_(),v=is(l,c),g=(M=!1)=>{var j;if(!_.modified)return;const P=(j=_.values.config)==null?void 0:j.chartType;if(!P)return;const A=p[P];if(!(A==null?void 0:A.init)){M&&(_.values.config.general={},_.values.config.advanced={});return}const N=_.values.query,T=pl(v,N),{general:I,advanced:C}=A.init(T,N);(I||M)&&(_.values.config.general=I),(C||M)&&(_.values.config.advanced=C||{})},[y,m]=K.useState([]),[b,x]=K.useState([]),w=(M,P)=>{var N,T;const A=((N=M.values.query)==null?void 0:N.measures.filter(I=>I.field))||[],L=((T=M.values.query)==null?void 0:T.dimensions.filter(I=>I.field))||[];B.isEqual(A,y)&&B.isEqual(L,b)||(P==null||P(),m(B.cloneDeep(A)),x(B.cloneDeep(L)))},O=q8(),_=K.useMemo(()=>he.createForm({values:_e(se({config:{chartType:O}},u||(s==null?void 0:s.decoratorProps)),{collection:[l,c]}),effects:M=>{he.onFieldChange("config.chartType",()=>g(!0)),he.onFormInit(()=>w(M))}}),[s,r,l,c]),S=()=>G.jsx(Me.Button,{type:"link",loading:n==null?void 0:n.loading,icon:G.jsx(Sr.RightSquareOutlined,{}),onClick:()=>$r(this,null,function*(){const M=_.query("query").take();try{yield M==null?void 0:M.validate()}catch(P){return}try{yield n.runAsync(l,c,_.values.query,!0)}catch(P){console.log(P)}w(_,g)}),children:t("Run query")}),k=K.useRef(null),E=K.useRef(null);return K.useEffect(()=>{var M;r&&n.run(c,(M=s==null?void 0:s.decoratorProps)==null?void 0:M.query,"configure")},[r]),G.jsx(Me.Modal,{title:t("Configure chart"),open:r,onOk:()=>{const{query:M,config:P,transform:A,mode:L}=_.values,N=()=>{var I;i(!1),(I=a.service)==null||I.run(l,c,M),k.current.scrollTop=0,E.current.scrollTop=0,n.mutate(void 0)},T={query:M,config:P,dataSource:l,collection:c,transform:A,mode:L||"builder"};if(o&&o["x-uid"]){o["x-decorator-props"]=T,s.decoratorProps=T,s["x-acl-action"]=`${c}:list`,f.emit("patch",{schema:o}),N();return}h(Y.gridRowColWrap(o_(T)),{onSuccess:N})},onCancel:()=>{d.confirm({title:t("Are you sure to cancel?"),content:t("You changes are not saved. If you click OK, your changes will be lost."),okButtonProps:{danger:!0},onOk:()=>{i(!1),k.current.scrollTop=0,E.current.scrollTop=0,n.mutate(void 0)}})},width:"95%",styles:{body:{background:"rgba(128, 128, 128, 0.08)"}},children:G.jsx(Y.FormProvider,{form:_,children:G.jsx(It.FormLayout,{layout:"vertical",children:G.jsxs(Me.Row,{gutter:8,children:[G.jsx(Me.Col,{span:7,children:G.jsx(Me.Card,{style:{height:"calc(100vh - 300px)",overflow:"auto",margin:"12px 0 12px 12px"},ref:k,children:G.jsx(Me.Tabs,{tabBarExtraContent:G.jsx(S,{}),items:[{label:t("Query"),key:"query",children:G.jsx(xi.Query,{})},{label:t("Data"),key:"data",children:G.jsx(xi.Data,{})}]})})}),G.jsx(Me.Col,{span:6,children:G.jsx(Me.Card,{style:{height:"calc(100vh - 300px)",overflow:"auto",margin:"12px 3px 12px 3px"},ref:E,children:G.jsx(Me.Tabs,{items:[{label:t("Chart"),key:"chart",children:G.jsx(xi.Config,{})},{label:t("Transform"),key:"transform",children:G.jsx(xi.Transform,{})}]})})}),G.jsx(Me.Col,{span:11,children:G.jsx(Me.Card,{style:{margin:"12px 12px 12px 0"},children:G.jsx(xi.Renderer,{})})})]})})})})};xi.Renderer=function(t){const{current:n}=K.useContext(Yi),{collection:r,data:i}=n||{},{service:a}=K.useContext(bi);return G.jsx(he.FormConsumer,{children:o=>{const s=B.cloneDeep(o.values.config),l=B.cloneDeep(o.values.transform);return G.jsx(bi.Provider,{value:{collection:r,config:s,transform:l,service:a,data:i},children:G.jsx(H0,se({},t))})}})},xi.Query=function(){const{t}=mt(),n=is(),r=c6(n),i=u6(),{current:a,setCurrent:o}=K.useContext(Yi),{dataSource:s,collection:l}=a||{},c=h6(s,l,1),u=he.Schema.compile(c,{t}),f=p6(s,l),{service:d}=K.useContext(bi),h=g=>{const{schema:y,field:m}=a,[b,x]=g;o({schema:y,field:m,collection:x,dataSource:b,service:a.service,initialValues:{},data:void 0}),d.mutate(void 0)},p=It.FormCollapse.createFormCollapse(["measures","dimensions","filter","sort"]),v=()=>G.jsxs(G6,{code:!0,children:["From ",G.jsx("span",{style:{color:"#1890ff"},children:a==null?void 0:a.collection})]});return G.jsx(Y.SchemaComponent,{schema:Y6,scope:{t,formCollapse:p,fieldOptions:u,filterOptions:f,useOrderOptions:f6(u,n),collectionOptions:i,useFormatterOptions:r,onCollectionChange:h,collection:a==null?void 0:a.collection,useOrderReaction:d6(u,n)},components:{ArrayItems:It.ArrayItems,Editable:It.Editable,FormCollapse:It.FormCollapse,FormItem:It.FormItem,Space:Me.Space,Switch:It.Switch,FromSql:v,FilterDynamicComponent:z6}})},xi.Config=function(){const{t}=mt(),n=r_(),r=is(),i=i_(),a=l_(r),o=s=>{var f,d;const l=(d=(f=i[s])==null?void 0:f.getReference)==null?void 0:d.call(f);if(!l)return"";const{title:c,link:u}=l;return G.jsxs("span",{children:[t("Config reference: "),G.jsx("a",{href:u,target:"_blank",rel:"noreferrer",children:t(c)})]})};return G.jsx(he.FormConsumer,{children:s=>{var f;const l=(f=s.values.config)==null?void 0:f.chartType,c=i[l],u=(c==null?void 0:c.schema)||{};return G.jsx(Y.SchemaComponent,{schema:B6(u),scope:{t,chartTypes:n,useChartFields:a,getReference:o},components:{FormItem:It.FormItem,ArrayItems:It.ArrayItems,Space:Me.Space,AutoComplete:Y.AutoComplete}})}})},xi.Transform=function(){const{t}=mt(),n=is(),r=v6(n),i=l_(n);return G.jsx(Y.SchemaComponent,{schema:W6,components:{FormItem:It.FormItem,ArrayItems:It.ArrayItems,Space:Me.Space},scope:{useChartFields:i,useFieldTypeOptions:r,useTransformers:g6,useTransformersDecimal:y6,t}})},xi.Data=function(){var o,s,l,c;const{service:t}=K.useContext(bi),{current:n}=K.useContext(Yi),r=is(),i=c_(n==null?void 0:n.data),a=t==null?void 0:t.error;return a?G.jsx(Me.Alert,{message:"Error",type:"error",description:((c=(l=(s=(o=a==null?void 0:a.response)==null?void 0:o.data)==null?void 0:s.errors)==null?void 0:l.map)==null?void 0:c.call(l,u=>u.message).join(`
6
+ `))||a.message,showIcon:!0}):G.jsx(Me.Table,{dataSource:i.map((u,f)=>_e(se({},u),{_key:f})),rowKey:"_key",scroll:{x:"max-content"},columns:Object.keys(i[0]||{}).map(u=>{const f=Jd(r,u.split("."));return{title:(f==null?void 0:f.label)||u,dataIndex:u,key:u}}),size:"small"})};const H6=()=>{const{t:e}=mt();return G.jsx(Y.GeneralSchemaDesigner,{disableInitializer:!0,title:e("Filter"),showDataSource:!1,children:G.jsx(Y.SchemaSettingsRemove,{breakRemoveOn:{"x-component":"ChartV2Block"}})})},V6=()=>({type:"void","x-action":"filter","x-decorator":"ChartFilterBlockProvider","x-component":"CardItem","x-component-props":{size:"small"},"x-designer":"ChartFilterBlockDesigner",properties:{[he.uid()]:{type:"void","x-component":"ChartFilterForm",properties:{grid:{type:"void","x-component":"ChartFilterGrid","x-initializer":"chartFilterForm:configureFields",properties:{}},actions:{type:"void","x-initializer":"chartFilterForm:configureActions","x-component":"ActionBar","x-component-props":{layout:"one-column",style:{float:"right",marginTop:8}},properties:{}}}}}}),U6=e=>{const{collapse:{collapsed:t}}=K.useContext(zr),{token:n}=Me.theme.useToken();return G.jsx("div",{className:Y.css`
7
+ .ant-tb-grid {
8
+ overflow: hidden;
9
+ height: ${t?`${n.controlHeight*2}px`:"auto"};
10
+ }
11
+ `,children:G.jsx(Y.Grid,_e(se({},e),{children:e.children}))})},X6=()=>{var c;const{insertAdjacent:e}=Y.useDesignable(),{setEnabled:t}=K.useContext(zr),n=Y.useSchemaInitializerItem(),{remove:r,disabled:i}=n,a="x-action",o=V6(),{exists:s,remove:l}=Y.useCurrentSchema((o==null?void 0:o[a])||((c=n==null?void 0:n.schema)==null?void 0:c[a]),a,n.find,r||n.remove);return G.jsx(Y.SchemaInitializerSwitch,{icon:G.jsx(Sr.FilterOutlined,{}),checked:s,disabled:i,title:n.title,onClick:()=>{var f;if(i)return;if(s)return t(!1),l();const u=he.merge(o||{},n.schema||{});(f=n==null?void 0:n.schemaInitialize)==null||f.call(n,u),e("afterBegin",Y.gridRowColWrap(u)),t(!0)}})},{Paragraph:q6,Text:K6}=Me.Typography,Z6=he.observer(e=>{const t=he.useForm(),n=V0(t.values.component,e.allCollection);return n?G.jsx(Y.SchemaComponent,se({schema:n},e)):null},{displayName:"FieldComponentProps"}),Q6=({error:e})=>G.jsx(q6,{copyable:!0,children:G.jsx(K6,{type:"danger",style:{whiteSpace:"pre-line",textAlign:"center",padding:"5px"},children:e.message})}),J6=he.observer(e=>{var c,u;mt();const t=he.useField(),n=he.useFieldSchema(),r=(u=(c=n["x-decorator-props"])==null?void 0:c.showTitle)!=null?u:!0,i=K.useMemo(()=>typeof t.description=="string"?G.jsx("div",{dangerouslySetInnerHTML:{__html:Y.HTMLEncode(t.description).split(`
12
+ `).join("<br/>")}}):t.description,[t.description]),a=K.useMemo(()=>Y.cx(Y.css`
13
+ & .ant-space {
14
+ flex-wrap: wrap;
15
+ }
16
+ `,{[Y.css`
17
+ > .ant-formily-item-label {
18
+ display: none;
19
+ }
20
+ `]:r===!1}),[r]),o=(n==null?void 0:n["x-data-source"])||Y.DEFAULT_DATA_SOURCE_KEY,s=(n==null?void 0:n["x-collection-field"])||"",[l]=s.split(".");return G.jsx(Y.BlockItem,{className:"tb-form-item",children:G.jsx(Y.CollectionManagerProvider,{dataSource:o,children:G.jsx(Y.CollectionProvider,{name:l,allowNull:!l,children:G.jsx(Y.CollectionFieldProvider,{name:n.name,allowNull:!n["x-collection-field"],children:G.jsx(Y.ACLCollectionFieldProvider,{children:G.jsx(a_,{onError:f=>{var d;console.log(f),(d=window==null?void 0:window.Sentry)==null||d.captureException(f)},FallbackComponent:Q6,children:G.jsx(It.FormItem,_e(se({className:a},e),{extra:i}))})})})})})})},{displayName:"ChartFilterFormItem"}),g_=K.memo(e=>{const{locale:t}=K.useContext(Me.ConfigProvider.ConfigContext),{t:n}=mt(),r=Bi.useMemoizedFn(n),{scope:i,components:a}=K.useContext(he.SchemaOptionsContext),{theme:o}=Y.useGlobalTheme(),{insert:s}=e,l=Y.useSchemaInitializerItem(),c=Y.useDataSourceManager(),u=p_(),{options:f,values:d}=v_(),{collections:h,getCollectionFields:p}=Y.useCollectionManager_deprecated(),v=Y.useCompile(),g=h.map(m=>({label:m.getOption("title"),value:m.getOption("name")})),y=K.useCallback(()=>$r(this,null,function*(){var k,E;const m=yield Y.FormDialog(r("Add custom field"),()=>G.jsx(Y.SchemaComponentOptions,{scope:_e(se({},i),{useChartFilterSourceFields:p_,useCollectionField(M){var P;return(P=p(M))==null?void 0:P.map(A=>({label:v(A.uiSchema.title),value:A.name}))}}),components:_e(se({},a),{FieldComponentProps:Z6}),children:G.jsxs(It.FormLayout,{layout:"vertical",children:[G.jsx(Me.Alert,{type:"info",message:r('To filter with custom fields, use "Current filter" variables in the chart configuration.'),style:{marginBottom:16}}),G.jsx(Me.ConfigProvider,{locale:t,children:G.jsx(Y.SchemaComponent,{schema:{properties:{name:{type:"string",required:!0},title:{type:"string",title:r("Field title"),"x-component":"Input","x-decorator":"FormItem",required:!0},source:{type:"string",title:r("Field source"),"x-decorator":"FormItem","x-component":"Cascader",enum:u,description:r("Select a source field to use metadata of the field")},component:{type:"string",title:r("Field component"),"x-component":"Select","x-decorator":"FormItem",required:!0,enum:f},props:{type:"object",title:r("Component properties"),"x-component":"FieldComponentProps","x-component-props":{allCollection:g}}}}})})]})}),o).open({values:{name:`f_${he.uid()}`},effects(){he.onFieldValueChange("source",M=>{if(!M.value)return;const[P,...A]=M.value,L=c.getDataSource(P);if(!L)return;const N=L.collectionManager,T=A.join("."),I=N.getCollectionField(T);if(!I)return;const C=I.uiSchema||{};let j;if(d.includes(C["x-component"])){j=C["x-component"];const F=C["x-component-props"]||{};C.enum&&(F.options=C.enum),M.query(".props").take().setValue(F)}else d.includes(I.interface)&&(j=I.interface);if(!j)return;M.query(".component").take().setValue(j)})}}),{name:b,title:x,component:w,props:O}=m,S=((E=(k=c.collectionFieldInterfaceManager.getFieldInterface(w))==null?void 0:k.default)==null?void 0:E.uiSchema)||{};s(Y.gridRowColWrap(_e(se({"x-component":w},S),{type:"string",title:x,name:`custom.${b}`,required:!1,"x-designer":"ChartFilterItemDesigner","x-decorator":"ChartFilterFormItem","x-component-props":_e(se(se({},S["x-component-props"]),O),{chartCascader:!0})})))}),[o]);return G.jsx(Y.SchemaInitializerItem,_e(se(se({},l),e),{onClick:y}))});g_.displayName="ChartFilterCustomItemInitializer";const e$={name:"chartFilterForm:configureFields","data-testid":"configure-fields-button-of-chart-filter-item",wrap:Y.gridRowColWrap,icon:"SettingOutlined",title:'{{ t("Configure fields") }}',items:[{type:"itemGroup",name:"displayFields",title:'{{ t("Display fields") }}',useChildren:()=>{const{t:e}=mt(),{chartCollections:t,showDataSource:n}=X0(),{getChartFilterFields:r}=as(),i=Y.useDataSourceManager(),a=i.collectionFieldInterfaceManager;return K.useMemo(()=>{var s;const o=Object.entries(t).map(([l,c])=>{const u=i.getDataSource(l);return{name:u.key,title:he.Schema.compile(u.displayName,{t:e}),type:"subMenu",children:c.map(f=>{const d=u.collectionManager,h=d.getCollection(f),p=r({dataSource:l,collection:h,cm:d,fim:a});return{name:h.key,title:he.Schema.compile(h.title,{t:e}),type:"subMenu",children:p}})}});return n?o:((s=o[0])==null?void 0:s.children)||[]},[t,n])}},{name:"divider",type:"divider"},{name:"custom",type:"item",title:Ve("Custom"),Component:()=>{const{insertAdjacent:e}=Y.useDesignable();return G.jsx(g_,{insert:t=>e("beforeEnd",t)})}}]},t$=new Y.SchemaInitializer(e$),n$=()=>{const{filter:e}=as();return{onClick:e}},r$=()=>{const e=he.useForm(),{filter:t}=as();return{onClick:()=>$r(this,null,function*(){e.reset(),yield t()})}},i$=()=>{const{collapse:{collapsed:e},setCollapse:t}=K.useContext(zr),{t:n}=mt();return{onClick:()=>t({collapsed:!e}),title:G.jsxs(G.Fragment,{children:[G.jsx(Sr.DownOutlined,{rotate:e?0:180})," ",n(e?"Expand":"Collapse")]})}},a$=e=>{const{t}=mt();return G.jsx(Y.GeneralSchemaDesigner,_e(se({},e),{disableInitializer:!0,children:G.jsx(Y.SchemaSettingsRemove,{breakRemoveOn:n=>n["x-component"]==="Space"||n["x-component"].endsWith("ActionBar"),confirm:{title:t("Delete action")}})}))},o$=e=>{const i=e,{buttonEditorProps:t}=i,n=L8(i,["buttonEditorProps"]),{t:r}=mt();return G.jsxs(Y.GeneralSchemaDesigner,_e(se({},n),{disableInitializer:!0,children:[G.jsx(Y.Action.Designer.ButtonEditor,se({},t)),G.jsx(Y.SchemaSettingsDivider,{}),G.jsx(Y.SchemaSettingsRemove,{breakRemoveOn:a=>a["x-component"]==="Space"||a["x-component"].endsWith("ActionBar"),confirm:{title:r("Delete action")}})]}))},s$=e=>{const t={title:'{{ t("Filter") }}',"x-action":"submit","x-component":"Action","x-use-component-props":"useChartFilterActionProps","x-designer":"ChartFilterActionDesigner","x-component-props":{htmlType:"submit",type:"primary"}};return G.jsx(Y.ActionInitializer,_e(se({},e),{schema:t}))},l$=e=>{const t={title:'{{ t("Reset") }}',"x-action":"reset","x-component":"Action","x-use-component-props":"useChartFilterResetProps","x-designer":"ChartFilterActionDesigner"};return G.jsx(Y.ActionInitializer,_e(se({},e),{schema:t}))},c$=e=>{const t={title:'{{ t("Collapse") }}',"x-action":"collapse","x-component":"Action","x-use-component-props":"useChartFilterCollapseProps","x-component-props":{type:"link"},"x-designer":"ChartFilterCollapseDesigner"};return G.jsx(Y.ActionInitializer,_e(se({},e),{schema:t}))},u$=new Y.SchemaInitializer({name:"chartFilterForm:configureActions","data-testid":"configure-actions-button-of-chart-filter",title:'{{t("Configure actions")}}',icon:"SettingOutlined",items:[{name:"enbaleActions",type:"itemGroup",title:'{{t("Enable actions")}}',children:[{name:"filter",type:"item",title:'{{t("Filter")}}',component:s$,schema:{"x-action-settings":{}}},{name:"reset",type:"item",title:'{{t("Reset")}}',component:l$,schema:{"x-action-settings":{}}},{name:"collapse",type:"item",title:'{{t("Collapse")}}',component:c$,schema:{"x-action-settings":{}}}]}]}),f$=e=>{var h;const{value:t,onChange:n,fieldSchema:r}=e,{currentUserSettings:i}=Y.useCurrentUserVariable({collectionField:{uiSchema:r},uiSchema:r}),{datetimeSettings:a}=Y.useDatetimeVariable({operator:(h=r["x-component-props"])==null?void 0:h["filter-operator"],schema:r,noDisabled:!0}),o=K.useMemo(()=>[i,a].filter(Boolean),[a,i]),s=_e(se({},r),{"x-component":r["x-component"]||"Input","x-decorator":"",title:"",name:"value",default:""}),l=r["x-component-props"]||{},c=Bi.useMemoizedFn(n);K.useEffect(()=>{r.default&&c({value:r.default})},[r.default,c]);const u=(s==null?void 0:s["x-data-source"])||Y.DEFAULT_DATA_SOURCE_KEY,f=(s==null?void 0:s["x-collection-field"])||"",[d]=f.split(".");return G.jsx(Y.CollectionManagerProvider,{dataSource:u,children:G.jsx(Y.CollectionProvider,{name:d,allowNull:!d,children:G.jsx(Y.CollectionFieldProvider,{name:s["x-collection-field"],allowNull:!s["x-collection-field"],children:G.jsx(Y.VariableScopeProvider,{scope:o,children:G.jsx(Y.VariableInput,_e(se({},l),{renderSchemaComponent:()=>G.jsx(Y.SchemaComponent,{schema:s}),fieldNames:{},value:t==null?void 0:t.value,scope:o,onChange:p=>{n({value:p})},shouldChange:Y.getShouldChange({})}))})})})})},{Text:d$}=Me.Typography,h$=()=>{const e=he.useField(),t=he.useFieldSchema(),{t:n}=mt(),{dn:r}=Y.useDesignable(),{setField:i}=K.useContext(zr);return G.jsx(Y.SchemaSettingsModalItem,{title:n("Edit field title"),schema:{type:"object",title:n("Edit field title"),properties:{title:{title:n("Field title"),default:e==null?void 0:e.title,required:!0,"x-decorator":"FormItem","x-component":"Input","x-component-props":{}}}},onSubmit:({title:a})=>{a&&(e.title=a,t.title=a,r.emit("patch",{schema:{"x-uid":t["x-uid"],title:t.title}}),i(t.name,{title:a})),r.refresh()}},"edit-field-title")},p$=()=>{var y,m,b,x;const e=Y.useCompile(),t=he.useFieldSchema(),n=he.useField(),{t:r}=mt(),{dn:i}=Y.useDesignable(),{setField:a}=K.useContext(zr),o=t["x-collection-field"],s=t["x-data-source"]||Y.DEFAULT_DATA_SOURCE_KEY,{cm:l,fim:c}=iu(s);if(!l)return null;const u=w=>{var k;let O=w==null?void 0:w.interface;O==="formula"&&(O=r6(w.dataType)||w.dataType);const _=c.getFieldInterface(O);return{operatorList:((k=_==null?void 0:_.filterable)==null?void 0:k.operators)||[],interfaceConfig:_}};let f=l.getCollectionField(o),{operatorList:d,interfaceConfig:h}=u(f);if(!d.length){const w=o.split("."),O=w.pop();if(f=l.getCollectionField(w.join(".")),!f)return null;const _=u(f);if(d=_.operatorList,h=_.interfaceConfig,!h)return null;const k=((h==null?void 0:h.filterable.children)||[]).find(E=>E.name===O);d=(k==null?void 0:k.operators)||[]}if(!d.length)return null;const p=((m=(y=h==null?void 0:h.default)==null?void 0:y.uiSchema)==null?void 0:m["x-component"])||"Input",v=(b=t["x-component-props"])==null?void 0:b["filter-operator"],g=(w,O,_={})=>{const S=n.componentProps||{};n.component=O,n.componentProps=se(_e(se({},S),{"filter-operator":w}),_),t["x-component"]=O,t["x-component-props"]=se(_e(se({},t["x-component-props"]),{"filter-operator":w}),_),i.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component":O,"x-component-props":se(_e(se({},t["x-component-props"]),{"filter-operator":w}),_)}})};return G.jsx(Y.SchemaSettingsSelectItem,{title:r("Operator"),value:(v==null?void 0:v.value)||((x=d[0])==null?void 0:x.value),options:e(d),onChange:w=>{var _;const O=d.find(S=>S.value===w);O.noValue?g(O,"ChartFilterCheckbox",{content:he.Schema.compile(O.label,{t:r})}):(_=O.schema)!=null&&_["x-component"]?g(O,O.schema["x-component"]):g(O,p),a(t.name,{operator:O}),i.refresh()}},"operator")},v$=()=>{const{t:e}=mt(),{dn:t}=Y.useDesignable(),n=he.useField(),r=he.useFieldSchema(),i=V0(r["x-component"]);return G.jsx(Y.SchemaSettingsModalItem,{title:e("Edit field properties"),schema:se({title:e("Edit field properties")},i),initialValues:n.componentProps,onSubmit:a=>{n.reset(),n.componentProps=a,r["x-component-props"]=a,t.emit("patch",{schema:{"x-uid":r["x-uid"],"x-component-props":a}}),t.refresh()}},"edit-field-props")},g$=()=>{const{t:e}=mt(),{dn:t}=Y.useDesignable(),n=K.useContext(Y.VariablesContext),r=he.useField(),i=he.useFieldSchema(),{getTranslatedTitle:a}=as(),o=a(i.title);return G.jsx(Y.SchemaSettingsModalItem,{title:e("Set default value"),components:{ChartFilterVariableInput:f$},schema:{type:"void",title:e("Set default value"),properties:{default:{title:o,"x-decorator":"FormItem","x-component":"ChartFilterVariableInput","x-component-props":{fieldSchema:i}}}},onSubmit:({default:{value:s}})=>{r.setInitialValue(s),i.default=s,t.emit("patch",{schema:{"x-uid":i["x-uid"],default:s}}),t.refresh(),d_(r,n)}},"set field default value")},y$=()=>{var f,d,h;const{getCollectionFields:e,getCollectionJoinField:t,getInterface:n}=Y.useCollectionManager_deprecated(),r=he.useField(),i=he.useFieldSchema(),{t:a}=mt(),{dn:o}=Y.useDesignable(),s=Y.useCompile(),l=t(i["x-collection-field"]),u=(l!=null&&l.target?e(l==null?void 0:l.target):(f=e(l==null?void 0:l.targetCollection))!=null?f:[]).filter(p=>{if(p!=null&&p.target||p.type==="boolean")return!1;const v=n(p==null?void 0:p.interface);return v==null?void 0:v.titleUsable}).map(p=>{var v;return{value:p==null?void 0:p.name,label:s((v=p==null?void 0:p.uiSchema)==null?void 0:v.title)||(p==null?void 0:p.name)}});return u.length>0&&i["x-component"]==="CollectionField"?G.jsx(Y.SchemaSettingsSelectItem,{title:a("Title field"),options:u,value:(h=(d=r==null?void 0:r.componentProps)==null?void 0:d.fieldNames)==null?void 0:h.label,onChange:p=>{var y,m;const v={"x-uid":i["x-uid"]},g=_e(se(se({},(m=(y=l==null?void 0:l.uiSchema)==null?void 0:y["x-component-props"])==null?void 0:m.fieldNames),r.componentProps.fieldNames),{label:p});i["x-component-props"]=i["x-component-props"]||{},i["x-component-props"].fieldNames=g,v["x-component-props"]=i["x-component-props"],r.componentProps.fieldNames=i["x-component-props"].fieldNames,o.emit("patch",{schema:v}),o.refresh()}},"title-field"):null},m$=()=>{var c,u;const{form:e}=Y.useFormBlockContext(),t=he.useFieldSchema(),n=t["x-data-source"]||Y.DEFAULT_DATA_SOURCE_KEY,{cm:r}=iu(n),i=he.useField(),{dn:a}=Y.useDesignable(),o=r.getCollectionField(t["x-collection-field"]),s=((u=(c=t==null?void 0:t["x-component-props"])==null?void 0:c.params)==null?void 0:u.filter)||{},l=({filter:f})=>{f=Y.removeNullCondition(f),B.set(i.componentProps,"service.params.filter",f),t["x-component-props"]=i.componentProps,a.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"]}})};return o?G.jsx(Y.SchemaSettingsDataScope,{form:e,collectionName:o.target,defaultFilter:s,onSubmit:l}):null},b$=()=>{const{getCollectionJoinField:e}=Y.useCollectionManager_deprecated(),{getField:t}=Y.useCollection_deprecated(),{t:n}=mt(),r=he.useFieldSchema(),i=r.name,a=r["x-data-source"]||Y.DEFAULT_DATA_SOURCE_KEY,o=t(i)||e(r["x-collection-field"]),s=i.startsWith("custom."),l=V0(r["x-component"]),c=F6(a,i),u=Y.useIsAssociationField();return G.jsxs(Y.GeneralSchemaDesigner,{disableInitializer:!0,children:[!s&&G.jsxs(G.Fragment,{children:[G.jsx(Y.SchemaSettingsItem,{title:i,children:G.jsxs(d$,{type:"secondary",children:[n("Original field"),": ",c]})}),G.jsx(Y.SchemaSettingsDivider,{})]}),G.jsx(h$,{}),G.jsx(Y.EditDescription,{}),u&&G.jsx(m$,{}),l&&s&&G.jsx(v$,{}),!s&&G.jsx(p$,{}),G.jsx(y$,{}),G.jsx(g$,{}),G.jsx(Y.SchemaSettingsSortingRule,{}),o?G.jsx(Y.SchemaSettingsDivider,{}):null,G.jsx(Y.SchemaSettingsRemove,{confirm:{title:n("Delete field")},breakRemoveOn:{"x-component":"Grid"}},"remove")]})},x$=()=>{const e={},t=Y.useSchemaInitializerItem();return G.jsx(Y.InitializerWithSwitch,_e(se({},t),{item:t,schema:e,type:"name"}))},w$=he.connect(e=>{const{content:t}=e,n=he.useField(),r=()=>{n.setValue(!n.value)};return G.jsx(Me.Checkbox,{onClick:r,checked:n.value,children:t})}),y_=K.memo(e=>{const{setField:t,removeField:n,setForm:r}=K.useContext(zr),{getTranslatedTitle:i}=as(),a=K.useRef(null);a.current=K.useContext(Y.VariablesContext);const o=K.useMemo(()=>he.createForm({effects(){const s=l=>{if(l.displayName!=="Field")return null;const{name:c}=l.props||{};return c};he.onFieldInit("*",l=>{s(l)&&l.setValue(null)}),he.onFieldMount("*",l=>$r(this,null,function*(){const c=s(l);c&&(t(c,{title:l.title,operator:l.componentProps["filter-operator"]}),l.title.includes("/")&&(l.title=i(l.title)),d_(l,a.current))})),he.onFieldUnmount("*",l=>{const c=s(l);c&&n(c)})}}),[t,i,n,a]);return K.useEffect(()=>r(o),[o,r]),G.jsx(Y.FormV2,_e(se({},e),{form:o}))});y_.displayName="ChartFilterForm";const O$=e=>{const{t}=mt(),{setEnabled:n}=K.useContext(zr);return K.useEffect(()=>{n(!0)},[n]),G.jsx("div",{className:Y.css`
21
+ .ant-card {
22
+ box-shadow: none;
23
+ border: none;
24
+ margin-bottom: 6px;
25
+ }
26
+ `,children:G.jsx(Y.SchemaComponentOptions,{components:{ChartFilterItemDesigner:b$,ChartFilterForm:y_,ChartFilterGrid:U6,ChartFilterCheckbox:w$,ChartFilterFormItem:J6,ArrayItems:It.ArrayItems,ChartFilterCollapseDesigner:a$,ChartFilterActionDesigner:o$,CollectionFieldInitializer:x$},scope:{t,useChartFilterActionProps:n$,useChartFilterResetProps:r$,useChartFilterCollapseProps:i$},children:e.children})})},_$=e=>{const[t,n]=K.useState(!1),r=Y.useSchemaInitializer();return G.jsx(Y.SchemaInitializerContext.Provider,{value:_e(se({},r),{visible:t,setVisible:n}),children:G.jsx(Y.SchemaComponentOptions,{components:{ChartRenderer:H0,ChartRendererProvider:s_,ChartFilterBlockProvider:O$,ChartFilterBlockDesigner:H6},children:G.jsx(J8,{children:G.jsx(i6,{children:G.jsx($6,{children:e.children})})})})})},S$=()=>{const{t:e}=mt();return G.jsxs(Y.GeneralSchemaDesigner,{title:e("Charts"),showDataSource:!1,children:[G.jsx(Y.SchemaSettingsBlockTitleItem,{}),G.jsx(Y.SchemaSettingsDivider,{}),G.jsx(Y.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})},k$=()=>{const{setVisible:e,setCurrent:t}=K.useContext(Yi),{parseAction:n}=Y.useACLRoleContext(),r=Y.useSchemaInitializerItem(),i=K.useCallback(a=>n(`${a.name}:list`),[n]);return G.jsx(Y.DataBlockInitializer,_e(se({},r),{filter:i,filterDataSource:a=>a.key===Y.DEFAULT_DATA_SOURCE_KEY||a.getOptions().isDBInstance,icon:G.jsx(Sr.BarChartOutlined,{}),componentType:"Chart",onCreateBlockSchema:o=>$r(this,[o],function*({item:a}){t({schema:{},field:null,collection:a.name,dataSource:a.dataSource,service:null,data:void 0}),e(!0)})}))},E$=new Y.SchemaInitializer({name:"charts:addBlock",icon:"PlusOutlined",title:'{{t("Add block")}}',items:[{name:"chart",title:Ve("Chart"),Component:k$},{name:"otherBlocks",type:"itemGroup",title:Ve("Other blocks"),children:[{name:"filter",title:Ve("Filter"),Component:X6}]}]}),M$=()=>{const e=Y.useSchemaInitializerItem(),{insert:t}=Y.useSchemaInitializer();return G.jsx(Y.SchemaInitializerItem,_e(se({},e),{icon:G.jsx(Sr.LineChartOutlined,{}),onClick:()=>{t({type:"void","x-component":"CardItem","x-component-props":{name:"charts"},"x-designer":"ChartV2BlockDesigner",properties:{[he.uid()]:{type:"void","x-component":"Grid","x-decorator":"ChartV2Block","x-initializer":"charts:addBlock"}}})}}))},cu=({name:e,title:t,required:n,defaultValue:r})=>({[e||"field"]:{title:Ve(t||"Field"),type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}",required:n,default:r}}),m_={field:cu,booleanField:({name:e,title:t,defaultValue:n=!1})=>({[e||"field"]:{"x-content":Ve(t||"Field"),type:"boolean","x-decorator":"FormItem","x-component":"Checkbox",default:n}}),xField:e=>cu(se({name:"xField",title:"xField",required:!0},e)),yField:e=>cu(se({name:"yField",title:"yField",required:!0},e)),seriesField:e=>cu(se({name:"seriesField",title:"seriesField"},e)),colorField:e=>cu(se({name:"colorField",title:"colorField"},e))};let q0=class{constructor({name:t,title:n,Component:r,config:i}){mi(this,"name");mi(this,"title");mi(this,"Component");mi(this,"config");mi(this,"configs",new Map);this.name=t,this.title=n,this.Component=r,this.config=i,this.addConfigs(m_)}get schema(){return this.config?{type:"object",properties:this.config.reduce((n,r)=>{let i={};if(typeof r=="string"){const a=this.configs.get(r);i=(a==null?void 0:a())||{}}else if(typeof r=="function")i=r();else if(r.property){const a=this.configs.get(r.property);i=(a==null?void 0:a(r))||{}}else i=r;return se(se({},n),i)},{})}:{}}addConfigs(t){Object.entries(t).forEach(([n,r])=>{this.configs.set(n,r)})}infer(t,{measures:n,dimensions:r}){let i,a,o,s,l;const c=(u,f)=>{if(f.alias)return u.find(h=>h.value===f.alias);const{alias:d}=ru(f.field);return u.find(h=>h.value===d)};if(n!=null&&n.length&&(a=c(t,n[0]),l=n.map(u=>c(t,u))),r){if(r.length===1)i=c(t,r[0]);else if(r.length>1){let u;r.forEach((d,h)=>{const p=c(t,d);["date","time","datetime"].includes(p==null?void 0:p.type)&&(i=p,u=h)}),u=u||0,i=i||c(t,r[u]);const f=r.filter((d,h)=>h!==u).map(d=>c(t,d));f.length===1?(o=f[0],s=f[0]):f.length>1&&(s=f[0],o=f[1])}}return{xField:i,yField:a,seriesField:o,colorField:s,yFields:l}}getProps(t){return t}};class K0 extends q0{getReference(){return{title:this.title,link:`https://ant.design/components/${this.name}`}}}class A$ extends K0{constructor(){super({name:"groupedTable",title:"GroupedTable",Component:Me.Table})}getProps({data:t,fieldProps:n,general:r,advanced:i,ctx:a}){var u;const{transform:o}=a,s=t.length?Object.keys(t[0]).map(f=>{var d;return{title:((d=n[f])==null?void 0:d.label)||f,dataIndex:f,key:f,calculate:!0}}):[],l=[];let c=0;return t.forEach((f,d)=>{Object.keys(f).forEach(p=>{const v=n[p];if((v==null?void 0:v.interface)==="percent"){const g=Math.round(parseFloat(f[p])*100).toFixed(2);f[p]=`${g}%`}typeof f[p]=="boolean"&&(f[p]=f[p].toString()),v!=null&&v.transformer&&(f[p]=v.transformer(f[p]))});const h=l.filter(p=>p["product.name"]===f["product.name"])[0];h?l[h.key].children.push(se({key:`key${dl.uid()}${dl.uid()}`},f)):(l.push(_e(se({key:c},f),{children:[se({key:`key${dl.uid()}`},f)]})),c++)}),(u=i==null?void 0:i.columns)==null||u.forEach(f=>{l.forEach(d=>{if(f.calculate){let h=o.filter(y=>y.field===f.key)[0];if(h)switch(h=h.specific?h.specific:3,h){case"TwoDigits":h=2;break;case"ThreeDigits":h=3;break;case"FourDigits":h=4;break}else h=3;const p={style:"decimal",minimumFractionDigits:h,maximumFractionDigits:h},v=new Intl.NumberFormat("zh-CN",p),g=String(d[f.key]).includes(",")?String(d[f.key]).replace(/,/g,""):d[f.key];if(!isNaN(g)){const y=d.children.reduce((m,b)=>{const x=String(b[f.key]).includes(",")?String(b[f.key]).replace(/,/g,""):b[f.key];return m+parseFloat(x)},0);d[f.key]=v.format(y)}}else d[f.key]=""})}),_e(se(se({bordered:!0,size:"middle",pagination:!1,dataSource:l,columns:s,scroll:{x:"max-content"},rowKey:f=>f.key},r),i),{expandRowByClick:!0})}}class P$ extends K0{constructor(){super({name:"statistic",title:"Statistic",Component:Me.Statistic,config:[{property:"field",name:"field",title:"Field",required:!0},{title:{title:Ve("Title"),type:"string","x-decorator":"FormItem","x-component":"Input"}}]});mi(this,"init",(n,{measures:r,dimensions:i})=>{const{yField:a}=this.infer(n,{measures:r,dimensions:i});return{general:{field:a==null?void 0:a.value,title:a==null?void 0:a.label}}})}getProps({data:n,fieldProps:r,general:i,advanced:a}){const o=n[0]||{},s=i==null?void 0:i.field,l=r[s];return se(se({value:o[s],formatter:l==null?void 0:l.transformer},i),a)}}class C$ extends K0{constructor(){super({name:"table",title:"Table",Component:Me.Table})}getProps({data:t,fieldProps:n,general:r,advanced:i,ctx:a}){var c,u;const o=t.length?Object.keys(t[0]).map(f=>{var d;return{title:((d=n[f])==null?void 0:d.label)||f,dataIndex:f,key:f}}):[],s=t.map((f,d)=>(Object.keys(f).map(h=>{const p=n[h];if((p==null?void 0:p.interface)==="percent"){const v=Math.round(parseFloat(f[h])*100).toFixed(2);f[h]=`${v}%`}typeof f[h]=="boolean"&&(f[h]=f[h].toString()),p!=null&&p.transformer&&(f[h]=p.transformer(f[h]))}),f._key=d,f)),l=((c=a.config)==null?void 0:c.pageSize)||((u=i==null?void 0:i.pagination)==null?void 0:u.pageSize)||10;return se(se({size:"middle",pagination:s.length<l?!1:{pageSize:l,onShowSizeChange:(f,d)=>{a.config.setPageSize(d)}},dataSource:s,columns:o,scroll:{x:"max-content"},rowKey:"_key"},r),i)}}const T$=[new P$,new C$,new A$],b_=()=>[["cartesian"]];b_.props={};function L$(e,t){return e=e%(2*Math.PI),t=t%(2*Math.PI),e<0&&(e=2*Math.PI+e),t<0&&(t=2*Math.PI+t),e>=t&&(t=t+2*Math.PI),{startAngle:e,endAngle:t}}const x_=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},t),e);return Object.assign(Object.assign({},n),L$(n.startAngle,n.endAngle))},uu=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=x_(e);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,n,r,i]]};uu.props={};const Z0=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];Z0.props={transform:!0};const N$=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},t),e)},w_=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=N$(e);return[...Z0(),...uu({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};w_.props={};const O_=(e={})=>{const t={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},t),e)},Q0=e=>{const{startAngle:t,endAngle:n,innerRadius:r,outerRadius:i}=O_(e);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...uu({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};Q0.props={};const J0=()=>[["parallel",0,1,0,1]];J0.props={};const __=({focusX:e=0,focusY:t=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",e,t,n,r,i]];__.props={transform:!0};const S_=e=>{const{startAngle:t=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=e;return[...J0(),...uu({startAngle:t,endAngle:n,innerRadius:r,outerRadius:i})]};S_.props={};const k_=({value:e})=>t=>t.map(()=>e);k_.props={};const E_=({value:e})=>t=>t.map(e);E_.props={};const M_=({value:e})=>t=>t.map(n=>n[e]);M_.props={};const A_=({value:e})=>()=>e;A_.props={};var gl=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},I$=function(e,t){if(!gl(e))return e;for(var n=[],r=0;r<e.length;r++){var i=e[r];t(i,r)&&n.push(i)}return n};function fr(e){return typeof e=="function"}function Ze(e){return e==null}function er(e){return Array.isArray(e)}const ey=function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"};function ty(e,t){if(e){var n;if(er(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(ey(e)){for(var a in e)if(e.hasOwnProperty(a)&&(n=t(e[a],a),n===!1))break}}}var P_=Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];return ty(e,function(n,r){fr(e)&&r==="prototype"||t.push(r)}),t};function j$(e,t){var n=P_(t),r=n.length;if(Ze(e))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(t[a]!==e[a]||!(a in e))return!1}return!0}var ny=function(e){return typeof e=="object"&&e!==null},D$={}.toString,F$=function(e,t){return D$.call(e)==="[object "+t+"]"},xa=function(e){if(!ny(e)||!F$(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};function yl(e,t){if(!er(e))return null;var n;if(fr(t)&&(n=t),xa(t)&&(n=function(i){return j$(i,t)}),n){for(var r=0;r<e.length;r+=1)if(n(e[r]))return e[r]}return null}function C_(e){if(!Array.isArray(e))return-1/0;var t=e.length;if(!t)return-1/0;for(var n=e[0],r=1;r<t;r++)n=Math.max(n,e[r]);return n}const T_=function(e){if(er(e))return e.reduce(function(t,n){return Math.min(t,n)},e[0])};var R$=function(e,t,n){if(!er(e)&&!xa(e))return e;var r=n;return ty(e,function(i,a){r=t(r,i,a)}),r};function tr(e){return typeof e=="string"}function fu(e){if(gl(e)){var t=e;return t[t.length-1]}}var wi=function(e,t,n){return e<t?t:e>n?n:e};function _n(e){return typeof e=="number"}const $$=function(e,t){if(er(e)){for(var n,r=-1/0,i=0;i<e.length;i++){var a=e[i],o=fr(t)?t(a):a[t];o>r&&(n=a,r=o)}return n}},z$=function(e,t){if(er(e)){for(var n,r=1/0,i=0;i<e.length;i++){var a=e[i],o=fr(t)?t(a):a[t];o<r&&(n=a,r=o)}return n}},L_=function(e){return Ze(e)?"":e.toString()};var N_=function(e){var t=L_(e);return t.charAt(0).toLowerCase()+t.substring(1)};function B$(e,t){return!e||!t?e:e.replace(/\\?\{([^{}]+)\}/g,function(n,r){return n.charAt(0)==="\\"?n.slice(1):t[r]===void 0?"":t[r]})}var eo=function(e){var t=L_(e);return t.charAt(0).toUpperCase()+t.substring(1)};function Y$(e){return e===null}var nh=function(e){return e===void 0},du=function(e){if(typeof e!="object"||e===null)return e;var t;if(er(e)){t=[];for(var n=0,r=e.length;n<r;n++)typeof e[n]=="object"&&e[n]!=null?t[n]=du(e[n]):t[n]=e[n]}else{t={};for(var i in e)typeof e[i]=="object"&&e[i]!=null?t[i]=du(e[i]):t[i]=e[i]}return t};function I_(e,t,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,e.apply(i,a)};clearTimeout(r),r=setTimeout(o,t)}}function W$(e){var t,n,r,i=e;function a(s,l){++t>i&&(r=n,o(1),++t),n[s]=l}function o(s){t=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){n[s]!==void 0?n[s]=l:a(s,l)}}}var ry=new Map;function G$(e,t,n){var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=t?t.apply(this,i):i[0];ry.has(e)||ry.set(e,W$(n));var s=ry.get(e);if(s.has(o))return s.get(o);var l=e.apply(this,i);return s.set(o,l),l};return r}var H$=5;function V$(e,t){if(Object.hasOwn)return Object.hasOwn(e,t);if(e==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}function j_(e,t,n,r){n=n||0,r=r||H$;for(var i in t)if(V$(t,i)){var a=t[i];a!==null&&xa(a)?(xa(e[i])||(e[i]={}),n<r?j_(e[i],a,n+1,r):e[i]=t[i]):er(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var Z=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)j_(e,t[r]);return e},D_=function(e,t){if(!gl(e))return-1;var n=Array.prototype.indexOf;if(n)return n.call(e,t);for(var r=-1,i=0;i<e.length;i++)if(e[i]===t){r=i;break}return r},rh=function(e,t){if(e===t)return!0;if(!e||!t||tr(e)||tr(t))return!1;if(gl(e)||gl(t)){if(e.length!==t.length)return!1;for(var n=!0,r=0;r<e.length&&(n=rh(e[r],t[r]),!!n);r++);return n}if(ny(e)||ny(t)){var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=rh(e[i[r]],t[i[r]]),!!n);r++);return n}return!1};const Ot=function(e,t,n){for(var r=0,i=tr(t)?t.split("."):t;e&&r<i.length;)e=e[i[r++]];return e===void 0||r<i.length?n:e},U$=function(e,t,n){var r=e,i=tr(t)?t.split("."):t;return i.forEach(function(a,o){o<i.length-1?(ey(r[a])||(r[a]=_n(i[o+1])?[]:{}),r=r[a]):r[a]=n}),e};var X$=Object.prototype.hasOwnProperty;const q$=function(e,t){if(e===null||!xa(e))return{};var n={};return ty(t,function(r){X$.call(e,r)&&(n[r]=e[r])}),n},iy=function(e,t){return R$(e,function(n,r,i){return t.includes(i)||(n[i]=r),n},{})},os=function(e,t,n){var r,i,a,o,s=0;n||(n={});var l=function(){s=n.leading===!1?0:Date.now(),r=null,o=e.apply(i,a),r||(i=a=null)},c=function(){var u=Date.now();!s&&n.leading===!1&&(s=u);var f=t-(u-s);return i=this,a=arguments,f<=0||f>t?(r&&(clearTimeout(r),r=null),s=u,o=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(l,f)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c},ay=function(){},ss=function(e){return e};function ih(e){return Ze(e)?0:gl(e)?e.length:Object.keys(e).length}var Pt=1e-6,tn=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});function ml(){var e=new tn(9);return tn!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function K$(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function Z$(e){var t=new tn(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Q$(e,t,n,r,i,a,o,s,l){var c=new tn(9);return c[0]=e,c[1]=t,c[2]=n,c[3]=r,c[4]=i,c[5]=a,c[6]=o,c[7]=s,c[8]=l,c}function J$(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=u*o-s*c,d=-u*a+s*l,h=c*a-o*l,p=n*f+r*d+i*h;return p?(p=1/p,e[0]=f*p,e[1]=(-u*r+i*c)*p,e[2]=(s*r-i*o)*p,e[3]=d*p,e[4]=(u*n-i*l)*p,e[5]=(-s*n+i*a)*p,e[6]=h*p,e[7]=(-c*n+r*l)*p,e[8]=(o*n-r*a)*p,e):null}function ez(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],b=n[7],x=n[8];return e[0]=d*r+h*o+p*c,e[1]=d*i+h*s+p*u,e[2]=d*a+h*l+p*f,e[3]=v*r+g*o+y*c,e[4]=v*i+g*s+y*u,e[5]=v*a+g*l+y*f,e[6]=m*r+b*o+x*c,e[7]=m*i+b*s+x*u,e[8]=m*a+b*l+x*f,e}function tz(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function nz(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function rz(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}var iz=ez;function it(){var e=new tn(16);return tn!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function oy(e){var t=new tn(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function bl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function F_(e,t,n,r,i,a,o,s,l,c,u,f,d,h,p,v){var g=new tn(16);return g[0]=e,g[1]=t,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function sy(e,t,n,r,i,a,o,s,l,c,u,f,d,h,p,v,g){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=l,e[8]=c,e[9]=u,e[10]=f,e[11]=d,e[12]=h,e[13]=p,e[14]=v,e[15]=g,e}function to(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function R_(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function Oi(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=n*s-r*o,b=n*l-i*o,x=n*c-a*o,w=r*l-i*s,O=r*c-a*s,_=i*c-a*l,S=u*v-f*p,k=u*g-d*p,E=u*y-h*p,M=f*g-d*v,P=f*y-h*v,A=d*y-h*g,L=m*A-b*P+x*M+w*E-O*k+_*S;return L?(L=1/L,e[0]=(s*A-l*P+c*M)*L,e[1]=(i*P-r*A-a*M)*L,e[2]=(v*_-g*O+y*w)*L,e[3]=(d*O-f*_-h*w)*L,e[4]=(l*E-o*A-c*k)*L,e[5]=(n*A-i*E+a*k)*L,e[6]=(g*x-p*_-y*b)*L,e[7]=(u*_-d*x+h*b)*L,e[8]=(o*P-s*E+c*S)*L,e[9]=(r*E-n*P-a*S)*L,e[10]=(p*O-v*x+y*m)*L,e[11]=(f*x-u*O-h*m)*L,e[12]=(s*k-o*M-l*S)*L,e[13]=(n*M-r*k+i*S)*L,e[14]=(v*b-p*w-g*m)*L,e[15]=(u*w-f*b+d*m)*L,e):null}function az(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15];return e[0]=s*(d*y-h*g)-f*(l*y-c*g)+v*(l*h-c*d),e[1]=-(r*(d*y-h*g)-f*(i*y-a*g)+v*(i*h-a*d)),e[2]=r*(l*y-c*g)-s*(i*y-a*g)+v*(i*c-a*l),e[3]=-(r*(l*h-c*d)-s*(i*h-a*d)+f*(i*c-a*l)),e[4]=-(o*(d*y-h*g)-u*(l*y-c*g)+p*(l*h-c*d)),e[5]=n*(d*y-h*g)-u*(i*y-a*g)+p*(i*h-a*d),e[6]=-(n*(l*y-c*g)-o*(i*y-a*g)+p*(i*c-a*l)),e[7]=n*(l*h-c*d)-o*(i*h-a*d)+u*(i*c-a*l),e[8]=o*(f*y-h*v)-u*(s*y-c*v)+p*(s*h-c*f),e[9]=-(n*(f*y-h*v)-u*(r*y-a*v)+p*(r*h-a*f)),e[10]=n*(s*y-c*v)-o*(r*y-a*v)+p*(r*c-a*s),e[11]=-(n*(s*h-c*f)-o*(r*h-a*f)+u*(r*c-a*s)),e[12]=-(o*(f*g-d*v)-u*(s*g-l*v)+p*(s*d-l*f)),e[13]=n*(f*g-d*v)-u*(r*g-i*v)+p*(r*d-i*f),e[14]=-(n*(s*g-l*v)-o*(r*g-i*v)+p*(r*l-i*s)),e[15]=n*(s*d-l*f)-o*(r*d-i*f)+u*(r*l-i*s),e}function $_(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],f=e[10],d=e[11],h=e[12],p=e[13],v=e[14],g=e[15],y=t*o-n*a,m=t*s-r*a,b=t*l-i*a,x=n*s-r*o,w=n*l-i*o,O=r*l-i*s,_=c*p-u*h,S=c*v-f*h,k=c*g-d*h,E=u*v-f*p,M=u*g-d*p,P=f*g-d*v;return y*P-m*M+b*E+x*k-w*S+O*_}function Yn(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=t[8],d=t[9],h=t[10],p=t[11],v=t[12],g=t[13],y=t[14],m=t[15],b=n[0],x=n[1],w=n[2],O=n[3];return e[0]=b*r+x*s+w*f+O*v,e[1]=b*i+x*l+w*d+O*g,e[2]=b*a+x*c+w*h+O*y,e[3]=b*o+x*u+w*p+O*m,b=n[4],x=n[5],w=n[6],O=n[7],e[4]=b*r+x*s+w*f+O*v,e[5]=b*i+x*l+w*d+O*g,e[6]=b*a+x*c+w*h+O*y,e[7]=b*o+x*u+w*p+O*m,b=n[8],x=n[9],w=n[10],O=n[11],e[8]=b*r+x*s+w*f+O*v,e[9]=b*i+x*l+w*d+O*g,e[10]=b*a+x*c+w*h+O*y,e[11]=b*o+x*u+w*p+O*m,b=n[12],x=n[13],w=n[14],O=n[15],e[12]=b*r+x*s+w*f+O*v,e[13]=b*i+x*l+w*d+O*g,e[14]=b*a+x*c+w*h+O*y,e[15]=b*o+x*u+w*p+O*m,e}function xl(e,t,n){var r=n[0],i=n[1],a=n[2],o,s,l,c,u,f,d,h,p,v,g,y;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],l=t[2],c=t[3],u=t[4],f=t[5],d=t[6],h=t[7],p=t[8],v=t[9],g=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=c,e[4]=u,e[5]=f,e[6]=d,e[7]=h,e[8]=p,e[9]=v,e[10]=g,e[11]=y,e[12]=o*r+u*i+p*a+t[12],e[13]=s*r+f*i+v*a+t[13],e[14]=l*r+d*i+g*a+t[14],e[15]=c*r+h*i+y*a+t[15]),e}function z_(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function oz(e,t,n,r){var i=r[0],a=r[1],o=r[2],s=Math.hypot(i,a,o),l,c,u,f,d,h,p,v,g,y,m,b,x,w,O,_,S,k,E,M,P,A,L,N;return s<Pt?null:(s=1/s,i*=s,a*=s,o*=s,l=Math.sin(n),c=Math.cos(n),u=1-c,f=t[0],d=t[1],h=t[2],p=t[3],v=t[4],g=t[5],y=t[6],m=t[7],b=t[8],x=t[9],w=t[10],O=t[11],_=i*i*u+c,S=a*i*u+o*l,k=o*i*u-a*l,E=i*a*u-o*l,M=a*a*u+c,P=o*a*u+i*l,A=i*o*u+a*l,L=a*o*u-i*l,N=o*o*u+c,e[0]=f*_+v*S+b*k,e[1]=d*_+g*S+x*k,e[2]=h*_+y*S+w*k,e[3]=p*_+m*S+O*k,e[4]=f*E+v*M+b*P,e[5]=d*E+g*M+x*P,e[6]=h*E+y*M+w*P,e[7]=p*E+m*M+O*P,e[8]=f*A+v*L+b*N,e[9]=d*A+g*L+x*N,e[10]=h*A+y*L+w*N,e[11]=p*A+m*L+O*N,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function B_(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*r,e[5]=o*i+u*r,e[6]=s*i+f*r,e[7]=l*i+d*r,e[8]=c*i-a*r,e[9]=u*i-o*r,e[10]=f*i-s*r,e[11]=d*i-l*r,e}function Y_(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],f=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*r,e[1]=o*i-u*r,e[2]=s*i-f*r,e[3]=l*i-d*r,e[8]=a*r+c*i,e[9]=o*r+u*i,e[10]=s*r+f*i,e[11]=l*r+d*i,e}function sz(e,t,n){var r=Math.sin(n),i=Math.cos(n),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],f=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+c*r,e[1]=o*i+u*r,e[2]=s*i+f*r,e[3]=l*i+d*r,e[4]=c*i-a*r,e[5]=u*i-o*r,e[6]=f*i-s*r,e[7]=d*i-l*r,e}function wa(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function no(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function W_(e,t,n){var r=n[0],i=n[1],a=n[2],o=Math.hypot(r,i,a),s,l,c;return o<Pt?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(t),l=Math.cos(t),c=1-l,e[0]=r*r*c+l,e[1]=i*r*c+a*s,e[2]=a*r*c-i*s,e[3]=0,e[4]=r*i*c-a*s,e[5]=i*i*c+l,e[6]=a*i*c+r*s,e[7]=0,e[8]=r*a*c+i*s,e[9]=i*a*c-r*s,e[10]=a*a*c+l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function G_(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function H_(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ly(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function V_(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=r+r,l=i+i,c=a+a,u=r*s,f=r*l,d=r*c,h=i*l,p=i*c,v=a*c,g=o*s,y=o*l,m=o*c;return e[0]=1-(h+v),e[1]=f+m,e[2]=d-y,e[3]=0,e[4]=f-m,e[5]=1-(u+v),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(u+h),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function lz(e,t){var n=new tn(3),r=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],f=r*r+i*i+a*a+o*o;return f>0?(n[0]=(s*o+u*r+l*a-c*i)*2/f,n[1]=(l*o+u*i+c*r-s*a)*2/f,n[2]=(c*o+u*a+s*i-l*r)*2/f):(n[0]=(s*o+u*r+l*a-c*i)*2,n[1]=(l*o+u*i+c*r-s*a)*2,n[2]=(c*o+u*a+s*i-l*r)*2),V_(e,t,n),e}function ah(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function wl(e,t){var n=t[0],r=t[1],i=t[2],a=t[4],o=t[5],s=t[6],l=t[8],c=t[9],u=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(l,c,u),e}function oh(e,t){var n=new tn(3);wl(n,t);var r=1/n[0],i=1/n[1],a=1/n[2],o=t[0]*r,s=t[1]*i,l=t[2]*a,c=t[4]*r,u=t[5]*i,f=t[6]*a,d=t[8]*r,h=t[9]*i,p=t[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,e[3]=.25*g,e[0]=(f-h)/g,e[1]=(d-l)/g,e[2]=(s-c)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,e[3]=(f-h)/g,e[0]=.25*g,e[1]=(s+c)/g,e[2]=(d+l)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,e[3]=(d-l)/g,e[0]=(s+c)/g,e[1]=.25*g,e[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,e[3]=(s-c)/g,e[0]=(d+l)/g,e[1]=(f+h)/g,e[2]=.25*g),e}function cz(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3],l=i+i,c=a+a,u=o+o,f=i*l,d=i*c,h=i*u,p=a*c,v=a*u,g=o*u,y=s*l,m=s*c,b=s*u,x=r[0],w=r[1],O=r[2];return e[0]=(1-(p+g))*x,e[1]=(d+b)*x,e[2]=(h-m)*x,e[3]=0,e[4]=(d-b)*w,e[5]=(1-(f+g))*w,e[6]=(v+y)*w,e[7]=0,e[8]=(h+m)*O,e[9]=(v-y)*O,e[10]=(1-(f+p))*O,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function hu(e,t,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],c=a+a,u=o+o,f=s+s,d=a*c,h=a*u,p=a*f,v=o*u,g=o*f,y=s*f,m=l*c,b=l*u,x=l*f,w=r[0],O=r[1],_=r[2],S=i[0],k=i[1],E=i[2],M=(1-(v+y))*w,P=(h+x)*w,A=(p-b)*w,L=(h-x)*O,N=(1-(d+y))*O,T=(g+m)*O,I=(p+b)*_,C=(g-m)*_,j=(1-(d+v))*_;return e[0]=M,e[1]=P,e[2]=A,e[3]=0,e[4]=L,e[5]=N,e[6]=T,e[7]=0,e[8]=I,e[9]=C,e[10]=j,e[11]=0,e[12]=n[0]+S-(M*S+L*k+I*E),e[13]=n[1]+k-(P*S+N*k+C*E),e[14]=n[2]+E-(A*S+T*k+j*E),e[15]=1,e}function cy(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n+n,s=r+r,l=i+i,c=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*l,v=a*o,g=a*s,y=a*l;return e[0]=1-f-p,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=h+v,e[7]=0,e[8]=d+g,e[9]=h-v,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function uz(e,t,n,r,i,a,o){var s=1/(n-t),l=1/(i-r),c=1/(a-o);return e[0]=a*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a*2*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}function U_(e,t,n,r,i){var a=1/Math.tan(t/2),o;return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}var fz=U_;function dz(e,t,n,r,i){var a=1/Math.tan(t/2),o;return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,i!=null&&i!==1/0?(o=1/(r-i),e[10]=i*o,e[14]=i*r*o):(e[10]=-1,e[14]=-r),e}function hz(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}function X_(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(o+a)*c,e[15]=1,e}var q_=X_;function K_(e,t,n,r,i,a,o){var s=1/(t-n),l=1/(r-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=a*c,e[15]=1,e}function Z_(e,t,n,r){var i,a,o,s,l,c,u,f,d,h,p=t[0],v=t[1],g=t[2],y=r[0],m=r[1],b=r[2],x=n[0],w=n[1],O=n[2];return Math.abs(p-x)<Pt&&Math.abs(v-w)<Pt&&Math.abs(g-O)<Pt?to(e):(u=p-x,f=v-w,d=g-O,h=1/Math.hypot(u,f,d),u*=h,f*=h,d*=h,i=m*d-b*f,a=b*u-y*d,o=y*f-m*u,h=Math.hypot(i,a,o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,l=d*i-u*o,c=u*a-f*i,h=Math.hypot(s,l,c),h?(h=1/h,s*=h,l*=h,c*=h):(s=0,l=0,c=0),e[0]=i,e[1]=s,e[2]=u,e[3]=0,e[4]=a,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=c,e[10]=d,e[11]=0,e[12]=-(i*p+a*v+o*g),e[13]=-(s*p+l*v+c*g),e[14]=-(u*p+f*v+d*g),e[15]=1,e)}function pz(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=r[0],l=r[1],c=r[2],u=i-n[0],f=a-n[1],d=o-n[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=l*d-c*f,v=c*u-s*d,g=s*f-l*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),e[0]=p,e[1]=v,e[2]=g,e[3]=0,e[4]=f*g-d*v,e[5]=d*p-u*g,e[6]=u*v-f*p,e[7]=0,e[8]=u,e[9]=f,e[10]=d,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e}function vz(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function gz(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function yz(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e}function Q_(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function mz(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e}function bz(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e}function uy(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function xz(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=t[0],b=t[1],x=t[2],w=t[3],O=t[4],_=t[5],S=t[6],k=t[7],E=t[8],M=t[9],P=t[10],A=t[11],L=t[12],N=t[13],T=t[14],I=t[15];return Math.abs(n-m)<=Pt*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=Pt*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=Pt*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(a-w)<=Pt*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(o-O)<=Pt*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(s-_)<=Pt*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(l-S)<=Pt*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-k)<=Pt*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(u-E)<=Pt*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(f-M)<=Pt*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-P)<=Pt*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(h-A)<=Pt*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-L)<=Pt*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(v-N)<=Pt*Math.max(1,Math.abs(v),Math.abs(N))&&Math.abs(g-T)<=Pt*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(y-I)<=Pt*Math.max(1,Math.abs(y),Math.abs(I))}var fy=Yn,wz=Q_;const Oz=Object.freeze(Object.defineProperty({__proto__:null,add:yz,adjoint:az,clone:oy,copy:bl,create:it,determinant:$_,equals:xz,exactEquals:uy,frob:gz,fromQuat:cy,fromQuat2:lz,fromRotation:W_,fromRotationTranslation:V_,fromRotationTranslationScale:cz,fromRotationTranslationScaleOrigin:hu,fromScaling:no,fromTranslation:wa,fromValues:F_,fromXRotation:G_,fromYRotation:H_,fromZRotation:ly,frustum:uz,getRotation:oh,getScaling:wl,getTranslation:ah,identity:to,invert:Oi,lookAt:Z_,mul:fy,multiply:Yn,multiplyScalar:mz,multiplyScalarAndAdd:bz,ortho:q_,orthoNO:X_,orthoZO:K_,perspective:fz,perspectiveFromFieldOfView:hz,perspectiveNO:U_,perspectiveZO:dz,rotate:oz,rotateX:B_,rotateY:Y_,rotateZ:sz,scale:z_,set:sy,str:vz,sub:wz,subtract:Q_,targetTo:pz,translate:xl,transpose:R_},Symbol.toStringTag,{value:"Module"}));function Ye(){var e=new tn(3);return tn!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function Oa(e){var t=new tn(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function _a(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function Xe(e,t,n){var r=new tn(3);return r[0]=e,r[1]=t,r[2]=n,r}function Wi(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Wn(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function ro(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function dy(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function _z(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function Sz(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function kz(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function sh(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function Ez(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.hypot(n,r,i)}function ls(e,t){var n=t[0],r=t[1],i=t[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function Gi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function lh(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],l=n[2];return e[0]=i*l-a*s,e[1]=a*o-r*l,e[2]=r*s-i*o,e}function hy(e,t,n,r){var i=t[0],a=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e}function zt(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,e[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,e[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,e}function J_(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}function Mz(e,t,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=t[0],l=t[1],c=t[2],u=i*c-a*l,f=a*s-r*c,d=r*l-i*s,h=i*d-a*f,p=a*u-r*d,v=r*f-i*u,g=o*2;return u*=g,f*=g,d*=g,h*=2,p*=2,v*=2,e[0]=s+u+h,e[1]=l+f+p,e[2]=c+d+v,e}function pu(e,t){var n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],s=t[2];return Math.abs(n-a)<=Pt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=Pt*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=Pt*Math.max(1,Math.abs(i),Math.abs(s))}var Az=dy,eS=Ez,tS=_a;(function(){var e=Ye();return function(t,n,r,i,a,o){var s,l;for(n||(n=3),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}})();function Hi(){var e=new tn(4);return tn!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function vu(e,t,n,r){var i=new tn(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function Pz(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Cz(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Tz(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o,e}function Vi(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}(function(){var e=Hi();return function(t,n,r,i,a,o){var s,l;for(n||(n=4),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2],t[s+3]=e[3];return t}})();function mn(){var e=new tn(4);return tn!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function io(e,t,n){n=n*.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function ao(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=n[0],l=n[1],c=n[2],u=n[3];return e[0]=r*u+o*s+i*c-a*l,e[1]=i*u+o*l+a*s-r*c,e[2]=a*u+o*c+r*l-i*s,e[3]=o*u-r*s-i*l-a*c,e}function py(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3],l=n[0],c=n[1],u=n[2],f=n[3],d,h,p,v,g;return h=i*l+a*c+o*u+s*f,h<0&&(h=-h,l=-l,c=-c,u=-u,f=-f),1-h>Pt?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),e[0]=v*i+g*l,e[1]=v*a+g*c,e[2]=v*o+g*u,e[3]=v*s+g*f,e}function vy(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=a*s,e}function Lz(e,t){var n=t[0]+t[4]+t[8],r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(t[i*3+i]-t[a*3+a]-t[o*3+o]+1),e[i]=.5*r,r=.5/r,e[3]=(t[a*3+o]-t[o*3+a])*r,e[a]=(t[a*3+i]+t[i*3+a])*r,e[o]=(t[o*3+i]+t[i*3+o])*r}return e}function ch(e,t,n,r){var i=.5*Math.PI/180;t*=i,n*=i,r*=i;var a=Math.sin(t),o=Math.cos(t),s=Math.sin(n),l=Math.cos(n),c=Math.sin(r),u=Math.cos(r);return e[0]=a*l*u-o*s*c,e[1]=o*s*u+a*l*c,e[2]=o*l*c-a*s*u,e[3]=o*l*u+a*s*c,e}var Nz=vu,uh=Pz,nS=Cz,rS=ao,fh=Tz;(function(){var e=Ye(),t=Xe(1,0,0),n=Xe(0,1,0);return function(r,i,a){var o=Gi(i,a);return o<-.999999?(lh(e,t,i),tS(e)<1e-6&&lh(e,n,i),ls(e,e),io(r,e,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(lh(e,i,a),r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=1+o,fh(r,r))}})(),function(){var e=mn(),t=mn();return function(n,r,i,a,o,s){return py(e,r,o,s),py(t,i,a,s),py(n,e,t,2*s*(1-s)),n}}(),function(){var e=ml();return function(t,n,r,i){return e[0]=r[0],e[3]=r[1],e[6]=r[2],e[1]=i[0],e[4]=i[1],e[7]=i[2],e[2]=-n[0],e[5]=-n[1],e[8]=-n[2],fh(t,Lz(t,e))}}();function gy(){var e=new tn(2);return tn!=Float32Array&&(e[0]=0,e[1]=0),e}function Iz(e,t){return e[0]=t[0],e[1]=t[1],e}function jz(e,t,n){return e[0]=t,e[1]=n,e}function Dz(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function Fz(e,t){return e[0]*t[0]+e[1]*t[1]}function Rz(e,t){return e[0]===t[0]&&e[1]===t[1]}(function(){var e=gy();return function(t,n,r,i,a,o){var s,l;for(n||(n=2),r||(r=0),i?l=Math.min(i*n+r,t.length):l=t.length,s=r;s<l;s+=n)e[0]=t[s],e[1]=t[s+1],a(e,e,o),t[s]=e[0],t[s+1]=e[1];return t}})();var oo=function(){return oo=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},oo.apply(this,arguments)};function Br(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function $z(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function dr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function dh(e,t,n){var r=e*Math.cos(n)-t*Math.sin(n),i=e*Math.sin(n)+t*Math.cos(n);return{x:r,y:i}}function iS(e,t,n,r,i,a,o,s,l,c){var u=e,f=t,d=n,h=r,p=s,v=l,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,w,O,_;if(c)x=c[0],w=c[1],O=c[2],_=c[3];else{b=dh(u,f,-y),u=b.x,f=b.y,b=dh(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,k=(f-v)/2,E=S*S/(d*d)+k*k/(h*h);E>1&&(E=Math.sqrt(E),d*=E,h*=E);var M=d*d,P=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((M*P-M*k*k-P*S*S)/(M*k*k+P*S*S)));O=A*d*k/h+(u+p)/2,_=A*-h*S/d+(f+v)/2,x=Math.asin(((f-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((v-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,w=p<O?Math.PI-w:w,x<0&&(x=Math.PI*2+x),w<0&&(w=Math.PI*2+w),o&&x>w&&(x-=Math.PI*2),!o&&w>x&&(w-=Math.PI*2)}var L=w-x;if(Math.abs(L)>g){var N=w,T=p,I=v;w=x+g*(o&&w>x?1:-1),p=O+d*Math.cos(w),v=_+h*Math.sin(w),m=iS(p,v,d,h,i,0,o,T,I,[w,N,O,_])}L=w-x;var C=Math.cos(x),j=Math.sin(x),D=Math.cos(w),F=Math.sin(w),R=Math.tan(L/4),z=4/3*d*R,H=4/3*h*R,W=[u,f],X=[u+z*j,f-H*C],V=[p+z*F,v-H*D],q=[p,v];if(X[0]=2*W[0]-X[0],X[1]=2*W[1]-X[1],c)return X.concat(V,q,m);m=X.concat(V,q,m);for(var ie=[],Q=0,ne=m.length;Q<ne;Q+=1)ie[Q]=Q%2?dh(m[Q-1],m[Q],y).y:dh(m[Q],m[Q+1],y).x;return ie}function zz(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function aS(e){var t=document.createElement("div");t.innerHTML=e;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function ot(e,t){if(e!==null)return{type:"column",value:e,field:t}}function gu(e,t){const n=ot(e,t);return Object.assign(Object.assign({},n),{inferred:!0})}function hh(e,t){if(e!==null)return{type:"column",value:e,field:t,visual:!0}}function Bz(e,t){const n=ot(e,t);return Object.assign(Object.assign({},n),{constant:!1})}function so(e,t){const n=[];for(const r of e)n[r]=t;return n}function He(e,t){const n=e[t];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function yu(e,...t){for(const n of t)if(typeof n=="string"){const[r,i]=He(e,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function mu(e){return e instanceof Date?!1:typeof e=="object"}const bu=()=>(e,t)=>{const{encode:n}=t,{y1:r}=n;return r!==void 0?[e,t]:[e,Z({},t,{encode:{y1:gu(so(e,0))}})]};bu.props={};function Bt(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Yz(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function lo(e){let t,n,r;e.length!==2?(t=Bt,n=(s,l)=>Bt(e(s),l),r=(s,l)=>e(s)-l):(t=e===Bt||e===Yz?e:Wz,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;n(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=i(s,l,c,u-1);return f>c&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Wz(){return 0}function yy(e){return e===null?NaN:+e}function*Gz(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const oS=lo(Bt),Hz=oS.right,Vz=oS.left,Uz=lo(yy).center;function sS(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Xz(e,t){let n=0,r,i=0,a=0;if(t===void 0)for(let o of e)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++n,a+=r*(o-i));else{let o=-1;for(let s of e)(s=t(s,++o,e))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i))}if(n>1)return a/(n-1)}function lS(e,t){const n=Xz(e,t);return n&&Math.sqrt(n)}function Sa(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}class cs{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=n[i],o=t+a,s=Math.abs(t)<Math.abs(a)?t-(o-a):a-(o-t);s&&(n[r++]=s),t=o}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,a,o=0;if(n>0){for(o=t[--n];n>0&&(r=o,i=t[--n],o=r+i,a=i-(o-r),!a););n>0&&(a<0&&t[n-1]<0||a>0&&t[n-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}let qz=class extends Map{constructor(t,n=Qz){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(cS(this,t))}has(t){return super.has(cS(this,t))}set(t,n){return super.set(Kz(this,t),n)}delete(t){return super.delete(Zz(this,t))}};function cS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Kz({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Zz({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Qz(e){return e!==null&&typeof e=="object"?e.valueOf():e}function xu(e){return e}function _t(e,...t){return ph(e,xu,xu,t)}function my(e,...t){return ph(e,Array.from,xu,t)}function by(e,t,...n){return ph(e,xu,t,n)}function xy(e,t,...n){return ph(e,Array.from,t,n)}function ph(e,t,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new qz,l=r[o++];let c=-1;for(const u of a){const f=l(u,++c,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return t(s)}(e,0)}function Jz(e,t){return Array.from(t,n=>e[n])}function _i(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[n]=t;if(n&&n.length!==2||t.length>1){const r=Uint32Array.from(e,(i,a)=>a);return t.length>1?(t=t.map(i=>e.map(i)),r.sort((i,a)=>{for(const o of t){const s=wu(o[i],o[a]);if(s)return s}})):(n=e.map(n),r.sort((i,a)=>wu(n[i],n[a]))),Jz(e,r)}return e.sort(uS(n))}function uS(e=Bt){if(e===Bt)return wu;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function wu(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}function eB(e,t,n){return(t.length!==2?_i(by(e,t,n),([r,i],[a,o])=>Bt(i,o)||Bt(r,a)):_i(_t(e,n),([r,i],[a,o])=>t(i,o)||Bt(r,a))).map(([r])=>r)}var tB=Array.prototype,nB=tB.slice;function wy(e){return()=>e}const rB=Math.sqrt(50),iB=Math.sqrt(10),aB=Math.sqrt(2);function vh(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=rB?10:a>=iB?5:a>=aB?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?vh(e,t,n*2):[s,l,c]}function oB(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?vh(t,e,n):vh(e,t,n);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function Oy(e,t,n){return t=+t,e=+e,n=+n,vh(e,t,n)[2]}function sB(e,t,n){let r;for(;;){const i=Oy(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function lB(e){return Math.max(1,Math.ceil(Math.log(sS(e))/Math.LN2)+1)}function cB(){var e=xu,t=Sa,n=lB;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,l,c=new Array(o);for(a=0;a<o;++a)c[a]=e(i[a],a,i);var u=t(c),f=u[0],d=u[1],h=n(c,f,d);if(!Array.isArray(h)){const b=d,x=+h;if(t===Sa&&([f,d]=sB(f,d,x)),h=oB(f,d,x),h[0]<=f&&(l=Oy(f,d,x)),h[h.length-1]>=d)if(b>=d&&t===Sa){const w=Oy(f,d,x);isFinite(w)&&(w>0?d=(Math.floor(d/w)+1)*w:w<0&&(d=(Math.ceil(d*-w)+1)/-w))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(l)){if(l>0)for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/l))].push(i[a]);else if(l<0){for(a=0;a<o;++a)if((s=c[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*l);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=c[a])!=null&&f<=s&&s<=d&&y[Hz(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:wy(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:wy([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:wy(Array.isArray(i)?nB.call(i):i),r):n},r}function tt(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Ol(e,t){let n,r=-1,i=-1;if(t===void 0)for(const a of e)++i,a!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);return r}function kr(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Ou(e,t){let n,r=-1,i=-1;if(t===void 0)for(const a of e)++i,a!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of e)(a=t(a,++i,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);return r}function _y(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?wu:uS(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(n,Math.floor(t-c*f/l+d)),p=Math.min(r,Math.floor(t+(l-c)*f/l+d));_y(e,t,h,p,i)}const a=e[t];let o=n,s=r;for(_u(e,n,t),i(e[r],a)>0&&_u(e,n,r);o<s;){for(_u(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?_u(e,n,s):(++s,_u(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function _u(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function uB(e,t=Bt){let n,r=!1;if(t.length===1){let i;for(const a of e){const o=t(a);(r?Bt(o,i)>0:Bt(o,o)===0)&&(n=a,i=o,r=!0)}}else for(const i of e)(r?t(i,n)>0:t(i,i)===0)&&(n=i,r=!0);return n}function gh(e,t,n){if(e=Float64Array.from(Gz(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return kr(e);if(t>=1)return tt(e);var r,i=(r-1)*t,a=Math.floor(i),o=tt(_y(e,a).subarray(0,a+1)),s=kr(e.subarray(a+1));return o+(s-o)*(i-a)}}function fB(e,t,n=yy){if(!isNaN(t=+t)){if(r=Float64Array.from(e,(s,l)=>yy(n(e[l],l,e))),t<=0)return Ou(r);if(t>=1)return Ol(r);var r,i=Uint32Array.from(e,(s,l)=>l),a=r.length-1,o=Math.floor(a*t);return _y(i,o,0,a,(s,l)=>wu(r[s],r[l])),o=uB(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function dB(e,t,n){const r=sS(e),i=lS(e);return r&&i?Math.ceil((n-t)*Math.cbrt(r)/(3.49*i)):1}function Su(e,t){let n=0,r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function Sy(e,t){return gh(e,.5,t)}function hB(e,t){return fB(e,.5,t)}function*pB(e){for(const t of e)yield*N8(t)}function fS(e){return Array.from(pB(e))}function _l(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Yr(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}var vB=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function us(e){return e}function ky(e){return e.reduce((t,n)=>(r,...i)=>n(t(r,...i),...i),us)}function gB(e){return e.reduce((t,n)=>r=>vB(this,void 0,void 0,function*(){const i=yield t(r);return n(i)}),us)}function Ey(e){return e.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function Sl(e=""){throw new Error(e)}function My(e,t){const{attributes:n}=t,r=new Set(["id","className"]);for(const[i,a]of Object.entries(n))r.has(i)||e.attr(i,a)}function pt(e){return e!=null&&!Number.isNaN(e)}function yB(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}function mB(e,t){const{transform:n}=e.style,i=(a=>a==="none"||a===void 0)(n)?"":n;e.style.transform=`${i} ${t}`.trimStart()}function le(e,t){return dS(e,t)||{}}function dS(e,t){const n=Object.entries(e||{}).filter(([r])=>r.startsWith(t)).map(([r,i])=>[N_(r.replace(t,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function bB(e,t){return Object.fromEntries(Object.entries(e).filter(([n])=>t.find(r=>n.startsWith(r))))}function Ay(e,...t){return Object.fromEntries(Object.entries(e).filter(([n])=>t.every(r=>!n.startsWith(r))))}function hS(e,t){if(e===void 0)return null;if(typeof e=="number")return e;const n=+e.replace("%","");return Number.isNaN(n)?null:n/100*t}function kl(e){return typeof e=="object"&&!(e instanceof Date)&&e!==null&&!Array.isArray(e)}function ka(e){return e===null||e===!1}function pS(e,t,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(t)){const a=t[i];!xa(a)||!xa(e[i])?e[i]=a:pS(e[i],a,n,r+1)}return e}}function Ui(e,t){return Object.entries(e).reduce((n,[r,i])=>(n[r]=t(i,r,e),n),{})}function fs(e){return e.map((t,n)=>n)}function xB(e){return e[0]}function vS(e){return e[e.length-1]}function wB(e){return Array.from(new Set(e))}function gS(e,t){const n=[[],[]];return e.forEach(r=>{n[t(r)?0:1].push(r)}),n}function yS(e,t=e.length){if(t===1)return e.map(r=>[r]);const n=[];for(let r=0;r<e.length;r++){const i=e.slice(r+1);yS(i,t-1).forEach(o=>{n.push([e[r],...o])})}return n}function OB(e){if(e.length===1)return[e];const t=[];for(let n=1;n<=e.length;n++)t.push(...yS(e,n));return t}function co(e,t,n){const{encode:r}=n;if(e===null)return[t];const i=_B(e).map(o=>{var s;return[o,(s=He(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>pt(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(_t(t,a).values())}function mS(e){return Array.isArray(e)?EB(e):typeof e=="function"?kB(e):e==="series"?SB:e==="value"?MB:e==="sum"?AB:e==="maxIndex"?PB:null}function bS(e,t){for(const n of e)n.sort(t)}function xS(e,t){return(t==null?void 0:t.domain)||Array.from(new Set(e))}function _B(e){return Array.isArray(e)?e:[e]}function SB(e,t,n){return ku(r=>n[r])}function kB(e){return(t,n,r)=>ku(i=>e(t[i]))}function EB(e){return(t,n,r)=>(i,a)=>e.reduce((o,s)=>o!==0?o:Bt(t[i][s],t[a][s]),0)}function MB(e,t,n){return ku(r=>t[r])}function AB(e,t,n){const r=fs(e),i=Array.from(_t(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((l,c)=>l+ +t[c])]));return ku(o=>a.get(n[o]))}function PB(e,t,n){const r=fs(e),i=Array.from(_t(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,Ol(s,l=>t[l])]));return ku(o=>a.get(n[o]))}function ku(e){return(t,n)=>Bt(e(t),e(n))}const wS=(e={})=>{const{groupBy:t="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=e;return(s,l)=>{var c;const{data:u,encode:f,style:d={}}=l,[h,p]=He(f,"y"),[v,g]=He(f,"y1"),[y]=o?yu(f,"series","color"):He(f,"color"),m=co(t,s,l),x=((c=mS(n))!==null&&c!==void 0?c:()=>null)(u,h,y);x&&bS(m,x);const w=new Array(s.length),O=new Array(s.length),_=new Array(s.length),S=[],k=[];for(const N of m){r&&N.reverse();const T=v?+v[N[0]]:0,I=[],C=[];for(const W of N){const X=_[W]=+h[W]-T;X<0?C.push(W):X>=0&&I.push(W)}const j=I.length>0?I:C,D=C.length>0?C:I;let F=I.length-1,R=0;for(;F>0&&h[j[F]]===0;)F--;for(;R<D.length-1&&h[D[R]]===0;)R++;S.push(j[F]),k.push(D[R]);let z=T;for(const W of C.reverse()){const X=_[W];z=w[W]=(O[W]=z)+X}let H=T;for(const W of I){const X=_[W];X>0?H=w[W]=(O[W]=H)+X:w[W]=O[W]=H}}const E=new Set(S),M=new Set(k),P=i==="y"?w:O,A=a==="y"?w:O;let L;return l.type==="point"?L={y0:gu(h,p),y:ot(P,p)}:L={y0:gu(h,p),y:ot(P,p),y1:ot(A,g)},[s,Z({},l,{encode:Object.assign({},L),style:Object.assign({first:(N,T)=>E.has(T),last:(N,T)=>M.has(T)},d)})]}};wS.props={};function Eu(e){return Math.abs(e)>10?String(e):e.toString().padStart(2,"0")}function CB(e){const t=e.getFullYear(),n=Eu(e.getMonth()+1),r=Eu(e.getDate()),i=`${t}-${n}-${r}`,a=e.getHours(),o=e.getMinutes(),s=e.getSeconds();return a||o||s?`${i} ${Eu(a)}:${Eu(o)}:${Eu(s)}`:i}const yh=(e={})=>{const{channel:t="x"}=e;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(ka(a))return[n,r];const{title:o}=a;if(o!==void 0)return[n,r];const s=Object.keys(i).filter(c=>c.startsWith(t)).filter(c=>!i[c].inferred).map(c=>He(i,c)).filter(([c])=>c).map(c=>c[0]);if(s.length===0)return[n,r];const l=[];for(const c of n)l[c]={value:s.map(u=>u[c]instanceof Date?CB(u[c]):u[c]).join(", ")};return[n,Z({},r,{tooltip:{title:l}})]}};yh.props={};const ds=()=>(e,t)=>{const{encode:n}=t,{x:r}=n;return r!==void 0?[e,t]:[e,Z({},t,{encode:{x:gu(so(e,0))},scale:{x:{guide:null}}})]};ds.props={};const mh=()=>(e,t)=>{const{encode:n}=t,{y:r}=n;return r!==void 0?[e,t]:[e,Z({},t,{encode:{y:gu(so(e,0))},scale:{y:{guide:null}}})]};mh.props={};const OS=()=>(e,t)=>{const{encode:n}=t,{size:r}=n;return r!==void 0?[e,t]:[e,Z({},t,{encode:{size:hh(so(e,3))}})]};OS.props={};var TB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const _S=()=>(e,t)=>{const{encode:n}=t,{key:r}=n,i=TB(n,["key"]);if(r!==void 0)return[e,t];const a=Object.values(i).map(({value:s})=>s),o=e.map(s=>a.filter(Array.isArray).map(l=>l[s]).join("-"));return[e,Z({},t,{encode:{key:ot(o)}})]};_S.props={};const Py=()=>(e,t)=>{const{encode:n}=t,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[e,t];const[a,o]=He(n,"color");return[e,Z({},t,{encode:{series:ot(a,o)}})]};Py.props={};const SS=()=>(e,t)=>{const{data:n}=t;return!Array.isArray(n)||n.some(mu)?[e,t]:[e,Z({},t,{encode:{y:ot(n)}})]};SS.props={};const kS=()=>(e,t)=>{const{data:n}=t;return!Array.isArray(n)||n.some(mu)?[e,t]:[e,Z({},t,{encode:{x:ot(n)}})]};kS.props={};const ES=()=>(e,t)=>{const{encode:n}=t,{y1:r}=n;if(r)return[e,t];const[i]=He(n,"y");return[e,Z({},t,{encode:{y1:ot([...i])}})]};ES.props={};const MS=()=>(e,t)=>{const{encode:n}=t,{x1:r}=n;if(r)return[e,t];const[i]=He(n,"x");return[e,Z({},t,{encode:{x1:ot([...i])}})]};MS.props={};const AS=()=>(e,t)=>{const{data:n}=t;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(mu))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[e,Z({},t,{encode:{x:ot(r(n,0)),x1:ot(r(n,1))}})]}return[e,t]};AS.props={};const PS=()=>(e,t)=>{const{data:n}=t;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(mu))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[e,Z({},t,{encode:{y:ot(r(n,0)),y1:ot(r(n,1))}})]}return[e,t]};PS.props={};const bh=e=>{const{channel:t}=e;return(n,r)=>{const{encode:i,tooltip:a}=r;if(ka(a))return[n,r];const{items:o=[]}=a;if(!o||o.length>0)return[n,r];const l=(Array.isArray(t)?t:[t]).flatMap(c=>Object.keys(i).filter(u=>u.startsWith(c)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[n,Z({},r,{tooltip:{items:l}})]}};bh.props={};const Cy=()=>(e,t)=>[e,Z({scale:{x:{padding:0},y:{padding:0}}},t)];Cy.props={};var CS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const xh=()=>(e,t)=>{const{data:n,style:r={}}=t,i=CS(t,["data","style"]),{x:a,y:o}=r,s=CS(r,["x","y"]);if(a==null||o==null)return[e,t];const l=a||0,c=o||0;return[[0],Z({},i,{data:[0],cartesian:!0,encode:{x:ot([l]),y:ot([c])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};xh.props={};const TS=()=>(e,t)=>{const{style:n={}}=t;return[e,Z({},t,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};TS.props={};const wh=()=>(e,t)=>{const{data:n}=t;if(!Array.isArray(n)||n.some(mu))return[e,t];const r=Array.isArray(n[0])?n:[n],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[e,Z({},t,{encode:{x:ot(i),y:ot(a)}})]};wh.props={};const LS=()=>(e,t)=>{const{style:n={},encode:r}=t,{series:i}=r,{gradient:a}=n;return!a||i?[e,t]:[e,Z({},t,{encode:{series:hh(so(e,void 0))}})]};LS.props={};var LB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const NS=(e={})=>{const{groupBy:t="x",reverse:n=!1,orderBy:r,padding:i}=e;return LB(e,["groupBy","reverse","orderBy","padding"]),(a,o)=>{const{data:s,encode:l,scale:c}=o,{series:u}=c,[f]=He(l,"y"),[d]=yu(l,"series","color"),h=xS(d,u),p=Z({},o,{scale:{series:{domain:h,paddingInner:i}}}),v=co(t,a,o),g=mS(r);if(!g)return[a,Z(p,{encode:{series:ot(d)}})];const y=g(s,f,d);y&&bS(v,y);const m=new Array(a.length);for(const b of v){n&&b.reverse();for(let x=0;x<b.length;x++)m[b[x]]=h[x]}return[a,Z(p,{encode:{series:ot(r?m:d)}})]}};NS.props={};const IS=e=>{const{groupBy:t=["x"],reducer:n=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=e;return(o,s)=>{const{encode:l}=s,u=(Array.isArray(t)?t:[t]).map(g=>[g,He(l,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const y=[];for(const m of f){const b=Array.from(_t(m,x=>g[x]).values());y.push(...b)}f=y}if(r){const[g]=He(l,r);g&&f.sort((y,m)=>n(y,g)-n(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[so(o,d)]:yu(l,"enterDuration",so(o,d)),[p]=yu(l,"enterDelay",so(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=tt(m,x=>+h[x]);for(const x of m)v[x]=+p[x]+y;y+=b}return[o,Z({},s,{encode:{enterDuration:hh(h),enterDelay:hh(v)}})]}};IS.props={};var NB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function IB(e){return typeof e=="function"?e:{min:(n,r)=>kr(n,i=>r[+i]),max:(n,r)=>tt(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>Su(n,i=>r[+i]),median:(n,r)=>Sy(n,i=>r[+i]),sum:(n,r)=>Yr(n,i=>r[+i]),deviation:(n,r)=>lS(n,i=>r[+i])}[e]||tt}const jS=(e={})=>{const{groupBy:t="x",basis:n="max"}=e;return(r,i)=>{const{encode:a,tooltip:o}=i,s=NB(a,["x"]),l=Object.entries(s).filter(([p])=>p.startsWith("y")).map(([p])=>[p,He(a,p)[0]]),[,c]=l.find(([p])=>p==="y"),u=l.map(([p])=>[p,new Array(r.length)]),f=co(t,r,i),d=IB(n);for(const p of f){const v=d(p,c);for(const g of p)for(let y=0;y<l.length;y++){const[,m]=l[y],[,b]=u[y];b[g]=+m[g]/v}}const h=ka(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,Z({},i,Object.assign({encode:Object.fromEntries(u.map(([p,v])=>[p,ot(v,He(a,p)[1])]))},!h&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};jS.props={};function El(e,...t){return t.reduce((n,r)=>i=>n(r(i)),e)}function Oh(e,t){return t-e?n=>(n-e)/(t-e):n=>.5}function jB(e,t){const n=t<e?t:e,r=e>t?e:t;return i=>Math.min(Math.max(n,i),r)}function Ty(e,t,n,r,i){let a=n||0,o=r||e.length;const s=i||(l=>l);for(;a<o;){const l=Math.floor((a+o)/2);s(e[l])>t?o=l:a=l+1}return a}const Ly=Math.sqrt(50),Ny=Math.sqrt(10),Iy=Math.sqrt(2);function _h(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Pn(10,i);return i>=0?(a>=Ly?10:a>=Ny?5:a>=Iy?2:1)*Pn(10,i):-Pn(10,-i)/(a>=Ly?10:a>=Ny?5:a>=Iy?2:1)}function DS(e,t,n){const r=Math.abs(t-e)/Math.max(0,n);let i=Pn(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=Ly?i*=10:a>=Ny?i*=5:a>=Iy&&(i*=2),t<e?-i:i}const FS=(e,t,n=5)=>{const r=[e,t];let i=0,a=r.length-1,o=r[i],s=r[a],l;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),l=_h(o,s,n),l>0?(o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l,l=_h(o,s,n)):l<0&&(o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l,l=_h(o,s,n)),l>0?(r[i]=Math.floor(o/l)*l,r[a]=Math.ceil(s/l)*l):l<0&&(r[i]=Math.ceil(o*l)/l,r[a]=Math.floor(s*l)/l),r},Mu=1e3,Au=Mu*60,Pu=Au*60,hs=Pu*24,Cu=hs*7,RS=hs*30,$S=hs*365;function Gn(e,t,n,r){const i=(c,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(c);)n(c,-1),d-=1;return c},a=(c,u)=>{u&&i(c,u),t(c)},o=(c,u)=>{const f=new Date(+c);return a(f,u),f},s=(c,u)=>{const f=new Date(+c-1);return a(f,u),n(f,u),a(f),f};return{ceil:s,floor:o,range:(c,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(c,f):s(c);for(let g=v;g<u;n(g,p),a(g))h.push(new Date(+g));return h},duration:e}}const DB=Gn(1,e=>e,(e,t=1)=>{e.setTime(+e+t)},e=>e.getTime()),FB=Gn(Mu,e=>{e.setMilliseconds(0)},(e,t=1)=>{e.setTime(+e+Mu*t)},e=>e.getSeconds()),RB=Gn(Au,e=>{e.setSeconds(0,0)},(e,t=1)=>{e.setTime(+e+Au*t)},e=>e.getMinutes()),$B=Gn(Pu,e=>{e.setMinutes(0,0,0)},(e,t=1)=>{e.setTime(+e+Pu*t)},e=>e.getHours()),zB=Gn(hs,e=>{e.setHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+hs*t)},e=>e.getDate()-1),zS=Gn(RS,e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t=1)=>{const n=e.getMonth();e.setMonth(n+t)},e=>e.getMonth()),BB=Gn(Cu,e=>{e.setDate(e.getDate()-e.getDay()%7),e.setHours(0,0,0,0)},(e,t=1)=>{e.setDate(e.getDate()+7*t)},e=>{const t=zS.floor(e),n=new Date(+e);return Math.floor((+n-+t)/Cu)}),YB=Gn($S,e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t=1)=>{const n=e.getFullYear();e.setFullYear(n+t)},e=>e.getFullYear()),BS={millisecond:DB,second:FB,minute:RB,hour:$B,day:zB,week:BB,month:zS,year:YB},WB=Gn(1,e=>e,(e,t=1)=>{e.setTime(+e+t)},e=>e.getTime()),GB=Gn(Mu,e=>{e.setUTCMilliseconds(0)},(e,t=1)=>{e.setTime(+e+Mu*t)},e=>e.getUTCSeconds()),HB=Gn(Au,e=>{e.setUTCSeconds(0,0)},(e,t=1)=>{e.setTime(+e+Au*t)},e=>e.getUTCMinutes()),VB=Gn(Pu,e=>{e.setUTCMinutes(0,0,0)},(e,t=1)=>{e.setTime(+e+Pu*t)},e=>e.getUTCHours()),UB=Gn(hs,e=>{e.setUTCHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+hs*t)},e=>e.getUTCDate()-1),YS=Gn(RS,e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t=1)=>{const n=e.getUTCMonth();e.setUTCMonth(n+t)},e=>e.getUTCMonth()),XB=Gn(Cu,e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7)%7),e.setUTCHours(0,0,0,0)},(e,t=1)=>{e.setTime(+e+Cu*t)},e=>{const t=YS.floor(e),n=new Date(+e);return Math.floor((+n-+t)/Cu)}),qB=Gn($S,e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t=1)=>{const n=e.getUTCFullYear();e.setUTCFullYear(n+t)},e=>e.getUTCFullYear()),WS={millisecond:WB,second:GB,minute:HB,hour:VB,day:UB,week:XB,month:YS,year:qB};function KB(e){const t=e?WS:BS,{year:n,month:r,week:i,day:a,hour:o,minute:s,second:l,millisecond:c}=t;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[n,1]],year:n,millisecond:c}}function GS(e,t,n,r,i){const a=+e,o=+t,{tickIntervals:s,year:l,millisecond:c}=KB(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=Ty(s,d,0,h,u);let v;if(p===h){const g=DS(a/l.duration,o/l.duration,f);v=[l,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[y,m]=g?s[p-1]:s[p],b=r?Math.ceil(r/y.duration):m;v=[y,b]}else{const g=Math.max(DS(a,o,f),1);v=[c,g]}return v}const ZB=(e,t,n,r,i)=>{const a=e>t,o=a?t:e,s=a?e:t,[l,c]=GS(o,s,n,r,i),u=[l.floor(o,c),l.ceil(s,c)];return a?u.reverse():u};function Sh(e){return!nh(e)&&!Y$(e)&&!Number.isNaN(e)}const HS=e=>t=>-e(-t),jy=(e,t)=>{const n=Math.log(e),r=e===Math.E?Math.log:e===10?Math.log10:e===2?Math.log2:i=>Math.log(i)/n;return t?HS(r):r},Dy=(e,t)=>{const n=e===Math.E?Math.exp:r=>Pn(e,r);return t?HS(n):n},QB=(e,t,n,r)=>{const i=e<0,a=jy(r,i),o=Dy(r,i),s=e>t,l=s?t:e,c=s?e:t,u=[o(Math.floor(a(l))),o(Math.ceil(a(c)))];return s?u.reverse():u},JB=e=>t=>{const n=e(t);return _n(n)?Math.round(n):n};function e9(e,t){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},n.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=e(r)},n.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),l=t(a.map(r)),c=s?JB(o):o;this.output=El(c,l,i,r)},n.prototype.invert=void 0}}var VS={exports:{}},t9={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},US={exports:{}},n9=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},r9=n9,i9=Array.prototype.concat,a9=Array.prototype.slice,XS=US.exports=function(t){for(var n=[],r=0,i=t.length;r<i;r++){var a=t[r];r9(a)?n=i9.call(n,a9.call(a)):n.push(a)}return n};XS.wrap=function(e){return function(){return e(XS(arguments))}};var o9=US.exports,Tu=t9,Lu=o9,qS=Object.hasOwnProperty,KS=Object.create(null);for(var Fy in Tu)qS.call(Tu,Fy)&&(KS[Tu[Fy]]=Fy);var Er=VS.exports={to:{},get:{}};Er.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case"hsl":n=Er.get.hsl(e),r="hsl";break;case"hwb":n=Er.get.hwb(e),r="hwb";break;default:n=Er.get.rgb(e),r="rgb";break}return n?{model:r,value:n}:null},Er.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,a=/^(\w+)$/,o=[0,0,0,1],s,l,c;if(s=e.match(n)){for(c=s[2],s=s[1],l=0;l<3;l++){var u=l*2;o[l]=parseInt(s.slice(u,u+2),16)}c&&(o[3]=parseInt(c,16)/255)}else if(s=e.match(t)){for(s=s[1],c=s[3],l=0;l<3;l++)o[l]=parseInt(s[l]+s[l],16);c&&(o[3]=parseInt(c+c,16)/255)}else if(s=e.match(r)){for(l=0;l<3;l++)o[l]=parseInt(s[l+1],0);s[4]&&(s[5]?o[3]=parseFloat(s[4])*.01:o[3]=parseFloat(s[4]))}else if(s=e.match(i)){for(l=0;l<3;l++)o[l]=Math.round(parseFloat(s[l+1])*2.55);s[4]&&(s[5]?o[3]=parseFloat(s[4])*.01:o[3]=parseFloat(s[4]))}else return(s=e.match(a))?s[1]==="transparent"?[0,0,0,0]:qS.call(Tu,s[1])?(o=Tu[s[1]],o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=uo(o[l],0,255);return o[3]=uo(o[3],0,1),o},Er.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,a=uo(parseFloat(n[2]),0,100),o=uo(parseFloat(n[3]),0,100),s=uo(isNaN(r)?1:r,0,1);return[i,a,o,s]}return null},Er.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,a=uo(parseFloat(n[2]),0,100),o=uo(parseFloat(n[3]),0,100),s=uo(isNaN(r)?1:r,0,1);return[i,a,o,s]}return null},Er.to.hex=function(){var e=Lu(arguments);return"#"+kh(e[0])+kh(e[1])+kh(e[2])+(e[3]<1?kh(Math.round(e[3]*255)):"")},Er.to.rgb=function(){var e=Lu(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},Er.to.rgb.percent=function(){var e=Lu(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},Er.to.hsl=function(){var e=Lu(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Er.to.hwb=function(){var e=Lu(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Er.to.keyword=function(e){return KS[e.slice(0,3)]};function uo(e,t,n){return Math.min(Math.max(t,e),n)}function kh(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var s9=VS.exports;const l9=ou(s9);function Ry(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function c9(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100,i=e[3];if(n===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+n):r+n-r*n,o=2*r-a,s=Ry(o,a,t+1/3),l=Ry(o,a,t),c=Ry(o,a,t-1/3);return[s*255,l*255,c*255,i]}function ZS(e){const t=l9.get(e);if(!t)return null;const{model:n,value:r}=t;return n==="rgb"?r:n==="hsl"?c9(r):null}const Ml=(e,t)=>n=>e*(1-n)+t*n,u9=(e,t)=>{const n=ZS(e),r=ZS(t);return n===null||r===null?n?()=>e:()=>t:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=n[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,l,c]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(l)}, ${c})`}},Nu=(e,t)=>typeof e=="number"&&typeof t=="number"?Ml(e,t):typeof e=="string"&&typeof t=="string"?u9(e,t):()=>e,f9=(e,t)=>{const n=Ml(e,t);return r=>Math.round(n(r))};function d9(e,t){const{second:n,minute:r,hour:i,day:a,week:o,month:s,year:l}=t;return n.floor(e)<e?".SSS":r.floor(e)<e?":ss":i.floor(e)<e?"hh:mm":a.floor(e)<e?"hh A":s.floor(e)<e?o.floor(e)<e?"MMM DD":"ddd DD":l.floor(e)<e?"MMMM":"YYYY"}function QS({map:e,initKey:t},n){const r=t(n);return e.has(r)?e.get(r):n}function h9({map:e,initKey:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function p9({map:e,initKey:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function v9(e){return typeof e=="object"?e.valueOf():e}class JS extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=v9,t!==null)for(const[n,r]of t)this.set(n,r)}get(t){return super.get(QS({map:this.map,initKey:this.initKey},t))}has(t){return super.has(QS({map:this.map,initKey:this.initKey},t))}set(t,n){return super.set(h9({map:this.map,initKey:this.initKey},t),n)}delete(t){return super.delete(p9({map:this.map,initKey:this.initKey},t))}}let Iu=class{constructor(t){this.options=Z({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Z({},this.options,t),this.rescale(t)}rescale(t){}};const Eh=Symbol("defaultUnknown");function ek(e,t,n){for(let r=0;r<t.length;r+=1)e.has(t[r])||e.set(n(t[r]),r)}function tk(e){const{value:t,from:n,to:r,mapper:i,notFoundReturn:a}=e;let o=i.get(t);if(o===void 0){if(a!==Eh)return a;o=n.push(t)-1,i.set(t,o)}return r[o%r.length]}function nk(e){return e instanceof Date?t=>`${t}`:typeof e=="object"?t=>JSON.stringify(t):t=>t}let rk=class I8 extends Iu{getDefaultOptions(){return{domain:[],range:[],unknown:Eh}}constructor(t){super(t)}map(t){return this.domainIndexMap.size===0&&ek(this.domainIndexMap,this.getDomain(),this.domainKey),tk({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return this.rangeIndexMap.size===0&&ek(this.rangeIndexMap,this.getRange(),this.rangeKey),tk({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[n]=this.options.domain,[r]=this.options.range;if(this.domainKey=nk(n),this.rangeKey=nk(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new I8(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:n}=this.options;return this.sortedDomain=n?[...t].sort(n):t,this.sortedDomain}};function g9(e){const t=Math.min(...e);return e.map(n=>n/t)}function y9(e,t){const n=e.length,r=t-n;return r>0?[...e,...new Array(r).fill(1)]:r<0?e.slice(0,t):e}function m9(e){return Math.round(e*1e12)/1e12}function b9(e){const{domain:t,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=e,l=t.length,c=y9(a,l),[u,f]=n,d=f-u,h=2/l*r+1-1/l*i,p=d/h,v=p*i/l,g=p-l*v,y=g9(c),m=y.reduce((P,A)=>P+A),b=g/m,x=new JS(t.map((P,A)=>{const L=y[A]*b;return[P,o?Math.floor(L):L]})),w=new JS(t.map((P,A)=>{const N=y[A]*b+v;return[P,o?Math.floor(N):N]})),O=Array.from(w.values()).reduce((P,A)=>P+A),S=(d-(O-O/l*i))*s,k=u+S;let E=o?Math.round(k):k;const M=new Array(l);for(let P=0;P<l;P+=1){M[P]=m9(E);const A=t[P];E+=w.get(A)}return{valueBandWidth:x,valueStep:w,adjustedRange:M}}function x9(e){var t;const{domain:n}=e,r=n.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((t=e.flex)===null||t===void 0)&&t.length))return b9(e);const{range:a,paddingOuter:o,paddingInner:s,round:l,align:c}=e;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),l&&(u=Math.floor(u)),d+=(p-u*(r-s))*c,f=u*(1-s),l&&(d=Math.round(d),f=Math.round(f));const y=new Array(r).fill(0).map((m,b)=>d+b*u);return{valueStep:u,valueBandWidth:f,adjustedRange:y}}let Al=class j8 extends rk{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Eh,flex:[]}}constructor(t){super(t)}clone(){return new j8(this.options)}getStep(t){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:t===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:t===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:t,paddingInner:n}=this.options;return t>0?t:n}getPaddingOuter(){const{padding:t,paddingOuter:n}=this.options;return t>0?t:n}rescale(){super.rescale();const{align:t,domain:n,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:l}=x9({align:t,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:n});this.valueStep=l,this.valueBandWidth=s,this.adjustedRange=o}};const ps=(e,t,n)=>{let r,i,a=e,o=t;if(a===o&&n>0)return[a];let s=_h(a,o,n);if(s===0||!Number.isFinite(s))return[];if(s>0){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)/s}return i};let $y=class D8 extends Iu{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:ps}}map(t){const[n]=this.options.range;return n!==void 0?n:this.options.unknown}invert(t){const[n]=this.options.range;return t===n&&n!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:t,domain:n,tickCount:r}=this.options,[i,a]=n;return!_n(i)||!_n(a)?[]:t(i,a,r)}clone(){return new D8(this.options)}};function ju(e){return Math.abs(e)<1e-14?e:parseFloat(e.toFixed(14))}const w9=[1,5,2,2.5,4,3],ik=Number.EPSILON*100;function O9(e,t){return(e%t+t)%t}function _9(e){return Math.round(e*1e12)/1e12}function S9(e,t,n,r,i,a){const o=ih(t),s=D_(t,e);let l=0;const c=O9(r,a);return(c<ik||a-c<ik)&&r<=0&&i>=0&&(l=1),1-s/(o-1)-n+l}function k9(e,t,n){const r=ih(t);return 1-D_(t,e)/(r-1)-n+1}function E9(e,t,n,r,i,a){const o=(e-1)/(a-i),s=(t-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function M9(e,t){return e>=t?2-(e-1)/(t-1):1}function A9(e,t,n,r){const i=t-e;return 1-.5*(Pn(t-r,2)+Pn(e-n,2))/Pn(.1*i,2)}function P9(e,t,n){const r=t-e;if(n>r){const i=(n-r)/2;return 1-Pn(i,2)/Pn(.1*r,2)}return 1}function C9(){return 1}const zy=(e,t,n=5,r=!0,i=w9,a=[.25,.2,.5,.05])=>{const o=n<0?0:Math.round(n);if(Number.isNaN(e)||Number.isNaN(t)||typeof e!="number"||typeof t!="number"||!o)return[];if(t-e<1e-15||o===1)return[e];const s={score:-2,lmin:0,lmax:0,lstep:0};let l=1;for(;l<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=k9(v,i,l);if(a[0]*g+a[1]+a[2]+a[3]<s.score){l=1/0;break}let y=2;for(;y<1/0;){const m=M9(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(t-e)/(y+1)/l/v;let x=Math.ceil(Math.log10(b));for(;x<1/0;){const w=l*v*Pn(10,x),O=P9(e,t,w*(y-1));if(a[0]*g+a[1]*O+a[2]*m+a[3]<s.score)break;const _=Math.floor(t/w)*l-(y-1)*l,S=Math.ceil(e/w)*l;if(_<=S){const k=S-_;for(let E=0;E<=k;E+=1){const P=(_+E)*(w/l),A=P+w*(y-1),L=w,N=S9(v,i,l,P,A,L),T=A9(e,t,P,A),I=E9(y,o,e,t,P,A),C=C9(),j=a[0]*N+a[1]*T+a[2]*I+a[3]*C;j>s.score&&(!r||P<=e&&A>=t)&&(s.lmin=P,s.lmax=A,s.lstep=L,s.score=j)}}x+=1}y+=1}}l+=1}const c=ju(s.lmax),u=ju(s.lmin),f=ju(s.lstep),d=Math.floor(_9((c-u)/f))+1,h=new Array(d);h[0]=ju(u);for(let p=1;p<d;p+=1)h[p]=ju(h[p-1]+f);return h};let ak=class F8 extends Iu{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:zy}}map(t){return Sh(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new F8(this.options)}getTicks(){const{domain:t,tickCount:n,tickMethod:r}=this.options,[i,a]=t;return!_n(i)||!_n(a)?[]:r(i,a,n)}};const T9=(e,t,n)=>{const[r,i]=e,[a,o]=t;let s,l;return r<i?(s=Oh(r,i),l=n(a,o)):(s=Oh(i,r),l=n(o,a)),El(l,s)},L9=(e,t,n)=>{const r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=e[0]>e[r],s=o?[...e].reverse():e,l=o?[...t].reverse():t;for(let c=0;c<r;c+=1)i[c]=Oh(s[c],s[c+1]),a[c]=n(l[c],l[c+1]);return c=>{const u=Ty(e,c,1,r)-1,f=i[u],d=a[u];return El(d,f)(c)}},ok=(e,t,n,r)=>(Math.min(e.length,t.length)>2?L9:T9)(e,t,r?f9:n);let Mh=class extends Iu{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ml,tickCount:5}}map(t){return Sh(t)?this.output(t):this.options.unknown}invert(t){return Sh(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,n,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,n,r,...i)}getTicks(){const{tickMethod:t}=this.options,[n,r,i,...a]=this.getTickMethodOptions();return t(n,r,i,...a)}getTickMethodOptions(){const{domain:t,tickCount:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,n]}chooseNice(){return FS}rescale(){this.nice();const[t,n]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,n,this.chooseClamp(n))}chooseClamp(t){const{clamp:n,range:r}=this.options,i=this.options.domain.map(t),a=Math.min(i.length,r.length);return n?jB(i[0],i[a-1]):ss}composeOutput(t,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=ok(r.map(t),i,o,a);this.output=El(s,n,t)}composeInput(t,n,r){const{domain:i,range:a}=this.options,o=ok(a,i.map(t),Ml);this.input=El(n,r,o)}},bt=class R8 extends Mh{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Nu,tickMethod:ps,tickCount:5}}chooseTransforms(){return[ss,ss]}clone(){return new R8(this.options)}},sk=class $8 extends Al{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Eh,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new $8(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}};const N9=e=>t=>t<0?-Pn(-t,e):Pn(t,e),I9=e=>t=>t<0?-Pn(-t,1/e):Pn(t,1/e),j9=e=>e<0?-Math.sqrt(-e):Math.sqrt(e);let lk=class z8 extends Mh{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Nu,tickMethod:ps,tickCount:5}}constructor(t){super(t)}chooseTransforms(){const{exponent:t}=this.options;if(t===1)return[ss,ss];const n=t===.5?j9:N9(t),r=I9(t);return[n,r]}clone(){return new z8(this.options)}},D9=class B8 extends lk{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Nu,tickMethod:ps,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new B8(this.options)}},Ah=class Y8 extends Iu{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!Sh(t))return this.options.unknown;const n=Ty(this.thresholds,t,0,this.n);return this.options.range[n]}invert(t){const{range:n}=this.options,r=n.indexOf(t),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new Y8(this.options)}rescale(){const{domain:t,range:n}=this.options;this.n=Math.min(t.length,n.length-1),this.thresholds=t}};const F9=(e,t,n,r=10)=>{const i=e<0,a=Dy(r,i),o=jy(r,i),s=t<e,l=s?t:e,c=s?e:t;let u=o(l),f=o(c),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>c)break;v>=l&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>c)break;v>=l&&d.push(v)}}d.length*2<n&&(d=ps(l,c,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=ps(u,f,h).map(a)}return s?d.reverse():d};let R9=class W8 extends Mh{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Nu,tickMethod:F9,tickCount:5}}chooseNice(){return QB}getTickMethodOptions(){const{domain:t,tickCount:n,base:r}=this.options,i=t[0],a=t[t.length-1];return[i,a,n,r]}chooseTransforms(){const{base:t,domain:n}=this.options,r=n[0]<0;return[jy(t,r),Dy(t,r)]}clone(){return new W8(this.options)}},ck=class G8 extends Ah{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:zy}}constructor(t){super(t)}nice(){const{nice:t}=this.options;if(t){const[n,r,i]=this.getTickMethodOptions();this.options.domain=FS(n,r,i)}}getTicks(){const{tickMethod:t}=this.options,[n,r,i]=this.getTickMethodOptions();return t(n,r,i)}getTickMethodOptions(){const{domain:t,tickCount:n}=this.options,r=t[0],i=t[t.length-1];return[r,i,n]}rescale(){this.nice();const{range:t,domain:n}=this.options,[r,i]=n;this.n=t.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(t){const[n,r]=super.invert(t),[i,a]=this.options.domain;return n===void 0&&r===void 0?[n,r]:[n||i,r||a]}getThresholds(){return this.thresholds}clone(){return new G8(this.options)}};function $9(e,t){const n=e.length;if(!n)return;if(n<2)return e[n-1];const r=(n-1)*t,i=Math.floor(r),a=e[i],o=e[i+1];return a+(o-a)*(r-i)}function z9(e,t,n=!1){const r=e;n||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<t;a+=1)i.push($9(r,a/t));return i}let uk=class H8 extends Ah{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:zy}}constructor(t){super(t)}rescale(){const{domain:t,range:n}=this.options;this.n=n.length-1,this.thresholds=z9(t,this.n+1,!1)}invert(t){const[n,r]=super.invert(t),{domain:i}=this.options,a=i[0],o=i[i.length-1];return n===void 0&&r===void 0?[n,r]:[n||a,r||o]}getThresholds(){return this.thresholds}clone(){return new H8(this.options)}getTicks(){const{tickCount:t,domain:n,tickMethod:r}=this.options,i=n.length-1,a=n[0],o=n[i];return r(a,o,t)}};var B9=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Y9=/\[([^]*?)\]/gm;function fk(e,t){for(var n=[],r=0,i=e.length;r<i;r++)n.push(e[r].substr(0,t));return n}function By(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,i=t;r<i.length;r++){var a=i[r];for(var o in a)e[o]=a[o]}return e}var dk=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],hk=["January","February","March","April","May","June","July","August","September","October","November","December"],W9=fk(hk,3),G9=fk(dk,3),H9={dayNamesShort:G9,dayNames:dk,monthNamesShort:W9,monthNames:hk,amPm:["am","pm"],DoFn:function(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10?1:0)*e%10]}},V9=By({},H9),hr=function(e,t){for(t===void 0&&(t=2),e=String(e);e.length<t;)e="0"+e;return e},U9={D:function(e){return String(e.getDate())},DD:function(e){return hr(e.getDate())},Do:function(e,t){return t.DoFn(e.getDate())},d:function(e){return String(e.getDay())},dd:function(e){return hr(e.getDay())},ddd:function(e,t){return t.dayNamesShort[e.getDay()]},dddd:function(e,t){return t.dayNames[e.getDay()]},M:function(e){return String(e.getMonth()+1)},MM:function(e){return hr(e.getMonth()+1)},MMM:function(e,t){return t.monthNamesShort[e.getMonth()]},MMMM:function(e,t){return t.monthNames[e.getMonth()]},YY:function(e){return hr(String(e.getFullYear()),4).substr(2)},YYYY:function(e){return hr(e.getFullYear(),4)},h:function(e){return String(e.getHours()%12||12)},hh:function(e){return hr(e.getHours()%12||12)},H:function(e){return String(e.getHours())},HH:function(e){return hr(e.getHours())},m:function(e){return String(e.getMinutes())},mm:function(e){return hr(e.getMinutes())},s:function(e){return String(e.getSeconds())},ss:function(e){return hr(e.getSeconds())},S:function(e){return String(Math.round(e.getMilliseconds()/100))},SS:function(e){return hr(Math.round(e.getMilliseconds()/10),2)},SSS:function(e){return hr(e.getMilliseconds(),3)},a:function(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+hr(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+hr(Math.floor(Math.abs(t)/60),2)+":"+hr(Math.abs(t)%60,2)}},pk={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},X9=function(e,t,n){if(t===void 0&&(t=pk.default),n===void 0&&(n={}),typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=pk[t]||t;var r=[];t=t.replace(Y9,function(a,o){return r.push(o),"@@@"});var i=By(By({},V9),n);return t=t.replace(B9,function(a){return U9[a](e,i)}),t.replace(/@@@/g,function(){return r.shift()})};const q9=(e,t,n,r,i)=>{const a=e>t,o=a?t:e,s=a?e:t,[l,c]=GS(o,s,n,r,i),u=l.range(o,new Date(+s+1),c,!0);return a?u.reverse():u};function K9(e){const t=e.getTimezoneOffset(),n=new Date(e);return n.setMinutes(n.getMinutes()+t,n.getSeconds(),n.getMilliseconds()),n}let Z9=class V8 extends Mh{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:q9,interpolate:Ml,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return ZB}getTickMethodOptions(){const{domain:t,tickCount:n,tickInterval:r,utc:i}=this.options,a=t[0],o=t[t.length-1];return[a,o,n,r,i]}getFormatter(){const{mask:t,utc:n}=this.options,r=n?WS:BS,i=n?K9:ss;return a=>X9(i(a),t||d9(a,r))}clone(){return new V8(this.options)}};var Q9=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Yy;function J9(e){return[e(0),e(1)]}const e7=e=>{const[t,n]=e;return El(Ml(0,1),Oh(t,n))};let Wy=Yy=class extends bt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ss,tickMethod:ps,tickCount:5}}constructor(t){super(t)}clone(){return new Yy(this.options)}};Wy=Yy=Q9([e9(J9,e7)],Wy);function Ph(e,t,n){if(e===null)return[-.5,.5];const r=xS(e,t),a=new Al({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function Ch(e,t,n){return t*(1-e)+n*e}const vk=(e={})=>{const{padding:t=0,paddingX:n=t,paddingY:r=t,random:i=Math.random}=e;return(a,o)=>{const{encode:s,scale:l}=o,{x:c,y:u}=l,[f]=He(s,"x"),[d]=He(s,"y"),h=Ph(f,c,n),p=Ph(d,u,r),v=a.map(()=>Ch(i(),...p)),g=a.map(()=>Ch(i(),...h));return[a,Z({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:ot(v),dx:ot(g)}})]}};vk.props={};const gk=(e={})=>{const{padding:t=0,random:n=Math.random}=e;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[l]=He(a,"x"),c=Ph(l,s,t),u=r.map(()=>Ch(n(),...c));return[r,Z({scale:{x:{padding:.5}}},i,{encode:{dx:ot(u)}})]}};gk.props={};const yk=(e={})=>{const{padding:t=0,random:n=Math.random}=e;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[l]=He(a,"y"),c=Ph(l,s,t),u=r.map(()=>Ch(n(),...c));return[r,Z({scale:{y:{padding:.5}}},i,{encode:{dy:ot(u)}})]}};yk.props={};var t7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const mk=(e={})=>{const{groupBy:t="x"}=e;return(n,r)=>{const{encode:i}=r,a=t7(i,["x"]),o=Object.entries(a).filter(([f])=>f.startsWith("y")).map(([f])=>[f,He(i,f)[0]]),s=o.map(([f])=>[f,new Array(n.length)]),l=co(t,n,r),c=new Array(l.length);for(let f=0;f<l.length;f++){const h=l[f].flatMap(g=>o.map(([,y])=>+y[g])),[p,v]=Sa(h);c[f]=(p+v)/2}const u=Math.max(...c);for(let f=0;f<l.length;f++){const d=u-c[f],h=l[f];for(const p of h)for(let v=0;v<o.length;v++){const[,g]=o[v],[,y]=s[v];y[p]=+g[p]+d}}return[n,Z({},r,{encode:Object.fromEntries(s.map(([f,d])=>[f,ot(d,He(i,f)[1])]))})]}};mk.props={};const bk=(e={})=>{const{groupBy:t="x",series:n=!0}=e;return(r,i)=>{const{encode:a}=i,[o]=He(a,"y"),[s,l]=He(a,"y1");n?yu(a,"series","color"):He(a,"color");const c=co(t,r,i),u=new Array(r.length);for(const f of c){const d=f.map(h=>+o[h]);for(let h=0;h<f.length;h++){const p=f[h],v=Math.max(...d.filter((g,y)=>y!==h));u[p]=+o[p]>v?v:o[p]}}return[r,Z({},i,{encode:{y1:ot(u,l)}})]}};bk.props={};function xk(e,t){return[e[0]]}function n7(e,t){const n=e.length-1;return[e[n]]}function r7(e,t){const n=Ol(e,r=>t[r]);return[e[n]]}function i7(e,t){const n=Ou(e,r=>t[r]);return[e[n]]}function a7(e){return typeof e=="function"?e:{first:xk,last:n7,max:r7,min:i7}[e]||xk}const Th=(e={})=>{const{groupBy:t="series",channel:n,selector:r}=e;return(i,a)=>{const{encode:o}=a,s=co(t,i,a),[l]=He(o,n),c=a7(r);return[s.flatMap(u=>c(u,l)),a]}};Th.props={};var o7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const wk=(e={})=>{const{selector:t}=e,n=o7(e,["selector"]);return Th(Object.assign({channel:"x",selector:t},n))};wk.props={};var s7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ok=(e={})=>{const{selector:t}=e,n=s7(e,["selector"]);return Th(Object.assign({channel:"y",selector:t},n))};Ok.props={};var l7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function fo(e){return t=>t===null?e:`${e} of ${t}`}function c7(e){if(typeof e=="function")return[e,null];const n={mean:u7,max:d7,count:p7,first:g7,last:y7,sum:v7,min:h7,median:f7}[e];if(!n)throw new Error(`Unknown reducer: ${e}.`);return n()}function u7(){const e=(n,r)=>Su(n,i=>+r[i]),t=fo("mean");return[e,t]}function f7(){const e=(n,r)=>Sy(n,i=>+r[i]),t=fo("median");return[e,t]}function d7(){const e=(n,r)=>tt(n,i=>+r[i]),t=fo("max");return[e,t]}function h7(){const e=(n,r)=>kr(n,i=>+r[i]),t=fo("min");return[e,t]}function p7(){const e=(n,r)=>n.length,t=fo("count");return[e,t]}function v7(){const e=(n,r)=>Yr(n,i=>+r[i]),t=fo("sum");return[e,t]}function g7(){const e=(n,r)=>r[n[0]],t=fo("first");return[e,t]}function y7(){const e=(n,r)=>r[n[n.length-1]],t=fo("last");return[e,t]}const Gy=(e={})=>{const{groupBy:t}=e,n=l7(e,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=t(r,i);if(!s)return[r,i];const l=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=He(o,v);return g},c=Object.entries(n).map(([h,p])=>{const[v,g]=c7(p),[y,m]=He(o,h),b=l(m,p),x=s.map(w=>v(w,y!=null?y:a));return[h,Object.assign(Object.assign({},Bz(x,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=He(o,h),g=s.map(y=>p[y[0]]);return[h,ot(g,v)]}),f=s.map(h=>a[h[0]]);return[fs(s),Z({},i,{data:f,encode:Object.fromEntries([...u,...c])})]}};Gy.props={};var m7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Du=(e={})=>{const{channels:t=["x","y"]}=e,n=m7(e,["channels"]),r=(i,a)=>co(t,i,a);return Gy(Object.assign(Object.assign({},n),{groupBy:r}))};Du.props={};const _k=(e={})=>Du(Object.assign(Object.assign({},e),{channels:["x","color","series"]}));_k.props={};const Sk=(e={})=>Du(Object.assign(Object.assign({},e),{channels:["y","color","series"]}));Sk.props={};const kk=(e={})=>Du(Object.assign(Object.assign({},e),{channels:["color"]}));kk.props={};var Ek=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function b7(e,t,n){const{by:r=e,reducer:i="max"}=t,[a]=He(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>tt(o,s=>+a[s]);if(i==="min")return o=>kr(o,s=>+a[s]);if(i==="sum")return o=>Yr(o,s=>+a[s]);if(i==="median")return o=>Sy(o,s=>+a[s]);if(i==="mean")return o=>Su(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function x7(e,t,n){const{reverse:r,channel:i}=n,{encode:a}=t,[o]=He(a,i),s=_i(e,l=>o[l]);return r&&s.reverse(),[s,t]}function w7(e,t,n){if(!Array.isArray(n))return e;const r=new Set(n);return e.filter(i=>r.has(t[i]))}function O7(e,t,n){var r;const{reverse:i,slice:a,channel:o}=n,s=Ek(n,["reverse","slice","channel"]),{encode:l,scale:c={}}=t,u=(r=c[o])===null||r===void 0?void 0:r.domain,[f]=He(l,o),d=b7(o,s,l),h=w7(e,f,u),p=eB(h,d,y=>f[y]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[e,Z(t,{scale:{[o]:{domain:g}}})]}const Lh=(e={})=>{const{reverse:t=!1,slice:n,channel:r,ordinal:i=!0}=e,a=Ek(e,["reverse","slice","channel","ordinal"]);return(o,s)=>i?O7(o,s,Object.assign({reverse:t,slice:n,channel:r},a)):x7(o,s,Object.assign({reverse:t,slice:n,channel:r},a))};Lh.props={};const Mk=(e={})=>Lh(Object.assign(Object.assign({},e),{channel:"x"}));Mk.props={};const Ak=(e={})=>Lh(Object.assign(Object.assign({},e),{channel:"color"}));Ak.props={};const Pk=(e={})=>Lh(Object.assign(Object.assign({},e),{channel:"y"}));Pk.props={};function _7(e,t){return typeof t=="string"?e.map(n=>n[t]):e.map(t)}function S7(e,t){if(typeof e=="function")return n=>e(n,t);if(e==="sum")return n=>Yr(n,r=>+t[r]);throw new Error(`Unknown reducer: ${e}`)}const Ck=(e={})=>{const{field:t,channel:n="y",reducer:r="sum"}=e;return(i,a)=>{const{data:o,encode:s}=a,[l]=He(s,"x"),c=t?_7(o,t):He(s,n)[0],u=S7(r,c),f=xy(i,u,d=>l[d]).map(d=>d[1]);return[i,Z({},a,{scale:{x:{flex:f}}})]}};Ck.props={};function Yt([e,t],[n,r]){return[e-n,t-r]}function Nh([e,t],[n,r]){return[e+n,t+r]}function jt([e,t],[n,r]){return Math.sqrt(Math.pow(e-n,2)+Math.pow(t-r,2))}function Wr([e,t]){return Math.atan2(t,e)}function Pl([e,t]){return Wr([e,t])+Math.PI/2}function Tk(e,t){const n=Wr(e),r=Wr(t);return n<r?r-n:Math.PI*2-(n-r)}function Hy(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(const[s,l]of e)t=Math.min(s,t),n=Math.max(s,n),r=Math.min(l,r),i=Math.max(l,i);const a=n-t,o=i-r;return[t,r,a,o]}function Lk([e,t],[n,r]){return[(e+n)/2,(t+r)/2]}function k7(e){const{padding:t=0,direction:n="col"}=e;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:l}=a,c=l/s;let u=Math.ceil(Math.sqrt(i/c)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>l;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=l-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(l-f)/2]:[0,0];return r.map((m,b)=>{const[x,w,O,_]=Hy(m),S=n==="col"?b%u:Math.floor(b/d),k=n==="col"?Math.floor(b/u):b%d,E=S*f,M=(d-k-1)*f+p,P=(f-t)/O,A=(f-t)/_,L=E-x+g*S+1/2*t,N=M-w-v*k-y+1/2*t;return`translate(${L}, ${N}) scale(${P}, ${A})`})}}const Nk=e=>(t,n)=>[t,Z({},n,{modifier:k7(e),axis:!1})];Nk.props={};var E7=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ik="thresholds";function M7(e){const[t,n]=Sa(e);return Math.min(200,dB(e,t,n))}const Vy=(e={})=>{const{groupChannels:t=["color"],binChannels:n=["x","y"]}=e,r=E7(e,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:l}=s,c=n.map(p=>{const[v]=He(l,p);return v}),u=le(r,Ik),f=o.filter(p=>c.every(v=>pt(v[p]))),d=[...t.map(p=>{const[v]=He(l,p);return v}).filter(pt).map(p=>v=>p[v]),...n.map((p,v)=>{const g=c[v],y=u[p]||M7(g),m=cB().thresholds(y).value(x=>+g[x])(f),b=new Map(m.flatMap(x=>{const{x0:w,x1:O}=x,_=`${w},${O}`;return x.map(S=>[S,_])}));return i[p]=b,x=>b.get(x)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(_t(f,h).values())};return Gy(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(Ik)))),Object.fromEntries(n.flatMap(o=>{const s=([c])=>+i[o].get(c).split(",")[0],l=([c])=>+i[o].get(c).split(",")[1];return l.from=o,[[o,s],[`${o}1`,l]]}))),{groupBy:a}))};Vy.props={};const jk=(e={})=>{const{thresholds:t}=e;return Vy(Object.assign(Object.assign({},e),{thresholdsX:t,groupChannels:["color"],binChannels:["x"]}))};jk.props={};function A7(e,t,n,r){const i=e.length;if(r>=i||r===0)return e;const a=h=>t[e[h]]*1,o=h=>n[e[h]]*1,s=[],l=(i-2)/(r-2);let c=0,u,f,d;s.push(c);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*l)+1,y=Math.floor((h+2)*l)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*l)+1;const x=Math.floor((h+1)*l)+1,w=[a(c),o(c)];for(u=f=-1;b<x;b++)f=Math.abs((w[0]-p)*(a(b)-w[1])-(w[0]-o(b))*(v-w[0]))*.5,f>u&&(u=f,d=b);s.push(d),c=d}return s.push(i-1),s.map(h=>e[h])}function P7(e){if(typeof e=="function")return e;if(e==="lttb")return A7;const t={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[Ou(r,o=>a[o])]],max:(r,i,a)=>[r[Ol(r,o=>a[o])]],median:(r,i,a)=>[r[hB(r,o=>a[o])]]},n=t[e]||t.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return C7(r,s).flatMap(c=>n(c,i,a))}}function C7(e,t){const n=e.length,r=[];let i=0;for(;i<n;)r.push(e.slice(i,i+=t));return r}const Dk=(e={})=>{const{strategy:t="median",thresholds:n=2e3,groupBy:r=["series","color"]}=e,i=P7(t);return(a,o)=>{const{encode:s}=o,l=co(r,a,o),[c]=He(s,"x"),[u]=He(s,"y");return[l.flatMap(f=>i(f,c,u,n)),o]}};Dk.props={};function T7(e){return typeof e=="object"?[e.value,e.ordinal]:[e,!0]}function L7(e){var t;const{encode:n}=e,r=Object.assign(Object.assign({},e),{encode:Object.assign(Object.assign({},e.encode),{y:Object.assign(Object.assign({},e.encode.y),{value:[]})})}),i=(t=n==null?void 0:n.color)===null||t===void 0?void 0:t.field;if(!n||!i)return r;let a;for(const[o,s]of Object.entries(n))(o==="x"||o==="y")&&s.field===i&&(a=Object.assign(Object.assign({},a),{[o]:Object.assign(Object.assign({},s),{value:[]})}));return a?Object.assign(Object.assign({},e),{encode:Object.assign(Object.assign({},e.encode),a)}):r}const Fk=(e={})=>(t,n)=>{const{encode:r,data:i}=n,a=Object.entries(e).map(([u,f])=>{const[d]=He(r,u);if(!d)return null;const[h,p=!0]=T7(f);if(typeof h=="function")return v=>h(d[v]);if(p){const v=Array.isArray(h)?h:[h];return v.length===0?null:g=>v.includes(d[g])}else{const[v,g]=h;return y=>d[y]>=v&&d[y]<=g}}).filter(pt),o=u=>a.every(f=>f(u)),s=t.filter(o),l=s.map((u,f)=>f);if(a.length===0){const u=L7(n);return[t,u]}const c=Object.entries(r).map(([u,f])=>[u,Object.assign(Object.assign({},f),{value:l.map(d=>f.value[s[d]]).filter(d=>d!==void 0)})]);return[l,Z({},n,{encode:Object.fromEntries(c),data:s.map(u=>i[u])})]};Fk.props={};function St(e){return function(){return e}}const Rk=Math.abs,Hn=Math.atan2,vs=Math.cos,N7=Math.max,Uy=Math.min,Xi=Math.sin,Cl=Math.sqrt,Vn=1e-12,Fu=Math.PI,Ih=Fu/2,I7=2*Fu;function j7(e){return e>1?0:e<-1?Fu:Math.acos(e)}function $k(e){return e>=1?Ih:e<=-1?-Ih:Math.asin(e)}const Xy=Math.PI,qy=2*Xy,gs=1e-6,D7=qy-gs;function zk(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function F7(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return zk;const n=Pn(10,t);return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Ky=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?zk:F7(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=r-t,c=i-n,u=o-t,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>gs)if(!(Math.abs(f*l-c*u)>gs)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,p=i-s,v=l*l+c*c,g=h*h+p*p,y=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((Xy-Math.acos((v+d-g)/(2*y*m)))/2),x=b/m,w=b/y;Math.abs(x-1)>gs&&this._append`L${t+x*u},${n+x*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=t+w*l},${this._y1=n+w*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>gs||Math.abs(this._y1-u)>gs)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%qy+qy),d>D7?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=u}`:d>gs&&this._append`A${r},${r},0,${+(d>=Xy)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Gr(){return new Ky}Gr.prototype=Ky.prototype;function Zy(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ky(t)}function R7(e){return e.innerRadius}function $7(e){return e.outerRadius}function z7(e){return e.startAngle}function B7(e){return e.endAngle}function Y7(e){return e&&e.padAngle}function W7(e,t,n,r,i,a,o,s){var l=n-e,c=r-t,u=o-i,f=s-a,d=f*l-u*c;if(!(d*d<Vn))return d=(u*(t-a)-f*(e-i))/d,[e+d*l,t+d*c]}function jh(e,t,n,r,i,a,o){var s=e-n,l=t-r,c=(o?a:-a)/Cl(s*s+l*l),u=c*l,f=-c*s,d=e+u,h=t+f,p=n+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,x=m*m+b*b,w=i-a,O=d*v-p*h,_=(b<0?-1:1)*Cl(N7(0,w*w*x-O*O)),S=(O*b-m*_)/x,k=(-O*m-b*_)/x,E=(O*b+m*_)/x,M=(-O*m+b*_)/x,P=S-g,A=k-y,L=E-g,N=M-y;return P*P+A*A>L*L+N*N&&(S=E,k=M),{cx:S,cy:k,x01:-u,y01:-f,x11:S*(i/w-1),y11:k*(i/w-1)}}function Dh(){var e=R7,t=$7,n=St(0),r=null,i=z7,a=B7,o=Y7,s=null,l=Zy(c);function c(){var u,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=i.apply(this,arguments)-Ih,v=a.apply(this,arguments)-Ih,g=Rk(v-p),y=v>p;if(s||(s=u=l()),h<d&&(f=h,h=d,d=f),!(h>Vn))s.moveTo(0,0);else if(g>I7-Vn)s.moveTo(h*vs(p),h*Xi(p)),s.arc(0,0,h,p,v,!y),d>Vn&&(s.moveTo(d*vs(v),d*Xi(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,x=p,w=v,O=g,_=g,S=o.apply(this,arguments)/2,k=S>Vn&&(r?+r.apply(this,arguments):Cl(d*d+h*h)),E=Uy(Rk(h-d)/2,+n.apply(this,arguments)),M=E,P=E,A,L;if(k>Vn){var N=$k(k/d*Xi(S)),T=$k(k/h*Xi(S));(O-=N*2)>Vn?(N*=y?1:-1,x+=N,w-=N):(O=0,x=w=(p+v)/2),(_-=T*2)>Vn?(T*=y?1:-1,m+=T,b-=T):(_=0,m=b=(p+v)/2)}var I=h*vs(m),C=h*Xi(m),j=d*vs(w),D=d*Xi(w);if(E>Vn){var F=h*vs(b),R=h*Xi(b),z=d*vs(x),H=d*Xi(x),W;if(g<Fu)if(W=W7(I,C,z,H,F,R,j,D)){var X=I-W[0],V=C-W[1],q=F-W[0],ie=R-W[1],Q=1/Xi(j7((X*q+V*ie)/(Cl(X*X+V*V)*Cl(q*q+ie*ie)))/2),ne=Cl(W[0]*W[0]+W[1]*W[1]);M=Uy(E,(d-ne)/(Q-1)),P=Uy(E,(h-ne)/(Q+1))}else M=P=0}_>Vn?P>Vn?(A=jh(z,H,I,C,h,P,y),L=jh(F,R,j,D,h,P,y),s.moveTo(A.cx+A.x01,A.cy+A.y01),P<E?s.arc(A.cx,A.cy,P,Hn(A.y01,A.x01),Hn(L.y01,L.x01),!y):(s.arc(A.cx,A.cy,P,Hn(A.y01,A.x01),Hn(A.y11,A.x11),!y),s.arc(0,0,h,Hn(A.cy+A.y11,A.cx+A.x11),Hn(L.cy+L.y11,L.cx+L.x11),!y),s.arc(L.cx,L.cy,P,Hn(L.y11,L.x11),Hn(L.y01,L.x01),!y))):(s.moveTo(I,C),s.arc(0,0,h,m,b,!y)):s.moveTo(I,C),!(d>Vn)||!(O>Vn)?s.lineTo(j,D):M>Vn?(A=jh(j,D,F,R,d,-M,y),L=jh(I,C,z,H,d,-M,y),s.lineTo(A.cx+A.x01,A.cy+A.y01),M<E?s.arc(A.cx,A.cy,M,Hn(A.y01,A.x01),Hn(L.y01,L.x01),!y):(s.arc(A.cx,A.cy,M,Hn(A.y01,A.x01),Hn(A.y11,A.x11),!y),s.arc(0,0,d,Hn(A.cy+A.y11,A.cx+A.x11),Hn(L.cy+L.y11,L.cx+L.x11),y),s.arc(L.cx,L.cy,M,Hn(L.y11,L.x11),Hn(L.y01,L.x01),!y))):s.arc(0,0,d,w,x,y)}if(s.closePath(),u)return s=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Fu/2;return[vs(f)*u,Xi(f)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:St(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:St(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:St(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:St(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:St(+u),c):i},c.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:St(+u),c):a},c.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:St(+u),c):o},c.context=function(u){return arguments.length?(s=u==null?null:u,c):s},c}function Bk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Yk(e){this._context=e}Yk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ru(e){return new Yk(e)}function Wk(e){return e[0]}function Gk(e){return e[1]}function ys(e,t){var n=St(!0),r=null,i=Ru,a=null,o=Zy(s);e=typeof e=="function"?e:e===void 0?Wk:St(e),t=typeof t=="function"?t:t===void 0?Gk:St(t);function s(l){var c,u=(l=Bk(l)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&n(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:St(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:St(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:St(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(a=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=a=null:a=i(r=l),s):r},s}function Qy(e,t,n){var r=null,i=St(!0),a=null,o=Ru,s=null,l=Zy(c);e=typeof e=="function"?e:e===void 0?Wk:St(+e),t=typeof t=="function"?t:St(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Gk:St(+n);function c(f){var d,h,p,v=(f=Bk(f)).length,g,y=!1,m,b=new Array(v),x=new Array(v);for(a==null&&(s=o(m=l())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],x[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+e(g,d,f),x[d]=+t(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):x[d]))}if(m)return s=null,m+""||null}function u(){return ys().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:St(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:St(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:St(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:St(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:St(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:St(+f),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:St(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}var Hk=Jy(Ru);function Vk(e){this._curve=e}Vk.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Jy(e){function t(n){return new Vk(e(n))}return t._curve=e,t}function $u(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Jy(n)):t()._curve},e}function G7(){return $u(ys().curve(Hk))}function H7(){var e=Qy().curve(Hk),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return $u(n())},delete e.lineX0,e.lineEndAngle=function(){return $u(r())},delete e.lineX1,e.lineInnerRadius=function(){return $u(i())},delete e.lineY0,e.lineOuterRadius=function(){return $u(a())},delete e.lineY1,e.curve=function(o){return arguments.length?t(Jy(o)):t()._curve},e}function Tl(){}function em(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function tm(e,t){this._context=e,this._k=(1-t)/6}tm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:em(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:em(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(r){return new tm(r,t)}return n.tension=function(r){return e(+r)},n}(0);function nm(e,t){this._context=e,this._k=(1-t)/6}nm.prototype={areaStart:Tl,areaEnd:Tl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:em(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(r){return new nm(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Uk(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>Vn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Vn){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Xk(e,t){this._context=e,this._alpha=t}Xk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Uk(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},function e(t){function n(r){return t?new Xk(r,t):new tm(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function qk(e,t){this._context=e,this._alpha=t}qk.prototype={areaStart:Tl,areaEnd:Tl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Uk(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kk=function e(t){function n(r){return t?new qk(r,t):new nm(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Zk(e){this._context=e}Zk.prototype={areaStart:Tl,areaEnd:Tl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function rm(e){return new Zk(e)}function Qk(e){return e<0?-1:1}function Jk(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Qk(a)+Qk(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function eE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function im(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Fh(e){this._context=e}Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:im(this,this._t0,eE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,im(this,eE(this,n=Jk(this,e,t)),n);break;default:im(this,this._t0,n=Jk(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function tE(e){this._context=new nE(e)}(tE.prototype=Object.create(Fh.prototype)).point=function(e,t){Fh.prototype.point.call(this,t,e)};function nE(e){this._context=e}nE.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function rE(e){return new Fh(e)}function iE(e){return new tE(e)}function Rh(e,t){this._context=e,this._t=t}Rh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function aE(e){return new Rh(e,.5)}function oE(e){return new Rh(e,0)}function sE(e){return new Rh(e,1)}function kt(e){const{transformations:t}=e.getOptions();return t.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function st(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="polar")}function $h(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="reflect")&&t.some(([n])=>n.startsWith("transpose"))}function lE(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="helix")}function zh(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="parallel")}function cE(e){const{transformations:t}=e.getOptions();return t.some(([n])=>n==="fisheye")}function V7(e){return zh(e)&&st(e)}function Ll(e){return lE(e)||st(e)}function U7(e){return st(e)&&kt(e)}function X7(e){if(Ll(e)){const[t,n]=e.getSize(),r=e.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(t,n)/2*r[4]}return 0}function Bh(e){const{transformations:t}=e.getOptions(),[,,,n,r]=t.find(i=>i[0]==="polar");return[+n,+r]}function am(e,t=!0){const{transformations:n}=e.getOptions(),[,r,i]=n.find(a=>a[0]==="polar");return t?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function q7(e,t){const{transformations:n}=e.getOptions(),[,...r]=n.find(i=>i[0]===t);return r}function ho(e){"@babel/helpers - typeof";return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(e)}function K7(e,t){if(ho(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ho(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uE(e){var t=K7(e,"string");return ho(t)=="symbol"?t:t+""}function de(e,t,n){return(t=uE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fE(Object(n),!0).forEach(function(r){de(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uE(r.key),r)}}function ee(e,t,n){return t&&dE(e.prototype,t),n&&dE(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function om(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z7(e){if(Array.isArray(e))return om(e)}function Q7(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sm(e,t){if(e){if(typeof e=="string")return om(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?om(e,t):void 0}}function J7(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vt(e){return Z7(e)||Q7(e)||sm(e)||J7()}function Nl(e){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(e)}function hE(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(hE=function(){return!!e})()}function eY(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tY(e,t){if(t&&(ho(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eY(e)}function Le(e,t,n){return t=Nl(t),tY(e,hE()?Reflect.construct(t,n||[],Nl(e).constructor):t.apply(e,n))}function lm(e,t){return lm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},lm(e,t)}function Ne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lm(e,t)}function nY(e){if(Array.isArray(e))return e}function rY(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function iY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(e,t){return nY(e)||rY(e,t)||sm(e,t)||iY()}var pE={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||l,d),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],h]:l._events[p].push(h):(l._events[p]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(c){var u=n?n+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,d,h,p){var v=n?n+c:c;if(!this._events[v])return!1;var g=this._events[v],y=arguments.length,m,b;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),y){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,p),!0}for(b=1,m=new Array(y-1);b<y;b++)m[b-1]=arguments[b];g.fn.apply(g.context,m)}else{var x=g.length,w;for(b=0;b<x;b++)switch(g[b].once&&this.removeListener(c,g[b].fn,void 0,!0),y){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,u);break;case 3:g[b].fn.call(g[b].context,u,f);break;case 4:g[b].fn.call(g[b].context,u,f,d);break;default:if(!m)for(w=1,m=new Array(y-1);w<y;w++)m[w-1]=arguments[w];g[b].fn.apply(g[b].context,m)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,d){var h=n?n+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===u&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var v=0,g=[],y=p.length;v<y;v++)(p[v].fn!==u||d&&!p[v].once||f&&p[v].context!==f)&&g.push(p[v]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(pE);var aY=pE.exports;const vE=ou(aY);var gE=function(e){return e!==null&&typeof e!="function"&&isFinite(e.length)},oY=function(e,t){if(!gE(e))return e;for(var n=[],r=0;r<e.length;r++){var i=e[r];t(i,r)&&n.push(i)}return n};const Il=function(e){return typeof e=="function"};var nn=function(e){return e==null},sY={}.toString,zu=function(e,t){return sY.call(e)==="[object "+t+"]"};const Ea=function(e){return Array.isArray?Array.isArray(e):zu(e,"Array")},yE=function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"};function cm(e,t){if(e){var n;if(Ea(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(yE(e)){for(var a in e)if(e.hasOwnProperty(a)&&(n=t(e[a],a),n===!1))break}}}var lY=Object.keys?function(e){return Object.keys(e)}:function(e){var t=[];return cm(e,function(n,r){Il(e)&&r==="prototype"||t.push(r)}),t},cY=function(e){return typeof e=="object"&&e!==null},Yh=function(e){if(!cY(e)||!zu(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};const mE=function(e){if(Ea(e))return e.reduce(function(t,n){return Math.max(t,n)},e[0])},bE=function(e){if(Ea(e))return e.reduce(function(t,n){return Math.min(t,n)},e[0])};var uY=function(e,t,n){if(!Ea(e)&&!Yh(e))return e;var r=n;return cm(e,function(i,a){r=t(r,i,a)}),r};const Si=function(e){return zu(e,"String")};var Hr=function(e,t,n){return e<t?t:e>n?n:e},po=function(e){return zu(e,"Number")},fY=1e-5;function Bu(e,t,n){return n===void 0&&(n=fY),Math.abs(e-t)<n}var xE=function(e,t){return(e%t+t)%t},wE=function(e){return zu(e,"Boolean")},Dt=function(e){return e===void 0};function OE(e,t){for(var n in t)t.hasOwnProperty(n)&&n!=="constructor"&&t[n]!==void 0&&(e[n]=t[n])}function dY(e,t,n,r){return t&&OE(e,t),n&&OE(e,n),e}var hY=5;function pY(e,t){if(Object.hasOwn)return Object.hasOwn(e,t);if(e==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}function _E(e,t,n,r){n=n||0,r=r||hY;for(var i in t)if(pY(t,i)){var a=t[i];a!==null&&Yh(a)?(Yh(e[i])||(e[i]={}),n<r?_E(e[i],a,n+1,r):e[i]=t[i]):Ea(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var Wh=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)_E(e,t[r]);return e};const qi=function(e,t,n){for(var r=0,i=Si(t)?t.split("."):t;e&&r<i.length;)e=e[i[r++]];return e===void 0||r<i.length?n:e};var vY=Object.prototype.hasOwnProperty;const SE=function(e,t){if(e===null||!Yh(e))return{};var n={};return cm(t,function(r){vY.call(e,r)&&(n[r]=e[r])}),n};function gY(e){return nn(e)?0:gE(e)?e.length:Object.keys(e).length}var kE={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function yY(e,t,n){if(e[n].length>7){e[n].shift();for(var r=e[n],i=n;r.length;)t[n]="A",e.splice(i+=1,0,["C"].concat(r.splice(0,6)));e.splice(n,1)}}var Yu={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function EE(e){return Array.isArray(e)&&e.every(function(t){var n=t[0].toLowerCase();return Yu[n]===t.length-1&&"achlmqstvz".includes(n)})}function ME(e){return EE(e)&&e.every(function(t){var n=t[0];return n===n.toUpperCase()})}function AE(e){return ME(e)&&e.every(function(t){var n=t[0];return"ACLMQZ".includes(n)})}function PE(e){for(var t=e.pathValue[e.segmentStart],n=t.toLowerCase(),r=e.data;r.length>=Yu[n]&&(n==="m"&&r.length>2?(e.segments.push([t].concat(r.splice(0,2))),n="l",t=t==="m"?"l":"L"):e.segments.push([t].concat(r.splice(0,Yu[n]))),!!Yu[n]););}function mY(e){var t=e.index,n=e.pathValue,r=n.charCodeAt(t);if(r===48){e.param=0,e.index+=1;return}if(r===49){e.param=1,e.index+=1;return}e.err='[path-util]: invalid Arc flag "'+n[t]+'", expecting 0 or 1 at index '+t}function bY(e){return e>=48&&e<=57||e===43||e===45||e===46}function jl(e){return e>=48&&e<=57}function xY(e){var t=e.max,n=e.pathValue,r=e.index,i=r,a=!1,o=!1,s=!1,l=!1,c;if(i>=t){e.err="[path-util]: Invalid path value at index "+i+', "pathValue" is missing param';return}if(c=n.charCodeAt(i),(c===43||c===45)&&(i+=1,c=n.charCodeAt(i)),!jl(c)&&c!==46){e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" is not a number';return}if(c!==46){if(a=c===48,i+=1,c=n.charCodeAt(i),a&&i<t&&c&&jl(c)){e.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<t&&jl(n.charCodeAt(i));)i+=1,o=!0;c=n.charCodeAt(i)}if(c===46){for(l=!0,i+=1;jl(n.charCodeAt(i));)i+=1,s=!0;c=n.charCodeAt(i)}if(c===101||c===69){if(l&&!o&&!s){e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid float exponent';return}if(i+=1,c=n.charCodeAt(i),(c===43||c===45)&&(i+=1),i<t&&jl(n.charCodeAt(i)))for(;i<t&&jl(n.charCodeAt(i));)i+=1;else{e.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid integer exponent';return}}e.index=i,e.param=+e.pathValue.slice(r,i)}function wY(e){var t=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&t.includes(e)}function Gh(e){for(var t=e.pathValue,n=e.max;e.index<n&&wY(t.charCodeAt(e.index));)e.index+=1}function OY(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function _Y(e){return(e|32)===97}function SY(e){var t=e.max,n=e.pathValue,r=e.index,i=n.charCodeAt(r),a=Yu[n[r].toLowerCase()];if(e.segmentStart=r,!OY(i)){e.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(e.index+=1,Gh(e),e.data=[],!a){PE(e);return}for(;;){for(var o=a;o>0;o-=1){if(_Y(i)&&(o===3||o===4)?mY(e):xY(e),e.err.length)return;e.data.push(e.param),Gh(e),e.index<t&&n.charCodeAt(e.index)===44&&(e.index+=1,Gh(e))}if(e.index>=e.max||!bY(n.charCodeAt(e.index)))break}PE(e)}var kY=function(){function e(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return e}();function EY(e){if(EE(e))return[].concat(e);var t=new kY(e);for(Gh(t);t.index<t.max&&!t.err.length;)SY(t);return t.err?t.err:t.segments}function MY(e){if(ME(e))return[].concat(e);var t=EY(e),n=0,r=0,i=0,a=0;return t.map(function(o){var s=o.slice(1).map(Number),l=o[0],c=l.toUpperCase();if(l==="M")return n=s[0],r=s[1],i=n,a=r,["M",n,r];var u;if(l!==c)switch(c){case"A":u=[c,s[0],s[1],s[2],s[3],s[4],s[5]+n,s[6]+r];break;case"V":u=[c,s[0]+r];break;case"H":u=[c,s[0]+n];break;default:{var f=s.map(function(h,p){return h+(p%2?r:n)});u=[c].concat(f)}}else u=[c].concat(s);var d=u.length;switch(c){case"Z":n=i,r=a;break;case"H":n=u[1];break;case"V":r=u[1];break;default:n=u[d-2],r=u[d-1],c==="M"&&(i=n,a=r)}return u})}function AY(e,t){var n=e[0],r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=e.slice(1).map(Number),l=e;if("TQ".includes(n)||(t.qx=null,t.qy=null),n==="H")l=["L",e[1],i];else if(n==="V")l=["L",r,e[1]];else if(n==="S"){var c=r*2-a,u=i*2-o;t.x1=c,t.y1=u,l=["C",c,u].concat(s)}else if(n==="T"){var f=r*2-t.qx,d=i*2-t.qy;t.qx=f,t.qy=d,l=["Q",f,d].concat(s)}else if(n==="Q"){var h=s[0],p=s[1];t.qx=h,t.qy=p}return l}function Hh(e){if(AE(e))return[].concat(e);for(var t=MY(e),n=oo({},kE),r=0;r<t.length;r+=1){t[r]=AY(t[r],n);var i=t[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return t}function PY(e){return AE(e)&&e.every(function(t){var n=t[0];return"MC".includes(n)})}function Vh(e,t,n){var r=e*Math.cos(n)-t*Math.sin(n),i=e*Math.sin(n)+t*Math.cos(n);return{x:r,y:i}}function CE(e,t,n,r,i,a,o,s,l,c){var u=e,f=t,d=n,h=r,p=s,v=l,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,w,O,_;if(c)x=c[0],w=c[1],O=c[2],_=c[3];else{b=Vh(u,f,-y),u=b.x,f=b.y,b=Vh(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,k=(f-v)/2,E=S*S/(d*d)+k*k/(h*h);E>1&&(E=Math.sqrt(E),d*=E,h*=E);var M=d*d,P=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((M*P-M*k*k-P*S*S)/(M*k*k+P*S*S)));O=A*d*k/h+(u+p)/2,_=A*-h*S/d+(f+v)/2,x=Math.asin(((f-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((v-_)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,w=p<O?Math.PI-w:w,x<0&&(x=Math.PI*2+x),w<0&&(w=Math.PI*2+w),o&&x>w&&(x-=Math.PI*2),!o&&w>x&&(w-=Math.PI*2)}var L=w-x;if(Math.abs(L)>g){var N=w,T=p,I=v;w=x+g*(o&&w>x?1:-1),p=O+d*Math.cos(w),v=_+h*Math.sin(w),m=CE(p,v,d,h,i,0,o,T,I,[w,N,O,_])}L=w-x;var C=Math.cos(x),j=Math.sin(x),D=Math.cos(w),F=Math.sin(w),R=Math.tan(L/4),z=4/3*d*R,H=4/3*h*R,W=[u,f],X=[u+z*j,f-H*C],V=[p+z*F,v-H*D],q=[p,v];if(X[0]=2*W[0]-X[0],X[1]=2*W[1]-X[1],c)return X.concat(V,q,m);m=X.concat(V,q,m);for(var ie=[],Q=0,ne=m.length;Q<ne;Q+=1)ie[Q]=Q%2?Vh(m[Q-1],m[Q],y).y:Vh(m[Q],m[Q+1],y).x;return ie}function CY(e,t,n,r,i,a){var o=.3333333333333333,s=2/3;return[o*e+s*n,o*t+s*r,o*i+s*n,o*a+s*r,i,a]}function vo(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return[r+(a-r)*n,i+(o-i)*n]}var TE=function(e,t,n,r){var i=.5,a=vo([e,t],[n,r],i);return dr(dr([],a,!0),[n,r,n,r],!1)};function TY(e,t){var n=e[0],r=e.slice(1).map(Number),i=r[0],a=r[1],o,s=t.x1,l=t.y1,c=t.x,u=t.y;switch("TQ".includes(n)||(t.qx=null,t.qy=null),n){case"M":return t.x=i,t.y=a,e;case"A":return o=[s,l].concat(r),["C"].concat(CE(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return t.qx=i,t.qy=a,o=[s,l].concat(r),["C"].concat(CY(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(TE(s,l,i,a));case"Z":return s===c&&l===u?["C",s,l,c,u,c,u]:["C"].concat(TE(s,l,c,u))}return e}function um(e,t){if(t===void 0&&(t=!1),PY(e)){var n=[].concat(e);return t?[n,[]]:n}for(var r=Hh(e),i=oo({},kE),a=[],o="",s=r.length,l,c,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=TY(r[f],i);r[f]=d,yY(r,a,f),s=r.length,o==="Z"&&u.push(f),l=r[f],c=l.length,i.x1=+l[c-2],i.y1=+l[c-1],i.x2=+l[c-4]||i.x1,i.y2=+l[c-3]||i.y1}return t?[r,u]:r}function LY(e){return e.map(function(t){return Array.isArray(t)?[].concat(t):t})}function NY(e){var t=e.slice(1).map(function(n,r,i){return r?i[r-1].slice(-2).concat(n.slice(1)):e[0].slice(1).concat(n.slice(1))}).map(function(n){return n.map(function(r,i){return n[n.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(function(n){return["C"].concat(n.slice(2))}))}function Mr(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function fm(e,t,n,r,i){var a=Mr([e,t],[n,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:e,y:t};else if(i>=a)o={x:n,y:r};else{var s=vo([e,t],[n,r],i/a),l=s[0],c=s[1];o={x:l,y:c}}return{length:a,point:o,min:{x:Math.min(e,n),y:Math.min(t,r)},max:{x:Math.max(e,n),y:Math.max(t,r)}}}function LE(e,t){var n=e.x,r=e.y,i=t.x,a=t.y,o=n*i+r*a,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),l=n*a-r*i<0?-1:1,c=l*Math.acos(o/s);return c}function IY(e,t,n,r,i,a,o,s,l,c){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(n),g=u(r),y=(i%360+360)%360,m=y*(p/180);if(e===s&&t===l)return{x:e,y:t};if(v===0||g===0)return fm(e,t,s,l,c).point;var b=(e-s)/2,x=(t-l)/2,w={x:d(m)*b+f(m)*x,y:-f(m)*b+d(m)*x},O=Math.pow(w.x,2)/Math.pow(v,2)+Math.pow(w.y,2)/Math.pow(g,2);O>1&&(v*=h(O),g*=h(O));var _=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(w.y,2)-Math.pow(g,2)*Math.pow(w.x,2),S=Math.pow(v,2)*Math.pow(w.y,2)+Math.pow(g,2)*Math.pow(w.x,2),k=_/S;k=k<0?0:k;var E=(a!==o?1:-1)*h(k),M={x:E*(v*w.y/g),y:E*(-(g*w.x)/v)},P={x:d(m)*M.x-f(m)*M.y+(e+s)/2,y:f(m)*M.x+d(m)*M.y+(t+l)/2},A={x:(w.x-M.x)/v,y:(w.y-M.y)/g},L=LE({x:1,y:0},A),N={x:(-w.x-M.x)/v,y:(-w.y-M.y)/g},T=LE(A,N);!o&&T>0?T-=2*p:o&&T<0&&(T+=2*p),T%=2*p;var I=L+T*c,C=v*d(I),j=g*f(I),D={x:d(m)*C-f(m)*j+P.x,y:f(m)*C+d(m)*j+P.y};return D}function jY(e,t,n,r,i,a,o,s,l,c,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof c=="number",b=e,x=t,w=0,O=[b,x,w],_=[b,x],S=0,k={x:0,y:0},E=[{x:b,y:x}];m&&c<=0&&(k={x:b,y:x});for(var M=0;M<=y;M+=1){if(S=M/y,f=IY(e,t,n,r,i,a,o,s,l,S),b=f.x,x=f.y,h&&E.push({x:b,y:x}),v&&(w+=Mr(_,[b,x])),_=[b,x],m&&w>=c&&c>O[2]){var P=(w-c)/(w-O[2]);k={x:_[0]*(1-P)+O[0]*P,y:_[1]*(1-P)+O[1]*P}}O=[b,x,w]}return m&&c>=w&&(k={x:s,y:l}),{length:w,point:k,min:{x:Math.min.apply(null,E.map(function(A){return A.x})),y:Math.min.apply(null,E.map(function(A){return A.y}))},max:{x:Math.max.apply(null,E.map(function(A){return A.x})),y:Math.max.apply(null,E.map(function(A){return A.y}))}}}function DY(e,t,n,r,i,a,o,s,l){var c=1-l;return{x:Math.pow(c,3)*e+3*Math.pow(c,2)*l*n+3*c*Math.pow(l,2)*i+Math.pow(l,3)*o,y:Math.pow(c,3)*t+3*Math.pow(c,2)*l*r+3*c*Math.pow(l,2)*a+Math.pow(l,3)*s}}function NE(e,t,n,r,i,a,o,s,l,c){var u,f=c.bbox,d=f===void 0?!0:f,h=c.length,p=h===void 0?!0:h,v=c.sampleSize,g=v===void 0?10:v,y=typeof l=="number",m=e,b=t,x=0,w=[m,b,x],O=[m,b],_=0,S={x:0,y:0},k=[{x:m,y:b}];y&&l<=0&&(S={x:m,y:b});for(var E=0;E<=g;E+=1){if(_=E/g,u=DY(e,t,n,r,i,a,o,s,_),m=u.x,b=u.y,d&&k.push({x:m,y:b}),p&&(x+=Mr(O,[m,b])),O=[m,b],y&&x>=l&&l>w[2]){var M=(x-l)/(x-w[2]);S={x:O[0]*(1-M)+w[0]*M,y:O[1]*(1-M)+w[1]*M}}w=[m,b,x]}return y&&l>=x&&(S={x:o,y:s}),{length:x,point:S,min:{x:Math.min.apply(null,k.map(function(P){return P.x})),y:Math.min.apply(null,k.map(function(P){return P.y}))},max:{x:Math.max.apply(null,k.map(function(P){return P.x})),y:Math.max.apply(null,k.map(function(P){return P.y}))}}}function FY(e,t,n,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*e+2*s*o*n+Math.pow(o,2)*i,y:Math.pow(s,2)*t+2*s*o*r+Math.pow(o,2)*a}}function RY(e,t,n,r,i,a,o,s){var l,c=s.bbox,u=c===void 0?!0:c,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=e,y=t,m=0,b=[g,y,m],x=[g,y],w=0,O={x:0,y:0},_=[{x:g,y}];v&&o<=0&&(O={x:g,y});for(var S=0;S<=p;S+=1){if(w=S/p,l=FY(e,t,n,r,i,a,w),g=l.x,y=l.y,u&&_.push({x:g,y}),d&&(m+=Mr(x,[g,y])),x=[g,y],v&&m>=o&&o>b[2]){var k=(m-o)/(m-b[2]);O={x:x[0]*(1-k)+b[0]*k,y:x[1]*(1-k)+b[1]*k}}b=[g,y,m]}return v&&o>=m&&(O={x:i,y:a}),{length:m,point:O,min:{x:Math.min.apply(null,_.map(function(E){return E.x})),y:Math.min.apply(null,_.map(function(E){return E.y}))},max:{x:Math.max.apply(null,_.map(function(E){return E.x})),y:Math.max.apply(null,_.map(function(E){return E.y}))}}}function IE(e,t,n){for(var r,i,a,o,s,l,c=Hh(e),u=typeof t=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],x=[],w=0,O={x:0,y:0},_=O,S=O,k=O,E=0,M=0,P=c.length;M<P;M+=1)m=c[M],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],O={x:g,y},_=O,w=0,u&&t<.001&&(k=O)):h==="L"?(r=fm(d[0],d[1],d[2],d[3],(t||0)-E),w=r.length,O=r.min,_=r.max,S=r.point):h==="A"?(i=jY(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(t||0)-E,n||{}),w=i.length,O=i.min,_=i.max,S=i.point):h==="C"?(a=NE(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(t||0)-E,n||{}),w=a.length,O=a.min,_=a.max,S=a.point):h==="Q"?(o=RY(d[0],d[1],d[2],d[3],d[4],d[5],(t||0)-E,n||{}),w=o.length,O=o.min,_=o.max,S=o.point):h==="Z"&&(d=[p,v,g,y],s=fm(d[0],d[1],d[2],d[3],(t||0)-E),w=s.length,O=s.min,_=s.max,S=s.point),u&&E<t&&E+w>=t&&(k=S),x.push(_),b.push(O),E+=w,l=h!=="Z"?m.slice(-2):[g,y],p=l[0],v=l[1];return u&&t>=E&&(k={x:p,y:v}),{length:E,point:k,min:{x:Math.min.apply(null,b.map(function(A){return A.x})),y:Math.min.apply(null,b.map(function(A){return A.y}))},max:{x:Math.max.apply(null,x.map(function(A){return A.x})),y:Math.max.apply(null,x.map(function(A){return A.y}))}}}function $Y(e,t){return IE(e,void 0,oo(oo({},t),{bbox:!1,length:!0})).length}function zY(e){var t=e.length,n=t-1;return e.map(function(r,i){return e.map(function(a,o){var s=i+o,l;return o===0||e[s]&&e[s][0]==="M"?(l=e[s],["M"].concat(l.slice(-2))):(s>=t&&(s-=n),e[s])})})}function BY(e,t){var n=e.length-1,r=[],i=0,a=0,o=zY(e);return o.forEach(function(s,l){e.slice(1).forEach(function(c,u){a+=Mr(e[(l+u)%n].slice(-2),t[u%n].slice(-2))}),r[l]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}function YY(e,t,n,r,i,a,o,s){return 3*((s-t)*(n+i)-(o-e)*(r+a)+r*(e-i)-n*(t-a)+s*(i+e/3)-o*(a+t/3))/20}function WY(e){var t=0,n=0,r=0;return um(e).map(function(i){var a;switch(i[0]){case"M":return t=i[1],n=i[2],0;default:var o=i.slice(1),s=o[0],l=o[1],c=o[2],u=o[3],f=o[4],d=o[5];return r=YY(t,n,s,l,c,u,f,d),a=i.slice(-2),t=a[0],n=a[1],r}}).reduce(function(i,a){return i+a},0)}function jE(e){return WY(e)>=0}function GY(e,t,n){return IE(e,t,oo(oo({},n),{bbox:!1,length:!0})).point}function HY(e,t){t===void 0&&(t=.5);var n=e.slice(0,2),r=e.slice(2,4),i=e.slice(4,6),a=e.slice(6,8),o=vo(n,r,t),s=vo(r,i,t),l=vo(i,a,t),c=vo(o,s,t),u=vo(s,l,t),f=vo(c,u,t);return[["C"].concat(o,c,f),["C"].concat(u,l,a)]}function DE(e){return e.map(function(t,n,r){var i=n&&r[n-1].slice(-2).concat(t.slice(1)),a=n?NE(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return n?o=a?HY(i):[t,t]:o=[t],{s:t,ss:o,l:a}})}function FE(e,t,n){var r=DE(e),i=DE(t),a=r.length,o=i.length,s=r.filter(function(g){return g.l}).length,l=i.filter(function(g){return g.l}).length,c=r.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/s||0,u=i.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/l||0,f=n||Math.max(a,o),d=[c,u],h=[f-a,f-o],p=0,v=[r,i].map(function(g,y){return g.l===f?g.map(function(m){return m.s}):g.map(function(m,b){return p=b&&h[y]&&m.l>=d[y],h[y]-=p?1:0,p?m.ss:[m.s]}).flat()});return v[0].length===v[1].length?v:FE(v[0],v[1],f)}function VY(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Nl(e))!==null;);return e}function dm(){return dm=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=VY(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},dm.apply(null,arguments)}function RE(e,t,n,r){var i=dm(Nl(e.prototype),t,n);return typeof i=="function"?function(a){return i.apply(n,a)}:i}function Uh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Dl(){}var ms=.7,Fl=1/ms,Rl="\\s*([+-]?\\d+)\\s*",Wu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UY=/^#([0-9a-f]{3,8})$/,XY=new RegExp(`^rgb\\(${Rl},${Rl},${Rl}\\)$`),qY=new RegExp(`^rgb\\(${Ki},${Ki},${Ki}\\)$`),KY=new RegExp(`^rgba\\(${Rl},${Rl},${Rl},${Wu}\\)$`),ZY=new RegExp(`^rgba\\(${Ki},${Ki},${Ki},${Wu}\\)$`),QY=new RegExp(`^hsl\\(${Wu},${Ki},${Ki}\\)$`),JY=new RegExp(`^hsla\\(${Wu},${Ki},${Ki},${Wu}\\)$`),$E={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Uh(Dl,Xh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zE,formatHex:zE,formatHex8:eW,formatHsl:tW,formatRgb:BE,toString:BE});function zE(){return this.rgb().formatHex()}function eW(){return this.rgb().formatHex8()}function tW(){return UE(this).formatHsl()}function BE(){return this.rgb().formatRgb()}function Xh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=UY.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?YE(t):n===3?new Un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=XY.exec(e))?new Un(t[1],t[2],t[3],1):(t=qY.exec(e))?new Un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KY.exec(e))?qh(t[1],t[2],t[3],t[4]):(t=ZY.exec(e))?qh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=QY.exec(e))?VE(t[1],t[2]/100,t[3]/100,1):(t=JY.exec(e))?VE(t[1],t[2]/100,t[3]/100,t[4]):$E.hasOwnProperty(e)?YE($E[e]):e==="transparent"?new Un(NaN,NaN,NaN,0):null}function YE(e){return new Un(e>>16&255,e>>8&255,e&255,1)}function qh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Un(e,t,n,r)}function WE(e){return e instanceof Dl||(e=Xh(e)),e?(e=e.rgb(),new Un(e.r,e.g,e.b,e.opacity)):new Un}function Gu(e,t,n,r){return arguments.length===1?WE(e):new Un(e,t,n,r==null?1:r)}function Un(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Uh(Un,Gu,hm(Dl,{brighter(e){return e=e==null?Fl:Math.pow(Fl,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ms:Math.pow(ms,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Un(bs(this.r),bs(this.g),bs(this.b),Kh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:GE,formatHex:GE,formatHex8:nW,formatRgb:HE,toString:HE}));function GE(){return`#${xs(this.r)}${xs(this.g)}${xs(this.b)}`}function nW(){return`#${xs(this.r)}${xs(this.g)}${xs(this.b)}${xs((isNaN(this.opacity)?1:this.opacity)*255)}`}function HE(){const e=Kh(this.opacity);return`${e===1?"rgb(":"rgba("}${bs(this.r)}, ${bs(this.g)}, ${bs(this.b)}${e===1?")":`, ${e})`}`}function Kh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xs(e){return e=bs(e),(e<16?"0":"")+e.toString(16)}function VE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ki(e,t,n,r)}function UE(e){if(e instanceof ki)return new ki(e.h,e.s,e.l,e.opacity);if(e instanceof Dl||(e=Xh(e)),!e)return new ki;if(e instanceof ki)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new ki(o,s,l,e.opacity)}function rW(e,t,n,r){return arguments.length===1?UE(e):new ki(e,t,n,r==null?1:r)}function ki(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uh(ki,rW,hm(Dl,{brighter(e){return e=e==null?Fl:Math.pow(Fl,e),new ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ms:Math.pow(ms,e),new ki(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Un(pm(e>=240?e-240:e+120,i,r),pm(e,i,r),pm(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ki(XE(this.h),Zh(this.s),Zh(this.l),Kh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kh(this.opacity);return`${e===1?"hsl(":"hsla("}${XE(this.h)}, ${Zh(this.s)*100}%, ${Zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function XE(e){return e=(e||0)%360,e<0?e+360:e}function Zh(e){return Math.max(0,Math.min(1,e||0))}function pm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const iW=Math.PI/180,aW=180/Math.PI;var qE=-.14861,vm=1.78277,gm=-.29227,Qh=-.90649,Hu=1.97294,KE=Hu*Qh,ZE=Hu*vm,QE=vm*gm-Qh*qE;function oW(e){if(e instanceof ws)return new ws(e.h,e.s,e.l,e.opacity);e instanceof Un||(e=WE(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(QE*r+KE*t-ZE*n)/(QE+KE-ZE),a=r-i,o=(Hu*(n-i)-gm*a)/Qh,s=Math.sqrt(o*o+a*a)/(Hu*i*(1-i)),l=s?Math.atan2(o,a)*aW-120:NaN;return new ws(l<0?l+360:l,s,i,e.opacity)}function Zi(e,t,n,r){return arguments.length===1?oW(e):new ws(e,t,n,r==null?1:r)}function ws(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Uh(ws,Zi,hm(Dl,{brighter(e){return e=e==null?Fl:Math.pow(Fl,e),new ws(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ms:Math.pow(ms,e),new ws(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*iW,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Un(255*(t+n*(qE*r+vm*i)),255*(t+n*(gm*r+Qh*i)),255*(t+n*(Hu*r)),this.opacity)}}));function Ma(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)}function JE(e,t){var n=Math.min.apply(Math,dr([],Br(e),!1)),r=Math.min.apply(Math,dr([],Br(t),!1)),i=Math.max.apply(Math,dr([],Br(e),!1)),a=Math.max.apply(Math,dr([],Br(t),!1));return{x:n,y:r,width:i-n,height:a-r}}function sW(e,t,n){return Math.atan(-t/e*Math.tan(n))}function lW(e,t,n){return Math.atan(t/(e*Math.tan(n)))}function cW(e,t,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+e}function uW(e,t,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+t}function fW(e,t,n,r,i,a,o){for(var s=sW(n,r,i),l=1/0,c=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var f=0;f<u.length;f++){var h=cW(e,t,n,r,i,u[f]);h<l&&(l=h),h>c&&(c=h)}for(var p=lW(n,r,i),v=1/0,g=-1/0,y=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var m=p+f;a<o?a<m&&m<o&&y.push(m):o<m&&m<a&&y.push(m)}for(var f=0;f<y.length;f++){var b=uW(e,t,n,r,i,y[f]);b<v&&(v=b),b>g&&(g=b)}return{x:l,y:v,width:c-l,height:g-v}}var dW=1e-4;function eM(e,t,n,r,i,a){var o=-1,s=1/0,l=[n,r],c=20;a&&a>200&&(c=a/10);for(var u=1/c,f=u/10,d=0;d<=c;d++){var h=d*u,p=[i.apply(void 0,dr([],Br(e.concat([h])),!1)),i.apply(void 0,dr([],Br(t.concat([h])),!1))],v=Ma(l[0],l[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:e[0],y:t[0]};if(o===1){var g=e.length;return{x:e[g-1],y:t[g-1]}}s=1/0;for(var d=0;d<32&&!(f<dW);d++){var y=o-f,m=o+f,p=[i.apply(void 0,dr([],Br(e.concat([y])),!1)),i.apply(void 0,dr([],Br(t.concat([y])),!1))],v=Ma(l[0],l[1],p[0],p[1]);if(y>=0&&v<s)o=y,s=v;else{var b=[i.apply(void 0,dr([],Br(e.concat([m])),!1)),i.apply(void 0,dr([],Br(t.concat([m])),!1))],x=Ma(l[0],l[1],b[0],b[1]);m<=1&&x<s?(o=m,s=x):f*=.5}}return{x:i.apply(void 0,dr([],Br(e.concat([o])),!1)),y:i.apply(void 0,dr([],Br(t.concat([o])),!1))}}function tM(e,t,n,r){return Ma(e,t,n,r)}function nM(e,t,n,r,i){return{x:(1-i)*e+i*n,y:(1-i)*t+i*r}}function hW(e,t,n,r,i,a){var o=[n-e,r-t];if(Rz(o,[0,0]))return Math.sqrt((i-e)*(i-e)+(a-t)*(a-t));var s=[-o[1],o[0]];Dz(s,s);var l=[i-e,a-t];return Math.abs(Fz(l,s))}function ym(e,t,n,r,i){var a=1-i;return a*a*a*e+3*t*i*a*a+3*n*i*i*a+r*i*i*i}function rM(e,t,n,r){var i=-3*e+9*t-9*n+3*r,a=6*e-12*t+6*n,o=3*t-3*e,s=[],l,c,u;if(Bu(i,0))Bu(a,0)||(l=-o/a,l>=0&&l<=1&&s.push(l));else{var f=a*a-4*i*o;Bu(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),l=(-a+u)/(2*i),c=(-a-u)/(2*i),l>=0&&l<=1&&s.push(l),c>=0&&c<=1&&s.push(c))}return s}function pW(e,t,n,r,i,a,o,s){for(var l=[e,o],c=[t,s],u=rM(e,n,i,o),f=rM(t,r,a,s),d=0;d<u.length;d++)l.push(ym(e,n,i,o,u[d]));for(var d=0;d<f.length;d++)c.push(ym(t,r,a,s,f[d]));return JE(l,c)}function vW(e,t,n,r,i,a,o,s,l,c,u){return eM([e,n,i,o],[t,r,a,s],l,c,ym,u)}function iM(e,t,n,r,i,a,o,s,l,c,u){var f=vW(e,t,n,r,i,a,o,s,l,c,u);return Ma(f.x,f.y,l,c)}function gW(e){if(e.length<2)return 0;for(var t=0,n=0;n<e.length-1;n++){var r=e[n],i=e[n+1];t+=Ma(r[0],r[1],i[0],i[1])}return t}function yW(e){return gW(e)}function mm(e,t,n,r){var i=1-r;return i*i*e+2*r*i*t+r*r*n}function aM(e,t,n){var r=e+n-2*t;if(Bu(r,0))return[.5];var i=(e-t)/r;return i<=1&&i>=0?[i]:[]}function mW(e,t,n,r,i,a){var o=aM(e,n,i)[0],s=aM(t,r,a)[0],l=[e,i],c=[t,a];return o!==void 0&&l.push(mm(e,n,i,o)),s!==void 0&&c.push(mm(t,r,a,s)),JE(l,c)}function bW(e,t,n,r,i,a,o,s){return eM([e,n,i],[t,r,a],o,s,mm)}function xW(e,t,n,r,i,a,o,s){var l=bW(e,t,n,r,i,a,o,s);return Ma(l.x,l.y,o,s)}function Tn(){Tn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(T,I,C){T[I]=C.value},a=typeof Symbol=="function"?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(T,I,C){return Object.defineProperty(T,I,{value:C,enumerable:!0,configurable:!0,writable:!0}),T[I]}try{c({},"")}catch(T){c=function(C,j,D){return C[j]=D}}function u(T,I,C,j){var D=I&&I.prototype instanceof y?I:y,F=Object.create(D.prototype),R=new L(j||[]);return i(F,"_invoke",{value:E(T,C,R)}),F}function f(T,I,C){try{return{type:"normal",arg:T.call(I,C)}}catch(j){return{type:"throw",arg:j}}}t.wrap=u;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",g={};function y(){}function m(){}function b(){}var x={};c(x,o,function(){return this});var w=Object.getPrototypeOf,O=w&&w(w(N([])));O&&O!==n&&r.call(O,o)&&(x=O);var _=b.prototype=y.prototype=Object.create(x);function S(T){["next","throw","return"].forEach(function(I){c(T,I,function(C){return this._invoke(I,C)})})}function k(T,I){function C(D,F,R,z){var H=f(T[D],T,F);if(H.type!=="throw"){var W=H.arg,X=W.value;return X&&ho(X)=="object"&&r.call(X,"__await")?I.resolve(X.__await).then(function(V){C("next",V,R,z)},function(V){C("throw",V,R,z)}):I.resolve(X).then(function(V){W.value=V,R(W)},function(V){return C("throw",V,R,z)})}z(H.arg)}var j;i(this,"_invoke",{value:function(F,R){function z(){return new I(function(H,W){C(F,R,H,W)})}return j=j?j.then(z,z):z()}})}function E(T,I,C){var j=d;return function(D,F){if(j===p)throw Error("Generator is already running");if(j===v){if(D==="throw")throw F;return{value:e,done:!0}}for(C.method=D,C.arg=F;;){var R=C.delegate;if(R){var z=M(R,C);if(z){if(z===g)continue;return z}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(j===d)throw j=v,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);j=p;var H=f(T,I,C);if(H.type==="normal"){if(j=C.done?v:h,H.arg===g)continue;return{value:H.arg,done:C.done}}H.type==="throw"&&(j=v,C.method="throw",C.arg=H.arg)}}}function M(T,I){var C=I.method,j=T.iterator[C];if(j===e)return I.delegate=null,C==="throw"&&T.iterator.return&&(I.method="return",I.arg=e,M(T,I),I.method==="throw")||C!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+C+"' method")),g;var D=f(j,T.iterator,I.arg);if(D.type==="throw")return I.method="throw",I.arg=D.arg,I.delegate=null,g;var F=D.arg;return F?F.done?(I[T.resultName]=F.value,I.next=T.nextLoc,I.method!=="return"&&(I.method="next",I.arg=e),I.delegate=null,g):F:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,g)}function P(T){var I={tryLoc:T[0]};1 in T&&(I.catchLoc=T[1]),2 in T&&(I.finallyLoc=T[2],I.afterLoc=T[3]),this.tryEntries.push(I)}function A(T){var I=T.completion||{};I.type="normal",delete I.arg,T.completion=I}function L(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(P,this),this.reset(!0)}function N(T){if(T||T===""){var I=T[o];if(I)return I.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var C=-1,j=function D(){for(;++C<T.length;)if(r.call(T,C))return D.value=T[C],D.done=!1,D;return D.value=e,D.done=!0,D};return j.next=j}}throw new TypeError(ho(T)+" is not iterable")}return m.prototype=b,i(_,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(T){var I=typeof T=="function"&&T.constructor;return!!I&&(I===m||(I.displayName||I.name)==="GeneratorFunction")},t.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,b):(T.__proto__=b,c(T,l,"GeneratorFunction")),T.prototype=Object.create(_),T},t.awrap=function(T){return{__await:T}},S(k.prototype),c(k.prototype,s,function(){return this}),t.AsyncIterator=k,t.async=function(T,I,C,j,D){D===void 0&&(D=Promise);var F=new k(u(T,I,C,j),D);return t.isGeneratorFunction(I)?F:F.next().then(function(R){return R.done?R.value:F.next()})},S(_),c(_,l,"Generator"),c(_,o,function(){return this}),c(_,"toString",function(){return"[object Generator]"}),t.keys=function(T){var I=Object(T),C=[];for(var j in I)C.push(j);return C.reverse(),function D(){for(;C.length;){var F=C.pop();if(F in I)return D.value=F,D.done=!1,D}return D.done=!0,D}},t.values=N,L.prototype={constructor:L,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!I)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=e)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var C=this;function j(W,X){return R.type="throw",R.arg=I,C.next=W,X&&(C.method="next",C.arg=e),!!X}for(var D=this.tryEntries.length-1;D>=0;--D){var F=this.tryEntries[D],R=F.completion;if(F.tryLoc==="root")return j("end");if(F.tryLoc<=this.prev){var z=r.call(F,"catchLoc"),H=r.call(F,"finallyLoc");if(z&&H){if(this.prev<F.catchLoc)return j(F.catchLoc,!0);if(this.prev<F.finallyLoc)return j(F.finallyLoc)}else if(z){if(this.prev<F.catchLoc)return j(F.catchLoc,!0)}else{if(!H)throw Error("try statement without catch or finally");if(this.prev<F.finallyLoc)return j(F.finallyLoc)}}}},abrupt:function(I,C){for(var j=this.tryEntries.length-1;j>=0;--j){var D=this.tryEntries[j];if(D.tryLoc<=this.prev&&r.call(D,"finallyLoc")&&this.prev<D.finallyLoc){var F=D;break}}F&&(I==="break"||I==="continue")&&F.tryLoc<=C&&C<=F.finallyLoc&&(F=null);var R=F?F.completion:{};return R.type=I,R.arg=C,F?(this.method="next",this.next=F.finallyLoc,g):this.complete(R)},complete:function(I,C){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&C&&(this.next=C),g},finish:function(I){for(var C=this.tryEntries.length-1;C>=0;--C){var j=this.tryEntries[C];if(j.finallyLoc===I)return this.complete(j.completion,j.afterLoc),A(j),g}},catch:function(I){for(var C=this.tryEntries.length-1;C>=0;--C){var j=this.tryEntries[C];if(j.tryLoc===I){var D=j.completion;if(D.type==="throw"){var F=D.arg;A(j)}return F}}throw Error("illegal catch attempt")},delegateYield:function(I,C,j){return this.delegate={iterator:N(I),resultName:C,nextLoc:j},this.method==="next"&&(this.arg=e),g}},t}function oM(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function go(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(l){oM(a,r,i,o,s,"next",l)}function s(l){oM(a,r,i,o,s,"throw",l)}o(void 0)})}}function Os(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=sm(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return o=c.done,c},e:function(c){s=!0,a=c},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function wW(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function _s(e,t){if(e==null)return{};var n,r,i=wW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}/*!
30
+ * @antv/g-lite
31
+ * @description A core module for rendering engine implements DOM API.
32
+ * @version 2.2.10
33
+ * @date 12/20/2024, 6:51:24 AM
34
+ * @author AntVis
35
+ * @docs https://g.antv.antgroup.com/
36
+ */var OW=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},sM={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(OW,function(){function n(w,O,_,S,k){r(w,O,_||0,S||w.length-1,k||a)}function r(w,O,_,S,k){for(;S>_;){if(S-_>600){var E=S-_+1,M=O-_+1,P=Math.log(E),A=.5*Math.exp(2*P/3),L=.5*Math.sqrt(P*A*(E-A)/E)*(M-E/2<0?-1:1),N=Math.max(_,Math.floor(O-M*A/E+L)),T=Math.min(S,Math.floor(O+(E-M)*A/E+L));r(w,O,N,T,k)}var I=w[O],C=_,j=S;for(i(w,_,O),k(w[S],I)>0&&i(w,_,S);C<j;){for(i(w,C,j),C++,j--;k(w[C],I)<0;)C++;for(;k(w[j],I)>0;)j--}k(w[_],I)===0?i(w,_,j):(j++,i(w,j,S)),j<=O&&(_=j+1),O<=j&&(S=j-1)}}function i(w,O,_){var S=w[O];w[O]=w[_],w[_]=S}function a(w,O){return w<O?-1:w>O?1:0}var o=function(O){O===void 0&&(O=9),this._maxEntries=Math.max(4,O),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(O){var _=this.data,S=[];if(!m(O,_))return S;for(var k=this.toBBox,E=[];_;){for(var M=0;M<_.children.length;M++){var P=_.children[M],A=_.leaf?k(P):P;m(O,A)&&(_.leaf?S.push(P):y(O,A)?this._all(P,S):E.push(P))}_=E.pop()}return S},o.prototype.collides=function(O){var _=this.data;if(!m(O,_))return!1;for(var S=[];_;){for(var k=0;k<_.children.length;k++){var E=_.children[k],M=_.leaf?this.toBBox(E):E;if(m(O,M)){if(_.leaf||y(O,M))return!0;S.push(E)}}_=S.pop()}return!1},o.prototype.load=function(O){if(!(O&&O.length))return this;if(O.length<this._minEntries){for(var _=0;_<O.length;_++)this.insert(O[_]);return this}var S=this._build(O.slice(),0,O.length-1,0);if(!this.data.children.length)this.data=S;else if(this.data.height===S.height)this._splitRoot(this.data,S);else{if(this.data.height<S.height){var k=this.data;this.data=S,S=k}this._insert(S,this.data.height-S.height-1,!0)}return this},o.prototype.insert=function(O){return O&&this._insert(O,this.data.height-1),this},o.prototype.clear=function(){return this.data=b([]),this},o.prototype.remove=function(O,_){if(!O)return this;for(var S=this.data,k=this.toBBox(O),E=[],M=[],P,A,L;S||E.length;){if(S||(S=E.pop(),A=E[E.length-1],P=M.pop(),L=!0),S.leaf){var N=s(O,S.children,_);if(N!==-1)return S.children.splice(N,1),E.push(S),this._condense(E),this}!L&&!S.leaf&&y(S,k)?(E.push(S),M.push(P),P=0,A=S,S=S.children[0]):A?(P++,S=A.children[P],L=!1):S=null}return this},o.prototype.toBBox=function(O){return O},o.prototype.compareMinX=function(O,_){return O.minX-_.minX},o.prototype.compareMinY=function(O,_){return O.minY-_.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(O){return this.data=O,this},o.prototype._all=function(O,_){for(var S=[];O;)O.leaf?_.push.apply(_,O.children):S.push.apply(S,O.children),O=S.pop();return _},o.prototype._build=function(O,_,S,k){var E=S-_+1,M=this._maxEntries,P;if(E<=M)return P=b(O.slice(_,S+1)),l(P,this.toBBox),P;k||(k=Math.ceil(Math.log(E)/Math.log(M)),M=Math.ceil(E/Math.pow(M,k-1))),P=b([]),P.leaf=!1,P.height=k;var A=Math.ceil(E/M),L=A*Math.ceil(Math.sqrt(M));x(O,_,S,L,this.compareMinX);for(var N=_;N<=S;N+=L){var T=Math.min(N+L-1,S);x(O,N,T,A,this.compareMinY);for(var I=N;I<=T;I+=A){var C=Math.min(I+A-1,T);P.children.push(this._build(O,I,C,k-1))}}return l(P,this.toBBox),P},o.prototype._chooseSubtree=function(O,_,S,k){for(;k.push(_),!(_.leaf||k.length-1===S);){for(var E=1/0,M=1/0,P=void 0,A=0;A<_.children.length;A++){var L=_.children[A],N=h(L),T=v(O,L)-N;T<M?(M=T,E=N<E?N:E,P=L):T===M&&N<E&&(E=N,P=L)}_=P||_.children[0]}return _},o.prototype._insert=function(O,_,S){var k=S?O:this.toBBox(O),E=[],M=this._chooseSubtree(k,this.data,_,E);for(M.children.push(O),u(M,k);_>=0&&E[_].children.length>this._maxEntries;)this._split(E,_),_--;this._adjustParentBBoxes(k,E,_)},o.prototype._split=function(O,_){var S=O[_],k=S.children.length,E=this._minEntries;this._chooseSplitAxis(S,E,k);var M=this._chooseSplitIndex(S,E,k),P=b(S.children.splice(M,S.children.length-M));P.height=S.height,P.leaf=S.leaf,l(S,this.toBBox),l(P,this.toBBox),_?O[_-1].children.push(P):this._splitRoot(S,P)},o.prototype._splitRoot=function(O,_){this.data=b([O,_]),this.data.height=O.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(O,_,S){for(var k,E=1/0,M=1/0,P=_;P<=S-_;P++){var A=c(O,0,P,this.toBBox),L=c(O,P,S,this.toBBox),N=g(A,L),T=h(A)+h(L);N<E?(E=N,k=P,M=T<M?T:M):N===E&&T<M&&(M=T,k=P)}return k||S-_},o.prototype._chooseSplitAxis=function(O,_,S){var k=O.leaf?this.compareMinX:f,E=O.leaf?this.compareMinY:d,M=this._allDistMargin(O,_,S,k),P=this._allDistMargin(O,_,S,E);M<P&&O.children.sort(k)},o.prototype._allDistMargin=function(O,_,S,k){O.children.sort(k);for(var E=this.toBBox,M=c(O,0,_,E),P=c(O,S-_,S,E),A=p(M)+p(P),L=_;L<S-_;L++){var N=O.children[L];u(M,O.leaf?E(N):N),A+=p(M)}for(var T=S-_-1;T>=_;T--){var I=O.children[T];u(P,O.leaf?E(I):I),A+=p(P)}return A},o.prototype._adjustParentBBoxes=function(O,_,S){for(var k=S;k>=0;k--)u(_[k],O)},o.prototype._condense=function(O){for(var _=O.length-1,S=void 0;_>=0;_--)O[_].children.length===0?_>0?(S=O[_-1].children,S.splice(S.indexOf(O[_]),1)):this.clear():l(O[_],this.toBBox)};function s(w,O,_){if(!_)return O.indexOf(w);for(var S=0;S<O.length;S++)if(_(w,O[S]))return S;return-1}function l(w,O){c(w,0,w.children.length,O,w)}function c(w,O,_,S,k){k||(k=b(null)),k.minX=1/0,k.minY=1/0,k.maxX=-1/0,k.maxY=-1/0;for(var E=O;E<_;E++){var M=w.children[E];u(k,w.leaf?S(M):M)}return k}function u(w,O){return w.minX=Math.min(w.minX,O.minX),w.minY=Math.min(w.minY,O.minY),w.maxX=Math.max(w.maxX,O.maxX),w.maxY=Math.max(w.maxY,O.maxY),w}function f(w,O){return w.minX-O.minX}function d(w,O){return w.minY-O.minY}function h(w){return(w.maxX-w.minX)*(w.maxY-w.minY)}function p(w){return w.maxX-w.minX+(w.maxY-w.minY)}function v(w,O){return(Math.max(O.maxX,w.maxX)-Math.min(O.minX,w.minX))*(Math.max(O.maxY,w.maxY)-Math.min(O.minY,w.minY))}function g(w,O){var _=Math.max(w.minX,O.minX),S=Math.max(w.minY,O.minY),k=Math.min(w.maxX,O.maxX),E=Math.min(w.maxY,O.maxY);return Math.max(0,k-_)*Math.max(0,E-S)}function y(w,O){return w.minX<=O.minX&&w.minY<=O.minY&&O.maxX<=w.maxX&&O.maxY<=w.maxY}function m(w,O){return O.minX<=w.maxX&&O.minY<=w.maxY&&O.maxX>=w.minX&&O.maxY>=w.minY}function b(w){return{children:w,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(w,O,_,S,k){for(var E=[O,_];E.length;)if(_=E.pop(),O=E.pop(),!(_-O<=S)){var M=O+Math.ceil((_-O)/S/2)*S;n(w,M,O,_,k),E.push(O,M,M,_)}}return o})})(sM);var _W=sM.exports,U=function(e){return e.GROUP="g",e.FRAGMENT="fragment",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",e}({}),Jh=function(e){return e[e.ZERO=0]="ZERO",e[e.NEGATIVE_ONE=1]="NEGATIVE_ONE",e}({}),yo=function(){function e(){J(this,e),this.plugins=[]}return ee(e,[{key:"addRenderingPlugin",value:function(n){this.plugins.push(n),this.context.renderingPlugins.push(n)}},{key:"removeAllRenderingPlugins",value:function(){var n=this;this.plugins.forEach(function(r){var i=n.context.renderingPlugins.indexOf(r);i>=0&&n.context.renderingPlugins.splice(i,1)})}}])}(),SW=function(){function e(t){J(this,e),this.clipSpaceNearZ=Jh.NEGATIVE_ONE,this.plugins=[],this.config=Te({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)}return ee(e,[{key:"registerPlugin",value:function(n){var r=this.plugins.findIndex(function(i){return i===n});r===-1&&this.plugins.push(n)}},{key:"unregisterPlugin",value:function(n){var r=this.plugins.findIndex(function(i){return i===n});r>-1&&this.plugins.splice(r,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(n){return this.plugins.find(function(r){return r.name===n})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(n){Object.assign(this.config,n)}}])}(),bm=ro,$l=Wi,kW=kz,EW=Sz,lM=sh,xm=Az,rn=function(){function e(){J(this,e),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return ee(e,[{key:"update",value:function(n,r){$l(this.center,n),$l(this.halfExtents,r),xm(this.min,this.center,this.halfExtents),bm(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(n,r){bm(this.center,r,n),lM(this.center,this.center,.5),xm(this.halfExtents,r,n),lM(this.halfExtents,this.halfExtents,.5),$l(this.min,n),$l(this.max,r)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(n){if(!e.isEmpty(n)){if(e.isEmpty(this)){this.setMinMax(n.getMin(),n.getMax());return}var r=this.center,i=r[0],a=r[1],o=r[2],s=this.halfExtents,l=s[0],c=s[1],u=s[2],f=i-l,d=i+l,h=a-c,p=a+c,v=o-u,g=o+u,y=n.center,m=y[0],b=y[1],x=y[2],w=n.halfExtents,O=w[0],_=w[1],S=w[2],k=m-O,E=m+O,M=b-_,P=b+_,A=x-S,L=x+S;k<f&&(f=k),E>d&&(d=E),M<h&&(h=M),P>p&&(p=P),A<v&&(v=A),L>g&&(g=L),r[0]=(f+d)*.5,r[1]=(h+p)*.5,r[2]=(v+g)*.5,s[0]=(d-f)*.5,s[1]=(p-h)*.5,s[2]=(g-v)*.5,this.min[0]=f,this.min[1]=h,this.min[2]=v,this.max[0]=d,this.max[1]=p,this.max[2]=g}}},{key:"setFromTransformedAABB",value:function(n,r){var i=this.center,a=this.halfExtents,o=n.center,s=n.halfExtents,l=r[0],c=r[4],u=r[8],f=r[1],d=r[5],h=r[9],p=r[2],v=r[6],g=r[10],y=Math.abs(l),m=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(d),O=Math.abs(h),_=Math.abs(p),S=Math.abs(v),k=Math.abs(g);i[0]=r[12]+l*o[0]+c*o[1]+u*o[2],i[1]=r[13]+f*o[0]+d*o[1]+h*o[2],i[2]=r[14]+p*o[0]+v*o[1]+g*o[2],a[0]=y*s[0]+m*s[1]+b*s[2],a[1]=x*s[0]+w*s[1]+O*s[2],a[2]=_*s[0]+S*s[1]+k*s[2],xm(this.min,i,a),bm(this.max,i,a)}},{key:"intersects",value:function(n){var r=this.getMax(),i=this.getMin(),a=n.getMax(),o=n.getMin();return i[0]<=a[0]&&r[0]>=o[0]&&i[1]<=a[1]&&r[1]>=o[1]&&i[2]<=a[2]&&r[2]>=o[2]}},{key:"intersection",value:function(n){if(!this.intersects(n))return null;var r=new e,i=kW([0,0,0],this.getMin(),n.getMin()),a=EW([0,0,0],this.getMax(),n.getMax());return r.setMinMax(i,a),r}},{key:"getNegativeFarPoint",value:function(n){return n.pnVertexFlag===273?$l([0,0,0],this.min):n.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:n.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:n.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:n.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:n.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:n.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(n){return n.pnVertexFlag===273?$l([0,0,0],this.max):n.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:n.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:n.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:n.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:n.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:n.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(n){return!n||n.halfExtents[0]===0&&n.halfExtents[1]===0&&n.halfExtents[2]===0}}])}(),MW=function(){function e(t,n){J(this,e),this.distance=t||0,this.normal=n||Xe(0,1,0),this.updatePNVertexFlag()}return ee(e,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(n){return Gi(n,this.normal)-this.distance}},{key:"normalize",value:function(){var n=1/tS(this.normal);sh(this.normal,this.normal,n),this.distance*=n}},{key:"intersectsLine",value:function(n,r,i){var a=this.distanceToPoint(n),o=this.distanceToPoint(r),s=a/(a-o),l=s>=0&&s<=1;return l&&i&&hy(i,n,r,s),l}}])}(),zl=function(e){return e[e.OUTSIDE=4294967295]="OUTSIDE",e[e.INSIDE=0]="INSIDE",e[e.INDETERMINATE=2147483647]="INDETERMINATE",e}({}),AW=function(){function e(t){if(J(this,e),this.planes=[],t)this.planes=t;else for(var n=0;n<6;n++)this.planes.push(new MW)}return ee(e,[{key:"extractFromVPMatrix",value:function(n){var r=Ce(n,16),i=r[0],a=r[1],o=r[2],s=r[3],l=r[4],c=r[5],u=r[6],f=r[7],d=r[8],h=r[9],p=r[10],v=r[11],g=r[12],y=r[13],m=r[14],b=r[15];Wn(this.planes[0].normal,s-i,f-l,v-d),this.planes[0].distance=b-g,Wn(this.planes[1].normal,s+i,f+l,v+d),this.planes[1].distance=b+g,Wn(this.planes[2].normal,s+a,f+c,v+h),this.planes[2].distance=b+y,Wn(this.planes[3].normal,s-a,f-c,v-h),this.planes[3].distance=b-y,Wn(this.planes[4].normal,s-o,f-u,v-p),this.planes[4].distance=b-m,Wn(this.planes[5].normal,s+o,f+u,v+p),this.planes[5].distance=b+m,this.planes.forEach(function(x){x.normalize(),x.updatePNVertexFlag()})}}])}(),Ln=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;J(this,e),this.x=0,this.y=0,this.x=t,this.y=n}return ee(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"copyFrom",value:function(n){this.x=n.x,this.y=n.y}}])}(),Bl=function(){function e(t,n,r,i){J(this,e),this.x=t,this.y=n,this.width=r,this.height=i,this.left=t,this.right=t+r,this.top=n,this.bottom=n+i}return ee(e,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(n){return new e(n.x,n.y,n.width,n.height)}},{key:"applyTransform",value:function(n,r){var i=vu(n.x,n.y,0,1),a=vu(n.x+n.width,n.y,0,1),o=vu(n.x,n.y+n.height,0,1),s=vu(n.x+n.width,n.y+n.height,0,1),l=Hi(),c=Hi(),u=Hi(),f=Hi();Vi(l,i,r),Vi(c,a,r),Vi(u,o,r),Vi(f,s,r);var d=Math.min(l[0],c[0],u[0],f[0]),h=Math.min(l[1],c[1],u[1],f[1]),p=Math.max(l[0],c[0],u[0],f[0]),v=Math.max(l[1],c[1],u[1],f[1]);return e.fromRect({x:d,y:h,width:p-d,height:v-h})}}])}(),lt="Method not implemented.",Yl="Use document.documentElement instead.",PW="Cannot append a destroyed element.";function Wl(e){return e===void 0?0:e>360||e<-360?e%360:e}var wm=Ye();function nr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(e)&&e.length===3?r?Oa(e):Wi(wm,e):po(e)?r?Xe(e,t,n):Wn(wm,e,t,n):r?Xe(e[0],e[1]||t,e[2]||n):Wn(wm,e[0],e[1]||t,e[2]||n)}var CW=Math.PI/180;function ct(e){return e*CW}var TW=180/Math.PI;function Vr(e){return e*TW}function LW(e){return 360*e}var ep=Math.PI/2;function NW(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n,s=r*r,l=i*i,c=a*a,u=o+s+l+c,f=n*a-r*i;return f>.499995*u?(e[0]=ep,e[1]=2*Math.atan2(r,n),e[2]=0):f<-.499995*u?(e[0]=-ep,e[1]=2*Math.atan2(r,n),e[2]=0):(e[0]=Math.asin(2*(n*i-a*r)),e[1]=Math.atan2(2*(n*a+r*i),1-2*(l+c)),e[2]=Math.atan2(2*(n*r+i*a),1-2*(s+l))),e}function IW(e,t){var n,r,i=wl(Ye(),t),a=Ce(i,3),o=a[0],s=a[1],l=a[2],c=Math.asin(-t[2]/o);return c<ep?c>-ep?(n=Math.atan2(t[6]/s,t[10]/l),r=Math.atan2(t[1]/o,t[0]/o)):(r=0,n=-Math.atan2(t[4]/s,t[5]/s)):(r=0,n=Math.atan2(t[4]/s,t[5]/s)),e[0]=n,e[1]=c,e[2]=r,e}function Om(e,t){return t.length===16?IW(e,t):NW(e,t)}function jW(e,t,n,r,i){var a=Math.cos(e),o=Math.sin(e);return Q$(r*a,i*o,0,-r*o,i*a,0,t,n,1)}function DW(e,t,n,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,c=n-t,u=r-i,f=l/c,d=l/u,h=(n+t)/c,p=(r+i)/u,v,g,y=o-a,m=o*a;return s?(v=-o/y,g=-m/y):(v=-(o+a)/y,g=-2*m/y),e[0]=f,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=d,e[6]=0,e[7]=0,e[8]=h,e[9]=p,e[10]=v,e[11]=-1,e[12]=0,e[13]=0,e[14]=g,e[15]=0,e}function cM(e){var t=e[0],n=e[1],r=e[3],i=e[4],a=Math.sqrt(t*t+n*n),o=Math.sqrt(r*r+i*i),s=t*i-n*r;if(s<0&&(t<i?a=-a:o=-o),a){var l=1/a;t*=l,n*=l}if(o){var c=1/o;r*=c,i*=c}var u=Math.atan2(n,t),f=Vr(u);return[e[6],e[7],a,o,f]}var Qi=it(),Ei=it(),Vu=Hi(),ke=[Ye(),Ye(),Ye()],uM=Ye();function FW(e,t,n,r,i,a){if(!RW(Qi,e)||(bl(Ei,Qi),Ei[3]=0,Ei[7]=0,Ei[11]=0,Ei[15]=1,Math.abs($_(Ei))<1e-8))return!1;var o=Qi[3],s=Qi[7],l=Qi[11],c=Qi[12],u=Qi[13],f=Qi[14],d=Qi[15];if(o!==0||s!==0||l!==0){Vu[0]=o,Vu[1]=s,Vu[2]=l,Vu[3]=d;var h=Oi(Ei,Ei);if(!h)return!1;R_(Ei,Ei),Vi(i,Vu,Ei)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=c,t[1]=u,t[2]=f,$W(ke,Qi),n[0]=_a(ke[0]),ls(ke[0],ke[0]),r[0]=Gi(ke[0],ke[1]),_m(ke[1],ke[1],ke[0],1,-r[0]),n[1]=_a(ke[1]),ls(ke[1],ke[1]),r[0]/=n[1],r[1]=Gi(ke[0],ke[2]),_m(ke[2],ke[2],ke[0],1,-r[1]),r[2]=Gi(ke[1],ke[2]),_m(ke[2],ke[2],ke[1],1,-r[2]),n[2]=_a(ke[2]),ls(ke[2],ke[2]),r[1]/=n[2],r[2]/=n[2],lh(uM,ke[1],ke[2]),Gi(ke[0],uM)<0)for(var p=0;p<3;p++)n[p]*=-1,ke[p][0]*=-1,ke[p][1]*=-1,ke[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+ke[0][0]-ke[1][1]-ke[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-ke[0][0]+ke[1][1]-ke[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-ke[0][0]-ke[1][1]+ke[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+ke[0][0]+ke[1][1]+ke[2][2],0)),ke[2][1]>ke[1][2]&&(a[0]=-a[0]),ke[0][2]>ke[2][0]&&(a[1]=-a[1]),ke[1][0]>ke[0][1]&&(a[2]=-a[2]),!0}function RW(e,t){var n=t[15];if(n===0)return!1;for(var r=1/n,i=0;i<16;i++)e[i]=t[i]*r;return!0}function $W(e,t){e[0][0]=t[0],e[0][1]=t[1],e[0][2]=t[2],e[1][0]=t[4],e[1][1]=t[5],e[1][2]=t[6],e[2][0]=t[8],e[2][1]=t[9],e[2][2]=t[10]}function _m(e,t,n,r,i){e[0]=t[0]*r+n[0]*i,e[1]=t[1]*r+n[1]*i,e[2]=t[2]*r+n[2]*i}var ut=function(e){return e[e.ORBITING=0]="ORBITING",e[e.EXPLORING=1]="EXPLORING",e[e.TRACKING=2]="TRACKING",e}({}),Sm=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.ROTATIONAL=1]="ROTATIONAL",e[e.TRANSLATIONAL=2]="TRANSLATIONAL",e[e.CINEMATIC=3]="CINEMATIC",e}({}),Ur=function(e){return e[e.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",e[e.PERSPECTIVE=1]="PERSPECTIVE",e}({}),fM={UPDATED:"updated"},dM=2e-4,hM=function(){function e(){J(this,e),this.clipSpaceNearZ=Jh.NEGATIVE_ONE,this.eventEmitter=new vE,this.matrix=it(),this.right=Xe(1,0,0),this.up=Xe(0,1,0),this.forward=Xe(0,0,1),this.position=Xe(0,0,1),this.focalPoint=Xe(0,0,0),this.distanceVector=Xe(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=it(),this.projectionMatrixInverse=it(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=ut.EXPLORING,this.trackingMode=Sm.DEFAULT,this.projectionMode=Ur.PERSPECTIVE,this.frustum=new AW,this.orthoMatrix=it()}return ee(e,[{key:"isOrtho",value:function(){return this.projectionMode===Ur.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(n){this.enableUpdate=n}},{key:"setType",value:function(n,r){return this.type=n,this.type===ut.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===ut.TRACKING&&r!==void 0&&this.setTrackingMode(r),this}},{key:"setProjectionMode",value:function(n){return this.projectionMode=n,this}},{key:"setTrackingMode",value:function(n){if(this.type!==ut.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=n,this}},{key:"setWorldRotation",value:function(n){return this.rotateWorld=n,this._getAngles(),this}},{key:"getViewTransform",value:function(){return Oi(it(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(n,r){var i=wa(it(),[n,r,0]);this.jitteredProjectionMatrix=Yn(it(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(n){return this.matrix=n,this._update(),this}},{key:"setProjectionMatrix",value:function(n){this.projectionMatrix=n}},{key:"setFov",value:function(n){return this.setPerspective(this.near,this.far,n,this.aspect),this}},{key:"setAspect",value:function(n){return this.setPerspective(this.near,this.far,this.fov,n),this}},{key:"setNear",value:function(n){return this.projectionMode===Ur.PERSPECTIVE?this.setPerspective(n,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,n,this.far),this}},{key:"setFar",value:function(n){return this.projectionMode===Ur.PERSPECTIVE?this.setPerspective(this.near,n,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,n),this}},{key:"setViewOffset",value:function(n,r,i,a,o,s){return this.aspect=n/r,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=n,this.view.fullHeight=r,this.view.offsetX=i,this.view.offsetY=a,this.view.width=o,this.view.height=s,this.projectionMode===Ur.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===Ur.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(n){return this.zoom=n,this.projectionMode===Ur.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ur.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(n,r){var i=this.canvas.viewport2Canvas({x:r[0],y:r[1]}),a=i.x,o=i.y,s=this.roll;this.rotate(0,0,-s),this.setPosition(a,o),this.setFocalPoint(a,o),this.setZoom(n),this.rotate(0,0,s);var l=this.canvas.viewport2Canvas({x:r[0],y:r[1]}),c=l.x,u=l.y,f=Xe(c-a,u-o,0),d=Gi(f,this.right)/_a(this.right),h=Gi(f,this.up)/_a(this.up),p=this.getPosition(),v=Ce(p,2),g=v[0],y=v[1],m=this.getFocalPoint(),b=Ce(m,2),x=b[0],w=b[1];return this.setPosition(g-d,y-h),this.setFocalPoint(x-d,w-h),this}},{key:"setPerspective",value:function(n,r,i,a){var o;this.projectionMode=Ur.PERSPECTIVE,this.fov=i,this.near=n,this.far=r,this.aspect=a;var s=this.near*Math.tan(ct(.5*this.fov))/this.zoom,l=2*s,c=this.aspect*l,u=-.5*c;if((o=this.view)!==null&&o!==void 0&&o.enabled){var f=this.view.fullWidth,d=this.view.fullHeight;u+=this.view.offsetX*c/f,s-=this.view.offsetY*l/d,c*=this.view.width/f,l*=this.view.height/d}return DW(this.projectionMatrix,u,u+c,s-l,s,n,this.far,this.clipSpaceNearZ===Jh.ZERO),Oi(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(n,r,i,a,o,s){var l;this.projectionMode=Ur.ORTHOGRAPHIC,this.rright=r,this.left=n,this.top=i,this.bottom=a,this.near=o,this.far=s;var c=(this.rright-this.left)/(2*this.zoom),u=(this.top-this.bottom)/(2*this.zoom),f=(this.rright+this.left)/2,d=(this.top+this.bottom)/2,h=f-c,p=f+c,v=d+u,g=d-u;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,m=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h+=y*this.view.offsetX,p=h+y*this.view.width,v-=m*this.view.offsetY,g=v-m*this.view.height}return this.clipSpaceNearZ===Jh.NEGATIVE_ONE?q_(this.projectionMatrix,h,p,v,g,o,s):K_(this.projectionMatrix,h,p,v,g,o,s),Oi(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=nr(n,r,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=Xe(0,1,0);if(this.focalPoint=nr(n,r,i),this.trackingMode===Sm.CINEMATIC){var o=dy(Ye(),this.focalPoint,this.position);n=o[0],r=o[1],i=o[2];var s=_a(o),l=Vr(Math.asin(r/s)),c=90+Vr(Math.atan2(i,n)),u=it();Y_(u,u,ct(c)),B_(u,u,ct(l)),a=zt(Ye(),[0,1,0],u)}return Oi(this.matrix,Z_(it(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(n){if(this.distance===n||n<0)return this;this.distance=n,this.distance<dM&&(this.distance=dM),this.dollyingStep=this.distance/100;var r=Ye();n=this.distance;var i=this.forward,a=this.focalPoint;return r[0]=n*i[0]+a[0],r[1]=n*i[1]+a[1],r[2]=n*i[2]+a[2],this._setPosition(r),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(n){return this.maxDistance=n,this}},{key:"setMinDistance",value:function(n){return this.minDistance=n,this}},{key:"setAzimuth",value:function(n){return this.azimuth=Wl(n),this.computeMatrix(),this._getAxes(),this.type===ut.ORBITING||this.type===ut.EXPLORING?this._getPosition():this.type===ut.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(n){return this.elevation=Wl(n),this.computeMatrix(),this._getAxes(),this.type===ut.ORBITING||this.type===ut.EXPLORING?this._getPosition():this.type===ut.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(n){return this.roll=Wl(n),this.computeMatrix(),this._getAxes(),this.type===ut.ORBITING||this.type===ut.EXPLORING?this._getPosition():this.type===ut.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var n=io(mn(),[0,0,1],ct(this.roll));to(this.matrix);var r=io(mn(),[1,0,0],ct((this.rotateWorld&&this.type!==ut.TRACKING||this.type===ut.TRACKING?1:-1)*this.elevation)),i=io(mn(),[0,1,0],ct((this.rotateWorld&&this.type!==ut.TRACKING||this.type===ut.TRACKING?1:-1)*this.azimuth)),a=ao(mn(),i,r);a=ao(mn(),a,n);var o=cy(it(),a);this.type===ut.ORBITING||this.type===ut.EXPLORING?(xl(this.matrix,this.matrix,this.focalPoint),Yn(this.matrix,this.matrix,o),xl(this.matrix,this.matrix,[0,0,this.distance])):this.type===ut.TRACKING&&(xl(this.matrix,this.matrix,this.position),Yn(this.matrix,this.matrix,o))}},{key:"_setPosition",value:function(n,r,i){this.position=nr(n,r,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){Wi(this.right,nr(Vi(Hi(),[1,0,0,0],this.matrix))),Wi(this.up,nr(Vi(Hi(),[0,1,0,0],this.matrix))),Wi(this.forward,nr(Vi(Hi(),[0,0,1,0],this.matrix))),ls(this.right,this.right),ls(this.up,this.up),ls(this.forward,this.forward)}},{key:"_getAngles",value:function(){var n=this.distanceVector[0],r=this.distanceVector[1],i=this.distanceVector[2],a=_a(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===ut.TRACKING?(this.elevation=Vr(Math.asin(r/a)),this.azimuth=Vr(Math.atan2(-n,-i))):this.rotateWorld?(this.elevation=Vr(Math.asin(r/a)),this.azimuth=Vr(Math.atan2(-n,-i))):(this.elevation=-Vr(Math.asin(r/a)),this.azimuth=-Vr(Math.atan2(-n,-i)))}},{key:"_getPosition",value:function(){Wi(this.position,nr(Vi(Hi(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){J_(this.distanceVector,[0,0,-this.distance],K$(ml(),this.matrix)),ro(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=dy(Ye(),this.focalPoint,this.position),this.distance=_a(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Ur.ORTHOGRAPHIC){var n=this.position,r=io(mn(),[0,0,1],-this.roll*Math.PI/180);hu(this.orthoMatrix,r,Xe((this.rright-this.left)/2-n[0],(this.top-this.bottom)/2-n[1],0),Xe(this.zoom,this.zoom,1),n)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var n=this.getViewTransform(),r=Yn(it(),this.getPerspective(),n);this.getFrustum().extractFromVPMatrix(r),this.eventEmitter.emit(fM.UPDATED)}}},{key:"rotate",value:function(n,r,i){throw new Error(lt)}},{key:"pan",value:function(n,r){throw new Error(lt)}},{key:"dolly",value:function(n){throw new Error(lt)}},{key:"createLandmark",value:function(n,r){throw new Error(lt)}},{key:"gotoLandmark",value:function(n,r){throw new Error(lt)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(lt)}}])}(),zW=function(e){return e[e.Standard=0]="Standard",e}({}),tp=function(e){return e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",e}({}),pM={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Bl(0,0,0,0)},ce=function(e){return e.COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>",e}({});function rr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=t?t.apply(this,a):a[0],l=n.cache;if(l.has(s))return l.get(s);var c=e.apply(this,a);return n.cache=l.set(s,c)||l,c};return n.cache=new(rr.Cache||Map),n}rr.Cache=Map;var ue=function(e){return e[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",e}({}),Mi=function(e){return e[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",e}({}),BW=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),YW=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),WW=[{name:"em",unit_type:ue.kEms},{name:"px",unit_type:ue.kPixels},{name:"deg",unit_type:ue.kDegrees},{name:"rad",unit_type:ue.kRadians},{name:"grad",unit_type:ue.kGradians},{name:"ms",unit_type:ue.kMilliseconds},{name:"s",unit_type:ue.kSeconds},{name:"rem",unit_type:ue.kRems},{name:"turn",unit_type:ue.kTurns}],Gl=function(e){return e[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",e}({}),GW=function(t){return WW.find(function(n){return n.name===t}).unit_type},HW=function(t){return t?t==="number"?ue.kNumber:t==="percent"||t==="%"?ue.kPercentage:GW(t):ue.kUnknown},VW=function(t){switch(t){case ue.kNumber:case ue.kInteger:return Mi.kUNumber;case ue.kPercentage:return Mi.kUPercent;case ue.kPixels:return Mi.kULength;case ue.kMilliseconds:case ue.kSeconds:return Mi.kUTime;case ue.kDegrees:case ue.kRadians:case ue.kGradians:case ue.kTurns:return Mi.kUAngle;default:return Mi.kUOther}},UW=function(t){switch(t){case Mi.kUNumber:return ue.kNumber;case Mi.kULength:return ue.kPixels;case Mi.kUPercent:return ue.kPercentage;case Mi.kUTime:return ue.kSeconds;case Mi.kUAngle:return ue.kDegrees;default:return ue.kUnknown}},vM=function(t){var n=1;switch(t){case ue.kPixels:case ue.kDegrees:case ue.kSeconds:break;case ue.kMilliseconds:n=.001;break;case ue.kRadians:n=180/Math.PI;break;case ue.kGradians:n=.9;break;case ue.kTurns:n=360;break}return n},km=function(t){switch(t){case ue.kNumber:case ue.kInteger:return"";case ue.kPercentage:return"%";case ue.kEms:return"em";case ue.kRems:return"rem";case ue.kPixels:return"px";case ue.kDegrees:return"deg";case ue.kRadians:return"rad";case ue.kGradians:return"grad";case ue.kMilliseconds:return"ms";case ue.kSeconds:return"s";case ue.kTurns:return"turn"}return""},np=function(){function e(){J(this,e)}return ee(e,[{key:"toString",value:function(){return this.buildCSSText(BW.kNo,YW.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Gl.kUnitType&&this.getType()<=Gl.kClampType}}],[{key:"isAngle",value:function(n){return n===ue.kDegrees||n===ue.kRadians||n===ue.kGradians||n===ue.kTurns}},{key:"isLength",value:function(n){return n>=ue.kEms&&n<ue.kDegrees}},{key:"isRelativeUnit",value:function(n){return n===ue.kPercentage||n===ue.kEms||n===ue.kRems}},{key:"isTime",value:function(n){return n===ue.kSeconds||n===ue.kMilliseconds}}])}(),XW=function(e){function t(n){var r;return J(this,t),r=Le(this,t),r.colorSpace=n,r}return Ne(t,e),ee(t,[{key:"getType",value:function(){return Gl.kColorType}},{key:"to",value:function(r){return this}}])}(np),mo=function(e){return e[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",e}({}),rp=function(e){function t(n,r){var i;return J(this,t),i=Le(this,t),i.type=n,i.value=r,i}return Ne(t,e),ee(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(r,i,a){return a}},{key:"getType",value:function(){return Gl.kColorType}}])}(np),Xr=function(e){function t(n){var r;return J(this,t),r=Le(this,t),r.value=n,r}return Ne(t,e),ee(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return Gl.kKeywordType}},{key:"buildCSSText",value:function(r,i,a){return a+this.value}}])}(np),qW=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r="";return Number.isFinite(t)?r="NaN":t>0?r="infinity":r="-infinity",r+=n},Em=function(t){return UW(VW(t))},ft=function(e){function t(n){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue.kNumber;J(this,t),r=Le(this,t);var a;return typeof i=="string"?a=HW(i):a=i,r.unit=a,r.value=n,r}return Ne(t,e),ee(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(r){var i=r;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Gl.kUnitType}},{key:"convertTo",value:function(r){if(this.unit===r)return new t(this.value,this.unit);var i=Em(this.unit);if(i!==Em(r)||i===ue.kUnknown)return null;var a=vM(this.unit)/vM(r);return new t(this.value*a,r)}},{key:"buildCSSText",value:function(r,i,a){var o;switch(this.unit){case ue.kUnknown:break;case ue.kInteger:o=Number(this.value).toFixed(0);break;case ue.kNumber:case ue.kPercentage:case ue.kEms:case ue.kRems:case ue.kPixels:case ue.kDegrees:case ue.kRadians:case ue.kGradians:case ue.kMilliseconds:case ue.kSeconds:case ue.kTurns:{var s=-999999,l=999999,c=this.value,u=km(this.unit);if(c<s||c>l){var f=km(this.unit);!Number.isFinite(c)||Number.isNaN(c)?o=qW(c,f):o=c+(f||"")}else o="".concat(c).concat(u)}}return a+=o,a}}])}(np),Ai=new ft(0,"px");new ft(1,"px");var Ss=new ft(0,"deg"),Mm=function(e){function t(n,r,i){var a,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return J(this,t),a=Le(this,t,["rgb"]),a.r=n,a.g=r,a.b=i,a.alpha=o,a.isNone=s,a}return Ne(t,e),ee(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(r,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(XW),gM=new Xr("unset"),KW=new Xr("initial"),ZW=new Xr("inherit"),Am={"":gM,unset:gM,initial:KW,inherit:ZW},QW=function(t){return Am[t]||(Am[t]=new Xr(t)),Am[t]},yM=new Mm(0,0,0,0,!0),mM=new Mm(0,0,0,0),JW=rr(function(e,t,n,r){return new Mm(e,t,n,r)},function(e,t,n,r){return"rgba(".concat(e,",").concat(t,",").concat(n,",").concat(r,")")}),Ct=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue.kNumber;return new ft(t,n)};new ft(50,"%");function eG(e){var t=e.type,n=e.value;return t==="hex"?"#".concat(n):t==="literal"?n:t==="rgb"?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}var tG=function(){var e={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(I){throw new Error("".concat(t,": ").concat(I))}function r(){var I=i();return t.length>0&&n("Invalid input not EOF"),I}function i(){return b(a)}function a(){return o("linear-gradient",e.linearGradient,l)||o("repeating-linear-gradient",e.repeatingLinearGradient,l)||o("radial-gradient",e.radialGradient,f)||o("repeating-radial-gradient",e.repeatingRadialGradient,f)||o("conic-gradient",e.conicGradient,f)}function o(I,C,j){return s(C,function(D){var F=j();return F&&(N(e.comma)||n("Missing comma before color stops")),{type:I,orientation:F,colorStops:b(x)}})}function s(I,C){var j=N(I);if(j){N(e.startCall)||n("Missing (");var D=C(j);return N(e.endCall)||n("Missing )"),D}}function l(){return c()||u()}function c(){return L("directional",e.sideOrCorner,1)}function u(){return L("angular",e.angleValue,1)}function f(){var I,C=d(),j;return C&&(I=[],I.push(C),j=t,N(e.comma)&&(C=d(),C?I.push(C):t=j)),I}function d(){var I=h()||p();if(I)I.at=g();else{var C=v();if(C){I=C;var j=g();j&&(I.at=j)}else{var D=y();D&&(I={type:"default-radial",at:D})}}return I}function h(){var I=L("shape",/^(circle)/i,0);return I&&(I.style=A()||v()),I}function p(){var I=L("shape",/^(ellipse)/i,0);return I&&(I.style=M()||v()),I}function v(){return L("extent-keyword",e.extentKeywords,1)}function g(){if(L("position",/^at/,0)){var I=y();return I||n("Missing positioning value"),I}}function y(){var I=m();if(I.x||I.y)return{type:"position",value:I}}function m(){return{x:M(),y:M()}}function b(I){var C=I(),j=[];if(C)for(j.push(C);N(e.comma);)C=I(),C?j.push(C):n("One extra comma");return j}function x(){var I=w();return I||n("Expected color definition"),I.length=M(),I}function w(){return _()||k()||S()||O()}function O(){return L("literal",e.literalColor,0)}function _(){return L("hex",e.hexColor,1)}function S(){return s(e.rgbColor,function(){return{type:"rgb",value:b(E)}})}function k(){return s(e.rgbaColor,function(){return{type:"rgba",value:b(E)}})}function E(){return N(e.number)[1]}function M(){return L("%",e.percentageValue,1)||P()||A()}function P(){return L("position-keyword",e.positionKeywords,1)}function A(){return L("px",e.pixelValue,1)||L("em",e.emValue,1)}function L(I,C,j){var D=N(C);if(D)return{type:I,value:D[j]}}function N(I){var C=/^[\n\r\t\s]+/.exec(t);C&&T(C[0].length);var j=I.exec(t);return j&&T(j[0].length),j}function T(I){t=t.substring(I)}return function(I){return t=I,r()}}();function nG(e,t,n,r){var i=ct(r.value),a=0,o=0,s=a+t/2,l=o+n/2,c=Math.abs(t*Math.cos(i))+Math.abs(n*Math.sin(i)),u=e[0]+s-Math.cos(i)*c/2,f=e[1]+l-Math.sin(i)*c/2,d=e[0]+s+Math.cos(i)*c/2,h=e[1]+l+Math.sin(i)*c/2;return{x1:u,y1:f,x2:d,y2:h}}function rG(e,t,n,r,i,a){var o=r.value,s=i.value;r.unit===ue.kPercentage&&(o=r.value/100*t),i.unit===ue.kPercentage&&(s=i.value/100*n);var l=Math.max(Mr([0,0],[o,s]),Mr([0,n],[o,s]),Mr([t,n],[o,s]),Mr([t,0],[o,s]));return a&&(a instanceof ft?l=a.value:a instanceof Xr&&(a.value==="closest-side"?l=Math.min(o,t-o,s,n-s):a.value==="farthest-side"?l=Math.max(o,t-o,s,n-s):a.value==="closest-corner"&&(l=Math.min(Mr([0,0],[o,s]),Mr([0,n],[o,s]),Mr([t,n],[o,s]),Mr([t,0],[o,s]))))),{x:o+e[0],y:s+e[1],r:l}}var iG=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,aG=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,oG=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,bM=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function sG(e){var t,n=e.length;if(e[n-1].length=(t=e[n-1].length)!==null&&t!==void 0?t:{type:"%",value:"100"},n>1){var r;e[0].length=(r=e[0].length)!==null&&r!==void 0?r:{type:"%",value:"0"}}for(var i=0,a=Number(e[0].length.value),o=1;o<n;o++){var s,l=(s=e[o].length)===null||s===void 0?void 0:s.value;if(!nn(l)&&!nn(a)){for(var c=1;c<o-i;c++)e[i+c].length={type:"%",value:"".concat(a+(Number(l)-a)*c/(o-i))};i=o,a=Number(l)}}}var lG={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},cG=rr(function(e){var t;return e.type==="angular"?t=Number(e.value):t=lG[e.value]||0,Ct(t,"deg")}),uG=rr(function(e){var t=50,n=50,r="%",i="%";if((e==null?void 0:e.type)==="position"){var a=e.value,o=a.x,s=a.y;(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?t=0:o.value==="center"?t=50:o.value==="right"?t=100:o.value==="top"?n=0:o.value==="bottom"&&(n=100)),(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?t=0:s.value==="center"?n=50:s.value==="right"?t=100:s.value==="top"?n=0:s.value==="bottom"&&(n=100)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(r=o==null?void 0:o.type,t=Number(o.value)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(i=s==null?void 0:s.type,n=Number(s.value))}return{cx:Ct(t,r),cy:Ct(n,i)}}),fG=rr(function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1){var t=tG(e);return t.map(function(s){var l=s.type,c=s.orientation,u=s.colorStops;sG(u);var f=u.map(function(b){return{offset:Ct(Number(b.length.value),"%"),color:eG(b)}});if(l==="linear-gradient")return new rp(mo.LinearGradient,{angle:c?cG(c):Ss,steps:f});if(l==="radial-gradient"&&(c||(c=[{type:"shape",value:"circle"}]),c[0].type==="shape"&&c[0].value==="circle")){var d=uG(c[0].at),h=d.cx,p=d.cy,v;if(c[0].style){var g=c[0].style,y=g.type,m=g.value;y==="extent-keyword"?v=QW(m):v=Ct(m,y)}return new rp(mo.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var n=e[0];if(e[1]==="("||e[2]==="("){if(n==="l"){var r=iG.exec(e);if(r){var i,a=((i=r[2].match(bM))===null||i===void 0?void 0:i.map(function(s){return s.split(":")}))||[];return[new rp(mo.LinearGradient,{angle:Ct(parseFloat(r[1]),"deg"),steps:a.map(function(s){var l=Ce(s,2),c=l[0],u=l[1];return{offset:Ct(Number(c)*100,"%"),color:u}})})]}}else if(n==="r"){var o=dG(e);if(o)if(Si(o))e=o;else return[new rp(mo.RadialGradient,o)]}else if(n==="p")return hG(e)}});function dG(e){var t=aG.exec(e);if(t){var n,r=((n=t[4].match(bM))===null||n===void 0?void 0:n.map(function(i){return i.split(":")}))||[];return{cx:Ct(50,"%"),cy:Ct(50,"%"),steps:r.map(function(i){var a=Ce(i,2),o=a[0],s=a[1];return{offset:Ct(Number(o)*100,"%"),color:s}})}}return null}function hG(e){var t=oG.exec(e);if(t){var n=t[1],r=t[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}function ks(e){return e&&!!e.image}function ip(e){return e&&!nn(e.r)&&!nn(e.g)&&!nn(e.b)}var bo=rr(function(e){if(ks(e))return Te({repetition:"repeat"},e);if(nn(e)&&(e=""),e==="transparent")return mM;if(e==="currentColor")e="black";else if(e==="none")return yM;var t=fG(e);if(t)return t;var n=Xh(e),r=[0,0,0,0];return n!==null&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),JW.apply(void 0,r)});function pG(e,t){if(!(!ip(e)||!ip(t)))return[[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(n){var r=n.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round(Hr(r[i],0,255));return r[3]=Hr(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Uu(e,t){if(nn(t))return Ct(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(e)>=0)return Ct(Number(t),"px");if("deg".search(e)>=0)return Ct(Number(t),"deg")}var n=[];t=t.replace(e,function(i){return n.push(i),"U".concat(i)});var r="U(".concat(e.source,")");return n.map(function(i){return Ct(Number(t.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var xM=function(t){return Uu(new RegExp("px","g"),t)},vG=rr(xM),gG=function(t){return Uu(new RegExp("%","g"),t)};rr(gG);var wM=function(t){return po(t)||isFinite(Number(t))?Ct(Number(t)||0,"px"):Uu(new RegExp("px|%|em|rem","g"),t)},Pm=rr(wM),OM=function(t){return Uu(new RegExp("deg|rad|grad|turn","g"),t)},yG=rr(OM);function mG(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",o=e.value||0,s=t.value||0,l=Em(e.unit),c=e.convertTo(l),u=t.convertTo(l);return c&&u?(o=c.value,s=u.value,a=km(e.unit)):(ft.isLength(e.unit)||ft.isLength(t.unit))&&(o=Ar(e,i,n),s=Ar(t,i,n),a="px"),[o,s,function(f){return f+a}]}function pr(e){var t=0;return e.unit===ue.kDegrees?t=e.value:e.unit===ue.kRadians?t=Vr(Number(e.value)):e.unit===ue.kTurns?t=LW(Number(e.value)):e.value&&(t=e.value),t}function _M(e,t){var n;return Array.isArray(e)?n=e.map(function(r){return Number(r)}):Si(e)?n=e.split(" ").map(function(r){return Number(r)}):po(e)&&(n=[e]),t===2?n.length===1?[n[0],n[0]]:[n[0],n[1]]:t===4?n.length===1?[n[0],n[0],n[0],n[0]]:n.length===2?[n[0],n[1],n[0],n[1]]:n.length===3?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]:t==="even"&&n.length%2===1?[].concat(vt(n),vt(n)):n}function Ar(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e.unit===ue.kPixels)return Number(e.value);if(e.unit===ue.kPercentage&&n){var i=n.nodeName===U.GROUP?n.getLocalBounds():n.getGeometryBounds();return(r?i.min[t]:0)+e.value/100*i.halfExtents[t]*2}return 0}var bG=function(t){return Uu(/deg|rad|grad|turn|px|%/g,t)},xG=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function wG(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(e=e.toLowerCase().trim(),e==="none")return[];for(var t=/\s*([\w-]+)\(([^)]*)\)/g,n=[],r,i=0;r=t.exec(e);){if(r.index!==i)return[];if(i=r.index+r[0].length,xG.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return bG(a)||bo(a)})}),t.lastIndex===e.length)return n}return[]}function SM(e){return e.toString()}var kM=function(t){return typeof t=="number"?Ct(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Ct(Number(t)):Ct(0)},Cm=rr(kM);rr(function(e){return Si(e)?e.split(" ").map(Cm):e.map(Cm)});function Tm(e,t){return[e,t,SM]}function Lm(e,t){return function(n,r){return[n,r,function(i){return SM(Hr(i,e,t))}]}}function EM(e,t){if(e.length===t.length)return[e,t,function(n){return n}]}function Nm(e){return e.parsedStyle.d.totalLength===0&&(e.parsedStyle.d.totalLength=$Y(e.parsedStyle.d.absolutePath)),e.parsedStyle.d.totalLength}function OG(e){return e.parsedStyle.points.totalLength===0&&(e.parsedStyle.points.totalLength=yW(e.parsedStyle.points.points)),e.parsedStyle.points.totalLength}function _G(e){for(var t=0;t<e.length;t++){var n=e[t-1],r=e[t],i=r[0];if(i==="M"&&n){var a=n[0],o=[r[1],r[2]],s=void 0;a==="L"||a==="M"?s=[n[1],n[2]]:(a==="C"||a==="A"||a==="Q")&&(s=[n[n.length-2],n[n.length-1]]),s&&ap(o,s)&&(e.splice(t,1),t--)}}}function SG(e){for(var t=!1,n=e.length,r=0;r<n;r++){var i=e[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){t=!0;break}}return t}function kG(e){for(var t=[],n=[],r=[],i=0;i<e.length;i++){var a=e[i],o=a[0];o==="M"?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):o==="Z"?r.length&&(t.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&n.push(r),{polygons:t,polylines:n}}function ap(e,t){return e[0]===t[0]&&e[1]===t[1]}function EG(e,t){for(var n=[],r=[],i=[],a=0;a<e.length;a++){var o=e[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=mW(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=pW(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=fW(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1]);break}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height))}n=n.filter(function(x){return!Number.isNaN(x)&&x!==1/0&&x!==-1/0}),r=r.filter(function(x){return!Number.isNaN(x)&&x!==1/0&&x!==-1/0});var d=bE(n),h=bE(r),p=mE(n),v=mE(r);if(i.length===0)return{x:d,y:h,width:p-d,height:v-h};for(var g=0;g<i.length;g++){var y=i[g],m=y.currentPoint,b=void 0;m[0]===d?(b=op(y,t),d-=b.xExtra):m[0]===p&&(b=op(y,t),p+=b.xExtra),m[1]===h?(b=op(y,t),h-=b.yExtra):m[1]===v&&(b=op(y,t),v+=b.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function op(e,t){var n=e.prePoint,r=e.currentPoint,i=e.nextPoint,a=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),l=Math.acos((a+o-s)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!l||Math.sin(l)===0||Bu(l,0))return{xExtra:0,yExtra:0};var c=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),u=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));c=c>Math.PI/2?Math.PI-c:c,u=u>Math.PI/2?Math.PI-u:u;var f={xExtra:Math.cos(l/2-c)*(t/2*(1/Math.sin(l/2)))-t/2||0,yExtra:Math.cos(u-l/2)*(t/2*(1/Math.sin(l/2)))-t/2||0};return f}function MM(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}var AM=function(t,n){var r=t.x*n.x+t.y*n.y,i=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(n.x,2)+Math.pow(n.y,2))),a=t.x*n.y-t.y*n.x<0?-1:1,o=a*Math.acos(r/i);return o},PM=function(t,n,r,i,a,o,s,l){n=Math.abs(n),r=Math.abs(r),i=xE(i,360);var c=ct(i);if(t.x===s.x&&t.y===s.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(n===0||r===0)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-s.x)/2,f=(t.y-s.y)/2,d={x:Math.cos(c)*u+Math.sin(c)*f,y:-Math.sin(c)*u+Math.cos(c)*f},h=Math.pow(d.x,2)/Math.pow(n,2)+Math.pow(d.y,2)/Math.pow(r,2);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=Math.pow(n,2)*Math.pow(r,2)-Math.pow(n,2)*Math.pow(d.y,2)-Math.pow(r,2)*Math.pow(d.x,2),v=Math.pow(n,2)*Math.pow(d.y,2)+Math.pow(r,2)*Math.pow(d.x,2),g=p/v;g=g<0?0:g;var y=(a!==o?1:-1)*Math.sqrt(g),m={x:y*(n*d.y/r),y:y*(-(r*d.x)/n)},b={x:Math.cos(c)*m.x-Math.sin(c)*m.y+(t.x+s.x)/2,y:Math.sin(c)*m.x+Math.cos(c)*m.y+(t.y+s.y)/2},x={x:(d.x-m.x)/n,y:(d.y-m.y)/r},w=AM({x:1,y:0},x),O={x:(-d.x-m.x)/n,y:(-d.y-m.y)/r},_=AM(x,O);!o&&_>0?_-=2*Math.PI:o&&_<0&&(_+=2*Math.PI),_%=2*Math.PI;var S=w+_*l,k=n*Math.cos(S),E=r*Math.sin(S),M={x:Math.cos(c)*k-Math.sin(c)*E+b.x,y:Math.sin(c)*k+Math.cos(c)*E+b.y,ellipticalArcStartAngle:w,ellipticalArcEndAngle:w+_,ellipticalArcAngle:S,ellipticalArcCenter:b,resultantRx:n,resultantRy:r};return M};function MG(e){for(var t=[],n=null,r=null,i=null,a=0,o=e.length,s=0;s<o;s++){var l=e[s];r=e[s+1];var c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=AG(n,l);u.arcParams=f;break}if(c==="Z")n=i,r=e[a+1];else{var d=l.length;n=[l[d-2],l[d-1]]}r&&r[0]==="Z"&&(r=e[a],t[a]&&(t[a].prePoint=n)),u.currentPoint=n,t[a]&&ap(n,t[a].currentPoint)&&(t[a].prePoint=u.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=h;var p=u.prePoint;if(["L","H","V"].includes(c))u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]];else if(c==="Q"){var v=[l[1],l[2]];u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]}else if(c==="T"){var g=t[s-1],y=MM(g.currentPoint,p);g.command==="Q"?(u.command="Q",u.startTangent=[p[0]-y[0],p[1]-y[1]],u.endTangent=[n[0]-y[0],n[1]-y[1]]):(u.command="TL",u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]])}else if(c==="C"){var m=[l[1],l[2]],b=[l[3],l[4]];u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]],u.startTangent[0]===0&&u.startTangent[1]===0&&(u.startTangent=[m[0]-b[0],m[1]-b[1]]),u.endTangent[0]===0&&u.endTangent[1]===0&&(u.endTangent=[b[0]-m[0],b[1]-m[1]])}else if(c==="S"){var x=t[s-1],w=MM(x.currentPoint,p),O=[l[1],l[2]];x.command==="C"?(u.command="C",u.startTangent=[p[0]-w[0],p[1]-w[1]],u.endTangent=[n[0]-O[0],n[1]-O[1]]):(u.command="SQ",u.startTangent=[p[0]-O[0],p[1]-O[1]],u.endTangent=[n[0]-O[0],n[1]-O[1]])}else if(c==="A"){var _=CM(u,0),S=_.x,k=_.y,E=CM(u,1,!1),M=E.x,P=E.y;u.startTangent=[S,k],u.endTangent=[M,P]}t.push(u)}return t}function CM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=e.arcParams,i=r.rx,a=i===void 0?0:i,o=r.ry,s=o===void 0?0:o,l=r.xRotation,c=r.arcFlag,u=r.sweepFlag,f=PM({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!c,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},t),d=PM({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!c,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},n?t+.005:t-.005),h=d.x-f.x,p=d.y-f.y,v=Math.sqrt(h*h+p*p);return{x:-h/v,y:-p/v}}function sp(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Im(e,t){return sp(e)*sp(t)?(e[0]*t[0]+e[1]*t[1])/(sp(e)*sp(t)):1}function TM(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Im(e,t))}function AG(e,t){var n=t[1],r=t[2],i=xE(ct(t[3]),Math.PI*2),a=t[4],o=t[5],s=e[0],l=e[1],c=t[6],u=t[7],f=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-u)/2,d=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-u)/2,h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=n*n*(d*d)+r*r*(f*f),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*f/n:0,m=(s+c)/2+Math.cos(i)*g-Math.sin(i)*y,b=(l+u)/2+Math.sin(i)*g+Math.cos(i)*y,x=[(f-g)/n,(d-y)/r],w=[(-1*f-g)/n,(-1*d-y)/r],O=TM([1,0],x),_=TM(x,w);return Im(x,w)<=-1&&(_=Math.PI),Im(x,w)>=1&&(_=0),o===0&&_>0&&(_-=2*Math.PI),o===1&&_<0&&(_+=2*Math.PI),{cx:m,cy:b,rx:ap(e,[c,u])?0:n,ry:ap(e,[c,u])?0:r,startAngle:O,endAngle:O+_,xRotation:i,arcFlag:a,sweepFlag:o}}function PG(e,t,n){return e.reduce(function(r,i){var a="";if(i[0]==="M"||i[0]==="L"){var o=Xe(i[1],i[2],0);n&&zt(o,o,n),a="".concat(i[0]).concat(o[0],",").concat(o[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var s=Xe(i[1],i[2],0),l=Xe(i[3],i[4],0),c=Xe(i[5],i[6],0);n&&(zt(s,s,n),zt(l,l,n),zt(c,c,n)),a="".concat(i[0]).concat(s[0],",").concat(s[1],",").concat(l[0],",").concat(l[1],",").concat(c[0],",").concat(c[1])}else if(i[0]==="A"){var u=Xe(i[6],i[7],0);n&&zt(u,u,n),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(u[0],",").concat(u[1])}else if(i[0]==="Q"){var f=Xe(i[1],i[2],0),d=Xe(i[3],i[4],0);n&&(zt(f,f,n),zt(d,d,n)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return r+=a},"")}function CG(e,t,n,r){return[["M",e,t],["L",n,r]]}function LM(e,t,n,r){var i=(-1+Math.sqrt(2))/3*4,a=e*i,o=t*i,s=n-e,l=n+e,c=r-t,u=r+t;return[["M",s,r],["C",s,r-o,n-a,c,n,c],["C",n+a,c,l,r-o,l,r],["C",l,r+o,n+a,u,n,u],["C",n-a,u,s,r+o,s,r],["Z"]]}function TG(e,t){var n=e.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return t&&n.push(["Z"]),n}function LG(e,t,n,r,i){if(i){var a=Ce(i,4),o=a[0],s=a[1],l=a[2],c=a[3],u=e>0?1:-1,f=t>0?1:-1,d=u+f!==0?1:0;return[["M",u*o+n,r],["L",e-u*s+n,r],s?["A",s,s,0,0,d,e+n,f*s+r]:null,["L",e+n,t-f*l+r],l?["A",l,l,0,0,d,e+n-u*l,t+r]:null,["L",n+u*c,t+r],c?["A",c,c,0,0,d,n,t+r-f*c]:null,["L",n,f*o+r],o?["A",o,o,0,0,d,u*o+n,r]:null,["Z"]].filter(function(h){return h})}return[["M",n,r],["L",n+e,r],["L",n+e,r+t],["L",n,r+t],["Z"]]}function NM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.getLocalTransform(),n=[];switch(e.nodeName){case U.LINE:var r=e.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,l=r.x2,c=l===void 0?0:l,u=r.y2,f=u===void 0?0:u;n=CG(a,s,c,f);break;case U.CIRCLE:{var d=e.parsedStyle,h=d.r,p=h===void 0?0:h,v=d.cx,g=v===void 0?0:v,y=d.cy,m=y===void 0?0:y;n=LM(p,p,g,m);break}case U.ELLIPSE:{var b=e.parsedStyle,x=b.rx,w=x===void 0?0:x,O=b.ry,_=O===void 0?0:O,S=b.cx,k=S===void 0?0:S,E=b.cy,M=E===void 0?0:E;n=LM(w,_,k,M);break}case U.POLYLINE:case U.POLYGON:var P=e.parsedStyle.points;n=TG(P.points,e.nodeName===U.POLYGON);break;case U.RECT:var A=e.parsedStyle,L=A.width,N=L===void 0?0:L,T=A.height,I=T===void 0?0:T,C=A.x,j=C===void 0?0:C,D=A.y,F=D===void 0?0:D,R=A.radius,z=R&&R.some(function(W){return W!==0});n=LG(N,I,j,F,z&&R.map(function(W){return Hr(W,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case U.PATH:var H=e.parsedStyle.d.absolutePath;n=vt(H);break}if(n.length)return PG(n,e,t)}var IM=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=Hh(t)}catch(h){n=Hh(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}_G(n);var r=SG(n),i=kG(n),a=i.polygons,o=i.polylines,s=MG(n),l=EG(s,0),c=l.x,u=l.y,f=l.width,d=l.height;return{absolutePath:n,hasArc:r,segments:s,polygons:a,polylines:o,totalLength:0,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(f)?f:0,height:Number.isFinite(d)?d:0}}},NG=rr(IM);function jM(e){return Si(e)?NG(e):IM(e)}function IG(e,t,n){var r=e.curve,i=t.curve;(!r||r.length===0)&&(r=um(e.absolutePath,!1),e.curve=r),(!i||i.length===0)&&(i=um(t.absolutePath,!1),t.curve=i);var a=[r,i];r.length!==i.length&&(a=FE(r,i));var o=jE(a[0])!==jE(a[1])?NY(a[0]):LY(a[0]);return[o,BY(a[1],o),function(s){return s}]}function jG(e,t){var n;return Si(e)?n=e.split(" ").map(function(r){var i=r.split(","),a=Ce(i,2),o=a[0],s=a[1];return[Number(o),Number(s)]}):n=e,{points:n,totalLength:0,segments:[]}}function DG(e,t){return[e.points,t.points,function(n){return n}]}var Wt=null,Hl=/\s*(\w+)\(([^)]*)\)/g;function vr(e){return function(t){var n=0;return e.map(function(r){return r===Wt?t[n++]:r})}}function Es(e){return e}var Xu={matrix:["NNNNNN",[Wt,Wt,0,0,Wt,Wt,0,0,0,0,1,0,Wt,Wt,0,1],Es],matrix3d:["NNNNNNNNNNNNNNNN",Es],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",vr([Wt,Wt,new ft(1)]),Es],scaleX:["N",vr([Wt,new ft(1),new ft(1)]),vr([Wt,new ft(1)])],scaleY:["N",vr([new ft(1),Wt,new ft(1)]),vr([new ft(1),Wt])],scaleZ:["N",vr([new ft(1),new ft(1),Wt])],scale3d:["NNN",Es],skew:["Aa",null,Es],skewX:["A",null,vr([Wt,Ss])],skewY:["A",null,vr([Ss,Wt])],translate:["Tt",vr([Wt,Wt,Ai]),Es],translateX:["T",vr([Wt,Ai,Ai]),vr([Wt,Ai])],translateY:["T",vr([Ai,Wt,Ai]),vr([Ai,Wt])],translateZ:["L",vr([Ai,Ai,Wt])],translate3d:["TTL",Es]};function DM(e){for(var t=[],n=e.length,r=0;r<n;r++){var i=e[r],a=i[0],o=i.slice(1);a==="translate"||a==="skew"?o.length===1&&o.push(0):a==="scale"&&o.length===1&&o.push(o[0]);var s=Xu[a];if(!s)return[];var l=o.map(function(c){return Ct(c)});t.push({t:a,d:l})}return t}function FM(e){if(Array.isArray(e))return DM(e);if(e=(e||"none").trim(),e==="none")return[];var t=[],n,r=0;for(Hl.lastIndex=0;n=Hl.exec(e);){if(n.index!==r)return[];r=n.index+n[0].length;var i=n[1],a=Xu[i];if(!a)return[];var o=n[2].split(","),s=a[0];if(s.length<o.length)return[];for(var l=[],c=0;c<s.length;c++){var u=o[c],f=s[c],d=void 0;if(u?d={A:function(p){return p.trim()==="0"?Ss:yG(p)},N:Cm,T:Pm,L:vG}[f.toUpperCase()](u):d={a:Ss,n:l[0],t:Ai}[f],d===void 0)return[];l.push(d)}if(t.push({t:i,d:l}),Hl.lastIndex===e.length)return t}return[]}function FG(e){if(Array.isArray(e))return DM(e);if(e=(e||"none").trim(),e==="none")return[];var t=[],n,r=0;for(Hl.lastIndex=0;n=Hl.exec(e);){if(n.index!==r)return[];r=n.index+n[0].length;var i=n[1],a=Xu[i];if(!a)return[];var o=n[2].split(","),s=a[0];if(s.length<o.length)return[];for(var l=[],c=0;c<s.length;c++){var u=o[c],f=s[c],d=void 0;if(u?d={A:function(p){return p.trim()==="0"?Ss:OM(p)},N:kM,T:wM,L:xM}[f.toUpperCase()](u):d={a:Ss,n:l[0],t:Ai}[f],d===void 0)return[];l.push(d)}if(t.push({t:i,d:l}),Hl.lastIndex===e.length)return t}return[]}function RG(e){var t,n,r,i;switch(e.t){case"rotateX":return i=ct(pr(e.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=ct(pr(e.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=ct(pr(e.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=e.d[0].value,n=e.d[1].value,r=e.d[2].value,i=ct(pr(e.d[3]));var a=t*t+n*n+r*r;if(a===0)t=1,n=0,r=0;else if(a!==1){var o=Math.sqrt(a);t/=o,n/=o,r/=o}var s=Math.sin(i/2),l=s*Math.cos(i/2),c=s*s;return[1-2*(n*n+r*r)*c,2*(t*n*c+r*l),2*(t*r*c-n*l),0,2*(t*n*c-r*l),1-2*(t*t+r*r)*c,2*(n*r*c+t*l),0,2*(t*r*c+n*l),2*(n*r*c-t*l),1-2*(t*t+n*n)*c,0,0,0,0,1];case"scale":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[e.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,e.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,e.d[0].value,0,0,0,0,1];case"scale3d":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,e.d[2].value,0,0,0,0,1];case"skew":var u=ct(pr(e.d[0])),f=ct(pr(e.d[1]));return[1,Math.tan(f),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=ct(pr(e.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=ct(pr(e.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return t=Ar(e.d[0],0,null)||0,n=Ar(e.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,n,0,1];case"translateX":return t=Ar(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,0,0,1];case"translateY":return n=Ar(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,n,0,1];case"translateZ":return r=Ar(e.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return t=Ar(e.d[0],0,null)||0,n=Ar(e.d[1],0,null)||0,r=Ar(e.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,n,r,1];case"perspective":var d=Ar(e.d[0],0,null)||0,h=d?-1/d:0;return[1,0,0,0,0,1,0,0,0,0,1,h,0,0,0,1];case"matrix":return[e.d[0].value,e.d[1].value,0,0,e.d[2].value,e.d[3].value,0,0,0,0,1,0,e.d[4].value,e.d[5].value,0,1];case"matrix3d":return e.d.map(function(p){return p.value})}}function $G(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function zG(e){return e.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(RG).reduce($G)}function RM(e){var t=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return FW(zG(e),t,n,r,i,a),[[t,n,r,a,i]]}var BG=function(){function e(r,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(var s=0;s<4;s++)for(var l=0;l<4;l++)a[o][s]+=i[o][l]*r[l][s];return a}function t(r){return r[0][2]===0&&r[0][3]===0&&r[1][2]===0&&r[1][3]===0&&r[2][0]===0&&r[2][1]===0&&r[2][2]===1&&r[2][3]===0&&r[3][2]===0&&r[3][3]===1}function n(r,i,a,o,s){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],c=0;c<4;c++)l[c][3]=s[c];for(var u=0;u<3;u++)for(var f=0;f<3;f++)l[3][u]+=r[f]*l[f][u];var d=o[0],h=o[1],p=o[2],v=o[3],g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];g[0][0]=1-2*(h*h+p*p),g[0][1]=2*(d*h-p*v),g[0][2]=2*(d*p+h*v),g[1][0]=2*(d*h+p*v),g[1][1]=1-2*(d*d+p*p),g[1][2]=2*(h*p-d*v),g[2][0]=2*(d*p-h*v),g[2][1]=2*(h*p+d*v),g[2][2]=1-2*(d*d+h*h),l=e(l,g);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=e(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=e(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=e(l,y));for(var m=0;m<3;m++)for(var b=0;b<3;b++)l[m][b]*=i[m];return t(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return n}();function YG(e){return e.toFixed(6).replace(".000000","")}function jm(e,t){var n,r;return e.decompositionPair!==t&&(e.decompositionPair=t,n=RM(e)),t.decompositionPair!==e&&(t.decompositionPair=e,r=RM(t)),n[0]===null||r[0]===null?[[!1],[!0],function(i){return i?t[0].d:e[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(i){var a=GG(n[0][3],r[0][3],i[5]),o=BG(i[0],i[1],i[2],a,i[4]),s=o.map(YG).join(",");return s}])}function WG(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function GG(e,t,n){var r=WG(e,t);r=Hr(r,-1,1);var i=[];if(r===1)i=e;else for(var a=Math.acos(r),o=Math.sin(n*a)*1/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(e[s]*(Math.cos(n*a)-r*o)+t[s]*o);return i}function Dm(e){return e.replace(/[XY]/,"")}function Fm(e){return e.replace(/(X|Y|Z|3d)?$/,"3d")}var HG=function(t,n){return t==="perspective"&&n==="perspective"||(t==="matrix"||t==="matrix3d")&&(n==="matrix"||n==="matrix3d")};function VG(e,t,n){var r=!1;if(!e.length||!t.length){e.length||(r=!0,e=t,t=[]);for(var i=function(){var M=e[a],P=M.t,A=M.d,L=P.substring(0,5)==="scale"?1:0;t.push({t:P,d:A.map(function(N){return typeof N=="number"?Ct(L):Ct(L,N.unit)})})},a=0;a<e.length;a++)i()}var o=[],s=[],l=[];if(e.length!==t.length){var c=jm(e,t);o=[c[0]],s=[c[1]],l=[["matrix",[c[2]]]]}else for(var u=0;u<e.length;u++){var f=e[u].t,d=t[u].t,h=e[u].d,p=t[u].d,v=Xu[f],g=Xu[d],y=void 0;if(HG(f,d)){var m=jm([e[u]],[t[u]]);o.push(m[0]),s.push(m[1]),l.push(["matrix",[m[2]]]);continue}else if(f===d)y=f;else if(v[2]&&g[2]&&Dm(f)===Dm(d))y=Dm(f),h=v[2](h),p=g[2](p);else if(v[1]&&g[1]&&Fm(f)===Fm(d))y=Fm(f),h=v[1](h),p=g[1](p);else{var b=jm(e,t);o=[b[0]],s=[b[1]],l=[["matrix",[b[2]]]];break}for(var x=[],w=[],O=[],_=0;_<h.length;_++){var S=mG(h[_],p[_],n,!1,_);x[_]=S[0],w[_]=S[1],O.push(S[2])}o.push(x),s.push(w),l.push([y,O])}if(r){var k=o;o=s,s=k}return[o,s,function(E){return E.map(function(M,P){var A=M.map(function(L,N){return l[P][1][N](L)}).join(",");return l[P][0]==="matrix"&&A.split(",").length===16&&(l[P][0]="matrix3d"),l[P][0]==="matrix3d"&&A.split(",").length===6&&(l[P][0]="matrix"),"".concat(l[P][0],"(").concat(A,")")}).join(" ")}]}var UG=rr(function(e){if(Si(e)){if(e==="text-anchor")return[Ct(0,"px"),Ct(0,"px")];var t=e.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[Pm($M(t[0])),Pm($M(t[1]))]}return[Ct(e[0]||0,"px"),Ct(e[1]||0,"px")]});function $M(e){return e==="center"?"50%":e==="left"||e==="top"?"0%":e==="right"||e==="bottom"?"100%":e}var Rm=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:ce.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:ce.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:ce.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:ce.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:ce.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:ce.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:ce.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:ce.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:ce.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:ce.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:ce.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:ce.FILTER},{n:"clipPath",syntax:ce.DEFINED_PATH},{n:"textPath",syntax:ce.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:ce.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:ce.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:ce.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"y1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"z1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"x2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"y2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"z2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:ce.PATH,p:50},{n:"points",int:!0,l:!0,syntax:ce.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:ce.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:ce.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:ce.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:ce.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:ce.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:ce.NUMBER,d:function(t){return t===U.PATH||t===U.POLYGON||t===U.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:ce.MARKER},{n:"markerEnd",syntax:ce.MARKER},{n:"markerMid",syntax:ce.MARKER},{n:"markerStartOffset",syntax:ce.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:ce.LENGTH,l:!0,int:!0,d:"0"}],XG=new Set(Rm.filter(function(e){return!!e.l}).map(function(e){return e.n})),zM={},qG=function(){function e(t){var n=this;J(this,e),this.runtime=t,Rm.forEach(function(r){n.registerMetadata(r)})}return ee(e,[{key:"registerMetadata",value:function(n){[n.n].concat(vt(n.a||[])).forEach(function(r){zM[r]=n})}},{key:"getPropertySyntax",value:function(n){return this.runtime.CSSPropertySyntaxFactory[n]}},{key:"processProperties",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(n.attributes,r);var a=n.parsedStyle.clipPath,o=n.parsedStyle.offsetPath;KG(n,r);var s=!!i.forceUpdateGeometry;if(!s){for(var l in r)if(XG.has(l)){s=!0;break}}var c=BM(n);c.has("fill")&&r.fill&&(n.parsedStyle.fill=bo(r.fill)),c.has("stroke")&&r.stroke&&(n.parsedStyle.stroke=bo(r.stroke)),c.has("shadowColor")&&r.shadowColor&&(n.parsedStyle.shadowColor=bo(r.shadowColor)),c.has("filter")&&r.filter&&(n.parsedStyle.filter=wG(r.filter)),c.has("radius")&&!nn(r.radius)&&(n.parsedStyle.radius=_M(r.radius,4)),c.has("lineDash")&&!nn(r.lineDash)&&(n.parsedStyle.lineDash=_M(r.lineDash,"even")),c.has("points")&&r.points&&(n.parsedStyle.points=jG(r.points)),c.has("d")&&r.d===""&&(n.parsedStyle.d=Te({},pM)),c.has("d")&&r.d&&(n.parsedStyle.d=jM(r.d)),c.has("textTransform")&&r.textTransform&&this.runtime.CSSPropertySyntaxFactory[ce.TEXT_TRANSFORM].calculator(null,null,{value:r.textTransform},n,null),c.has("clipPath")&&!Dt(r.clipPath)&&this.runtime.CSSPropertySyntaxFactory[ce.DEFINED_PATH].calculator("clipPath",a,r.clipPath,n,this.runtime),c.has("offsetPath")&&r.offsetPath&&this.runtime.CSSPropertySyntaxFactory[ce.DEFINED_PATH].calculator("offsetPath",o,r.offsetPath,n,this.runtime),c.has("transform")&&r.transform&&(n.parsedStyle.transform=FM(r.transform)),c.has("transformOrigin")&&r.transformOrigin&&(n.parsedStyle.transformOrigin=UG(r.transformOrigin)),c.has("markerStart")&&r.markerStart&&(n.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[ce.MARKER].calculator(null,r.markerStart,r.markerStart,null,null)),c.has("markerEnd")&&r.markerEnd&&(n.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[ce.MARKER].calculator(null,r.markerEnd,r.markerEnd,null,null)),c.has("markerMid")&&r.markerMid&&(n.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[ce.MARKER].calculator("",r.markerMid,r.markerMid,null,null)),c.has("zIndex")&&!nn(r.zIndex)&&this.runtime.CSSPropertySyntaxFactory[ce.Z_INDEX].postProcessor(n),c.has("offsetDistance")&&!nn(r.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[ce.OFFSET_DISTANCE].postProcessor(n),c.has("transform")&&r.transform&&this.runtime.CSSPropertySyntaxFactory[ce.TRANSFORM].postProcessor(n),c.has("transformOrigin")&&r.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[ce.TRANSFORM_ORIGIN].postProcessor(n),s&&(n.geometry.dirty=!0,n.renderable.boundsDirty=!0,n.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(n))}},{key:"updateGeometry",value:function(n){var r=n.nodeName,i=this.runtime.geometryUpdaterFactory[r];if(i){var a=n.geometry;a.contentBounds||(a.contentBounds=new rn),a.renderBounds||(a.renderBounds=new rn);var o=n.parsedStyle,s=i.update(o,n),l=s.cx,c=l===void 0?0:l,u=s.cy,f=u===void 0?0:u,d=s.cz,h=d===void 0?0:d,p=s.hwidth,v=p===void 0?0:p,g=s.hheight,y=g===void 0?0:g,m=s.hdepth,b=m===void 0?0:m,x=[Math.abs(v),Math.abs(y),b],w=o.stroke,O=o.lineWidth,_=O===void 0?1:O,S=o.increasedLineWidthForHitTesting,k=S===void 0?0:S,E=o.shadowType,M=E===void 0?"outer":E,P=o.shadowColor,A=o.filter,L=A===void 0?[]:A,N=o.transformOrigin,T=[c,f,h];a.contentBounds.update(T,x);var I=r===U.POLYLINE||r===U.POLYGON||r===U.PATH?Math.SQRT2:.5,C=w&&!w.isNone;if(C){var j=((_||0)+(k||0))*I;x[0]+=j,x[1]+=j}if(a.renderBounds.update(T,x),P&&M&&M!=="inner"){var D=a.renderBounds,F=D.min,R=D.max,z=o.shadowBlur,H=o.shadowOffsetX,W=o.shadowOffsetY,X=z||0,V=H||0,q=W||0,ie=F[0]-X+V,Q=R[0]+X+V,ne=F[1]-X+q,ae=R[1]+X+q;F[0]=Math.min(F[0],ie),R[0]=Math.max(R[0],Q),F[1]=Math.min(F[1],ne),R[1]=Math.max(R[1],ae),a.renderBounds.setMinMax(F,R)}L.forEach(function(xe){var Ee=xe.name,et=xe.params;if(Ee==="blur"){var cn=et[0].value;a.renderBounds.update(a.renderBounds.center,ro(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[cn,cn,0]))}else if(Ee==="drop-shadow"){var On=et[0].value,At=et[1].value,vn=et[2].value,un=a.renderBounds,gn=un.min,gt=un.max,fn=gn[0]-vn+On,$n=gt[0]+vn+On,yn=gn[1]-vn+At,pe=gt[1]+vn+At;gn[0]=Math.min(gn[0],fn),gt[0]=Math.max(gt[0],$n),gn[1]=Math.min(gn[1],yn),gt[1]=Math.max(gt[1],pe),a.renderBounds.setMinMax(gn,gt)}}),n.geometry.dirty=!1;var fe=v<0,ge=y<0,be=(fe?-1:1)*(N?Ar(N[0],0,n,!0):0),Fe=(ge?-1:1)*(N?Ar(N[1],1,n,!0):0);(be||Fe)&&n.setOrigin(be,Fe)}}},{key:"updateSizeAttenuation",value:function(n,r){n.style.isSizeAttenuation?(n.style.rawLineWidth||(n.style.rawLineWidth=n.style.lineWidth),n.style.lineWidth=(n.style.rawLineWidth||1)/r,n.nodeName===U.CIRCLE&&(n.style.rawR||(n.style.rawR=n.style.r),n.style.r=(n.style.rawR||1)/r)):(n.style.rawLineWidth&&(n.style.lineWidth=n.style.rawLineWidth,delete n.style.rawLineWidth),n.nodeName===U.CIRCLE&&n.style.rawR&&(n.style.r=n.style.rawR,delete n.style.rawR))}}])}();function KG(e,t){var n=BM(e);for(var r in t)n.has(r)&&(e.parsedStyle[r]=t[r])}function BM(e){return e.constructor.PARSED_STYLE_LIST}var ZG=function(){function e(){J(this,e),this.mixer=Tm}return ee(e,[{key:"calculator",value:function(n,r,i,a){return pr(i)}}])}(),QG=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i,a,o){return i instanceof Xr&&(i=null),o.sceneGraphService.updateDisplayObjectDependency(n,r,i,a),n==="clipPath"&&a.forEach(function(s){s.childNodes.length===0&&o.sceneGraphService.dirtifyToRoot(s)}),i}}])}(),JG=function(){function e(){J(this,e),this.parser=bo,this.mixer=pG}return ee(e,[{key:"calculator",value:function(n,r,i,a){return i instanceof Xr?i.value==="none"?yM:mM:i}}])}(),eH=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i){return i instanceof Xr?[]:i}}])}();function YM(e){var t=e.parsedStyle,n=t.fontSize;return nn(n)?null:n}var $m=function(){function e(){J(this,e),this.mixer=Tm}return ee(e,[{key:"calculator",value:function(n,r,i,a,o){if(po(i))return i;if(ft.isRelativeUnit(i.unit)){if(i.unit===ue.kPercentage)return 0;if(i.unit===ue.kEms){if(a.parentNode){var s=YM(a.parentNode);if(s)return s*=i.value,s}return 0}if(i.unit===ue.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var c=YM(a.ownerDocument.documentElement);if(c)return c*=i.value,c}return 0}}else return i.value}}])}(),tH=function(){function e(){J(this,e),this.mixer=EM}return ee(e,[{key:"calculator",value:function(n,r,i){return i.map(function(a){return a.value})}}])}(),nH=function(){function e(){J(this,e),this.mixer=EM}return ee(e,[{key:"calculator",value:function(n,r,i){return i.map(function(a){return a.value})}}])}(),rH=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i,a){var o;i instanceof Xr&&(i=null);var s=(o=i)===null||o===void 0?void 0:o.cloneNode(!0);return s&&(s.style.isMarker=!0),s}}])}(),iH=function(){function e(){J(this,e),this.mixer=Tm}return ee(e,[{key:"calculator",value:function(n,r,i){return i.value}}])}(),aH=function(){function e(){J(this,e),this.mixer=Lm(0,1)}return ee(e,[{key:"calculator",value:function(n,r,i){return i.value}},{key:"postProcessor",value:function(n){var r=n.parsedStyle,i=r.offsetPath,a=r.offsetDistance;if(i){var o=i.nodeName;if(o===U.LINE||o===U.PATH||o===U.POLYLINE){var s=i.getPoint(a);s&&n.setLocalPosition(s.x,s.y)}}}}])}(),oH=function(){function e(){J(this,e),this.mixer=Lm(0,1)}return ee(e,[{key:"calculator",value:function(n,r,i){return i.value}}])}(),sH=function(){function e(){J(this,e),this.parser=jM,this.mixer=IG}return ee(e,[{key:"calculator",value:function(n,r,i){return i instanceof Xr&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Bl(0,0,0,0)}:i}}])}(),lH=ee(function e(){J(this,e),this.mixer=DG}),cH=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.mixer=Lm(0,1/0),n}return Ne(t,e),ee(t)}($m),uH=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i,a){return i instanceof Xr?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(n){n.nodeValue="".concat(n.parsedStyle.text)||""}}])}(),fH=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i,a){var o=a.getAttribute("text");if(o){var s=o;i.value==="capitalize"?s=o.charAt(0).toUpperCase()+o.slice(1):i.value==="lowercase"?s=o.toLowerCase():i.value==="uppercase"&&(s=o.toUpperCase()),a.parsedStyle.text=s}return i.value}}])}(),zm=new WeakMap;function dH(e,t,n){if(e){var r=typeof e=="string"?document.getElementById(e):e;zm.has(r)&&zm.get(r).destroy(n),zm.set(r,t)}}var Bm=typeof window!="undefined"&&typeof window.document!="undefined";function hH(e){return!!e.getAttribute}function pH(e,t){for(var n=0,r=e.length;n<r;){var i=n+r>>>1;WM(e[i],t)<0?n=i+1:r=i}return n}function WM(e,t){var n=Number(e.parsedStyle.zIndex||0),r=Number(t.parsedStyle.zIndex||0);if(n===r){var i=e.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(e)-a.indexOf(t)}}return n-r}function GM(e){var t=e;do{var n,r=(n=t.parsedStyle)===null||n===void 0?void 0:n.clipPath;if(r)return t;t=t.parentElement}while(t!==null);return null}var HM="px";function vH(e,t,n){Bm&&e.style&&(e.style.width=t+HM,e.style.height=n+HM)}function VM(e,t){if(Bm)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}function gH(e){var t=VM(e,"width");return t==="auto"?e.offsetWidth:parseFloat(t)}function yH(e){var t=VM(e,"height");return t==="auto"?e.offsetHeight:parseFloat(t)}var mH=1,bH={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Ym=typeof performance=="object"&&performance.now?performance:Date;function lp(e){return e.nodeName===U.FRAGMENT?!0:e.getRootNode().nodeName===U.FRAGMENT}function Ms(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=!1,i=!1,a=!!t&&!t.isNone,o=!!n&&!n.isNone;return e==="visiblepainted"||e==="painted"||e==="auto"?(r=a,i=o):e==="visiblefill"||e==="fill"?r=!0:e==="visiblestroke"||e==="stroke"?i=!0:(e==="visible"||e==="all")&&(r=!0,i=!0),[r,i]}var xH=1,wH=function(){return xH++},Ji=typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:{},OH=Date.now(),_H=function(){return Ji.performance&&typeof Ji.performance.now=="function"?Ji.performance.now():Date.now()-OH},qu={},UM=Date.now(),SH=function(t){if(typeof t!="function")throw new TypeError("".concat(t," is not a function"));var n=Date.now(),r=n-UM,i=r>16?0:16-r,a=wH();return qu[a]=t,Object.keys(qu).length>1||setTimeout(function(){UM=n;var o=qu;qu={},Object.keys(o).forEach(function(s){return o[s](_H())})},i),a},kH=function(t){delete qu[t]},EH=["","webkit","moz","ms","o"],XM=function(t){return typeof t!="string"?SH:t===""?Ji.requestAnimationFrame:Ji["".concat(t,"RequestAnimationFrame")]},MH=function(t){return typeof t!="string"?kH:t===""?Ji.cancelAnimationFrame:Ji["".concat(t,"CancelAnimationFrame")]||Ji["".concat(t,"CancelRequestAnimationFrame")]},AH=function(t,n){for(var r=0;t[r]!==void 0;){if(n(t[r]))return t[r];r+=1}},qM=AH(EH,function(e){return!!XM(e)}),Wm=XM(qM),KM=MH(qM);Ji.requestAnimationFrame=Wm,Ji.cancelAnimationFrame=KM;var PH=function(){function e(){J(this,e),this.callbacks=[]}return ee(e,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(n,r){this.callbacks.push(r)}},{key:"promise",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,r)}))}}])}(),CH=function(){function e(){J(this,e),this.callbacks=[]}return ee(e,[{key:"tapPromise",value:function(n,r){this.callbacks.push(r)}},{key:"promise",value:function(){var t=go(Tn().mark(function r(){var i,a,o,s,l=arguments;return Tn().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!this.callbacks.length){u.next=14;break}return u.next=3,(i=this.callbacks)[0].apply(i,l);case 3:a=u.sent,o=0;case 5:if(!(o<this.callbacks.length-1)){u.next=13;break}return s=this.callbacks[o],u.next=9,s(a);case 9:a=u.sent;case 10:o++,u.next=5;break;case 13:return u.abrupt("return",a);case 14:return u.abrupt("return",null);case 15:case"end":return u.stop()}},r,this)}));function n(){return t.apply(this,arguments)}return n}()}])}(),ir=function(){function e(){J(this,e),this.callbacks=[]}return ee(e,[{key:"tap",value:function(n,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(o){o.apply(void 0,a)})}}])}(),Gm=function(){function e(){J(this,e),this.callbacks=[]}return ee(e,[{key:"tap",value:function(n,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,o=this.callbacks[0].apply(void 0,a),s=0;s<this.callbacks.length-1;s++){var l=this.callbacks[s];o=l(o)}return o}return null}}])}(),TH=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],LH=/([\"\'])[^\'\"]+\1/;function NH(e){for(var t=e.fontSize,n=t===void 0?16:t,r=e.fontFamily,i=r===void 0?"sans-serif":r,a=e.fontStyle,o=a===void 0?"normal":a,s=e.fontVariant,l=s===void 0?"normal":s,c=e.fontWeight,u=c===void 0?"normal":c,f=po(n)&&"".concat(n,"px")||"16px",d=i.split(","),h=d.length-1;h>=0;h--){var p=d[h].trim();!LH.test(p)&&TH.indexOf(p)<0&&(p='"'.concat(p,'"')),d[h]=p}return"".concat(o," ").concat(l," ").concat(u," ").concat(f," ").concat(d.join(","))}function Hm(e,t,n){return to(e),e[4]=Math.tan(t),e[1]=Math.tan(n),e}var an=it(),IH=it(),jH={scale:function(t){no(an,[t[0].value,t[1].value,1])},scaleX:function(t){no(an,[t[0].value,1,1])},scaleY:function(t){no(an,[1,t[0].value,1])},scaleZ:function(t){no(an,[1,1,t[0].value])},scale3d:function(t){no(an,[t[0].value,t[1].value,t[2].value])},translate:function(t){wa(an,[t[0].value,t[1].value,0])},translateX:function(t){wa(an,[t[0].value,0,0])},translateY:function(t){wa(an,[0,t[0].value,0])},translateZ:function(t){wa(an,[0,0,t[0].value])},translate3d:function(t){wa(an,[t[0].value,t[1].value,t[2].value])},rotate:function(t){ly(an,ct(pr(t[0])))},rotateX:function(t){G_(an,ct(pr(t[0])))},rotateY:function(t){H_(an,ct(pr(t[0])))},rotateZ:function(t){ly(an,ct(pr(t[0])))},rotate3d:function(t){W_(an,ct(pr(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){Hm(an,ct(t[0].value),ct(t[1].value))},skewX:function(t){Hm(an,ct(t[0].value),0)},skewY:function(t){Hm(an,0,ct(t[0].value))},matrix:function(t){sy(an,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){sy.apply(Oz,[an].concat(vt(t.map(function(n){return n.value}))))}},DH=Xe(1,1,1),FH=Ye(),ZM={translate:function(t,n){te.sceneGraphService.setLocalScale(t,DH,!1),te.sceneGraphService.setLocalEulerAngles(t,FH,void 0,void 0,!1),te.sceneGraphService.setLocalPosition(t,[n[0].value,n[1].value,0],!1),te.sceneGraphService.dirtifyLocal(t,t.transformable)}};function QM(e,t){if(e.length){if(e.length===1&&ZM[e[0].t]){ZM[e[0].t](t,e[0].d);return}for(var n=to(IH),r=0;r<e.length;r++){var i=e[r],a=i.t,o=i.d,s=jH[a];s&&(s(o),fy(n,n,an))}t.setLocalTransform(n)}else t.resetLocalTransform();return t.getLocalTransform()}var RH=function(){function e(){J(this,e),this.parser=FG,this.mixer=VG}return ee(e,[{key:"calculator",value:function(n,r,i,a){return i instanceof Xr?[]:i}},{key:"postProcessor",value:function(n){QM(n.parsedStyle.transform,n)}}])}(),$H=function(){function e(){J(this,e)}return ee(e,[{key:"postProcessor",value:function(n){var r=n.parsedStyle.transformOrigin;r[0].unit===ue.kPixels&&r[1].unit===ue.kPixels?n.setOrigin(r[0].value,r[1].value):n.getGeometryBounds()}}])}(),zH=function(){function e(){J(this,e)}return ee(e,[{key:"calculator",value:function(n,r,i,a){return i.value}},{key:"postProcessor",value:function(n){if(n.parentNode){var r=n.parentNode,i=r.renderable,a=r.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=tp.Z_INDEX_CHANGED)}}}])}(),BH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n,r){var i=n.cx,a=i===void 0?0:i,o=n.cy,s=o===void 0?0:o,l=n.r,c=l===void 0?0:l;return{cx:a,cy:s,hwidth:c,hheight:c}}}])}(),YH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n,r){var i=n.cx,a=i===void 0?0:i,o=n.cy,s=o===void 0?0:o,l=n.rx,c=l===void 0?0:l,u=n.ry,f=u===void 0?0:u;return{cx:a,cy:s,hwidth:c,hheight:f}}}])}(),WH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n){var r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=Math.min(r,a),l=Math.max(r,a),c=Math.min(i,o),u=Math.max(i,o),f=l-s,d=u-c,h=f/2,p=d/2;return{cx:s+h,cy:c+p,hwidth:h,hheight:p}}}])}(),GH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n){var r=n.d,i=r.rect,a=i.x,o=i.y,s=i.width,l=i.height,c=s/2,u=l/2;return{cx:a+c,cy:o+u,hwidth:c,hheight:u}}}])}(),HH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n){if(n.points&&Ea(n.points.points)){var r=n.points.points,i=Math.min.apply(Math,vt(r.map(function(d){return d[0]}))),a=Math.max.apply(Math,vt(r.map(function(d){return d[0]}))),o=Math.min.apply(Math,vt(r.map(function(d){return d[1]}))),s=Math.max.apply(Math,vt(r.map(function(d){return d[1]}))),l=a-i,c=s-o,u=l/2,f=c/2;return{cx:i+u,cy:o+f,hwidth:u,hheight:f}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),VH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o,l=n.src,c=n.width,u=c===void 0?0:c,f=n.height,d=f===void 0?0:f,h=u,p=d;return l&&!Si(l)&&(h||(h=l.width,n.width=h),p||(p=l.height,n.height=p)),{cx:a+h/2,cy:s+p/2,hwidth:h/2,hheight:p/2}}}])}(),UH=function(){function e(t){J(this,e),this.globalRuntime=t}return ee(e,[{key:"isReadyToMeasure",value:function(n,r){var i=n.text;return i}},{key:"update",value:function(n,r){var i,a=n.text,o=n.textAlign,s=o===void 0?"start":o,l=n.lineWidth,c=l===void 0?1:l,u=n.textBaseline,f=u===void 0?"alphabetic":u,d=n.dx,h=d===void 0?0:d,p=n.dy,v=p===void 0?0:p,g=n.x,y=g===void 0?0:g,m=n.y,b=m===void 0?0:m;if(!this.isReadyToMeasure(n,r))return n.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var x=(r==null||(i=r.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},w=x.offscreenCanvas,O=this.globalRuntime.textService.measureText(a,n,w);n.metrics=O;var _=O.width,S=O.height,k=_/2,E=S/2,M=y+k;s==="center"||s==="middle"?M+=c/2-k:(s==="right"||s==="end")&&(M+=c-k*2);var P=b-E;return f==="middle"?P+=E:f==="top"||f==="hanging"?P+=E*2:f==="alphabetic"||(f==="bottom"||f==="ideographic")&&(P+=0),h&&(M+=h),v&&(P+=v),{cx:M,cy:P,hwidth:k,hheight:E}}}])}(),XH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n,r){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),qH=function(){function e(){J(this,e)}return ee(e,[{key:"update",value:function(n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o,l=n.width,c=l===void 0?0:l,u=n.height,f=u===void 0?0:u;return{cx:a+c/2,cy:s+f/2,hwidth:c/2,hheight:f/2}}}])}(),cp=function(){function e(t){J(this,e),this.eventPhase=e.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ln,this.page=new Ln,this.canvas=new Ln,this.viewport=new Ln,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return ee(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(lt)}}])}(),JM=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.client=new Ln,n.movement=new Ln,n.offset=new Ln,n.global=new Ln,n.screen=new Ln,n}return Ne(t,e),ee(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(r){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(r)}},{key:"initMouseEvent",value:function(){throw new Error(lt)}}])}(cp),Vm=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.width=0,n.height=0,n.isPrimary=!1,n}return Ne(t,e),ee(t,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(JM),Um=function(e){function t(){return J(this,t),Le(this,t,arguments)}return Ne(t,e),ee(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(JM),dt=function(e){function t(n,r){var i;return J(this,t),i=Le(this,t,[null]),i.type=n,i.detail=r,Object.assign(i,r),i}return Ne(t,e),ee(t)}(cp),eA=new WeakMap,tA=function(){function e(){J(this,e),this.emitter=new vE}return ee(e,[{key:"on",value:function(n,r,i){return this.addEventListener(n,r,i),this}},{key:"addEventListener",value:function(n,r,i){var a=!1,o=!1;if(wE(i))a=i;else if(i){var s=i.capture;a=s===void 0?!1:s;var l=i.once;o=l===void 0?!1:l}a&&(n+="capture"),r=Il(r)?r:r.handleEvent;var c=Il(r)?void 0:r;return o?this.emitter.once(n,r,c):this.emitter.on(n,r,c),this}},{key:"off",value:function(n,r,i){return n?this.removeEventListener(n,r,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var n;(n=this.emitter)===null||n===void 0||n.removeAllListeners()}},{key:"removeEventListener",value:function(n,r,i){var a;if(!this.emitter)return this;var o=wE(i)?i:i==null?void 0:i.capture;o&&(n+="capture"),r=Il(r)?r:(a=r)===null||a===void 0?void 0:a.handleEvent;var s=Il(r)?void 0:r;return this.emitter.off(n,r,s),this}},{key:"emit",value:function(n,r){this.dispatchEvent(new dt(n,r))}},{key:"dispatchEvent",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=eA.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&eA.set(this,i)}if(i){if(n.manager=i.getEventService(),!n.manager)return!1;n.defaultPrevented=!1,n.path?n.path.length=0:n.page=[],r||(n.target=this),n.manager.dispatchEvent(n,n.type,r)}else this.emitter.emit(n.type,n);return!n.defaultPrevented}}])}(),Ft=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return Ne(t,e),ee(t,[{key:"textContent",get:function(){var r="";this.nodeName===U.TEXT&&(r+=this.style.text);var i=Os(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;o.nodeName===U.TEXT?r+=o.nodeValue:r+=o.textContent}}catch(s){i.e(s)}finally{i.f()}return r},set:function(r){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===U.TEXT&&(this.style.text="".concat(r))}},{key:"getRootNode",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(r):r.composed&&this.host?this.host.getRootNode(r):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(r){throw new Error(lt)}},{key:"lookupNamespaceURI",value:function(r){throw new Error(lt)}},{key:"lookupPrefix",value:function(r){throw new Error(lt)}},{key:"normalize",value:function(){throw new Error(lt)}},{key:"isEqualNode",value:function(r){return this===r}},{key:"isSameNode",value:function(r){return this.isEqualNode(r)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(r){if(r===this)return 0;for(var i=r,a=this,o=[i],s=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(o.push(i.parentNode),i.parentNode):i,a=a.parentNode?(s.push(a.parentNode),a.parentNode):a}if(i!==a)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var c=o.length>s.length?o:s,u=c===o?s:o;if(c[c.length-u.length]===u[0])return c===o?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var f=c.length-u.length,d=u.length-1;d>=0;d--){var h=u[d],p=c[f+d];if(p!==h){var v=h.parentNode.childNodes;return v.indexOf(h)<v.indexOf(p)?u===o?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:c===o?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(r){return this.contains(r)}},{key:"contains",value:function(r){for(var i=r;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(r){for(var i=this;r>0&&i;)i=i.parentNode,r--;return i}},{key:"forEach",value:function(r){for(var i=[this];i.length>0;){var a=i.pop(),o=r(a);if(o===!1)break;for(var s=a.childNodes.length-1;s>=0;s--)i.push(a.childNodes[s])}}}],[{key:"isNode",value:function(r){return!!r.childNodes}}])}(tA);Ft.DOCUMENT_POSITION_DISCONNECTED=1,Ft.DOCUMENT_POSITION_PRECEDING=2,Ft.DOCUMENT_POSITION_FOLLOWING=4,Ft.DOCUMENT_POSITION_CONTAINS=8,Ft.DOCUMENT_POSITION_CONTAINED_BY=16,Ft.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var KH=2048,ZH=function(){function e(t,n){var r=this;J(this,e),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=it(),this.tmpVec3=Ye(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var o=a.button===2;r.dispatchEvent(a,o?"rightdown":"mousedown")}var s=r.trackingData(i.pointerId);s.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a=Ym.now(),o=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(o,"pointerup"),o.pointerType==="touch")r.dispatchEvent(o,"touchend");else if(o.pointerType==="mouse"||o.pointerType==="pen"){var s=o.button===2;r.dispatchEvent(o,s?"rightup":"mouseup")}var l=r.trackingData(i.pointerId),c=r.findMountedTarget(l.pressTargetsByButton[i.button]),u=c;if(c&&!o.composedPath().includes(c)){for(var f=c;f&&!o.composedPath().includes(f);){if(o.currentTarget=f,r.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch")r.notifyTarget(o,"touchendoutside");else if(o.pointerType==="mouse"||o.pointerType==="pen"){var d=o.button===2;r.notifyTarget(o,d?"rightupoutside":"mouseupoutside")}Ft.isNode(f)&&(f=f.parentNode)}delete l.pressTargetsByButton[i.button],u=f}if(u){var h,p=r.clonePointerEvent(o,"click");p.target=u,p.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:p.target,timeStamp:a});var v=r.context.renderingContext.root.ownerDocument.defaultView,g=l.clicksByButton[i.button];g.target===p.target&&a-g.timeStamp<v.getConfig().dblClickSpeed?++g.clickCount:g.clickCount=1,g.target=p.target,g.timeStamp=a,p.detail=g.clickCount,(h=o.detail)!==null&&h!==void 0&&h.preventClick||(!r.context.config.useNativeClickEvent&&(p.pointerType==="mouse"||p.pointerType==="touch")&&r.dispatchEvent(p,"click"),r.dispatchEvent(p,"pointertap")),r.freeEvent(p)}r.freeEvent(o)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),o=a.pointerType==="mouse"||a.pointerType==="pen",s=r.trackingData(i.pointerId),l=r.findMountedTarget(s.overTargets);if(s.overTargets&&l!==a.target){var c=i.type==="mousemove"?"mouseout":"pointerout",u=r.createPointerEvent(i,c,l||void 0);if(r.dispatchEvent(u,"pointerout"),o&&r.dispatchEvent(u,"mouseout"),!a.composedPath().includes(l)){var f=r.createPointerEvent(i,"pointerleave",l||void 0);for(f.eventPhase=f.AT_TARGET;f.target&&!a.composedPath().includes(f.target);)f.currentTarget=f.target,r.notifyTarget(f),o&&r.notifyTarget(f,"mouseleave"),Ft.isNode(f.target)&&(f.target=f.target.parentNode);r.freeEvent(f)}r.freeEvent(u)}if(l!==a.target){var d=i.type==="mousemove"?"mouseover":"pointerover",h=r.clonePointerEvent(a,d);r.dispatchEvent(h,"pointerover"),o&&r.dispatchEvent(h,"mouseover");for(var p=l&&Ft.isNode(l)&&l.parentNode;p&&p!==(Ft.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(Ft.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(v){var g=r.clonePointerEvent(a,"pointerenter");for(g.eventPhase=g.AT_TARGET;g.target&&g.target!==l&&g.target!==(Ft.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),Ft.isNode(g.target)&&(g.target=g.target.parentNode);r.freeEvent(g)}r.freeEvent(h)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),o&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),s.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var o=i.pointerType==="mouse"||i.pointerType==="pen",s=r.findMountedTarget(a.overTargets),l=r.createPointerEvent(i,"pointerout",s||void 0);r.dispatchEvent(l),o&&r.dispatchEvent(l,"mouseout");var c=r.createPointerEvent(i,"pointerleave",s||void 0);for(c.eventPhase=c.AT_TARGET;c.target&&c.target!==(Ft.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),o&&r.notifyTarget(c,"mouseleave"),Ft.isNode(c.target)&&(c.target=c.target.parentNode);a.overTargets=null,r.freeEvent(l),r.freeEvent(c)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),o=r.createPointerEvent(i),s=o.pointerType==="mouse"||o.pointerType==="pen";r.dispatchEvent(o,"pointerover"),s&&r.dispatchEvent(o,"mouseover"),o.pointerType==="mouse"&&(r.cursor=r.getCursor(o.target));var l=r.clonePointerEvent(o,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(Ft.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),s&&r.notifyTarget(l,"mouseenter"),Ft.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=o.composedPath(),r.freeEvent(o),r.freeEvent(l)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[i.button]),s=r.createPointerEvent(i);if(o){for(var l=o;l;)s.currentTarget=l,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"||(s.pointerType==="mouse"||s.pointerType==="pen")&&r.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),Ft.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(s)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)},this.globalRuntime=t,this.context=n}return ee(e,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var n=this.context.contextService.getBoundingClientRect(),r=1,i=1,a=this.context.contextService.getDomElement();if(a&&n){var o=a.offsetWidth,s=a.offsetHeight;o&&s&&(r=n.width/o,i=n.height/s)}return{scaleX:r,scaleY:i,bbox:n}}},{key:"client2Viewport",value:function(n){var r=this.getScale(),i=r.scaleX,a=r.scaleY,o=r.bbox;return new Ln((n.x-((o==null?void 0:o.left)||0))/i,(n.y-((o==null?void 0:o.top)||0))/a)}},{key:"viewport2Client",value:function(n){var r=this.getScale(),i=r.scaleX,a=r.scaleY,o=r.bbox;return new Ln((n.x+((o==null?void 0:o.left)||0))*i,(n.y+((o==null?void 0:o.top)||0))*a)}},{key:"viewport2Canvas",value:function(n){var r=n.x,i=n.y,a=this.rootTarget.defaultView,o=a.getCamera(),s=this.context.config,l=s.width,c=s.height,u=o.getPerspectiveInverse(),f=o.getWorldTransform(),d=Yn(this.tmpMatrix,f,u),h=Wn(this.tmpVec3,r/l*2-1,(1-i/c)*2-1,0);return zt(h,h,d),new Ln(h[0],h[1])}},{key:"canvas2Viewport",value:function(n){var r=this.rootTarget.defaultView,i=r.getCamera(),a=i.getPerspective(),o=i.getViewTransform(),s=Yn(this.tmpMatrix,a,o),l=Wn(this.tmpVec3,n.x,n.y,0);zt(this.tmpVec3,this.tmpVec3,s);var c=this.context.config,u=c.width,f=c.height;return new Ln((l[0]+1)/2*u,(1-(l[1]+1)/2)*f)}},{key:"setPickHandler",value:function(n){this.pickHandler=n}},{key:"addEventMapping",value:function(n,r){this.mappingTable[n]||(this.mappingTable[n]=[]),this.mappingTable[n].push({fn:r,priority:0}),this.mappingTable[n].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(n){if(this.rootTarget){var r=this.mappingTable[n.type];if(r)for(var i=0,a=r.length;i<a;i++)r[i].fn(n);else console.warn("[EventService]: Event mapping not defined for ".concat(n.type))}}},{key:"dispatchEvent",value:function(n,r,i){if(!i)n.propagationStopped=!1,n.propagationImmediatelyStopped=!1,this.propagate(n,r);else{n.eventPhase=n.AT_TARGET;var a=this.rootTarget.defaultView||null;n.currentTarget=a,this.notifyListeners(n,r)}}},{key:"propagate",value:function(n,r){if(n.target){var i=n.composedPath();n.eventPhase=n.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(n.currentTarget=i[a],this.notifyTarget(n,r),n.propagationStopped||n.propagationImmediatelyStopped)return;if(n.eventPhase=n.AT_TARGET,n.currentTarget=n.target,this.notifyTarget(n,r),!(n.propagationStopped||n.propagationImmediatelyStopped)){var o=i.indexOf(n.currentTarget);n.eventPhase=n.BUBBLING_PHASE;for(var s=o+1;s<i.length;s++)if(n.currentTarget=i[s],this.notifyTarget(n,r),n.propagationStopped||n.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(n){var r=[n],i=this.rootTarget.defaultView||null;if(i&&i===n)return r.unshift(i.document),r;for(var a=0;a<KH&&n!==this.rootTarget;a++)Ft.isNode(n)&&n.parentNode&&(r.push(n.parentNode),n=n.parentNode);return i&&r.push(i),r}},{key:"hitTest",value:function(n){var r=n.viewportX,i=n.viewportY,a=this.context.config,o=a.width,s=a.height,l=a.disableHitTesting;return r<0||i<0||r>o||i>s?null:!l&&this.pickHandler(n)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(n,r){var i,a=r==null?void 0:r.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=r.composedPath()[0]),a){if(a===n)return!0;if(n&&n.contains)return n.contains(a)}return r!=null&&r.composedPath?r.composedPath().indexOf(n)>-1:!1}},{key:"getExistedHTML",value:function(n){if(n.nativeEvent.composedPath)for(var r=0,i=n.nativeEvent.composedPath();r<i.length;r++){var a=i[r],o=this.nativeHTMLMap.get(a);if(o)return o}return null}},{key:"pickTarget",value:function(n){return this.hitTest({clientX:n.clientX,clientY:n.clientY,viewportX:n.viewportX,viewportY:n.viewportY,x:n.canvasX,y:n.canvasY})}},{key:"createPointerEvent",value:function(n,r,i,a){var o=this.allocateEvent(Vm);this.copyPointerData(n,o),this.copyMouseData(n,o),this.copyData(n,o),o.nativeEvent=n.nativeEvent,o.originalEvent=n;var s=this.getExistedHTML(o),l=this.context.contextService.getDomElement();return o.target=i!=null?i:s||this.isNativeEventFromCanvas(l,o.nativeEvent)&&this.pickTarget(o)||a,typeof r=="string"&&(o.type=r),o}},{key:"createWheelEvent",value:function(n){var r=this.allocateEvent(Um);this.copyWheelData(n,r),this.copyMouseData(n,r),this.copyData(n,r),r.nativeEvent=n.nativeEvent,r.originalEvent=n;var i=this.getExistedHTML(r),a=this.context.contextService.getDomElement();return r.target=i||this.isNativeEventFromCanvas(a,r.nativeEvent)&&this.pickTarget(r),r}},{key:"trackingData",value:function(n){return this.mappingState.trackingData[n]||(this.mappingState.trackingData[n]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[n]}},{key:"cloneWheelEvent",value:function(n){var r=this.allocateEvent(Um);return r.nativeEvent=n.nativeEvent,r.originalEvent=n.originalEvent,this.copyWheelData(n,r),this.copyMouseData(n,r),this.copyData(n,r),r.target=n.target,r.path=n.composedPath().slice(),r.type=n.type,r}},{key:"clonePointerEvent",value:function(n,r){var i=this.allocateEvent(Vm);return i.nativeEvent=n.nativeEvent,i.originalEvent=n.originalEvent,this.copyPointerData(n,i),this.copyMouseData(n,i),this.copyData(n,i),i.target=n.target,i.path=n.composedPath().slice(),i.type=r!=null?r:i.type,i}},{key:"copyPointerData",value:function(n,r){r.pointerId=n.pointerId,r.width=n.width,r.height=n.height,r.isPrimary=n.isPrimary,r.pointerType=n.pointerType,r.pressure=n.pressure,r.tangentialPressure=n.tangentialPressure,r.tiltX=n.tiltX,r.tiltY=n.tiltY,r.twist=n.twist}},{key:"copyMouseData",value:function(n,r){r.altKey=n.altKey,r.button=n.button,r.buttons=n.buttons,r.ctrlKey=n.ctrlKey,r.metaKey=n.metaKey,r.shiftKey=n.shiftKey,r.client.copyFrom(n.client),r.movement.copyFrom(n.movement),r.canvas.copyFrom(n.canvas),r.screen.copyFrom(n.screen),r.global.copyFrom(n.global),r.offset.copyFrom(n.offset)}},{key:"copyWheelData",value:function(n,r){r.deltaMode=n.deltaMode,r.deltaX=n.deltaX,r.deltaY=n.deltaY,r.deltaZ=n.deltaZ}},{key:"copyData",value:function(n,r){r.isTrusted=n.isTrusted,r.timeStamp=Ym.now(),r.type=n.type,r.detail=n.detail,r.view=n.view,r.page.copyFrom(n.page),r.viewport.copyFrom(n.viewport)}},{key:"allocateEvent",value:function(n){this.eventPool.has(n)||this.eventPool.set(n,[]);var r=this.eventPool.get(n).pop()||new n(this);return r.eventPhase=r.NONE,r.currentTarget=null,r.path=[],r.target=null,r}},{key:"freeEvent",value:function(n){if(n.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var r=n.constructor;this.eventPool.has(r)||this.eventPool.set(r,[]),this.eventPool.get(r).push(n)}},{key:"notifyTarget",value:function(n,r){var i;r=(i=r)!==null&&i!==void 0?i:n.type;var a=n.eventPhase===n.CAPTURING_PHASE||n.eventPhase===n.AT_TARGET?"".concat(r,"capture"):r;this.notifyListeners(n,a),n.eventPhase===n.AT_TARGET&&this.notifyListeners(n,r)}},{key:"notifyListeners",value:function(n,r){var i=n.currentTarget.emitter,a=i._events[r];if(a)if("fn"in a)a.once&&i.removeListener(r,a.fn,void 0,!0),a.fn.call(n.currentTarget||a.context,n);else for(var o=0;o<a.length&&!n.propagationImmediatelyStopped;o++)a[o].once&&i.removeListener(r,a[o].fn,void 0,!0),a[o].fn.call(n.currentTarget||a[o].context,n)}},{key:"findMountedTarget",value:function(n){if(!n)return null;for(var r=n[n.length-1],i=n.length-2;i>=0;i--){var a=n[i];if(a===this.rootTarget||Ft.isNode(a)&&a.parentNode===r)r=n[i];else break}return r}},{key:"getCursor",value:function(n){for(var r=n;r;){var i=hH(r)&&r.getAttribute("cursor");if(i)return i;r=Ft.isNode(r)&&r.parentNode}}}])}(),Xm=function(){function e(){J(this,e)}return ee(e,[{key:"getOrCreateCanvas",value:function(n,r){if(this.canvas)return this.canvas;if(n||te.offscreenCanvas)this.canvas=n||te.offscreenCanvas,this.context=this.canvas.getContext("2d",Te({willReadFrequently:!0},r));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",Te({willReadFrequently:!0},r)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",Te({willReadFrequently:!0},r))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(n,r){return this.context?this.context:(this.getOrCreateCanvas(n,r),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(n){}try{return document.createElement("canvas")}catch(n){}return null}}])}(),Vl=function(e){return e[e.CAMERA_CHANGED=0]="CAMERA_CHANGED",e[e.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",e[e.NONE=2]="NONE",e}({}),QH=function(){function e(t,n){J(this,e),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ir,initAsync:new PH,dirtycheck:new Gm,cull:new Gm,beginFrame:new ir,beforeRender:new ir,render:new ir,afterRender:new ir,endFrame:new ir,destroy:new ir,pick:new CH,pickSync:new Gm,pointerDown:new ir,pointerUp:new ir,pointerMove:new ir,pointerOut:new ir,pointerOver:new ir,pointerWheel:new ir,pointerCancel:new ir,click:new ir},this.globalRuntime=t,this.context=n}return ee(e,[{key:"init",value:function(n){var r=this,i=Te(Te({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,r.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,n()):this.hooks.initAsync.promise().then(function(){r.inited=!0,n()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var n=this.context.config.renderer,r=n.getConfig(),i=r.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(Vl.CAMERA_CHANGED)}},{key:"render",value:function(n,r,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var o=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(o.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),o.renderReasons.size&&this.inited){o.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var s=o.renderReasons.size===1&&o.renderReasons.has(Vl.CAMERA_CHANGED),l=!n.disableRenderHooks||!(n.disableRenderHooks&&s);l&&this.renderDisplayObject(o.root,n,o),this.hooks.beginFrame.call(r),l&&o.renderListCurrentFrame.forEach(function(c){a.hooks.beforeRender.call(c),a.hooks.render.call(c),a.hooks.afterRender.call(c)}),this.hooks.endFrame.call(r),o.renderListCurrentFrame=[],o.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(n,r,i){var a=this,o=r.renderer.getConfig(),s=o.enableDirtyCheck,l=o.enableCulling;function c(p){var v=p.renderable,g=p.sortable,y=s?v.dirty||i.dirtyRectangleRenderingDisabled?p:null:p;if(y){var m=l?a.hooks.cull.call(y,a.context.camera):y;m&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(m))}v.dirty=!1,g.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,g.dirty&&(a.sort(p,g),g.dirty=!1,g.dirtyChildren=[],g.dirtyReason=void 0)}for(var u=[n];u.length>0;){var f=u.pop();c(f);for(var d=f.sortable.sorted||f.childNodes,h=d.length-1;h>=0;h--)u.push(d[h])}}},{key:"sort",value:function(n,r){r.sorted&&r.dirtyReason!==tp.Z_INDEX_CHANGED?r.dirtyChildren.forEach(function(i){var a=n.childNodes.indexOf(i);if(a===-1){var o=r.sorted.indexOf(i);o>=0&&r.sorted.splice(o,1)}else if(r.sorted.length===0)r.sorted.push(i);else{var s=pH(r.sorted,i);r.sorted.splice(s,0,i)}}):r.sorted=n.childNodes.slice().sort(WM)}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(Vl.DISPLAY_OBJECT_CHANGED)}}])}(),JH=/\[\s*(.*)=(.*)\s*\]/,eV=function(){function e(){J(this,e)}return ee(e,[{key:"selectOne",value:function(n,r){var i=this;if(n.startsWith("."))return r.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(n))>-1});if(n.startsWith("#"))return r.find(function(l){return l.id===i.getIdOrClassname(n)});if(n.startsWith("[")){var a=this.getAttribute(n),o=a.name,s=a.value;return o?r.find(function(l){return r!==l&&(o==="name"?l.name===s:i.attributeToString(l,o)===s)}):null}return r.find(function(l){return r!==l&&l.nodeName===n})}},{key:"selectAll",value:function(n,r){var i=this;if(n.startsWith("."))return r.findAll(function(l){return r!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(n))>-1});if(n.startsWith("#"))return r.findAll(function(l){return r!==l&&l.id===i.getIdOrClassname(n)});if(n.startsWith("[")){var a=this.getAttribute(n),o=a.name,s=a.value;return o?r.findAll(function(l){return r!==l&&(o==="name"?l.name===s:i.attributeToString(l,o)===s)}):[]}return r.findAll(function(l){return r!==l&&l.nodeName===n})}},{key:"is",value:function(n,r){if(n.startsWith("."))return r.className===this.getIdOrClassname(n);if(n.startsWith("#"))return r.id===this.getIdOrClassname(n);if(n.startsWith("[")){var i=this.getAttribute(n),a=i.name,o=i.value;return a==="name"?r.name===o:this.attributeToString(r,a)===o}return r.nodeName===n}},{key:"getIdOrClassname",value:function(n){return n.substring(1)}},{key:"getAttribute",value:function(n){var r=n.match(JH),i="",a="";return r&&r.length>2&&(i=r[1].replace(/"/g,""),a=r[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(n,r){if(!n.getAttribute)return"";var i=n.getAttribute(r);return nn(i)?"":i.toString?i.toString():""}}])}(),je=function(e){return e.ATTR_MODIFIED="DOMAttrModified",e.INSERTED="DOMNodeInserted",e.MOUNTED="DOMNodeInsertedIntoDocument",e.REMOVED="removed",e.UNMOUNTED="DOMNodeRemovedFromDocument",e.REPARENT="reparent",e.DESTROY="destroy",e.BOUNDS_CHANGED="bounds-changed",e.CULLED="culled",e}({}),ea=function(e){function t(n,r,i,a,o,s,l,c){var u;return J(this,t),u=Le(this,t,[null]),u.relatedNode=r,u.prevValue=i,u.newValue=a,u.attrName=o,u.attrChange=s,u.prevParsedValue=l,u.newParsedValue=c,u.type=n,u}return Ne(t,e),ee(t)}(cp);ea.ADDITION=2,ea.MODIFICATION=1,ea.REMOVAL=3;function nA(e){var t=e.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var tV=new ea(je.REPARENT,null,"","","",0,"",""),nV=gy(),up=Ye(),rV=Xe(1,1,1),iV=it(),aV=gy(),xo=Ye(),Ul=it(),wo=mn(),oV=Ye(),sV=mn(),lV=Ye(),Ku=Ye(),As=Ye(),fp=it(),rA=mn(),iA=mn(),dp=mn(),qm={affectChildren:!0},cV=function(){function e(t){J(this,e),this.pendingEvents=new Map,this.boundsChangedEvent=new dt(je.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}return ee(e,[{key:"matches",value:function(n,r){return this.runtime.sceneGraphSelector.is(n,r)}},{key:"querySelector",value:function(n,r){return this.runtime.sceneGraphSelector.selectOne(n,r)}},{key:"querySelectorAll",value:function(n,r){return this.runtime.sceneGraphSelector.selectAll(n,r)}},{key:"attach",value:function(n,r,i){var a,o=!1;n.parentNode&&(o=n.parentNode!==r,this.detach(n));var s=n.nodeName===U.FRAGMENT,l=lp(r);n.parentNode=r;var c=s?n.childNodes:[n];po(i)?c.forEach(function(h){r.childNodes.splice(i,0,h),h.parentNode=r}):c.forEach(function(h){r.childNodes.push(h),h.parentNode=r});var u=r,f=u.sortable;if((f!=null&&(a=f.sorted)!==null&&a!==void 0&&a.length||n.parsedStyle.zIndex)&&(f.dirtyChildren.indexOf(n)===-1&&f.dirtyChildren.push(n),f.dirty=!0,f.dirtyReason=tp.ADDED),!l){if(s)this.dirtifyFragment(n);else{var d=n.transformable;d&&this.dirtifyWorld(n,d)}o&&n.dispatchEvent(tV)}}},{key:"detach",value:function(n){if(n.parentNode){var r,i,a=n.transformable,o=n.parentNode,s=o.sortable;(s!=null&&(r=s.sorted)!==null&&r!==void 0&&r.length||(i=n.style)!==null&&i!==void 0&&i.zIndex)&&(s.dirtyChildren.indexOf(n)===-1&&s.dirtyChildren.push(n),s.dirty=!0,s.dirtyReason=tp.REMOVED);var l=n.parentNode.childNodes.indexOf(n);l>-1&&n.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(n,a),n.parentNode=null}}},{key:"getOrigin",value:function(n){return n.getGeometryBounds(),n.transformable.origin}},{key:"setOrigin",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=[r,i,a]);var o=n.transformable;if(!(r[0]===o.origin[0]&&r[1]===o.origin[1]&&r[2]===o.origin[2])){var s=o.origin;s[0]=r[0],s[1]=r[1],s[2]=r[2]||0,this.dirtifyLocal(n,o)}}},{key:"rotate",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=Xe(r,i,a));var o=n.transformable;if(n.parentNode===null||!n.parentNode.transformable)this.rotateLocal(n,r);else{var s=wo;ch(s,r[0],r[1],r[2]);var l=this.getRotation(n),c=this.getRotation(n.parentNode);uh(dp,c),vy(dp,dp),ao(s,dp,s),ao(o.localRotation,s,l),fh(o.localRotation,o.localRotation),this.dirtifyLocal(n,o)}}},{key:"rotateLocal",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=Xe(r,i,a));var o=n.transformable;ch(iA,r[0],r[1],r[2]),rS(o.localRotation,o.localRotation,iA),this.dirtifyLocal(n,o)}},{key:"setEulerAngles",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=Xe(r,i,a));var o=n.transformable;if(n.parentNode===null||!n.parentNode.transformable)this.setLocalEulerAngles(n,r);else{ch(o.localRotation,r[0],r[1],r[2]);var s=this.getRotation(n.parentNode);uh(rA,vy(wo,s)),rS(o.localRotation,o.localRotation,rA),this.dirtifyLocal(n,o)}}},{key:"setLocalEulerAngles",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof r=="number"&&(r=Xe(r,i,a));var s=n.transformable;ch(s.localRotation,r[0],r[1],r[2]),o&&this.dirtifyLocal(n,s)}},{key:"translateLocal",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=Xe(r,i,a));var o=n.transformable;pu(r,up)||(Mz(r,r,o.localRotation),ro(o.localPosition,o.localPosition,r),this.dirtifyLocal(n,o))}},{key:"setPosition",value:function(n,r){var i,a=n.transformable;if(As[0]=r[0],As[1]=r[1],As[2]=(i=r[2])!==null&&i!==void 0?i:0,!pu(this.getPosition(n),As)){if(Wi(a.position,As),n.parentNode===null||!n.parentNode.transformable)Wi(a.localPosition,As);else{var o=n.parentNode.transformable;bl(fp,o.worldTransform),Oi(fp,fp),zt(a.localPosition,As,fp)}this.dirtifyLocal(n,a)}}},{key:"setLocalPosition",value:function(n,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=n.transformable;Ku[0]=r[0],Ku[1]=r[1],Ku[2]=(i=r[2])!==null&&i!==void 0?i:0,!pu(o.localPosition,Ku)&&(Wi(o.localPosition,Ku),a&&this.dirtifyLocal(n,o))}},{key:"scaleLocal",value:function(n,r){var i,a=n.transformable;_z(a.localScale,a.localScale,Wn(xo,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(n,a)}},{key:"setLocalScale",value:function(n,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=n.transformable;Wn(xo,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:o.localScale[2]),!pu(xo,o.localScale)&&(Wi(o.localScale,xo),a&&this.dirtifyLocal(n,o))}},{key:"translate",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=Wn(xo,r,i,a)),!pu(r,up)&&(ro(xo,this.getPosition(n),r),this.setPosition(n,xo))}},{key:"setRotation",value:function(n,r,i,a,o){var s=n.transformable;if(typeof r=="number"&&(r=Nz(r,i,a,o)),n.parentNode===null||!n.parentNode.transformable)this.setLocalRotation(n,r);else{var l=this.getRotation(n.parentNode);uh(wo,l),vy(wo,wo),ao(s.localRotation,wo,r),fh(s.localRotation,s.localRotation),this.dirtifyLocal(n,s)}}},{key:"setLocalRotation",value:function(n,r,i,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof r=="number"&&(r=nS(wo,r,i,a,o));var l=n.transformable;uh(l.localRotation,r),s&&this.dirtifyLocal(n,l)}},{key:"setLocalSkew",value:function(n,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof r=="number"&&(r=jz(aV,r,i));var o=n.transformable;Iz(o.localSkew,r),a&&this.dirtifyLocal(n,o)}},{key:"dirtifyLocal",value:function(n,r){lp(n)||r.localDirtyFlag||(r.localDirtyFlag=!0,r.dirtyFlag||this.dirtifyWorld(n,r))}},{key:"dirtifyWorld",value:function(n,r){r.dirtyFlag||this.unfreezeParentToRoot(n),this.dirtifyWorldInternal(n,r),this.dirtifyToRoot(n,!0)}},{key:"dirtifyFragment",value:function(n){var r=n.transformable;r&&(r.frozen=!1,r.dirtyFlag=!0,r.localDirtyFlag=!0);var i=n.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=n.childNodes.length,o=0;o<a;o++)this.dirtifyFragment(n.childNodes[o]);n.nodeName===U.FRAGMENT&&this.pendingEvents.set(n,!1)}},{key:"triggerPendingEvents",value:function(){var n=this,r=new Set,i=function(o,s){!o.isConnected||r.has(o)||o.nodeName===U.FRAGMENT||(n.boundsChangedEvent.detail=s,n.boundsChangedEvent.target=o,o.isMutationObserved?o.dispatchEvent(n.boundsChangedEvent):o.ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),r.add(o))};this.pendingEvents.forEach(function(a,o){o.nodeName!==U.FRAGMENT&&(qm.affectChildren=a,a?o.forEach(function(s){i(s,qm)}):i(o,qm))}),r.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n;for(i.renderable&&(i.renderable.dirty=!0);i;)nA(i),i=i.parentNode;r&&n.forEach(function(a){nA(a)}),this.informDependentDisplayObjects(n),this.pendingEvents.set(n,r)}},{key:"updateDisplayObjectDependency",value:function(n,r,i,a){if(r&&r!==i){var o=this.displayObjectDependencyMap.get(r);if(o&&o[n]){var s=o[n].indexOf(a);o[n].splice(s,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[n]||(l[n]=[]),l[n].push(a)}}},{key:"informDependentDisplayObjects",value:function(n){var r=this,i=this.displayObjectDependencyMap.get(n);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(o){r.dirtifyToRoot(o,!0),o.dispatchEvent(new ea(je.ATTR_MODIFIED,o,r,r,a,ea.MODIFICATION,r,r)),o.isCustomElement&&o.isConnected&&o.attributeChangedCallback&&o.attributeChangedCallback(a,r,r)})})}},{key:"getPosition",value:function(n){var r=n.transformable;return ah(r.position,this.getWorldTransform(n,r))}},{key:"getRotation",value:function(n){var r=n.transformable;return oh(r.rotation,this.getWorldTransform(n,r))}},{key:"getScale",value:function(n){var r=n.transformable;return wl(r.scaling,this.getWorldTransform(n,r))}},{key:"getWorldTransform",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.transformable;return!r.localDirtyFlag&&!r.dirtyFlag||(n.parentNode&&n.parentNode.transformable&&this.getWorldTransform(n.parentNode),this.sync(n,r)),r.worldTransform}},{key:"getLocalPosition",value:function(n){return n.transformable.localPosition}},{key:"getLocalRotation",value:function(n){return n.transformable.localRotation}},{key:"getLocalScale",value:function(n){return n.transformable.localScale}},{key:"getLocalSkew",value:function(n){return n.transformable.localSkew}},{key:"calcLocalTransform",value:function(n){var r=n.localSkew[0]!==0||n.localSkew[1]!==0;if(r){hu(n.localTransform,n.localRotation,n.localPosition,Xe(1,1,1),n.origin),(n.localSkew[0]!==0||n.localSkew[1]!==0)&&(to(Ul),Ul[4]=Math.tan(n.localSkew[0]),Ul[1]=Math.tan(n.localSkew[1]),Yn(n.localTransform,n.localTransform,Ul));var i=hu(Ul,nS(wo,0,0,0,1),Wn(xo,1,1,1),n.localScale,n.origin);Yn(n.localTransform,n.localTransform,i)}else{var a=n.localTransform,o=n.localPosition,s=n.localRotation,l=n.localScale,c=n.origin,u=o[0]!==0||o[1]!==0||o[2]!==0,f=s[3]!==1||s[0]!==0||s[1]!==0||s[2]!==0,d=l[0]!==1||l[1]!==1||l[2]!==1,h=c[0]!==0||c[1]!==0||c[2]!==0;!f&&!d&&!h?u?wa(a,o):to(a):hu(a,s,o,l,c)}}},{key:"getLocalTransform",value:function(n){var r=n.transformable;return r.localDirtyFlag&&(this.calcLocalTransform(r),r.localDirtyFlag=!1),r.localTransform}},{key:"setLocalTransform",value:function(n,r){var i=ah(oV,r),a=oh(sV,r),o=wl(lV,r);this.setLocalScale(n,o,!1),this.setLocalPosition(n,i,!1),this.setLocalRotation(n,a,void 0,void 0,void 0,!1),this.dirtifyLocal(n,n.transformable)}},{key:"resetLocalTransform",value:function(n){this.setLocalScale(n,rV,!1),this.setLocalPosition(n,up,!1),this.setLocalEulerAngles(n,up,void 0,void 0,!1),this.setLocalSkew(n,nV,void 0,!1),this.dirtifyLocal(n,n.transformable)}},{key:"getTransformedGeometryBounds",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(n,r);if(!rn.isEmpty(a)){var o=i||new rn;return o.setFromTransformedAABB(a,this.getWorldTransform(n)),o}return null}},{key:"getGeometryBounds",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=n,a=i.geometry;a.dirty&&te.styleValueRegistry.updateGeometry(n);var o=r?a.renderBounds:a.contentBounds||null;return o||new rn}},{key:"getBounds",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=n,o=a.renderable;if(!o.boundsDirty&&!i&&o.bounds)return o.bounds;if(!o.renderBoundsDirty&&i&&o.renderBounds)return o.renderBounds;var s=i?o.renderBounds:o.bounds,l=this.getTransformedGeometryBounds(n,i,s),c=n.childNodes;if(c.forEach(function(d){var h=r.getBounds(d,i);h&&(l?l.add(h):(l=s||new rn,l.update(h.center,h.halfExtents)))}),l||(l=new rn),i){var u=GM(n);if(u){var f=u.parsedStyle.clipPath.getBounds(i);l?f&&(l=f.intersection(l)):l.update(f.center,f.halfExtents)}}return i?(o.renderBounds=l,o.renderBoundsDirty=!1):(o.bounds=l,o.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(n){if(n.parentNode){var r=iV;n.parentNode.transformable&&(r=Oi(Ul,this.getWorldTransform(n.parentNode)));var i=this.getBounds(n);if(!rn.isEmpty(i)){var a=new rn;return a.setFromTransformedAABB(i,r),a}}return this.getBounds(n)}},{key:"getBoundingClientRect",value:function(n){var r,i,a=this.getGeometryBounds(n);rn.isEmpty(a)||(i=new rn,i.setFromTransformedAABB(a,this.getWorldTransform(n)));var o=(r=n.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var s=i.getMin(),l=Ce(s,2),c=l[0],u=l[1],f=i.getMax(),d=Ce(f,2),h=d[0],p=d[1];return new Bl(c+((o==null?void 0:o.left)||0),u+((o==null?void 0:o.top)||0),h-c,p-u)}return new Bl((o==null?void 0:o.left)||0,(o==null?void 0:o.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(n,r){var i=this;if(!r.dirtyFlag){r.dirtyFlag=!0,r.frozen=!1,n.childNodes.forEach(function(s){var l=s.transformable;l.dirtyFlag||i.dirtifyWorldInternal(s,l)});var a=n,o=a.renderable;o&&(o.renderBoundsDirty=!0,o.boundsDirty=!0,o.dirty=!0)}}},{key:"syncHierarchy",value:function(n){var r=n.transformable;if(!r.frozen){r.frozen=!0,(r.localDirtyFlag||r.dirtyFlag)&&this.sync(n,r);for(var i=n.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(n,r){if(r.localDirtyFlag&&(this.calcLocalTransform(r),r.localDirtyFlag=!1),r.dirtyFlag){var i=n.parentNode,a=i&&i.transformable;i===null||!a?bl(r.worldTransform,r.localTransform):Yn(r.worldTransform,a.worldTransform,r.localTransform),r.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(n){for(var r=n.parentNode;r;){var i=r.transformable;i&&(i.frozen=!1),r=r.parentNode}}}])}(),Ps={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},aA=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,uV=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,fV=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,dV=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,hV=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,pV=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,vV=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,gV=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,yV=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,mV=new RegExp("".concat(uV.source,"|").concat(dV.source,"|").concat(pV.source,"|").concat(gV.source)),bV=new RegExp("".concat(fV.source,"|").concat(hV.source,"|").concat(vV.source,"|").concat(yV.source)),xV=function(){function e(t){var n=this;J(this,e),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(bV.exec(i)||mV.exec(r)))},this.trimByKinsokuShorui=function(r){var i=vt(r),a=i[i.length-2];if(!a)return r;var o=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=o+i[i.length-1],i},this.runtime=t}return ee(e,[{key:"measureFont",value:function(n,r){if(this.fontMetricsCache[n])return this.fontMetricsCache[n];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(r),o=this.runtime.offscreenCanvasCreator.getOrCreateContext(r,{willReadFrequently:!0});o.font=n;var s=Ps.MetricsString+Ps.BaselineSymbol,l=Math.ceil(o.measureText(s).width),c=Math.ceil(o.measureText(Ps.BaselineSymbol).width),u=Ps.HeightMultiplier*c;c=c*Ps.BaselineMultiplier|0,a.width=l,a.height=u,o.fillStyle="#f00",o.fillRect(0,0,l,u),o.font=n,o.textBaseline="alphabetic",o.fillStyle="#000",o.fillText(s,0,c);var f=o.getImageData(0,0,l||1,u||1).data,d=f.length,h=l*4,p=0,v=0,g=!1;for(p=0;p<c;++p){for(var y=0;y<h;y+=4)if(f[v+y]!==255){g=!0;break}if(!g)v+=h;else break}for(i.ascent=c-p,v=d-h,g=!1,p=u;p>c;--p){for(var m=0;m<h;m+=4)if(f[v+m]!==255){g=!0;break}if(!g)v-=h;else break}return i.descent=p-c,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[n]=i,i}},{key:"measureText",value:function(n,r,i){var a=r.fontSize,o=a===void 0?16:a,s=r.wordWrap,l=s===void 0?!1:s,c=r.lineHeight,u=r.lineWidth,f=u===void 0?1:u,d=r.textBaseline,h=d===void 0?"alphabetic":d,p=r.textAlign,v=p===void 0?"start":p,g=r.letterSpacing,y=g===void 0?0:g,m=r.textPath;r.textPathSide,r.textPathStartOffset;var b=r.leading,x=b===void 0?0:b,w=NH(r),O=this.measureFont(w,i);O.fontSize===0&&(O.fontSize=o,O.ascent=o);var _=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);_.font=w,r.isOverflowing=!1;var S=l?this.wordWrap(n,r,i):n,k=S.split(/(?:\r\n|\r|\n)/),E=new Array(k.length),M=0;if(m){m.getTotalLength();for(var P=0;P<k.length;P++)_.measureText(k[P]).width+(k[P].length-1)*y}else{for(var A=0;A<k.length;A++){var L=_.measureText(k[A]).width+(k[A].length-1)*y;E[A]=L,M=Math.max(M,L)}var N=M+f,T=c||O.fontSize+f,I=Math.max(T,O.fontSize+f)+(k.length-1)*(T+x);T+=x;var C=0;return h==="middle"?C=-I/2:h==="bottom"||h==="alphabetic"||h==="ideographic"?C=-I:(h==="top"||h==="hanging")&&(C=0),{font:w,width:N,height:I,lines:k,lineWidths:E,lineHeight:T,maxLineWidth:M,fontProperties:O,lineMetrics:E.map(function(j,D){var F=0;return v==="center"||v==="middle"?F-=j/2:(v==="right"||v==="end")&&(F-=j),new Bl(F-f/2,C+D*T,j+f,T)})}}}},{key:"wordWrap",value:function(n,r,i){var a=this,o=r.wordWrapWidth,s=o===void 0?0:o,l=r.letterSpacing,c=l===void 0?0:l,u=r.maxLines,f=u===void 0?1/0:u,d=r.textOverflow,h=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),p=s+c,v="";d==="ellipsis"?v="...":d&&d!=="clip"&&(v=d);var g=[],y=0,m=0,b={},x=function(L){return a.getFromCache(L,c,b,h)},w=Array.from(v).reduce(function(A,L){return A+x(L)},0);function O(A){if(!(w<=0||w>p)){for(var L=g[A]?g[A].length:0,N=0,T=L,I=0;I<L;I++){var C=x(g[A][I]);if(N+C+w>p){T=I;break}N+=C}g[A]=(g[A]||"").slice(0,T)+v}}for(var _=Array.from(n),S=0;S<_.length;S++){var k=_[S],E=n[S-1],M=n[S+1],P=x(k);if(this.isNewline(k)){if(y++,y>=f){r.isOverflowing=!0,S<_.length-1&&O(y-1);break}m=0,g[y]="";continue}if(m>0&&m+P>p){if(y+1>=f){r.isOverflowing=!0,O(y);break}if(y++,m=0,g[y]="",this.isBreakingSpace(k))continue;this.canBreakInLastChar(k)||(g=this.trimToBreakable(g),m=this.sumTextWidthByCache(g[y]||"",b)),this.shouldBreakByKinsokuShorui(k,M)&&(g=this.trimByKinsokuShorui(g),m+=x(E||""))}m+=P,g[y]=(g[y]||"")+k}return g.join(`
37
+ `)}},{key:"isBreakingSpace",value:function(n){return typeof n!="string"?!1:Ps.BreakingSpaces.indexOf(n.charCodeAt(0))>=0}},{key:"isNewline",value:function(n){return typeof n!="string"?!1:Ps.Newlines.indexOf(n.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(n){var r=vt(n),i=r[r.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return r;var o=i.slice(a,a+1),s=this.isBreakingSpace(o),l=a+1,c=a+(s?0:1);return r[r.length-1]+=i.slice(l,i.length),r[r.length-2]=i.slice(0,c),r}},{key:"canBreakInLastChar",value:function(n){return!(n&&aA.test(n))}},{key:"sumTextWidthByCache",value:function(n,r){return n.split("").reduce(function(i,a){if(!r[a])throw Error("cannot count the word without cache");return i+r[a]},0)}},{key:"findBreakableIndex",value:function(n){for(var r=n.length-1;r>=0;r--)if(!aA.test(n[r]))return r;return-1}},{key:"getFromCache",value:function(n,r,i,a){var o=i[n];if(typeof o!="number"){var s=n.length*r;o=a.measureText(n).width+s,i[n]=o}return o}}])}(),te={},wV=function(e){var t=new VH,n=new HH;return e={},de(de(de(de(de(de(de(de(de(de(e,U.FRAGMENT,null),U.CIRCLE,new BH),U.ELLIPSE,new YH),U.RECT,t),U.IMAGE,t),U.GROUP,new XH),U.LINE,new WH),U.TEXT,new UH(te)),U.POLYLINE,n),U.POLYGON,n),de(de(de(e,U.PATH,new GH),U.HTML,new qH),U.MESH,null)}(),OV=function(e){var t=new JG,n=new $m;return e={},de(de(de(de(de(de(de(de(de(de(e,ce.PERCENTAGE,null),ce.NUMBER,new iH),ce.ANGLE,new ZG),ce.DEFINED_PATH,new QG),ce.PAINT,t),ce.COLOR,t),ce.FILTER,new eH),ce.LENGTH,n),ce.LENGTH_PERCENTAGE,n),ce.LENGTH_PERCENTAGE_12,new tH),de(de(de(de(de(de(de(de(de(de(e,ce.LENGTH_PERCENTAGE_14,new nH),ce.COORDINATE,new $m),ce.OFFSET_DISTANCE,new aH),ce.OPACITY_VALUE,new oH),ce.PATH,new sH),ce.LIST_OF_POINTS,new lH),ce.SHADOW_BLUR,new cH),ce.TEXT,new uH),ce.TEXT_TRANSFORM,new fH),ce.TRANSFORM,new RH),de(de(de(e,ce.TRANSFORM_ORIGIN,new $H),ce.Z_INDEX,new zH),ce.MARKER,new rH)}(),_V=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}};te.CameraContribution=hM,te.AnimationTimeline=null,te.EasingFunction=null,te.offscreenCanvasCreator=new Xm,te.sceneGraphSelector=new eV,te.sceneGraphService=new cV(te),te.textService=new xV(te),te.geometryUpdaterFactory=wV,te.CSSPropertySyntaxFactory=OV,te.styleValueRegistry=new qG(te),te.layoutRegistry=null,te.globalThis=_V(),te.enableStyleSyntax=!0,te.enableSizeAttenuation=!1;var SV=0,Km=new ea(je.INSERTED,null,"","","",0,"",""),Zm=new ea(je.REMOVED,null,"","","",0,"",""),oA=new dt(je.DESTROY),kV=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.entity=SV++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:zW.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},n.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},n.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},n.rBushNode={aabb:void 0},n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle={},n.parsedStyle={},n.attributes={},n}return Ne(t,e),ee(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(r){this.setAttribute("class",r)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(r){return r!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r-1]||null}return null}},{key:"cloneNode",value:function(r){throw new Error(lt)}},{key:"appendChild",value:function(r,i){var a;if(r.destroyed)throw new Error(PW);return te.sceneGraphService.attach(r,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!lp(this)&&r.nodeName===U.FRAGMENT?this.ownerDocument.defaultView.mountFragment(r):this.ownerDocument.defaultView.mountChildren(r)),this.isMutationObserved&&(Km.relatedNode=this,r.dispatchEvent(Km)),r}},{key:"insertBefore",value:function(r,i){if(!i)this.appendChild(r);else{r.parentElement&&r.parentElement.removeChild(r);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(r):this.appendChild(r,a)}return r}},{key:"replaceChild",value:function(r,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(r,a),i}},{key:"removeChild",value:function(r){var i;return Zm.relatedNode=this,r.dispatchEvent(Zm),(i=r.ownerDocument)!==null&&i!==void 0&&i.defaultView&&r.ownerDocument.defaultView.unmountChildren(r),te.sceneGraphService.detach(r),r}},{key:"removeChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(r){return te.sceneGraphService.matches(r,this)}},{key:"getElementById",value:function(r){return te.sceneGraphService.querySelector("#".concat(r),this)}},{key:"getElementsByName",value:function(r){return te.sceneGraphService.querySelectorAll('[name="'.concat(r,'"]'),this)}},{key:"getElementsByClassName",value:function(r){return te.sceneGraphService.querySelectorAll(".".concat(r),this)}},{key:"getElementsByTagName",value:function(r){return te.sceneGraphService.querySelectorAll(r,this)}},{key:"querySelector",value:function(r){return te.sceneGraphService.querySelector(r,this)}},{key:"querySelectorAll",value:function(r){return te.sceneGraphService.querySelectorAll(r,this)}},{key:"closest",value:function(r){var i=this;do{if(te.sceneGraphService.matches(r,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(r){var i=this,a=null;return this.forEach(function(o){return o!==i&&r(o)?(a=o,!1):!0}),a}},{key:"findAll",value:function(r){var i=this,a=[];return this.forEach(function(o){o!==i&&r(o)&&a.push(o)}),a}},{key:"after",value:function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];o.forEach(function(l,c){var u;return(u=r.parentNode)===null||u===void 0?void 0:u.appendChild(l,i+c+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var r,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var l=o[0],c=o.slice(1);this.parentNode.appendChild(l,i),(r=l).after.apply(r,vt(c))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a.forEach(function(s){return r.appendChild(s)})}},{key:"prepend",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a.forEach(function(s,l){return r.appendChild(s,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(oA),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return te.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return te.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return te.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return te.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return te.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(r){if(typeof r!="symbol"){var i=this.attributes[r];return i}}},{key:"hasAttribute",value:function(r){return this.getAttributeNames().includes(r)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(r){this.setAttribute(r,null),delete this.attributes[r]}},{key:"setAttribute",value:function(r,i,a,o){this.attributes[r]=i}},{key:"getAttributeNS",value:function(r,i){throw new Error(lt)}},{key:"getAttributeNode",value:function(r){throw new Error(lt)}},{key:"getAttributeNodeNS",value:function(r,i){throw new Error(lt)}},{key:"hasAttributeNS",value:function(r,i){throw new Error(lt)}},{key:"removeAttributeNS",value:function(r,i){throw new Error(lt)}},{key:"removeAttributeNode",value:function(r){throw new Error(lt)}},{key:"setAttributeNS",value:function(r,i,a){throw new Error(lt)}},{key:"setAttributeNode",value:function(r){throw new Error(lt)}},{key:"setAttributeNodeNS",value:function(r){throw new Error(lt)}},{key:"toggleAttribute",value:function(r,i){throw new Error(lt)}}])}(Ft);function Ue(e){return!!(e!=null&&e.nodeName)}var EV=te.globalThis.Proxy?te.globalThis.Proxy:function(){},ta=new ea(je.ATTR_MODIFIED,null,null,null,null,ea.MODIFICATION,null,null),Zu=Ye(),MV=mn(),xt=function(e){function t(n){var r;return J(this,t),r=Le(this,t),r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.config=n,r.id=n.id||"",r.name=n.name||"",(n.className||n.class)&&(r.className=n.className||n.class),r.nodeName=n.type||U.GROUP,n.initialParsedStyle&&Object.assign(r.parsedStyle,n.initialParsedStyle),r.initAttributes(n.style),te.enableStyleSyntax&&(r.style=new EV({setProperty:function(a,o){r.setAttribute(a,o)},getPropertyValue:function(a){return r.getAttribute(a)},removeProperty:function(a){r.removeAttribute(a)},item:function(){return""}},{get:function(a,o){return a[o]!==void 0?a[o]:r.getAttribute(o)},set:function(a,o,s){return r.setAttribute(o,s),!0}})),r}return Ne(t,e),ee(t,[{key:"destroy",value:function(){RE(t,"destroy",this)([]),this.getAnimations().forEach(function(r){r.cancel()})}},{key:"cloneNode",value:function(r,i){var a=Te({},this.attributes);for(var o in a){var s=a[o];Ue(s)&&o!=="clipPath"&&o!=="offsetPath"&&o!=="textPath"&&(a[o]=s.cloneNode(r)),i&&(a[o]=i(o,s))}var l=new this.constructor(Te(Te({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),r&&this.children.forEach(function(c){if(!c.style.isMarker){var u=c.cloneNode(r);l.appendChild(u)}}),l}},{key:"initAttributes",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};te.styleValueRegistry.processProperties(this,r,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;Dt(i)||(a||i!==this.attributes[r])&&(this.internalSetAttribute(r,i,{memoize:o}),RE(t,"setAttribute",this)([r,i]))}},{key:"internalSetAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.renderable,s=this.attributes[r],l=this.parsedStyle[r];te.styleValueRegistry.processProperties(this,de({},r,i),a),o.dirty=!0;var c=this.parsedStyle[r];if(this.isConnected&&(ta.relatedNode=this,ta.prevValue=s,ta.newValue=i,ta.attrName=r,ta.prevParsedValue=l,ta.newParsedValue=c,this.isMutationObserved?this.dispatchEvent(ta):(ta.target=this,this.ownerDocument.defaultView.dispatchEvent(ta,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var u,f;(u=(f=this).attributeChangedCallback)===null||u===void 0||u.call(f,r,s,i,l,c)}}},{key:"getBBox",value:function(){var r=this.getBounds(),i=r.getMin(),a=Ce(i,2),o=a[0],s=a[1],l=r.getMax(),c=Ce(l,2),u=c[0],f=c[1];return new Bl(o,s,u-o,f-s)}},{key:"setOrigin",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return te.sceneGraphService.setOrigin(this,nr(r,i,a,!1)),this}},{key:"getOrigin",value:function(){return te.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return te.sceneGraphService.setPosition(this,nr(r,i,a,!1)),this}},{key:"setLocalPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return te.sceneGraphService.setLocalPosition(this,nr(r,i,a,!1)),this}},{key:"translate",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return te.sceneGraphService.translate(this,nr(r,i,a,!1)),this}},{key:"translateLocal",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return te.sceneGraphService.translateLocal(this,nr(r,i,a,!1)),this}},{key:"getPosition",value:function(){return te.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return te.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(r,i,a){return this.scaleLocal(r,i,a)}},{key:"scaleLocal",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=nr(r,i,a,!1)),te.sceneGraphService.scaleLocal(this,r),this}},{key:"setLocalScale",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=nr(r,i,a,!1)),te.sceneGraphService.setLocalScale(this,r),this}},{key:"getLocalScale",value:function(){return te.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return te.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var r=Om(Zu,te.sceneGraphService.getWorldTransform(this)),i=Ce(r,3),a=i[2];return Vr(a)}},{key:"getLocalEulerAngles",value:function(){var r=Om(Zu,te.sceneGraphService.getLocalRotation(this)),i=Ce(r,3),a=i[2];return Vr(a)}},{key:"setEulerAngles",value:function(r){return te.sceneGraphService.setEulerAngles(this,0,0,r),this}},{key:"setLocalEulerAngles",value:function(r){return te.sceneGraphService.setLocalEulerAngles(this,0,0,r),this}},{key:"rotateLocal",value:function(r,i,a){return nn(i)&&nn(a)?te.sceneGraphService.rotateLocal(this,0,0,r):te.sceneGraphService.rotateLocal(this,r,i,a),this}},{key:"rotate",value:function(r,i,a){return nn(i)&&nn(a)?te.sceneGraphService.rotate(this,0,0,r):te.sceneGraphService.rotate(this,r,i,a),this}},{key:"setRotation",value:function(r,i,a,o){return te.sceneGraphService.setRotation(this,r,i,a,o),this}},{key:"setLocalRotation",value:function(r,i,a,o){return te.sceneGraphService.setLocalRotation(this,r,i,a,o),this}},{key:"setLocalSkew",value:function(r,i){return te.sceneGraphService.setLocalSkew(this,r,i),this}},{key:"getRotation",value:function(){return te.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return te.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return te.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return te.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return te.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(r){return te.sceneGraphService.setLocalTransform(this,r),this}},{key:"resetLocalTransform",value:function(){te.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(r,i){var a,o=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return o?o.play(this,r,i):null}},{key:"isVisible",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(r){this.style.pointerEvents=r?"auto":"none"}},{key:"isInteractive",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,vt(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,vt(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var r=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=a[0],l=a[1];return s?yE(s)?(Object.keys(s).forEach(function(c){r.setAttribute(c,s[c])}),this):a.length===2?(this.setAttribute(s,l),this):this.attributes[s]:this.attributes}},{key:"getMatrix",value:function(r){var i=r||this.getWorldTransform(),a=ah(Zu,i),o=Ce(a,2),s=o[0],l=o[1],c=wl(Zu,i),u=Ce(c,2),f=u[0],d=u[1],h=oh(MV,i),p=Om(Zu,h),v=Ce(p,3),g=v[0],y=v[2];return jW(g||y,s,l,f,d)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(r){var i=cM(r),a=Ce(i,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4];this.setEulerAngles(u).setPosition(o,s).setLocalScale(l,c)}},{key:"setLocalMatrix",value:function(r){var i=cM(r),a=Ce(i,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4];this.setLocalEulerAngles(u).setLocalPosition(o,s).setLocalScale(l,c)}},{key:"show",value:function(){this.forEach(function(r){r.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(r){r.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(r){return this.children[r]||null}},{key:"add",value:function(r,i){return this.appendChild(r,i)}},{key:"set",value:function(r,i){this.config[r]=i}},{key:"get",value:function(r){return this.config[r]}},{key:"moveTo",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(r,i,a),this}},{key:"move",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(r,i,a),this}},{key:"setZIndex",value:function(r){return this.style.zIndex=r,this}}])}(kV);xt.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var Aa=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),Le(this,t,[Te({type:U.CIRCLE},n)])}return Ne(t,e),ee(t)}(xt);Aa.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var AV=["style"],Qu=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=_s(r,AV);return J(this,t),n=Le(this,t,[Te({style:i},a)]),n.isCustomElement=!0,n}return Ne(t,e),ee(t)}(xt);Qu.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var hp=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),Le(this,t,[Te({type:U.ELLIPSE},n)])}return Ne(t,e),ee(t)}(xt);hp.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var PV=function(e){function t(){return J(this,t),Le(this,t,[{type:U.FRAGMENT}])}return Ne(t,e),ee(t)}(xt);PV.PARSED_STYLE_LIST=new Set(["class","className"]);var bn=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),Le(this,t,[Te({type:U.GROUP},n)])}return Ne(t,e),ee(t)}(xt);bn.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var CV=["style"],Ju=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=_s(r,CV);return J(this,t),n=Le(this,t,[Te({type:U.HTML,style:i},a)]),n.cullable.enable=!1,n}return Ne(t,e),ee(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var r=Oi(it(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!rn.isEmpty(i)){var a=new rn;return a.setFromTransformedAABB(i,r),a}}return this.getBounds()}}])}(xt);Ju.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var pp=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),Le(this,t,[Te({type:U.IMAGE},n)])}return Ne(t,e),ee(t)}(xt);pp.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var TV=["style"],Cs=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=_s(r,TV);J(this,t),n=Le(this,t,[Te({type:U.LINE,style:Te({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),n.markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,s=o.markerStart,l=o.markerEnd;return s&&Ue(s)&&(n.markerStartAngle=s.getLocalEulerAngles(),n.appendChild(s)),l&&Ue(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return Ne(t,e),ee(t,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="x1"||r==="y1"||r==="x2"||r==="y2"||r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Ue(o)&&(this.markerStartAngle=0,o.remove()),s&&Ue(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"&&(o&&Ue(o)&&(this.markerEndAngle=0,o.remove()),s&&Ue(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1)))}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=i.x1,u=i.x2,f=i.y1,d=i.y2,h=r?a:o;if(!(!h||!Ue(h))){var p=0,v,g,y,m,b,x;r?(y=c,m=f,v=u-c,g=d-f,b=s||0,x=this.markerStartAngle):(y=u,m=d,v=c-u,g=f-d,b=l||0,x=this.markerEndAngle),p=Math.atan2(g,v),h.setLocalEulerAngles(p*180/Math.PI+x),h.setLocalPosition(y+Math.cos(p)*b,m+Math.sin(p)*b)}}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,o=a.x1,s=a.y1,l=a.x2,c=a.y2,u=nM(o,s,l,c,r),f=u.x,d=u.y,h=zt(Ye(),Xe(f,d,0),i?this.getWorldTransform():this.getLocalTransform());return new Ln(h[0],h[1])}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var r=this.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2;return tM(i,a,o,s)}}])}(xt);Cs.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var LV=["style"],Xn=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=_s(r,LV);J(this,t),n=Le(this,t,[Te({type:U.PATH,style:i,initialParsedStyle:{miterLimit:4,d:Te({},pM)}},a)]),n.markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&Ue(s)&&(n.markerStartAngle=s.getLocalEulerAngles(),n.appendChild(s)),c&&Ue(c)&&n.placeMarkerMid(c),l&&Ue(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return Ne(t,e),ee(t,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Ue(o)&&(this.markerStartAngle=0,o.remove()),s&&Ue(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"?(o&&Ue(o)&&(this.markerEndAngle=0,o.remove()),s&&Ue(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(s)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=r?a:o;if(!(!c||!Ue(c))){var u=0,f,d,h,p,v,g;if(r){var y=this.getStartTangent(),m=Ce(y,2),b=m[0],x=m[1];h=x[0],p=x[1],f=b[0]-x[0],d=b[1]-x[1],v=s||0,g=this.markerStartAngle}else{var w=this.getEndTangent(),O=Ce(w,2),_=O[0],S=O[1];h=S[0],p=S[1],f=_[0]-S[0],d=_[1]-S[1],v=l||0,g=this.markerEndAngle}u=Math.atan2(d,f),c.setLocalEulerAngles(u*180/Math.PI+g),c.setLocalPosition(h+Math.cos(u)*v,p+Math.sin(u)*v)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(u){u.remove()}),r&&Ue(r))for(var a=1;a<i.length-1;a++){var o=Ce(i[a].currentPoint,2),s=o[0],l=o[1],c=a===1?r:r.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s,l)}}},{key:"getTotalLength",value:function(){return Nm(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,o=GY(a,r),s=o.x,l=o.y,c=zt(Ye(),Xe(s,l,0),i?this.getWorldTransform():this.getLocalTransform());return new Ln(c[0],c[1])}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(r*Nm(this),i)}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.d.segments,i=[];if(r.length>1){var a=r[0].currentPoint,o=r[1].currentPoint,s=r[1].startTangent;i=[],s?(i.push([a[0]-s[0],a[1]-s[1]]),i.push([a[0],a[1]])):(i.push([o[0],o[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var r=this.parsedStyle.d.segments,i=r.length,a=[];if(i>1){var o=r[i-2].currentPoint,s=r[i-1].currentPoint,l=r[i-1].endTangent;a=[],l?(a.push([s[0]-l[0],s[1]-l[1]]),a.push([s[0],s[1]])):(a.push([o[0],o[1]]),a.push([s[0],s[1]]))}return a}}])}(xt);Xn.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var NV=["style"],Ts=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=_s(r,NV);J(this,t),n=Le(this,t,[Te({type:U.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),n.markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerMid;return s&&Ue(s)&&(n.markerStartAngle=s.getLocalEulerAngles(),n.appendChild(s)),c&&Ue(c)&&n.placeMarkerMid(c),l&&Ue(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return Ne(t,e),ee(t,[{key:"attributeChangedCallback",value:function(r,i,a,o,s){r==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(o&&Ue(o)&&(this.markerStartAngle=0,o.remove()),s&&Ue(s)&&(this.markerStartAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!0))):r==="markerEnd"?(o&&Ue(o)&&(this.markerEndAngle=0,o.remove()),s&&Ue(s)&&(this.markerEndAngle=s.getLocalEulerAngles(),this.appendChild(s),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(s)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,o=i.markerEnd,s=i.markerStartOffset,l=i.markerEndOffset,c=i.points,u=c||{},f=u.points,d=r?a:o;if(!(!d||!Ue(d)||!f)){var h=0,p,v,g,y,m,b;if(g=f[0][0],y=f[0][1],r)p=f[1][0]-f[0][0],v=f[1][1]-f[0][1],m=s||0,b=this.markerStartAngle;else{var x=f.length;this.parsedStyle.isClosed?(p=f[x-1][0]-f[0][0],v=f[x-1][1]-f[0][1]):(g=f[x-1][0],y=f[x-1][1],p=f[x-2][0]-f[x-1][0],v=f[x-2][1]-f[x-1][1]),m=l||0,b=this.markerEndAngle}h=Math.atan2(v,p),d.setLocalEulerAngles(h*180/Math.PI+b),d.setLocalPosition(g+Math.cos(h)*m,y+Math.sin(h)*m)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.points,a=i||{},o=a.points;if(this.markerMidList.forEach(function(f){f.remove()}),this.markerMidList=[],r&&Ue(r)&&o)for(var s=1;s<(this.parsedStyle.isClosed?o.length:o.length-1);s++){var l=o[s][0],c=o[s][1],u=s===1?r:r.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,c)}}}])}(xt);Ts.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var IV=["style"],vp=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.style,i=_s(n,IV);return J(this,t),Le(this,t,[Te({type:U.POLYLINE,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Ne(t,e),ee(t,[{key:"getTotalLength",value:function(){return OG(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var o=[],s=0,l,c,u=this.getTotalLength();a.forEach(function(y,m){a[m+1]&&(l=[0,0],l[0]=s/u,c=tM(y[0],y[1],a[m+1][0],a[m+1][1]),s+=c,l[1]=s/u,o.push(l))}),this.parsedStyle.points.segments=o}var f=0,d=0;this.parsedStyle.points.segments.forEach(function(y,m){r>=y[0]&&r<=y[1]&&(f=(r-y[0])/(y[1]-y[0]),d=m)});var h=nM(a[d][0],a[d][1],a[d+1][0],a[d+1][1],f),p=h.x,v=h.y,g=zt(Ye(),Xe(p,v,0),i?this.getWorldTransform():this.getLocalTransform());return new Ln(g[0],g[1])}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.points.points,i=[];return i.push([r[1][0],r[1][1]]),i.push([r[0][0],r[0][1]]),i}},{key:"getEndTangent",value:function(){var r=this.parsedStyle.points.points,i=r.length-1,a=[];return a.push([r[i-1][0],r[i-1][1]]),a.push([r[i][0],r[i][1]]),a}}])}(Ts);vp.PARSED_STYLE_LIST=new Set([].concat(vt(Ts.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Oo=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),Le(this,t,[Te({type:U.RECT},n)])}return Ne(t,e),ee(t)}(xt);Oo.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var jV=["style"],qr=function(e){function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.style,i=_s(n,jV);return J(this,t),Le(this,t,[Te({type:U.TEXT,style:Te({fill:"black"},r)},i)])}return Ne(t,e),ee(t,[{key:"getComputedTextLength",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(xt);qr.PARSED_STYLE_LIST=new Set([].concat(vt(xt.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var DV=function(){function e(){J(this,e),this.registry={},this.define(U.CIRCLE,Aa),this.define(U.ELLIPSE,hp),this.define(U.RECT,Oo),this.define(U.IMAGE,pp),this.define(U.LINE,Cs),this.define(U.GROUP,bn),this.define(U.PATH,Xn),this.define(U.POLYGON,Ts),this.define(U.POLYLINE,vp),this.define(U.TEXT,qr),this.define(U.HTML,Ju)}return ee(e,[{key:"define",value:function(n,r){this.registry[n]=r}},{key:"get",value:function(n){return this.registry[n]}}])}(),sA={number:function(t){return new ft(t)},percent:function(t){return new ft(t,"%")},px:function(t){return new ft(t,"px")},em:function(t){return new ft(t,"em")},rem:function(t){return new ft(t,"rem")},deg:function(t){return new ft(t,"deg")},grad:function(t){return new ft(t,"grad")},rad:function(t){return new ft(t,"rad")},turn:function(t){return new ft(t,"turn")},s:function(t){return new ft(t,"s")},ms:function(t){return new ft(t,"ms")},registerProperty:function(t){var n=t.name,r=t.inherits,i=t.interpolable,a=t.initialValue,o=t.syntax;te.styleValueRegistry.registerMetadata({n,inh:r,int:i,d:a,syntax:o})},registerLayout:function(t,n){te.layoutRegistry.registerLayout(t,n)}},FV=function(e){function t(){var n;J(this,t),n=Le(this,t),n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new te.AnimationTimeline(n)}catch(i){}var r={};return Rm.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Il(s)?s(U.GROUP):s)}),n.documentElement=new bn({id:"g-root",style:r}),n.documentElement.ownerDocument=n,n.documentElement.parentNode=n,n.childNodes=[n.documentElement],n}return Ne(t,e),ee(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(r,i){if(r==="svg")return this.documentElement;var a=this.defaultView.customElements.get(r);a||(console.warn("Unsupported tagName: ",r),a=r==="tspan"?qr:bn);var o=new a(i);return o.ownerDocument=this,o}},{key:"createElementNS",value:function(r,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(r){throw new Error(lt)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(r){}}},{key:"elementsFromBBox",value:function(r,i,a,o){var s=this.defaultView.context.rBushRoot,l=s.search({minX:r,minY:i,maxX:a,maxY:o}),c=[];return l.forEach(function(u){var f=u.displayObject,d=f.parsedStyle.pointerEvents,h=d===void 0?"auto":d,p=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(h);(!p||p&&f.isVisible())&&!f.isCulled()&&f.isInteractive()&&c.push(f)}),c.sort(function(u,f){return f.sortable.renderOrder-u.sortable.renderOrder}),c}},{key:"elementFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),o=a.x,s=a.y,l=this.defaultView.getConfig(),c=l.width,u=l.height;if(o<0||s<0||o>c||s>u)return null;var f=this.defaultView.viewport2Client({x:o,y:s}),d=f.x,h=f.y,p=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:r,y:i,viewportX:o,viewportY:s,clientX:d,clientY:h},picked:[]}),v=p.picked;return v&&v[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var n=go(Tn().mark(function i(a,o){var s,l,c,u,f,d,h,p,v,g,y;return Tn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(s=this.defaultView.canvas2Viewport({x:a,y:o}),l=s.x,c=s.y,u=this.defaultView.getConfig(),f=u.width,d=u.height,!(l<0||c<0||l>f||c>d)){b.next=4;break}return b.abrupt("return",null);case 4:return h=this.defaultView.viewport2Client({x:l,y:c}),p=h.x,v=h.y,b.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:o,viewportX:l,viewportY:c,clientX:p,clientY:v},picked:[]});case 7:return g=b.sent,y=g.picked,b.abrupt("return",y&&y[0]||this.documentElement);case 10:case"end":return b.stop()}},i,this)}));function r(i,a){return n.apply(this,arguments)}return r}()},{key:"elementsFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),o=a.x,s=a.y,l=this.defaultView.getConfig(),c=l.width,u=l.height;if(o<0||s<0||o>c||s>u)return[];var f=this.defaultView.viewport2Client({x:o,y:s}),d=f.x,h=f.y,p=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:r,y:i,viewportX:o,viewportY:s,clientX:d,clientY:h},picked:[]}),v=p.picked;return v[v.length-1]!==this.documentElement&&v.push(this.documentElement),v}},{key:"elementsFromPoint",value:function(){var n=go(Tn().mark(function i(a,o){var s,l,c,u,f,d,h,p,v,g,y;return Tn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(s=this.defaultView.canvas2Viewport({x:a,y:o}),l=s.x,c=s.y,u=this.defaultView.getConfig(),f=u.width,d=u.height,!(l<0||c<0||l>f||c>d)){b.next=4;break}return b.abrupt("return",[]);case 4:return h=this.defaultView.viewport2Client({x:l,y:c}),p=h.x,v=h.y,b.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:o,viewportX:l,viewportY:c,clientX:p,clientY:v},picked:[]});case 7:return g=b.sent,y=g.picked,y[y.length-1]!==this.documentElement&&y.push(this.documentElement),b.abrupt("return",y);case 11:case"end":return b.stop()}},i,this)}));function r(i,a){return n.apply(this,arguments)}return r}()},{key:"appendChild",value:function(r,i){throw new Error(Yl)}},{key:"insertBefore",value:function(r,i){throw new Error(Yl)}},{key:"removeChild",value:function(r,i){throw new Error(Yl)}},{key:"replaceChild",value:function(r,i,a){throw new Error(Yl)}},{key:"append",value:function(){throw new Error(Yl)}},{key:"prepend",value:function(){throw new Error(Yl)}},{key:"getElementById",value:function(r){return this.documentElement.getElementById(r)}},{key:"getElementsByName",value:function(r){return this.documentElement.getElementsByName(r)}},{key:"getElementsByTagName",value:function(r){return this.documentElement.getElementsByTagName(r)}},{key:"getElementsByClassName",value:function(r){return this.documentElement.getElementsByClassName(r)}},{key:"querySelector",value:function(r){return this.documentElement.querySelector(r)}},{key:"querySelectorAll",value:function(r){return this.documentElement.querySelectorAll(r)}},{key:"find",value:function(r){return this.documentElement.find(r)}},{key:"findAll",value:function(r){return this.documentElement.findAll(r)}}])}(Ft),lA=function(){function e(t){J(this,e),this.strategies=t}return ee(e,[{key:"apply",value:function(n){var r=n.camera,i=n.renderingService,a=n.renderingContext,o=this.strategies;i.hooks.cull.tap(e.tag,function(s){if(s){var l=s.cullable;return o.length===0?l.visible=a.unculledEntities.indexOf(s.entity)>-1:l.visible=o.every(function(c){return c.isVisible(r,s)}),!s.isCulled()&&s.isVisible()?s:(s.dispatchEvent(new dt(je.CULLED)),null)}return s}),i.hooks.afterRender.tap(e.tag,function(s){s.cullable.visibilityPlaneMask=-1})}}])}();lA.tag="Culling";var cA=function(){function e(){var t=this;J(this,e),this.autoPreventDefault=!1,this.rootPointerEvent=new Vm(null),this.rootWheelEvent=new Um(null),this.onPointerMove=function(n){var r,i=(r=t.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView;if(!(i.supportsTouchEvents&&n.pointerType==="touch")){var a=t.normalizeToPointerEvent(n,i),o=Os(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value,c=t.bootstrapEvent(t.rootPointerEvent,l,i,n);t.context.eventService.mapEvent(c)}}catch(u){o.e(u)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(n){var r,i=(r=t.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView,a=t.normalizeToPointerEvent(n,i),o=Os(a),s;try{for(o.s();!(s=o.n()).done;){var l=s.value,c=t.bootstrapEvent(t.rootPointerEvent,l,i,n);t.context.eventService.mapEvent(c)}}catch(u){o.e(u)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}}return ee(e,[{key:"apply",value:function(n){var r=this;this.context=n;var i=n.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(o){var s=r.context.renderingService.hooks.pickSync.call({position:o,picked:[],topmost:!0}),l=s.picked;return l[0]||null}),i.hooks.pointerWheel.tap(e.tag,function(o){var s=r.normalizeWheelEvent(o);r.context.eventService.mapEvent(s)}),i.hooks.pointerDown.tap(e.tag,function(o){if(!(a.supportsTouchEvents&&o.pointerType==="touch")){var s=r.normalizeToPointerEvent(o,a);if(r.autoPreventDefault&&s[0].isNormalized){var l=o.cancelable||!("cancelable"in o);l&&o.preventDefault()}var c=Os(s),u;try{for(c.s();!(u=c.n()).done;){var f=u.value,d=r.bootstrapEvent(r.rootPointerEvent,f,a,o);r.context.eventService.mapEvent(d)}}catch(h){c.e(h)}finally{c.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerUp.tap(e.tag,function(o){if(!(a.supportsTouchEvents&&o.pointerType==="touch")){var s=r.context.contextService.getDomElement(),l=r.context.eventService.isNativeEventFromCanvas(s,o),c=l?"":"outside",u=r.normalizeToPointerEvent(o,a),f=Os(u),d;try{for(f.s();!(d=f.n()).done;){var h=d.value,p=r.bootstrapEvent(r.rootPointerEvent,h,a,o);p.type+=c,r.context.eventService.mapEvent(p)}}catch(v){f.e(v)}finally{f.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerMove.tap(e.tag,this.onPointerMove),i.hooks.pointerOver.tap(e.tag,this.onPointerMove),i.hooks.pointerOut.tap(e.tag,this.onPointerMove),i.hooks.click.tap(e.tag,this.onClick),i.hooks.pointerCancel.tap(e.tag,function(o){var s=r.normalizeToPointerEvent(o,a),l=Os(s),c;try{for(l.s();!(c=l.n()).done;){var u=c.value,f=r.bootstrapEvent(r.rootPointerEvent,u,a,o);r.context.eventService.mapEvent(f)}}catch(d){l.e(d)}finally{l.f()}r.setCursor(r.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(n,r,i,a){n.view=i,n.originalEvent=null,n.nativeEvent=a,n.pointerId=r.pointerId,n.width=r.width,n.height=r.height,n.isPrimary=r.isPrimary,n.pointerType=r.pointerType,n.pressure=r.pressure,n.tangentialPressure=r.tangentialPressure,n.tiltX=r.tiltX,n.tiltY=r.tiltY,n.twist=r.twist,this.transferMouseData(n,r);var o=this.context.eventService.client2Viewport({x:r.clientX,y:r.clientY}),s=o.x,l=o.y;n.viewport.x=s,n.viewport.y=l;var c=this.context.eventService.viewport2Canvas(n.viewport),u=c.x,f=c.y;return n.canvas.x=u,n.canvas.y=f,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.isTrusted=a.isTrusted,n.type==="pointerleave"&&(n.type="pointerout"),n.type.startsWith("mouse")&&(n.type=n.type.replace("mouse","pointer")),n.type.startsWith("touch")&&(n.type=bH[n.type]||n.type),n}},{key:"normalizeWheelEvent",value:function(n){var r=this.rootWheelEvent;this.transferMouseData(r,n),r.deltaMode=n.deltaMode,r.deltaX=n.deltaX,r.deltaY=n.deltaY,r.deltaZ=n.deltaZ;var i=this.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),a=i.x,o=i.y;r.viewport.x=a,r.viewport.y=o;var s=this.context.eventService.viewport2Canvas(r.viewport),l=s.x,c=s.y;return r.canvas.x=l,r.canvas.y=c,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.nativeEvent=n,r.type=n.type,r}},{key:"transferMouseData",value:function(n,r){n.isTrusted=r.isTrusted,n.srcElement=r.srcElement,n.timeStamp=Ym.now(),n.type=r.type,n.altKey=r.altKey,n.metaKey=r.metaKey,n.shiftKey=r.shiftKey,n.ctrlKey=r.ctrlKey,n.button=r.button,n.buttons=r.buttons,n.client.x=r.clientX,n.client.y=r.clientY,n.movement.x=r.movementX,n.movement.y=r.movementY,n.page.x=r.pageX,n.page.y=r.pageY,n.screen.x=r.screenX,n.screen.y=r.screenY,n.relatedTarget=null}},{key:"setCursor",value:function(n){this.context.contextService.applyCursorStyle(n||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(n,r){var i=[];if(r.isTouchEvent(n))for(var a=0;a<n.changedTouches.length;a++){var o=n.changedTouches[a];Dt(o.button)&&(o.button=0),Dt(o.buttons)&&(o.buttons=1),Dt(o.isPrimary)&&(o.isPrimary=n.touches.length===1&&n.type==="touchstart"),Dt(o.width)&&(o.width=o.radiusX||1),Dt(o.height)&&(o.height=o.radiusY||1),Dt(o.tiltX)&&(o.tiltX=0),Dt(o.tiltY)&&(o.tiltY=0),Dt(o.pointerType)&&(o.pointerType="touch"),Dt(o.pointerId)&&(o.pointerId=o.identifier||0),Dt(o.pressure)&&(o.pressure=o.force||.5),Dt(o.twist)&&(o.twist=0),Dt(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,o.type=n.type,i.push(o)}else if(r.isMouseEvent(n)){var s=n;Dt(s.isPrimary)&&(s.isPrimary=!0),Dt(s.width)&&(s.width=1),Dt(s.height)&&(s.height=1),Dt(s.tiltX)&&(s.tiltX=0),Dt(s.tiltY)&&(s.tiltY=0),Dt(s.pointerType)&&(s.pointerType="mouse"),Dt(s.pointerId)&&(s.pointerId=mH),Dt(s.pressure)&&(s.pressure=.5),Dt(s.twist)&&(s.twist=0),Dt(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,i.push(s)}else i.push(n);return i}}])}();cA.tag="Event";var RV=[U.CIRCLE,U.ELLIPSE,U.IMAGE,U.RECT,U.LINE,U.POLYLINE,U.POLYGON,U.TEXT,U.PATH,U.HTML],$V=function(){function e(){J(this,e)}return ee(e,[{key:"isVisible",value:function(n,r){var i,a=r.cullable;if(!a.enable)return!0;var o=r.getRenderBounds();if(rn.isEmpty(o))return!1;var s=n.getFrustum(),l=(i=r.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(r,o,l||zl.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==zl.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(n,r,i,a){if(i===zl.OUTSIDE||i===zl.INSIDE)return i;for(var o=zl.INSIDE,s=RV.indexOf(n.nodeName)>-1,l=0,c=a.length;l<c;++l){var u=1<<l;if(i&u&&!(s&&(l===4||l===5))){var f=a[l],d=f.normal,h=f.distance;if(Gi(d,r.getPositiveFarPoint(a[l]))+h<0)return zl.OUTSIDE;Gi(d,r.getNegativeFarPoint(a[l]))+h<0&&(o|=u)}}return o}}])}(),uA=function(){function e(){J(this,e),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return ee(e,[{key:"apply",value:function(n){var r=this,i,a=n.renderingService,o=n.renderingContext,s=n.rBushRoot,l=o.root.ownerDocument.defaultView;this.rBush=s;var c=function(v){var g=v.target;g.renderable.dirty=!0,a.dirtify()},u=function(v){r.syncTasks.set(v.target,v.detail.affectChildren),a.dirtify()},f=function(v){var g=v.target;te.enableSizeAttenuation&&te.styleValueRegistry.updateSizeAttenuation(g,l.getCamera().getZoom())},d=function(v){var g=v.target,y=g.rBushNode;y.aabb&&r.rBush.remove(y.aabb),r.syncTasks.delete(g),te.sceneGraphService.dirtifyToRoot(g),a.dirtify()};a.hooks.init.tap(e.tag,function(){l.addEventListener(je.MOUNTED,f),l.addEventListener(je.UNMOUNTED,d),l.addEventListener(je.ATTR_MODIFIED,c),l.addEventListener(je.BOUNDS_CHANGED,u)}),a.hooks.destroy.tap(e.tag,function(){l.removeEventListener(je.MOUNTED,f),l.removeEventListener(je.UNMOUNTED,d),l.removeEventListener(je.ATTR_MODIFIED,c),l.removeEventListener(je.BOUNDS_CHANGED,u),r.syncTasks.clear()});var h=(i=te.globalThis.requestIdleCallback)!==null&&i!==void 0?i:Wm.bind(te.globalThis);a.hooks.endFrame.tap(e.tag,function(){r.isFirstTimeRendering?(r.isFirstTimeRendering=!1,r.syncing=!0,h(function(){r.syncRTree(!0),r.isFirstTimeRenderingFinished=!0})):r.syncRTree()})}},{key:"syncNode",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(n.isConnected){var i=n.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=n.getRenderBounds();if(a){var o=n.renderable;r&&(o.dirtyRenderBounds||(o.dirtyRenderBounds=new rn),o.dirtyRenderBounds.update(a.center,a.halfExtents));var s=a.getMin(),l=Ce(s,2),c=l[0],u=l[1],f=a.getMax(),d=Ce(f,2),h=d[0],p=d[1];i.aabb||(i.aabb={}),i.aabb.displayObject=n,i.aabb.minX=c,i.aabb.minY=u,i.aabb.maxX=h,i.aabb.maxY=p}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!r&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,o=function(l){if(!a.has(l)&&l.renderable){var c=n.syncNode(l,r);c&&(i.push(c),a.add(l))}};this.syncTasks.forEach(function(s,l){s&&l.forEach(o);for(var c=l;c;)o(c),c=c.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();uA.tag="Prepare";var Kr=function(e){return e.READY="ready",e.BEFORE_RENDER="beforerender",e.RERENDER="rerender",e.AFTER_RENDER="afterrender",e.BEFORE_DESTROY="beforedestroy",e.AFTER_DESTROY="afterdestroy",e.RESIZE="resize",e.DIRTY_RECTANGLE="dirtyrectangle",e.RENDERER_CHANGED="rendererchanged",e}({}),fA=500,zV=.1,BV=1e3,gp=new dt(je.MOUNTED),yp=new dt(je.UNMOUNTED),Qm=new dt(Kr.BEFORE_RENDER),dA=new dt(Kr.RERENDER),Jm=new dt(Kr.AFTER_RENDER),hA=function(e){function t(n){var r;J(this,t),r=Le(this,t),r.Element=xt,r.inited=!1,r.context={};var i=n.container,a=n.canvas,o=n.renderer,s=n.width,l=n.height,c=n.background,u=n.cursor,f=n.supportsMutipleCanvasesInOneContainer,d=n.cleanUpOnDestroy,h=d===void 0?!0:d,p=n.offscreenCanvas,v=n.devicePixelRatio,g=n.requestAnimationFrame,y=n.cancelAnimationFrame,m=n.createImage,b=n.supportsTouchEvents,x=n.supportsPointerEvents,w=n.isTouchEvent,O=n.isMouseEvent,_=n.dblClickSpeed,S=s,k=l,E=v||Bm&&window.devicePixelRatio||1;return E=E>=1?Math.ceil(E):1,a&&(S=s||gH(a)||a.width/E,k=l||yH(a)||a.height/E),r.customElements=new DV,r.devicePixelRatio=E,r.requestAnimationFrame=g!=null?g:Wm.bind(te.globalThis),r.cancelAnimationFrame=y!=null?y:KM.bind(te.globalThis),r.supportsTouchEvents=b!=null?b:"ontouchstart"in te.globalThis,r.supportsPointerEvents=x!=null?x:!!te.globalThis.PointerEvent,r.isTouchEvent=w!=null?w:function(M){return r.supportsTouchEvents&&M instanceof te.globalThis.TouchEvent},r.isMouseEvent=O!=null?O:function(M){return!te.globalThis.MouseEvent||M instanceof te.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(M instanceof te.globalThis.PointerEvent))},p&&(te.offscreenCanvas=p),r.document=new FV,r.document.defaultView=r,f||dH(i,r,h),r.initRenderingContext(Te(Te({},n),{},{width:S,height:k,background:c!=null?c:"transparent",cursor:u!=null?u:"default",cleanUpOnDestroy:h,devicePixelRatio:E,requestAnimationFrame:r.requestAnimationFrame,cancelAnimationFrame:r.cancelAnimationFrame,supportsTouchEvents:r.supportsTouchEvents,supportsPointerEvents:r.supportsPointerEvents,isTouchEvent:r.isTouchEvent,isMouseEvent:r.isMouseEvent,dblClickSpeed:_!=null?_:200,createImage:m!=null?m:function(){return new window.Image}})),r.initDefaultCamera(S,k,o.clipSpaceNearZ),r.initRenderer(o,!0),r}return Ne(t,e),ee(t,[{key:"initRenderingContext",value:function(r){this.context.config=r,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(r,i,a){var o=this,s=new te.CameraContribution;s.clipSpaceNearZ=a,s.setType(ut.EXPLORING,Sm.DEFAULT).setPosition(r/2,i/2,fA).setFocalPoint(r/2,i/2,0).setOrthographic(r/-2,r/2,i/2,i/-2,zV,BV),s.canvas=this,s.eventEmitter.on(fM.UPDATED,function(){o.context.renderingContext.renderReasons.add(Vl.CAMERA_CHANGED),te.enableSizeAttenuation&&o.getConfig().renderer.getConfig().enableSizeAttenuation&&o.updateSizeAttenuation()}),this.context.camera=s}},{key:"updateSizeAttenuation",value:function(){var r=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){te.styleValueRegistry.updateSizeAttenuation(i,r)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var r=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){r.resolveReadyPromise=function(){i(r)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;i||this.dispatchEvent(new dt(Kr.BEFORE_DESTROY)),this.frameId&&this.cancelAnimationFrame(this.frameId);var a=this.getRoot();r&&(this.unmountChildren(a),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),i||this.dispatchEvent(new dt(Kr.AFTER_DESTROY));var o=function(l){l.currentTarget=null,l.manager=null,l.target=null,l.relatedNode=null};o(gp),o(yp),o(Qm),o(dA),o(Jm),o(ta),o(Km),o(Zm),o(oA)}},{key:"changeSize",value:function(r,i){this.resize(r,i)}},{key:"resize",value:function(r,i){var a=this.context.config;a.width=r,a.height=i,this.getContextService().resize(r,i);var o=this.context.camera,s=o.getProjectionMode();o.setPosition(r/2,i/2,fA).setFocalPoint(r/2,i/2,0),s===Ur.ORTHOGRAPHIC?o.setOrthographic(r/-2,r/2,i/2,i/-2,o.getNear(),o.getFar()):o.setAspect(r/i),this.dispatchEvent(new dt(Kr.RESIZE,{width:r,height:i}))}},{key:"appendChild",value:function(r,i){return this.document.documentElement.appendChild(r,i)}},{key:"insertBefore",value:function(r,i){return this.document.documentElement.insertBefore(r,i)}},{key:"removeChild",value:function(r){return this.document.documentElement.removeChild(r)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(r){var i=this;r&&(Qm.detail=r,Jm.detail=r),this.dispatchEvent(Qm);var a=this.getRenderingService();a.render(this.getConfig(),r,function(){i.dispatchEvent(dA)}),this.dispatchEvent(Jm)}},{key:"run",value:function(){var r=this,i=function(o,s){r.render(s),r.frameId=r.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new _W,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new cA,new uA,new lA([new $V])),this.loadRendererContainerModule(r),this.context.contextService=new this.context.ContextService(Te(Te({},te),this.context)),this.context.renderingService=new QH(te,this.context),this.context.eventService=new ZH(te,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(r,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(r,a)}).catch(function(o){console.error(o)})}},{key:"initRenderingService",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){i.inited=!0,a?o?i.requestAnimationFrame(function(){i.dispatchEvent(new dt(Kr.READY))}):i.dispatchEvent(new dt(Kr.READY)):i.dispatchEvent(new dt(Kr.RENDERER_CHANGED)),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(s){var l=s,c=l.renderable;c&&(c.renderBoundsDirty=!0,c.boundsDirty=!0,c.dirty=!0)}),i.mountChildren(i.getRoot()),r.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(r){var i=this,a=r.getPlugins();a.forEach(function(o){o.context=i.context,o.init(te)})}},{key:"setRenderer",value:function(r){var i=this.getConfig();if(i.renderer!==r){var a=i.renderer;i.renderer=r,this.destroy(!1,!0),vt((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(o){o.destroy(te)}),this.initRenderer(r)}}},{key:"setCursor",value:function(r){var i=this.getConfig();i.cursor=r,this.getContextService().applyCursorStyle(r)}},{key:"unmountChildren",value:function(r){var i=this;r.childNodes.forEach(function(a){i.unmountChildren(a)}),this.inited&&(r.isMutationObserved?r.dispatchEvent(yp):(yp.target=r,this.dispatchEvent(yp,!0)),r!==this.document.documentElement&&(r.ownerDocument=null),r.isConnected=!1),r.isCustomElement&&r.disconnectedCallback&&r.disconnectedCallback()}},{key:"mountChildren",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lp(r);this.inited?r.isConnected||(r.ownerDocument=this.document,r.isConnected=!0,a||(r.isMutationObserved?r.dispatchEvent(gp):(gp.target=r,this.dispatchEvent(gp,!0)))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",r.nodeName),r.childNodes.forEach(function(o){i.mountChildren(o,a)}),r.isCustomElement&&r.connectedCallback&&r.connectedCallback()}},{key:"mountFragment",value:function(r){this.mountChildren(r,!1)}},{key:"client2Viewport",value:function(r){return this.getEventService().client2Viewport(r)}},{key:"viewport2Client",value:function(r){return this.getEventService().viewport2Client(r)}},{key:"viewport2Canvas",value:function(r){return this.getEventService().viewport2Canvas(r)}},{key:"canvas2Viewport",value:function(r){return this.getEventService().canvas2Viewport(r)}},{key:"getPointByClient",value:function(r,i){return this.client2Viewport({x:r,y:i})}},{key:"getClientByPoint",value:function(r,i){return this.viewport2Client({x:r,y:i})}}])}(tA);/*!
38
+ * @antv/g-camera-api
39
+ * @description A simple implementation of Camera API.
40
+ * @version 2.0.29
41
+ * @date 12/20/2024, 6:51:40 AM
42
+ * @author AntVis
43
+ * @docs https://g.antv.antgroup.com/
44
+ */var YV=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.landmarks=[],n}return Ne(t,e),ee(t,[{key:"rotate",value:function(r,i,a){if(this.relElevation=Wl(i),this.relAzimuth=Wl(r),this.relRoll=Wl(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===ut.EXPLORING){var o=io(mn(),[1,0,0],ct((this.rotateWorld?1:-1)*this.relElevation)),s=io(mn(),[0,1,0],ct((this.rotateWorld?1:-1)*this.relAzimuth)),l=io(mn(),[0,0,1],ct(this.relRoll)),c=ao(mn(),s,o);c=ao(mn(),c,l);var u=cy(it(),c);xl(this.matrix,this.matrix,[0,0,-this.distance]),Yn(this.matrix,this.matrix,u),xl(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===ut.ORBITING||this.type===ut.EXPLORING?this._getPosition():this.type===ut.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(r,i){var a=nr(r,i,0),o=Oa(this.position);return ro(o,o,sh(Ye(),this.right,a[0])),ro(o,o,sh(Ye(),this.up,a[1])),this._setPosition(o),this.triggerUpdate(),this}},{key:"dolly",value:function(r){var i=this.forward,a=Oa(this.position),o=r*this.dollyingStep,s=this.distance+r*this.dollyingStep;return o=Math.max(Math.min(s,this.maxDistance),this.minDistance)-this.distance,a[0]+=o*i[0],a[1]+=o*i[1],a[2]+=o*i[2],this._setPosition(a),this.type===ut.ORBITING||this.type===ut.EXPLORING?this._getDistance():this.type===ut.TRACKING&&ro(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(r){var i,a,o,s,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=l.position,u=c===void 0?this.position:c,f=l.focalPoint,d=f===void 0?this.focalPoint:f,h=l.roll,p=l.zoom,v=new te.CameraContribution;v.setType(this.type,void 0),v.setPosition(u[0],(i=u[1])!==null&&i!==void 0?i:this.position[1],(a=u[2])!==null&&a!==void 0?a:this.position[2]),v.setFocalPoint(d[0],(o=d[1])!==null&&o!==void 0?o:this.focalPoint[1],(s=d[2])!==null&&s!==void 0?s:this.focalPoint[2]),v.setRoll(h!=null?h:this.roll),v.setZoom(p!=null?p:this.zoom);var g={name:r,matrix:oy(v.getWorldTransform()),right:Oa(v.right),up:Oa(v.up),forward:Oa(v.forward),position:Oa(v.getPosition()),focalPoint:Oa(v.getFocalPoint()),distanceVector:Oa(v.getDistanceVector()),distance:v.getDistance(),dollyingStep:v.getDollyingStep(),azimuth:v.getAzimuth(),elevation:v.getElevation(),roll:v.getRoll(),relAzimuth:v.relAzimuth,relElevation:v.relElevation,relRoll:v.relRoll,zoom:v.getZoom()};return this.landmarks.push(g),g}},{key:"gotoLandmark",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=Si(r)?this.landmarks.find(function(M){return M.name===r}):r;if(o){var s=po(a)?{duration:a}:a,l=s.easing,c=l===void 0?"linear":l,u=s.duration,f=u===void 0?100:u,d=s.easingFunction,h=d===void 0?void 0:d,p=s.onfinish,v=p===void 0?void 0:p,g=s.onframe,y=g===void 0?void 0:g,m=.01;this.cancelLandmarkAnimation();var b=o.position,x=o.focalPoint,w=o.zoom,O=o.roll,_=h||te.EasingFunction(c),S,k=function(){i.setFocalPoint(x),i.setPosition(b),i.setRoll(O),i.setZoom(w),i.computeMatrix(),i.triggerUpdate(),v==null||v()};if(f===0)return k();var E=function(P){S===void 0&&(S=P);var A=P-S;if(A>=f){k();return}var L=_(A/f),N=Ye(),T=Ye(),I=1,C=0;hy(N,i.focalPoint,x,L),hy(T,i.position,b,L),C=i.roll*(1-L)+O*L,I=i.zoom*(1-L)+w*L,i.setFocalPoint(N),i.setPosition(T),i.setRoll(C),i.setZoom(I);var j=eS(N,x)+eS(T,b);if(j<=m&&w===void 0&&O===void 0)return k();i.computeMatrix(),i.triggerUpdate(),A<f&&(y==null||y(L),i.landmarkAnimationID=i.canvas.requestAnimationFrame(E))};this.canvas.requestAnimationFrame(E)}}}])}(hM);te.CameraContribution=YV;/*!
45
+ * @antv/g-web-animations-api
46
+ * @description A simple implementation of Web Animations API.
47
+ * @version 2.1.15
48
+ * @date 12/20/2024, 6:53:21 AM
49
+ * @author AntVis
50
+ * @docs https://g.antv.antgroup.com/
51
+ */var e1=function(e){function t(n,r,i,a){var o;return J(this,t),o=Le(this,t,[n]),o.currentTime=i,o.timelineTime=a,o.target=r,o.type="finish",o.bubbles=!1,o.currentTarget=r,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=a,o}return Ne(t,e),ee(t)}(cp),WV=0,GV=function(){function e(t,n){var r;J(this,e),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=n,this.id="".concat(WV++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return ee(e,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(r,i){n.resolveReadyPromise=function(){r(n)},n.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(r,i){n.resolveFinishedPromise=function(){r(n)},n.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(n){if(n=Number(n),!isNaN(n)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var r;this._startTime=Number((r=this.timeline)===null||r===void 0?void 0:r.currentTime)-n/this.playbackRate}this.currentTimePending=!1,this._currentTime!==n&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(n,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(n){if(n!==null){if(this.updatePromises(),n=Number(n),isNaN(n)||this._paused||this._idle)return;this._startTime=n,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(n){if(n!==this._playbackRate){this.updatePromises();var r=this.currentTime;this._playbackRate=n,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),r!==null&&(this.currentTime=r),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var n=this.oldPlayState,r=this.pending?"pending":this.playState;return this.readyPromise&&r!==n&&(r==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):n==="pending"?this.resolveReadyPromise():r==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&r!==n&&(r==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):r==="finished"?this.resolveFinishedPromise():n==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=r,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var n=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var r=new e1(null,this,this.currentTime,null);setTimeout(function(){n.oncancel(r)})}}},{key:"reverse",value:function(){this.updatePromises();var n=this.currentTime;this.playbackRate*=-1,this.play(),n!==null&&(this.currentTime=n),this.updatePromises()}},{key:"updatePlaybackRate",value:function(n){this.playbackRate=n}},{key:"targetAnimations",value:function(){var n,r=(n=this.effect)===null||n===void 0?void 0:n.target;return r.getAnimations()}},{key:"markTarget",value:function(){var n=this.targetAnimations();n.indexOf(this)===-1&&n.push(this)}},{key:"unmarkTarget",value:function(){var n=this.targetAnimations(),r=n.indexOf(this);r!==-1&&n.splice(r,1)}},{key:"tick",value:function(n,r){!this._idle&&!this._paused&&(this._startTime===null?r&&(this.startTime=n-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((n-this._startTime)*this.playbackRate)),r&&(this.currentTimePending=!1,this.fireEvents(n))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(lt)}},{key:"addEventListener",value:function(n,r,i){throw new Error(lt)}},{key:"removeEventListener",value:function(n,r,i){throw new Error(lt)}},{key:"dispatchEvent",value:function(n){throw new Error(lt)}},{key:"commitStyles",value:function(){throw new Error(lt)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var n;this._inEffect=!!((n=this.effect)!==null&&n!==void 0&&n.update(-1))}else{var r;this._inEffect=!!((r=this.effect)!==null&&r!==void 0&&r.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(n,r){n!==this._currentTime&&(this._currentTime=n,this._isFinished&&!r&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(n){var r=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new e1(null,this,this.currentTime,n);setTimeout(function(){r.onfinish&&r.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new e1(null,this,this.currentTime,n);this.onframe(a)}this._finishedFlag=!1}}}])}(),HV=4,VV=.001,UV=1e-7,XV=10,ef=11,mp=1/(ef-1),qV=typeof Float32Array=="function",pA=function(t,n){return 1-3*n+3*t},vA=function(t,n){return 3*n-6*t},gA=function(t){return 3*t},bp=function(t,n,r){return((pA(n,r)*t+vA(n,r))*t+gA(n))*t},yA=function(t,n,r){return 3*pA(n,r)*t*t+2*vA(n,r)*t+gA(n)},KV=function(t,n,r,i,a){var o,s,l=0;do s=n+(r-n)/2,o=bp(s,i,a)-t,o>0?r=s:n=s;while(Math.abs(o)>UV&&++l<XV);return s},ZV=function(t,n,r,i){for(var a=0;a<HV;++a){var o=yA(n,r,i);if(o===0)return n;var s=bp(n,r,i)-t;n-=s/o}return n},t1=function(t,n,r,i){if(!(t>=0&&t<=1&&r>=0&&r<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===n&&r===i)return function(l){return l};for(var a=qV?new Float32Array(ef):new Array(ef),o=0;o<ef;++o)a[o]=bp(o*mp,t,r);var s=function(c){for(var u=0,f=1,d=ef-1;f!==d&&a[f]<=c;++f)u+=mp;--f;var h=(c-a[f])/(a[f+1]-a[f]),p=u+h*mp,v=yA(p,t,r);return v>=VV?ZV(c,p,t,r):v===0?p:KV(c,u,u+mp,t,r)};return function(l){return l===0||l===1?l:bp(s(l),n,i)}},QV=function(t){return t=t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},xp=function(t){return Math.pow(t,2)},wp=function(t){return Math.pow(t,3)},Op=function(t){return Math.pow(t,4)},_p=function(t){return Math.pow(t,5)},Sp=function(t){return Math.pow(t,6)},kp=function(t){return 1-Math.cos(t*Math.PI/2)},Ep=function(t){return 1-Math.sqrt(1-t*t)},Mp=function(t){return t*t*(3*t-2)},Ap=function(t){for(var n,r=4;t<((n=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((n*3-2)/22-t,2)},Pp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=Ce(n,2),i=r[0],a=i===void 0?1:i,o=r[1],s=o===void 0?.5:o,l=Hr(Number(a),1,10),c=Hr(Number(s),.1,2);return t===0||t===1?t:-l*Math.pow(2,10*(t-1))*Math.sin((t-1-c/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/c)},tf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=Ce(n,4),a=i[0],o=a===void 0?1:a,s=i[1],l=s===void 0?100:s,c=i[2],u=c===void 0?10:c,f=i[3],d=f===void 0?0:f;o=Hr(o,.1,1e3),l=Hr(l,.1,1e3),u=Hr(u,.1,1e3),d=Hr(d,.1,1e3);var h=Math.sqrt(l/o),p=u/(2*Math.sqrt(l*o)),v=p<1?h*Math.sqrt(1-p*p):0,g=1,y=p<1?(p*h+-d)/v:-d+h,m=r?r*t/1e3:t;return p<1?m=Math.exp(-m*p*h)*(g*Math.cos(v*m)+y*Math.sin(v*m)):m=(g+y*m)*Math.exp(-m*h),t===0||t===1?t:1-m},n1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=n,i=Ce(r,2),a=i[0],o=a===void 0?10:a,s=i[1],l=s==="start"?Math.ceil:Math.floor;return l(Hr(t,0,1)*o)/o},mA=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=Ce(n,4),i=r[0],a=r[1],o=r[2],s=r[3];return t1(i,a,o,s)(t)},Cp=t1(.42,0,1,1),Zr=function(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-t(1-n,r,i)}},Qr=function(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return n<.5?t(n*2,r,i)/2:1-t(n*-2+2,r,i)/2}},Jr=function(t){return function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return n<.5?(1-t(1-n*2,r,i))/2:(t(n*2-1,r,i)+1)/2}},bA={steps:n1,"step-start":function(t){return n1(t,[1,"start"])},"step-end":function(t){return n1(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":mA,ease:function(t){return mA(t,[.25,.1,.25,1])},in:Cp,out:Zr(Cp),"in-out":Qr(Cp),"out-in":Jr(Cp),"in-quad":xp,"out-quad":Zr(xp),"in-out-quad":Qr(xp),"out-in-quad":Jr(xp),"in-cubic":wp,"out-cubic":Zr(wp),"in-out-cubic":Qr(wp),"out-in-cubic":Jr(wp),"in-quart":Op,"out-quart":Zr(Op),"in-out-quart":Qr(Op),"out-in-quart":Jr(Op),"in-quint":_p,"out-quint":Zr(_p),"in-out-quint":Qr(_p),"out-in-quint":Jr(_p),"in-expo":Sp,"out-expo":Zr(Sp),"in-out-expo":Qr(Sp),"out-in-expo":Jr(Sp),"in-sine":kp,"out-sine":Zr(kp),"in-out-sine":Qr(kp),"out-in-sine":Jr(kp),"in-circ":Ep,"out-circ":Zr(Ep),"in-out-circ":Qr(Ep),"out-in-circ":Jr(Ep),"in-back":Mp,"out-back":Zr(Mp),"in-out-back":Qr(Mp),"out-in-back":Jr(Mp),"in-bounce":Ap,"out-bounce":Zr(Ap),"in-out-bounce":Qr(Ap),"out-in-bounce":Jr(Ap),"in-elastic":Pp,"out-elastic":Zr(Pp),"in-out-elastic":Qr(Pp),"out-in-elastic":Jr(Pp),spring:tf,"spring-in":tf,"spring-out":Zr(tf),"spring-in-out":Qr(tf),"spring-out-in":Jr(tf)},JV=function(t){return QV(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},eU=function(t){return bA[JV(t)]||bA.linear},tU=function(t){return t},nU=1,rU=.5,xA=0;function wA(e,t){return function(n){if(n>=1)return 1;var r=1/e;return n+=t*r,n-n%r}}var Tp="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",iU=new RegExp("cubic-bezier\\(".concat(Tp,",").concat(Tp,",").concat(Tp,",").concat(Tp,"\\)")),aU=/steps\(\s*(\d+)\s*\)/,oU=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function r1(e){var t=iU.exec(e);if(t)return t1.apply(void 0,vt(t.slice(1).map(Number)));var n=aU.exec(e);if(n)return wA(Number(n[1]),xA);var r=oU.exec(e);return r?wA(Number(r[1]),{start:nU,middle:rU,end:xA}[r[2]]):eU(e)}function sU(e){return Math.abs(lU(e)/(e.playbackRate||1))}function lU(e){var t;return e.duration===0||e.iterations===0?0:(e.duration==="auto"?0:Number(e.duration))*((t=e.iterations)!==null&&t!==void 0?t:1)}var OA=0,i1=1,Lp=2,_A=3;function cU(e,t,n){if(t===null)return OA;var r=n.endTime;return t<Math.min(n.delay,r)?i1:t>=Math.min(n.delay+e+n.endDelay,r)?Lp:_A}function uU(e,t,n,r,i){switch(r){case i1:return t==="backwards"||t==="both"?0:null;case _A:return n-i;case Lp:return t==="forwards"||t==="both"?e:null;case OA:return null}}function fU(e,t,n,r,i){var a=i;return e===0?t!==i1&&(a+=n):a+=r/e,a}function dU(e,t,n,r,i,a){var o=e===1/0?t%1:e%1;return o===0&&n===Lp&&r!==0&&(i!==0||a===0)&&(o=1),o}function hU(e,t,n,r){return e===Lp&&t===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function pU(e,t,n){var r=e;if(e!=="normal"&&e!=="reverse"){var i=t;e==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?n:1-n}function vU(e,t,n){var r=cU(e,t,n),i=uU(e,n.fill,t,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=fU(a,r,n.iterations,i,n.iterationStart),s=dU(o,n.iterationStart,r,n.iterations,i,a),l=hU(r,n.iterations,s,o),c=pU(n.direction,l,s);return n.currentIteration=l,n.progress=c,n.easingFunction(c)}function gU(e,t,n){var r=yU(e,t),i=mU(r,n);return function(a,o){if(o!==null)i.filter(function(l){return o>=l.applyFrom&&o<l.applyTo}).forEach(function(l){var c=o-l.startOffset,u=l.endOffset-l.startOffset,f=u===0?0:c/u;a.setAttribute(l.property,l.interpolation(f),!1,!1)});else for(var s in r)SA(s)&&a.setAttribute(s,null)}}function SA(e){return e!=="offset"&&e!=="easing"&&e!=="composite"&&e!=="computedOffset"}function yU(e,t){for(var n={},r=0;r<e.length;r++)for(var i in e[r])if(SA(i)){var a={offset:e[r].offset,computedOffset:e[r].computedOffset,easing:e[r].easing,easingFunction:r1(e[r].easing)||t.easingFunction,value:e[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function mU(e,t){var n=[];for(var r in e)for(var i=e[r],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,f=c;a===0&&(u=-1/0,c===0&&(s=o)),a===i.length-2&&(f=1/0,l===1&&(o=s)),n.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:bU(r,i[o].value,i[s].value,t)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var kA=function(t,n,r){return function(i){var a=EA(t,n,i);return po(a)?a:r(a)}};function bU(e,t,n,r){var i=zM[e];if(i&&i.syntax&&i.int){var a=te.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=a.parser,s=o?o(t,r):t,l=o?o(n,r):n,c=a.mixer(s,l,r);if(c){var u=kA.apply(void 0,vt(c));return function(f){return f===0?t:f===1?n:u(f)}}}}return kA(!1,!0,function(f){return f?n:t})}function EA(e,t,n){if(typeof e=="number"&&typeof t=="number")return e*(1-n)+t*n;if(typeof e=="boolean"&&typeof t=="boolean"||typeof e=="string"&&typeof t=="string")return n<.5?e:t;if(Array.isArray(e)&&Array.isArray(t)){for(var r=e.length,i=t.length,a=Math.max(r,i),o=[],s=0;s<a;s++)o.push(EA(e[s<r?s:r-1],t[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments ".concat(e,":").concat(t))}var xU=function(){function e(){J(this,e),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=tU,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return ee(e,[{key:"easing",get:function(){return this._easing},set:function(n){this.easingFunction=r1(n),this._easing=n}}])}();function wU(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var r=e[n];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!t[a]){var o={};"offset"in e&&(o.offset=Number(e.offset)),"easing"in e&&(o.easing=e.easing),"composite"in e&&(o.composite=e.composite),t[a]=o}r[a]!==void 0&&r[a]!==null&&(t[a][n]=r[a])}}return t.sort(function(s,l){return(s.computedOffset||0)-(l.computedOffset||0)}),t}function MA(e,t){if(e===null)return[];Array.isArray(e)||(e=wU(e));for(var n=e.map(function(l){var c={};t!=null&&t.composite&&(c.composite="auto");for(var u in l){var f=l[u];if(u==="offset"){if(f!==null){if(f=Number(f),!isFinite(f))throw new Error("Keyframe offsets must be numbers.");if(f<0||f>1)throw new Error("Keyframe offsets must be between 0 and 1.");c.computedOffset=f}}else if(u==="composite"&&["replace","add","accumulate","auto"].indexOf(f)===-1)throw new Error("".concat(f," compositing is not supported"));c[u]=f}return c.offset===void 0&&(c.offset=null),c.easing===void 0&&(c.easing=(t==null?void 0:t.easing)||"linear"),c.composite===void 0&&(c.composite="auto"),c}),r=!0,i=-1/0,a=0;a<n.length;a++){var o=n[a].offset;if(nn(o))r=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}n=n.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function s(){var l,c=n,u=c.length;if(n[u-1].computedOffset=Number((l=n[u-1].offset)!==null&&l!==void 0?l:1),u>1){var f;n[0].computedOffset=Number((f=n[0].offset)!==null&&f!==void 0?f:0)}for(var d=0,h=Number(n[0].computedOffset),p=1;p<u;p++){var v=n[p].computedOffset;if(!nn(v)&&!nn(h)){for(var g=1;g<p-d;g++)n[d+g].computedOffset=h+(Number(v)-h)*g/(p-d);d=p,h=Number(v)}}}return r||s(),n}var OU="backwards|forwards|both|none".split("|"),_U="reverse|alternate|alternate-reverse".split("|");function SU(e,t){var n=new xU;return typeof e=="number"&&!isNaN(e)?n.duration=e:e!==void 0&&Object.keys(e).forEach(function(r){if(e[r]!==void 0&&e[r]!==null&&e[r]!=="auto"){if((typeof n[r]=="number"||r==="duration")&&(typeof e[r]!="number"||isNaN(e[r]))||r==="fill"&&OU.indexOf(e[r])===-1||r==="direction"&&_U.indexOf(e[r])===-1)return;n[r]=e[r]}}),n}function kU(e,t){var n;return e=EU((n=e)!==null&&n!==void 0?n:{duration:"auto"}),SU(e)}function EU(e){return typeof e=="number"&&(isNaN(e)?e={duration:"auto"}:e={duration:e}),e}var MU=function(){function e(t,n,r){var i=this;J(this,e),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=kU(r),this.timing.effect=this,this.timing.activeDuration=sU(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=MA(n,this.timing),this.interpolations=gU(this.normalizedKeyframes,this.timing,this.target);var a=te.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(s,l){return l==="duration"?s.duration==="auto"?0:s.duration:l==="fill"?s.fill==="auto"?"none":s.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:s.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:s.progress||0:s[l]},set:function(){return!0}}):this.timing}return ee(e,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(n){return n===null?!1:(this.timeFraction=vU(this.timing.activeDuration,n,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(n){this.normalizedKeyframes=MA(n)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(n){var r=this;Object.keys(n||{}).forEach(function(i){r.timing[i]=n[i]})}}])}();function AA(e,t){return Number(e.id)-Number(t.id)}var AU=function(){function e(t){var n=this;J(this,e),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(r){n.currentTime=r,n.discardAnimations(),n.animations.length===0?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=n.rafCallbacks;n.rafCallbacks=[],r<Number(n.currentTime)&&(r=Number(n.currentTime)),n.animations.sort(AA),n.animations=n.tick(r,!0,n.animations)[0],i.forEach(function(a){a[1](r)}),n.applyPendingEffects()},this.document=t}return ee(e,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(n,r,i){var a=new MU(n,r,i),o=new GV(a,this);return this.animations.push(o),this.restartWebAnimationsNextTick(),o.updatePromises(),o.play(),o.updatePromises(),o}},{key:"applyDirtiedAnimation",value:function(n){var r=this;if(!this.inTick){n.markTarget();var i=n.targetAnimations();i.sort(AA);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(o){var s=r.animations.indexOf(o);s!==-1&&r.animations.splice(s,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(n){n==null||n.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(n){return n.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(n){return n.playState!=="finished"&&n.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(n){var r=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([r,n]),r}},{key:"requestAnimationFrame",value:function(n){var r=this;return this.rAF(function(i){r.updateAnimationsPromises(),n(i),r.updateAnimationsPromises()})}},{key:"tick",value:function(n,r,i){var a=this,o,s;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1;var l=[],c=[],u=[],f=[];return i.forEach(function(d){d.tick(n,r),d._inEffect?(c.push(d.effect),d.markTarget()):(l.push(d.effect),d.unmarkTarget()),d._needsTick&&(a.ticking=!0);var h=d._inEffect||d._needsTick;d._inTimeline=h,h?u.push(d):f.push(d)}),(o=this.pendingEffects).push.apply(o,l),(s=this.pendingEffects).push.apply(s,c),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[u,f]}}])}();te.EasingFunction=r1,te.AnimationTimeline=AU;function we(e){return new Np([e],null,e,e.ownerDocument)}let Np=class Bn{constructor(t=null,n=null,r=null,i=null,a=[null,null,null,null,null],o=[],s=[]){this._elements=Array.from(t),this._data=n,this._parent=r,this._document=i,this._enter=a[0],this._update=a[1],this._exit=a[2],this._merge=a[3],this._split=a[4],this._transitions=o,this._facetElements=s}selectAll(t){const n=typeof t=="string"?this._parent.querySelectorAll(t):t;return new Bn(n,null,this._elements[0],this._document)}selectFacetAll(t){const n=typeof t=="string"?this._parent.querySelectorAll(t):t;return new Bn(this._elements,null,this._parent,this._document,void 0,void 0,n)}select(t){const n=typeof t=="string"?this._parent.querySelectorAll(t)[0]||null:t;return new Bn([n],null,n,this._document)}append(t){const n=typeof t=="function"?t:()=>this.createElement(t),r=[];if(this._data!==null){for(let i=0;i<this._data.length;i++){const a=this._data[i],[o,s]=Array.isArray(a)?a:[a,null],l=n(o,i);l.__data__=o,s!==null&&(l.__fromElements__=s),this._parent.appendChild(l),r.push(l)}return new Bn(r,null,this._parent,this._document)}else{for(let i=0;i<this._elements.length;i++){const a=this._elements[i],o=a.__data__,s=n(o,i);a.appendChild(s),r.push(s)}return new Bn(r,null,r[0],this._document)}}maybeAppend(t,n,r){const i=this._elements[0],a=i.getElementById(t);if(a)return new Bn([a],null,this._parent,this._document);const o=typeof n=="string"?this.createElement(n):n();return o.id=t,r&&(o.className=r),i.appendChild(o),new Bn([o],null,this._parent,this._document)}data(t,n=i=>i,r=()=>null){const i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((h,p)=>[n(h.__data__,p),h])),u=new Map(this._facetElements.map((h,p)=>[n(h.__data__,p),h])),f=_t(this._elements,h=>r(h.__data__));for(let h=0;h<t.length;h++){const p=t[h],v=n(p,h),g=r(p,h);if(c.has(v)){const y=c.get(v);y.__data__=p,y.__facet__=!1,a.push(y),o.delete(y),c.delete(v)}else if(u.has(v)){const y=u.get(v);y.__data__=p,y.__facet__=!0,a.push(y),u.delete(v)}else if(f.has(v)){const y=f.get(v);s.push([p,y]);for(const m of y)o.delete(m);f.delete(v)}else if(c.has(g)){const y=c.get(g);y.__toData__?y.__toData__.push(p):y.__toData__=[p],l.add(y),o.delete(y)}else i.push(p)}const d=[new Bn([],i,this._parent,this._document),new Bn(a,null,this._parent,this._document),new Bn(o,null,this._parent,this._document),new Bn([],s,this._parent,this._document),new Bn(l,null,this._parent,this._document)];return new Bn(this._elements,null,this._parent,this._document,d)}merge(t){const n=[...this._elements,...t._elements],r=[...this._transitions,...t._transitions];return new Bn(n,null,this._parent,this._document,void 0,r)}createElement(t){if(this._document)return this._document.createElement(t,{});const n=Bn.registry[t];return n?new n:Sl(`Unknown node type: ${t}`)}join(t=o=>o,n=o=>o,r=o=>o.remove(),i=o=>o,a=o=>o.remove()){const o=t(this._enter),s=n(this._update),l=r(this._exit),c=i(this._merge),u=a(this._split);return s.merge(o).merge(l).merge(c).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._transitions[t];if(n){const r=Array.isArray(n)?n:[n];Promise.all(r.map(i=>i.finished)).then(()=>{this._elements[t].remove()})}else this._elements[t].remove()}return new Bn([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let n=0;n<this._elements.length;n++){const r=this._elements[n],i=r.__data__;t(i,n,r)}return this}attr(t,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o[t]=r(i,a,o))})}style(t,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o.style[t]=r(i,a,o))})}transition(t){const n=typeof t!="function"?()=>t:t,{_transitions:r}=this;return this.each(function(i,a,o){r[a]=n(i,a,o)})}on(t,n){return this.each(function(r,i,a){a.addEventListener(t,n)}),this}call(t,...n){return t(this,...n),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}};Np.registry={g:bn,rect:Oo,circle:Aa,path:Xn,text:qr,ellipse:hp,image:pp,line:Cs,polygon:Ts,polyline:vp,html:Ju};function Ip(e,t,n){return Math.max(t,Math.min(e,n))}function jp(e,t=10){return typeof e!="number"||Math.abs(e)<1e-15?e:parseFloat(e.toFixed(t))}function ve(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}function PU(e,t){return t.forEach((n,r)=>r===0?e.moveTo(n[0],n[1]):e.lineTo(n[0],n[1])),e.closePath(),e}function CU(e,t,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*jt(e,t):r,a=Math.PI/6,o=Math.atan2(t[1]-e[1],t[0]-e[0]),s=Math.PI/2-o-a,l=[t[0]-i*Math.sin(s),t[1]-i*Math.cos(s)],c=o-a,u=[t[0]-i*Math.cos(c),t[1]-i*Math.sin(c)];return[l,u]}function nf(e,t,n,r,i){const a=Wr(Yt(r,t))+Math.PI,o=Wr(Yt(r,n))+Math.PI;return e.arc(r[0],r[1],i,a,o,o-a<0),e}function PA(e,t,n,r="y",i="between",a=!1){const o=(g,y)=>g==="y"||g===!0?y?180:90:y?90:0,s=r==="y"||r===!0?n:t,l=o(r,a),c=fs(s),[u,f]=Sa(c,g=>s[g]),d=new bt({domain:[u,f],range:[0,100]}),h=g=>_n(s[g])&&!Number.isNaN(s[g])?d.map(s[g]):0,p={between:g=>`${e[g]} ${h(g)}%`,start:g=>g===0?`${e[g]} ${h(g)}%`:`${e[g-1]} ${h(g)}%, ${e[g]} ${h(g)}%`,end:g=>g===e.length-1?`${e[g]} ${h(g)}%`:`${e[g]} ${h(g)}%, ${e[g+1]} ${h(g)}%`},v=c.sort((g,y)=>h(g)-h(y)).map(p[i]||p.between).join(",");return`linear-gradient(${l}deg, ${v})`}function Dp(e){const[t,n,r,i]=e;return[i,t,n,r]}function Ls(e,t,n){const[r,i,,a]=kt(e)?Dp(t):t,[o,s]=n,l=e.getCenter(),c=Pl(Yt(r,l)),u=Pl(Yt(i,l)),f=u===c&&o!==s?u+Math.PI*2:u;return{startAngle:c,endAngle:f-c>=0?f:Math.PI*2+f,innerRadius:jt(a,l),outerRadius:jt(r,l)}}function a1(e){const{colorAttribute:t,opacityAttribute:n=t}=e;return`${n}Opacity`}function CA(e,t){if(!st(e))return"";const n=e.getCenter(),{transform:r}=t;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function o1(e){if(e.length===1)return e[0];const[[t,n,r=0],[i,a,o=0]]=e;return[(t+i)/2,(n+a)/2,(r+o)/2]}var Fp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function TA(e,t,n,r,i={}){const{inset:a=0,radius:o=0,insetLeft:s=a,insetTop:l=a,insetRight:c=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:v=-1/0,maxWidth:g=1/0,minHeight:y=-1/0}=i,m=Fp(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!st(r)&&!lE(r)){const S=!!kt(r),[k,,E]=S?Dp(t):t,[M,P]=k,[A,L]=Yt(E,k),N=A>0?M:M+A,T=L>0?P:P+L,I=Math.abs(A),C=Math.abs(L),j=N+s,D=T+l,F=I-(s+c),R=C-(l+u),z=S?Ip(F,y,1/0):Ip(F,v,g),H=S?Ip(R,v,g):Ip(R,y,1/0),W=S?j:j-(z-F)/2,X=S?D-(H-R)/2:D-(H-R);return we(e.createElement("rect",{})).style("x",W).style("y",X).style("width",z).style("height",H).style("radius",[h,p,d,f]).call(ve,m).node()}const{y:b,y1:x}=n,w=r.getCenter(),O=Ls(r,t,[b,x]),_=Dh().cornerRadius(o).padAngle(a*Math.PI/180);return we(e.createElement("path",{})).style("d",_(O)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",o).style("inset",a).call(ve,m).node()}const rf=(e,t)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=e,o=Fp(e,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:l}=t;return(c,u,f)=>{const{color:d,radius:h=0}=f,p=Fp(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:y=h,radiusTopLeft:m=y,radiusTopRight:b=y,radiusBottomRight:x=y,radiusBottomLeft:w=y,innerRadius:O=0,innerRadiusTopLeft:_=O,innerRadiusTopRight:S=O,innerRadiusBottomRight:k=O,innerRadiusBottomLeft:E=O,lineWidth:M=n==="stroke"||g?v:0,inset:P=0,insetLeft:A=P,insetRight:L=P,insetBottom:N=P,insetTop:T=P,minWidth:I,maxWidth:C,minHeight:j}=o,D=Fp(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:F=d,opacity:R}=u,z=[i?m:_,i?b:S,a?x:k,a?w:E],H=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];kt(s)&&H.push(H.shift());const W=Object.assign(Object.assign({radius:y},Object.fromEntries(H.map((X,V)=>[X,z[V]]))),{inset:P,insetLeft:A,insetRight:L,insetBottom:N,insetTop:T,minWidth:I,maxWidth:C,minHeight:j});return we(TA(l,c,u,s,W)).call(ve,p).style("fill","transparent").style(n,F).style(a1(e),R).style("lineWidth",M).style("stroke",g===void 0?F:g).call(ve,D).node()}};rf.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Ns=(e,t)=>rf(Object.assign({colorAttribute:"fill"},e),t);Ns.props=Object.assign(Object.assign({},rf.props),{defaultMarker:"square"});const Rp=(e,t)=>rf(Object.assign({colorAttribute:"stroke"},e),t);Rp.props=Object.assign(Object.assign({},rf.props),{defaultMarker:"hollowSquare"});var LA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function TU(e,t,n){const[r,i,a,o]=e;if(kt(n)){const c=[t?t[0][0]:i[0],i[1]],u=[t?t[3][0]:a[0],a[1]];return[r,c,u,o]}const s=[i[0],t?t[0][1]:i[1]],l=[a[0],t?t[3][1]:a[1]];return[r,s,l,o]}const s1=(e,t)=>{const{adjustPoints:n=TU}=e,r=LA(e,["adjustPoints"]),{coordinate:i,document:a}=t;return(o,s,l,c)=>{const{index:u}=s,{color:f}=l,d=LA(l,["color"]),h=c[u+1],p=n(o,h,i),v=!!kt(i),[g,y,m,b]=v?Dp(p):p,{color:x=f,opacity:w}=s,O=ys().curve(rm)([g,y,m,b]);return we(a.createElement("path",{})).call(ve,d).style("d",O).style("fill",x).style("fillOpacity",w).call(ve,r).node()}};s1.props={defaultMarker:"square"};function LU(e,t,n){const[r,i,a,o]=e;if(kt(n)){const c=[t?t[0][0]:(i[0]+a[0])/2,i[1]],u=[t?t[3][0]:(i[0]+a[0])/2,a[1]];return[r,c,u,o]}const s=[i[0],t?t[0][1]:(i[1]+a[1])/2],l=[a[0],t?t[3][1]:(i[1]+a[1])/2];return[r,s,l,o]}const NA=(e,t)=>s1(Object.assign({adjustPoints:LU},e),t);NA.props={defaultMarker:"square"};function Xl(e){const t=typeof e=="function"?e:e.render;return class extends Qu{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){t(this)}}}var IA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const NU=Xl(e=>{const{d1:t,d2:n,style1:r,style2:i}=e.attributes,a=e.ownerDocument;we(e).maybeAppend("line",()=>a.createElement("path",{})).style("d",t).call(ve,r),we(e).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(ve,i)});function IU(e,t){const n=[],r=[];let i=!1,a=null;for(const o of e)!t(o[0])||!t(o[1])?i=!0:(n.push(o),i&&(i=!1,r.push([a,o])),a=o);return[n,r]}const ei=(e,t)=>{const{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=u=>!Number.isNaN(u)&&u!==void 0&&u!==null,connect:o=!1}=e,s=IA(e,["curve","gradient","gradientColor","defined","connect"]),{coordinate:l,document:c}=t;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=IA(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:x}=f,w=CA(l,f),O=kt(l),_=r&&m?PA(m,b,x,r,i,O):g,S=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),_&&{stroke:_}),y&&{lineWidth:y}),w&&{transform:w}),s);let k;if(st(l)){const N=l.getCenter();k=T=>G7().angle((I,C)=>Pl(Yt(T[C],N))).radius((I,C)=>jt(T[C],N)).defined(([I,C])=>a(I)&&a(C)).curve(n)(T)}else k=ys().x(N=>N[0]).y(N=>N[1]).defined(([N,T])=>a(N)&&a(T)).curve(n);const[E,M]=IU(u,a),P=le(S,"connect"),A=!!M.length;if(!A||o&&!Object.keys(P).length)return we(c.createElement("path",{})).style("d",k(E)||[]).call(ve,S).node();if(A&&!o)return we(c.createElement("path",{})).style("d",k(u)).call(ve,S).node();const L=N=>N.map(k).join(",");return we(new NU).style("style1",Object.assign(Object.assign({},S),P)).style("style2",S).style("d1",L(M)).style("d2",k(u)).node()}};ei.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const jA=(e,t)=>{const{coordinate:n}=t;return(...r)=>{const i=st(n)?rm:Ru;return ei(Object.assign({curve:i},e),t)(...r)}};jA.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"line"});var jU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const DA=(e,t)=>{const n=jU(e,[]),{coordinate:r}=t;return(...i)=>{const a=st(r)?Kk:kt(r)?iE:rE;return ei(Object.assign({curve:a},n),t)(...i)}};DA.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"smooth"});const FA=(e,t)=>ei(Object.assign({curve:sE},e),t);FA.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"hv"});const RA=(e,t)=>ei(Object.assign({curve:oE},e),t);RA.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"vh"});const $A=(e,t)=>ei(Object.assign({curve:aE},e),t);$A.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"hvh"});var DU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function FU(e,t,n,r,i){const a=Yt(n,t),o=Wr(a),s=o+Math.PI/2,l=[r/2*Math.cos(s),r/2*Math.sin(s)],c=[i/2*Math.cos(s),i/2*Math.sin(s)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],f=[r/2*Math.cos(o),r/2*Math.sin(o)],d=Nh(t,l),h=Nh(n,c),p=Nh(h,u),v=Nh(n,u),g=Yt(v,c),y=Yt(n,c),m=Yt(t,l),b=Yt(m,f),x=Yt(t,f),w=Yt(d,f);e.moveTo(...d),e.lineTo(...h),e.arcTo(...p,...v,i/2),e.arcTo(...g,...y,i/2),e.lineTo(...m),e.arcTo(...b,...x,r/2),e.arcTo(...w,...d,r/2),e.closePath()}const zA=(e,t)=>{const{document:n}=t;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:l}=a,c=DU(a,["color"]),u=Gr();for(let f=0;f<r.length-1;f++){const d=r[f],h=r[f+1],p=o[f],v=o[f+1];[...d,...h].every(pt)&&FU(u,d,h,p,v)}return we(n.createElement("path",{})).call(ve,c).style("fill",s||l).style("d",u.toString()).call(ve,e).node()}};zA.props=Object.assign(Object.assign({},ei.props),{defaultMarker:"line"});var RU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const l1=(e,t,n)=>[["M",e-n,t],["A",n,n,0,1,0,e+n,t],["A",n,n,0,1,0,e-n,t],["Z"]];l1.style=["fill"];const BA=l1.bind(void 0);BA.style=["stroke","lineWidth"];const $p=(e,t,n)=>[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]];$p.style=["fill"];const YA=$p.bind(void 0);YA.style=["fill"];const WA=$p.bind(void 0);WA.style=["stroke","lineWidth"];const c1=(e,t,n)=>{const r=n*.618;return[["M",e-r,t],["L",e,t-n],["L",e+r,t],["L",e,t+n],["Z"]]};c1.style=["fill"];const GA=c1.bind(void 0);GA.style=["stroke","lineWidth"];const u1=(e,t,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["Z"]]};u1.style=["fill"];const HA=u1.bind(void 0);HA.style=["stroke","lineWidth"];const f1=(e,t,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]};f1.style=["fill"];const VA=f1.bind(void 0);VA.style=["stroke","lineWidth"];const d1=(e,t,n)=>{const r=n/2*Math.sqrt(3);return[["M",e,t-n],["L",e+r,t-n/2],["L",e+r,t+n/2],["L",e,t+n],["L",e-r,t+n/2],["L",e-r,t-n/2],["Z"]]};d1.style=["fill"];const UA=d1.bind(void 0);UA.style=["stroke","lineWidth"];const h1=(e,t,n)=>{const r=n-1.5;return[["M",e-n,t-r],["L",e+n,t+r],["L",e+n,t-r],["L",e-n,t+r],["Z"]]};h1.style=["fill"];const XA=h1.bind(void 0);XA.style=["stroke","lineWidth"];const qA=(e,t,n)=>[["M",e,t+n],["L",e,t-n]];qA.style=["stroke","lineWidth"];const KA=(e,t,n)=>[["M",e-n,t-n],["L",e+n,t+n],["M",e+n,t-n],["L",e-n,t+n]];KA.style=["stroke","lineWidth"];const ZA=(e,t,n)=>[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]];ZA.style=["stroke","lineWidth"];const QA=(e,t,n)=>[["M",e-n,t],["L",e+n,t],["M",e,t-n],["L",e,t+n]];QA.style=["stroke","lineWidth"];const JA=(e,t,n)=>[["M",e-n,t],["L",e+n,t]];JA.style=["stroke","lineWidth"];const p1=(e,t,n)=>[["M",e-n,t],["L",e+n,t]];p1.style=["stroke","lineWidth"];const eP=p1.bind(void 0);eP.style=["stroke","lineWidth"];const tP=(e,t,n)=>[["M",e-n,t],["A",n/2,n/2,0,1,1,e,t],["A",n/2,n/2,0,1,0,e+n,t]];tP.style=["stroke","lineWidth"];const nP=(e,t,n)=>[["M",e-n-1,t-2.5],["L",e,t-2.5],["L",e,t+2.5],["L",e+n+1,t+2.5]];nP.style=["stroke","lineWidth"];const rP=(e,t,n)=>[["M",e-n-1,t+2.5],["L",e,t+2.5],["L",e,t-2.5],["L",e+n+1,t-2.5]];rP.style=["stroke","lineWidth"];const iP=(e,t,n)=>[["M",e-(n+1),t+2.5],["L",e-n/2,t+2.5],["L",e-n/2,t-2.5],["L",e+n/2,t-2.5],["L",e+n/2,t+2.5],["L",e+n+1,t+2.5]];iP.style=["stroke","lineWidth"];const aP=(e,t,n)=>[["M",e-5,t+2.5],["L",e-5,t],["L",e,t],["L",e,t-3],["L",e,t+3],["L",e+6.5,t+3]];aP.style=["stroke","lineWidth"];const af=new Map([["bowtie",h1],["cross",KA],["dash",eP],["diamond",c1],["dot",p1],["hexagon",d1],["hollowBowtie",XA],["hollowDiamond",GA],["hollowHexagon",UA],["hollowPoint",BA],["hollowSquare",WA],["hollowTriangle",HA],["hollowTriangleDown",VA],["hv",nP],["hvh",iP],["hyphen",JA],["line",qA],["plus",QA],["point",l1],["rect",YA],["smooth",tP],["square",$p],["tick",ZA],["triangleDown",f1],["triangle",u1],["vh",rP],["vhv",aP]]);function $U(e,t){var{d:n,fill:r,lineWidth:i,path:a,stroke:o,color:s}=t,l=RU(t,["d","fill","lineWidth","path","stroke","color"]);const c=af.get(e)||af.get("point");return(...u)=>new Xn({style:Object.assign(Object.assign({},l),{d:c(...u),stroke:c.style.includes("stroke")?s||o:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?i||i||2:0})})}function zU(e,t){af.set(e,t)}var BU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function oP(e,t,n,r){if(t.length===1)return;const{size:i}=n;if(e==="fixed")return i;if(e==="normal"||cE(r)){const[[a,o],[s,l]]=t,c=Math.abs((s-a)/2),u=Math.abs((l-o)/2);return Math.max(0,(c+u)/2)}return i}const We=(e,t)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=e,a=BU(e,["colorAttribute","symbol","mode"]),o=af.get(r)||af.get("point"),{coordinate:s,document:l}=t;return(c,u,f)=>{const{lineWidth:d,color:h}=f,p=a.stroke?d||1:d,{color:v=h,transform:g,opacity:y}=u,[m,b]=o1(c),w=oP(i,c,u,s)||a.r||f.r;return we(l.createElement("path",{})).call(ve,f).style("fill","transparent").style("d",o(m,b,w)).style("lineWidth",p).style("transform",g).style("transformOrigin",`${m-w} ${b-w}`).style("stroke",v).style(a1(e),y).style(n,v).call(ve,a).node()}};We.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const sP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},e),t);sP.props=Object.assign({defaultMarker:"hollowBowtie"},We.props);const lP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"diamond"},e),t);lP.props=Object.assign({defaultMarker:"hollowDiamond"},We.props);const cP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},e),t);cP.props=Object.assign({defaultMarker:"hollowHexagon"},We.props);const uP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"point"},e),t);uP.props=Object.assign({defaultMarker:"hollowPoint"},We.props);const fP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"square"},e),t);fP.props=Object.assign({defaultMarker:"hollowSquare"},We.props);const dP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"triangle"},e),t);dP.props=Object.assign({defaultMarker:"hollowTriangle"},We.props);const hP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},e),t);hP.props=Object.assign({defaultMarker:"hollowTriangleDown"},We.props);var YU=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const pP=(e,t)=>{const{colorAttribute:n,mode:r="auto"}=e,i=YU(e,["colorAttribute","mode"]),{coordinate:a,document:o}=t;return(s,l,c)=>{const{lineWidth:u,color:f}=c,d=i.stroke?u||1:u,{color:h=f,transform:p,opacity:v}=l,[g,y]=o1(s),b=oP(r,s,l,a)||i.r||c.r;return we(o.createElement("circle",{})).call(ve,c).style("fill","transparent").style("cx",g).style("cy",y).style("r",b).style("lineWidth",d).style("transform",p).style("transformOrigin",`${g} ${y}`).style("stroke",h).style(a1(e),v).style(n,h).call(ve,i).node()}},v1=(e,t)=>pP(Object.assign({colorAttribute:"fill"},e),t);v1.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const vP=(e,t)=>pP(Object.assign({colorAttribute:"stroke"},e),t);vP.props=Object.assign({defaultMarker:"hollowPoint"},v1.props);const gP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"bowtie"},e),t);gP.props=Object.assign({defaultMarker:"bowtie"},We.props);const yP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"cross"},e),t);yP.props=Object.assign({defaultMarker:"cross"},We.props);const mP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"diamond"},e),t);mP.props=Object.assign({defaultMarker:"diamond"},We.props);const bP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"hexagon"},e),t);bP.props=Object.assign({defaultMarker:"hexagon"},We.props);const xP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},e),t);xP.props=Object.assign({defaultMarker:"hyphen"},We.props);const wP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"line"},e),t);wP.props=Object.assign({defaultMarker:"line"},We.props);const OP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"plus"},e),t);OP.props=Object.assign({defaultMarker:"plus"},We.props);const _P=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"point"},e),t);_P.props=Object.assign({defaultMarker:"point"},We.props);const SP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"square"},e),t);SP.props=Object.assign({defaultMarker:"square"},We.props);const kP=(e,t)=>We(Object.assign({colorAttribute:"stroke",symbol:"tick"},e),t);kP.props=Object.assign({defaultMarker:"tick"},We.props);const EP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"triangle"},e),t);EP.props=Object.assign({defaultMarker:"triangle"},We.props);const MP=(e,t)=>We(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},e),t);MP.props=Object.assign({defaultMarker:"triangleDown"},We.props);var AP=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const g1=(e,t)=>{const{arrow:n=!0,arrowSize:r="40%"}=e,i=AP(e,["arrow","arrowSize"]),{document:a}=t;return(o,s,l)=>{const{defaultColor:c}=l,u=AP(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,v=Gr();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=CU(h,p,{arrowSize:r});v.moveTo(...g),v.lineTo(...p),v.lineTo(...y)}return we(a.createElement("path",{})).call(ve,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(ve,i).node()}};g1.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var y1=function(e,t){return y1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},y1(e,t)};function Rt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");y1(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var re=function(){return re=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},re.apply(this,arguments)};function Sn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function of(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function me(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function m1(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)}typeof SuppressedError=="function"&&SuppressedError;function PP(e,t){t(e),e.children&&e.children.forEach(function(n){n&&PP(n,t)})}function sf(e){zp(e,!0)}function _o(e){zp(e,!1)}function zp(e,t){var n=t?"visible":"hidden";PP(e,function(r){r.attr("visibility",n)})}var WU=function(e){Rt(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,me([],$(n),!1))||this;return i.isMutationObserved=!0,i.addEventListener(je.INSERTED,function(){_o(i)}),i}return t}(bn);function CP(e){var t=e.appendChild(new WU({class:"offscreen"}));return _o(t),t}function GU(e){for(var t=e;t;){if(t.className==="offscreen")return!0;t=t.parent}return!1}var b1=function(e){Rt(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Sn(n,["style"]);return e.call(this,re({style:re({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=CP(this)),this._offscreen},enumerable:!1,configurable:!0}),t.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},t}(qr);function ql(e){return e*Math.PI/180}function TP(e){return Number((e*180/Math.PI).toPrecision(5))}var Tt=function(){function e(t,n,r,i){t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=n,this.width=r,this.height=i}return Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e.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}},e.prototype.isPointIn=function(t,n){return t>=this.left&&t<=this.right&&n>=this.top&&n<=this.bottom},e}();function ti(e,t){return fr(e)?e.apply(void 0,me([],$(t),!1)):e}var ni=function(e,t){var n=function(i){return"".concat(t,"-").concat(i)},r=Object.fromEntries(Object.entries(e).map(function(i){var a=$(i,2),o=a[0],s=a[1],l=n(s);return[o,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(r,{prefix:n}),r},HU=5,LP=function(e,t,n,r){n===void 0&&(n=0),r===void 0&&(r=HU),Object.entries(t).forEach(function(i){var a=$(i,2),o=a[0],s=a[1],l=e;Object.prototype.hasOwnProperty.call(t,o)&&(s?xa(s)?(xa(e[o])||(l[o]={}),n<r?LP(e[o],s,n+1,r):l[o]=t[o]):er(s)?(l[o]=[],l[o]=l[o].concat(s)):l[o]=s:l[o]=s)})},Pa=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)LP(e,t[r]);return e},NP=function(e){return e!==void 0&&e!=null&&!Number.isNaN(e)},Bp,VU=G$(function(e,t){var n=t.fontSize,r=t.fontFamily,i=t.fontWeight,a=t.fontStyle,o=t.fontVariant;return Bp||(Bp=te.offscreenCanvasCreator.getOrCreateContext(void 0)),Bp.font=[a,o,i,"".concat(n,"px"),r].join(" "),Bp.measureText(e).width},function(e,t){return[e,Object.values(t||IP(e)).join()].join("")},4096),IP=function(e){var t=e.style.fontFamily||"sans-serif",n=e.style.fontWeight||"normal",r=e.style.fontStyle||"normal",i=e.style.fontVariant,a=e.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:t,fontWeight:n,fontStyle:r,fontVariant:i}};function jP(e){return e.nodeName==="text"?e:e.nodeName==="g"&&e.children.length===1&&e.children[0].nodeName==="text"?e.children[0]:null}function DP(e,t){var n=jP(e);n&&n.attr(t)}function x1(e,t,n){n===void 0&&(n="..."),DP(e,{wordWrap:!0,wordWrapWidth:t,maxLines:1,textOverflow:n})}function UU(e,t,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),DP(e,{wordWrap:!0,wordWrapWidth:t,maxLines:n,textBaseline:r})}function Yp(e){var t=e.canvas,n=e.touches,r=e.offsetX,i=e.offsetY;if(t){var a=t.x,o=t.y;return[a,o]}if(n){var s=n[0],l=s.clientX,c=s.clientY;return[l,c]}return r&&i?[r,i]:[0,0]}function Is(e){return typeof e=="function"?e():tr(e)||_n(e)?new b1({style:{text:String(e)}}):e}function XU(e,t){return e.reduce(function(n,r){return(n[r[t]]=n[r[t]]||[]).push(r),n},{})}function gr(e,t,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),e?n(t):(r&&i(t),null)}function Nn(e,t,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&e===t||i&&e===n?!0:e>t&&e<n}var qU=function(e,t){return function(n){return e*(1-n)+t*n}};function KU(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0;return function(i){var a=new Array(r),o=new Array(n),s=0;for(s=0;s<r;++s)a[s]=w1(e[s],t[s]);for(;s<n;++s)o[s]=t[s];for(s=0;s<r;++s)o[s]=a[s](i);return o}}function ZU(e,t){e===void 0&&(e={}),t===void 0&&(t={});var n={},r={};return Object.entries(t).forEach(function(i){var a=$(i,2),o=a[0],s=a[1];o in e?n[o]=w1(e[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=$(a,2),s=o[0],l=o[1];return r[s]=l(i)}),r}}function w1(e,t){return typeof e=="number"&&typeof t=="number"?qU(e,t):Array.isArray(e)&&Array.isArray(t)?KU(e,t):typeof e=="object"&&typeof t=="object"?ZU(e,t):function(n){return e}}function QU(e,t,n,r){if(!r)return e.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=w1(t,n),s=Math.ceil(+a/16),l=new Array(s).fill(0).map(function(c,u,f){return{__keyframe_data__:o(u/(f.length-1))}});return e.animate(l,re({fill:"both"},r))}function FP(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<e.length;a++){var o=e[a],s=o.x,l=o.y,c=o.width,u=o.height,f=$([s+c,l+u],2),d=f[0],h=f[1];s<t&&(t=s),l<n&&(n=l),d>r&&(r=d),h>i&&(i=h)}return new Tt(t,n,r-t,i-n)}var JU=function(e,t,n){var r=e.width,i=e.height,a=n.flexDirection,o=a===void 0?"row":a;n.flexWrap;var s=n.justifyContent,l=s===void 0?"flex-start":s;n.alignContent;var c=n.alignItems,u=c===void 0?"flex-start":c,f=o==="row",d=o==="row"||o==="column",h=f?d?[1,0]:[-1,0]:d?[0,1]:[0,-1],p=$([0,0],2),v=p[0],g=p[1],y=t.map(function(S){var k,E=S.width,M=S.height,P=$([v,g],2),A=P[0],L=P[1];return k=$([v+E*h[0],g+M*h[1]],2),v=k[0],g=k[1],new Tt(A,L,E,M)}),m=FP(y),b={"flex-start":0,"flex-end":f?r-m.width:i-m.height,center:f?(r-m.width)/2:(i-m.height)/2},x=y.map(function(S){var k=S.x,E=S.y,M=Tt.fromRect(S);return M.x=f?k+b[l]:k,M.y=f?E:E+b[l],M});FP(x);var w=function(S){var k=$(f?["height",i]:["width",r],2),E=k[0],M=k[1];switch(u){case"flex-start":return 0;case"flex-end":return M-S[E];case"center":return M/2-S[E]/2;default:return 0}},O=x.map(function(S){var k=S.x,E=S.y,M=Tt.fromRect(S);return M.x=f?k:k+w(M),M.y=f?E+w(M):E,M}),_=O.map(function(S){var k,E,M=Tt.fromRect(S);return M.x+=(k=e.x)!==null&&k!==void 0?k:0,M.y+=(E=e.y)!==null&&E!==void 0?E:0,M});return _},eX=function(e,t,n){return[]};const tX=function(e,t,n){if(t.length===0)return[];var r={flex:JU,grid:eX},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,e,t,n))||[]};function Ca(e,t){return[e[0]*t,e[1]*t]}function lf(e,t){return[e[0]+t[0],e[1]+t[1]]}function O1(e,t){return[e[0]-t[0],e[1]-t[1]]}function js(e,t){return[Math.min(e[0],t[0]),Math.min(e[1],t[1])]}function Ds(e,t){return[Math.max(e[0],t[0]),Math.max(e[1],t[1])]}function cf(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function RP(e){if(e[0]===0&&e[1]===0)return[0,0];var t=Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2));return[e[0]/t,e[1]/t]}function nX(e,t){return t?[e[1],-e[0]]:[-e[1],e[0]]}function _1(e,t){return+e.toPrecision(t)}function $P(e,t){var n={},r=Array.isArray(t)?t:[t];for(var i in e)r.includes(i)||(n[i]=e[i]);return n}function rX(e,t,n,r){var i,a=[],o=!!r,s,l,c=[1/0,1/0],u=[-1/0,-1/0],f,d,h;if(o){i=$(r,2),c=i[0],u=i[1];for(var p=0,v=e.length;p<v;p+=1){var g=e[p];c=js(c,g),u=Ds(u,g)}}for(var p=0,y=e.length;p<y;p+=1){var g=e[p];if(p===0&&!n)h=g;else if(p===y-1&&!n)d=g,a.push(h),a.push(d);else{var m=[p?p-1:y-1,p-1][1];s=e[m],l=e[p+1];var b=[0,0];b=O1(l,s),b=Ca(b,t);var x=cf(g,s),w=cf(g,l),O=x+w;O!==0&&(x/=O,w/=O);var _=Ca(b,-x),S=Ca(b,w);d=lf(g,_),f=lf(g,S),f=js(f,Ds(l,g)),f=Ds(f,js(l,g)),_=O1(f,g),_=Ca(_,-x/w),d=lf(g,_),d=js(d,Ds(s,g)),d=Ds(d,js(s,g)),S=O1(g,d),S=Ca(S,w/x),f=lf(g,S),o&&(d=Ds(d,c),d=js(d,u),f=Ds(f,c),f=js(f,u)),a.push(h),a.push(d),h=f}}return a}function iX(e,t,n){n===void 0&&(n=[[0,0],[1,1]]);for(var r=!!t,i=[],a=0,o=e.length;a<o;a+=2)i.push([e[a],e[a+1]]);for(var s=rX(i,.4,r,n),l=i.length,c=[],u,f,d,a=0;a<l-1;a+=1)u=s[a*2],f=s[a*2+1],d=i[a+1],c.push(["C",u[0],u[1],f[0],f[1],d[0],d[1]]);return c}var aX=["$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 oX(e){return aX.includes(e)}function zP(e){var t={};for(var n in e)oX(n)&&(t[n]=e[n]);return t}function sX(e,t){if(e.length<=t)return e;for(var n=Math.floor(e.length/t),r=[],i=0;i<e.length;i+=n)r.push(e[i]);return r}function S1(e,t,n){var r=e.getBBox(),i=r.width,a=r.height,o=t/Math.max(i,a);return e.style.transform="scale(".concat(o,")"),o}function lX(e,t){var n=new Map;return e.forEach(function(r){var i=t(r);n.has(i)||n.set(i,[]),n.get(i).push(r)}),n}function cX(e){throw new Error(e)}var uX=function(){function e(i,a,o,s,l,c,u){i===void 0&&(i=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]),c===void 0&&(c=[]),u===void 0&&(u=[]),t.add(this),this._elements=Array.from(i),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=c,this._facetElements=u}e.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(a,null,this._elements[0],this._document)},e.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(this._elements,null,this._parent,this._document,void 0,void 0,a)},e.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new n([a],null,a,this._document)},e.prototype.append=function(i){var a=this,o=typeof i=="function"?i:function(){return a.createElement(i)},s=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var c=this._data[l],u=$(Array.isArray(c)?c:[c,null],2),f=u[0],d=u[1],h=o(f,l);h.__data__=f,d!==null&&(h.__fromElements__=d),this._parent.appendChild(h),s.push(h)}return new n(s,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var p=this._elements[l],f=p.__data__,h=o(f,l);p.appendChild(h),s.push(h)}return new n(s,null,s[0],this._document)},e.prototype.maybeAppend=function(i,a){var o=m1(this,t,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return o.attr("id",i),o},e.prototype.maybeAppendByClassName=function(i,a){var o=i.toString(),s=m1(this,t,"m",r).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},e.prototype.maybeAppendByName=function(i,a){var o=m1(this,t,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},e.prototype.data=function(i,a,o){var s,l;a===void 0&&(a=function(E){return E}),o===void 0&&(o=function(){return null});for(var c=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(E,M){return[a(E.__data__,M),E]})),v=new Map(this._facetElements.map(function(E,M){return[a(E.__data__,M),E]})),g=lX(this._elements,function(E){return o(E.__data__)}),y=0;y<i.length;y++){var m=i[y],b=a(m,y),x=o(m,y);if(p.has(b)){var w=p.get(b);w.__data__=m,w.__facet__=!1,u.push(w),f.delete(w),p.delete(b)}else if(v.has(b)){var w=v.get(b);w.__data__=m,w.__facet__=!0,u.push(w),v.delete(b)}else if(g.has(b)){var O=g.get(b);d.push([m,O]);try{for(var _=(s=void 0,of(O)),S=_.next();!S.done;S=_.next()){var w=S.value;f.delete(w)}}catch(E){s={error:E}}finally{try{S&&!S.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}g.delete(b)}else if(p.has(x)){var w=p.get(x);w.__toData__?w.__toData__.push(m):w.__toData__=[m],h.add(w),f.delete(w)}else c.push(m)}var k=[new n([],c,this._parent,this._document),new n(u,null,this._parent,this._document),new n(f,null,this._parent,this._document),new n([],d,this._parent,this._document),new n(h,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,k)},e.prototype.merge=function(i){var a=me(me([],$(this._elements),!1),$(i._elements),!1),o=me(me([],$(this._transitions),!1),$(i._transitions),!1);return new n(a,null,this._parent,this._document,void 0,o)},e.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=n.registry[i];return a?new a:cX("Unknown node type: ".concat(i))},e.prototype.join=function(i,a,o,s,l){i===void 0&&(i=function(p){return p}),a===void 0&&(a=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),s===void 0&&(s=function(p){return p}),l===void 0&&(l=function(p){return p.remove()});var c=i(this._enter),u=a(this._update),f=o(this._exit),d=s(this._merge),h=l(this._split);return u.merge(c).merge(f).merge(d).merge(h)},e.prototype.remove=function(){for(var i=function(s){var l=a._elements[s],c=a._transitions[s];c?c.then(function(){return l.remove()}):l.remove()},a=this,o=0;o<this._elements.length;o++)i(o);return new n([],null,this._parent,this._document,void 0,this._transitions)},e.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;i.call(o,s,a)}return this},e.prototype.attr=function(i,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,l){a!==void 0&&(this[i]=o.call(this,s,l))})},e.prototype.style=function(i,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(l,c){a!==void 0&&(this.style[i]=s.call(this,l,c))})},e.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(o,s){var l=this;Object.entries(i).forEach(function(c){var u=$(c,2),f=u[0],d=u[1],h=typeof d!="function"||!a?function(){return d}:d;d!==void 0&&l.attr(f,h.call(l,o,s))})})},e.prototype.update=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},e.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,l){i&&this.update&&this.update(o.call(this,s,l))})},e.prototype.transition=function(i){var a=this._transitions;return this.each(function(o,s){a[s]=i.call(this,o,s)})},e.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},e.prototype.call=function(i){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return i.call.apply(i,me([this._parent,this],$(a),!1)),this},e.prototype.node=function(){return this._elements[0]},e.prototype.nodes=function(){return this._elements},e.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},e.prototype.parent=function(){return this._parent};var t,n,r;return n=e,t=new WeakSet,r=function(a,o){var s=this._elements[0],l=s.querySelector(a);if(l)return new n([l],null,this._parent,this._document);var c=typeof o=="string"?this.createElement(o):o();return s.appendChild(c),new n([c],null,this._parent,this._document)},e.registry={g:bn,rect:Oo,circle:Aa,path:Xn,text:b1,ellipse:hp,image:pp,line:Cs,polygon:Ts,polyline:vp,html:Ju},e}();function Pe(e){return new uX([e],null,e,e.ownerDocument)}function fX(e,t,n){return e.querySelector(t)?Pe(e).select(t):Pe(e).append(n)}function In(e){if(_n(e))return[e,e,e,e];if(er(e)){var t=e.length;if(t===1)return[e[0],e[0],e[0],e[0]];if(t===2)return[e[0],e[1],e[0],e[1]];if(t===3)return[e[0],e[1],e[2],e[1]];if(t===4)return e}return[0,0,0,0]}function BP(e){var t=e.getLocalBounds(),n=t.min,r=t.max,i=$([n,r],2),a=$(i[0],2),o=a[0],s=a[1],l=$(i[1],2),c=l[0],u=l[1];return{x:o,y:s,width:c-o,height:u-s,left:o,bottom:u,top:s,right:c}}function dX(e,t){var n=$(e,2),r=n[0],i=n[1],a=$(t,2),o=a[0],s=a[1];return r!==o&&i===s}function hX(e,t){var n,r,i=t.attributes;try{for(var a=of(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=$(o.value,2),l=s[0],c=s[1];l!=="id"&&l!=="className"&&e.attr(l,c)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function k1(e){return e.toString().charAt(0).toUpperCase()+e.toString().slice(1)}function pX(e){return e.toString().charAt(0).toLowerCase()+e.toString().slice(1)}function vX(e,t){return"".concat(t).concat(k1(e))}function YP(e,t,n){var r;n===void 0&&(n=!0);var i=t||((r=e.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=e.replace(new RegExp("^(".concat(i,")")),"");return n?pX(a):a}function gX(e,t){Object.entries(t).forEach(function(n){var r=$(n,2),i=r[0],a=r[1];me([e],$(e.querySelectorAll(i)),!1).filter(function(o){return o.matches(i)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(l,c){return"".concat(l).concat(c.join(":"),";")},"")}})})}var Wp=function(e,t){if(!(e!=null&&e.startsWith(t)))return!1;var n=e[t.length];return n>="A"&&n<="Z"};function $e(e,t,n){n===void 0&&(n=!1);var r={};return Object.entries(e).forEach(function(i){var a=$(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(Wp(o,"show")&&Wp(YP(o,"show"),t)!==n)o===vX(t,"show")?r[o]=s:r[o.replace(new RegExp(k1(t)),"")]=s;else if(!Wp(o,"show")&&Wp(o,t)!==n){var l=YP(o,t);l==="filter"&&typeof s=="function"||(r[l]=s)}}}),r}function na(e,t){return Object.entries(e).reduce(function(n,r){var i=$(r,2),a=i[0],o=i[1];return a.startsWith("show")?n["show".concat(t).concat(a.slice(4))]=o:n["".concat(t).concat(k1(a))]=o,n},{})}function Ta(e,t){t===void 0&&(t=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(e).forEach(function(a){var o=$(a,2),s=o[0],l=o[1];t.includes(s)||(n.indexOf(s)!==-1?i[s]=l:r[s]=l)}),[r,i]}function yX(e,t,n){var r=e.getBBox(),i=r.width,a=r.height,o=$([t,n].map(function(c,u){var f;return c.includes("%")?parseFloat(((f=c.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||f===void 0?void 0:f[0])||"0")/100*(u===0?i:a):c}),2),s=o[0],l=o[1];return[s,l]}function WP(e,t){if(t)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=t.replace(n,function(i,a,o){return"translate(".concat(yX(e,a,o),")")});e.attr("transform",r)}catch(i){}}function mX(e){var t;return((t=e[0])===null||t===void 0?void 0:t.map(function(n,r){return e.map(function(i){return i[r]})}))||[]}var GP=function(e,t){if(t==null){e.innerHTML="";return}e.replaceChildren?Array.isArray(t)?e.replaceChildren.apply(e,me([],$(t),!1)):e.replaceChildren(t):(e.innerHTML="",Array.isArray(t)?t.forEach(function(n){return e.appendChild(n)}):e.appendChild(t))};function bX(){zp(this,this.attributes.visibility!=="hidden")}var kn=function(e){Rt(t,e);function t(n,r){r===void 0&&(r={});var i=e.call(this,Pa({},{style:r},n))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=CP(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},t.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},t.prototype.attributeChangedCallback=function(n){n==="visibility"&&bX.call(this)},t.prototype.update=function(n,r){var i;return this.attr(Pa({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},t.prototype.clear=function(){this.removeChildren()},t.prototype.bindEvents=function(n,r){},t.prototype.getSubShapeStyle=function(n){n.x,n.y,n.transform,n.transformOrigin,n.class,n.className,n.zIndex;var r=Sn(n,["x","y","transform","transformOrigin","class","className","zIndex"]);return r},t}(Qu),HP=function(e,t,n){return[["M",e-n,t],["A",n,n,0,1,0,e+n,t],["A",n,n,0,1,0,e-n,t],["Z"]]},xX=HP,wX=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t-n],["L",e+n,t+n],["L",e-n,t+n],["Z"]]},OX=function(e,t,n){return[["M",e-n,t],["L",e,t-n],["L",e+n,t],["L",e,t+n],["Z"]]},_X=function(e,t,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t+r],["L",e,t-r],["L",e+n,t+r],["Z"]]},SX=function(e,t,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",e-n,t-r],["L",e+n,t-r],["L",e,t+r],["Z"]]},kX=function(e,t,n){var r=n/2*Math.sqrt(3);return[["M",e,t-n],["L",e+r,t-n/2],["L",e+r,t+n/2],["L",e,t+n],["L",e-r,t+n/2],["L",e-r,t-n/2],["Z"]]},EX=function(e,t,n){var r=n-1.5;return[["M",e-n,t-r],["L",e+n,t+r],["L",e+n,t-r],["L",e-n,t+r],["Z"]]},VP=function(e,t,n){return[["M",e,t+n],["L",e,t-n]]},MX=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t+n],["M",e+n,t-n],["L",e-n,t+n]]},AX=function(e,t,n){return[["M",e-n/2,t-n],["L",e+n/2,t-n],["M",e,t-n],["L",e,t+n],["M",e-n/2,t+n],["L",e+n/2,t+n]]},PX=function(e,t,n){return[["M",e-n,t],["L",e+n,t],["M",e,t-n],["L",e,t+n]]},CX=function(e,t,n){return[["M",e-n,t],["L",e+n,t]]},UP=function(e,t,n){return[["M",e-n,t],["L",e+n,t]]},TX=UP,LX=function(e,t,n){return[["M",e-n,t],["A",n/2,n/2,0,1,1,e,t],["A",n/2,n/2,0,1,0,e+n,t]]},NX=function(e,t,n){return[["M",e-n-1,t-2.5],["L",e,t-2.5],["L",e,t+2.5],["L",e+n+1,t+2.5]]},IX=function(e,t,n){return[["M",e-n-1,t+2.5],["L",e,t+2.5],["L",e,t-2.5],["L",e+n+1,t-2.5]]},jX=function(e,t,n){return[["M",e-(n+1),t+2.5],["L",e-n/2,t+2.5],["L",e-n/2,t-2.5],["L",e+n/2,t-2.5],["L",e+n/2,t+2.5],["L",e+n+1,t+2.5]]};function DX(e,t){return[["M",e-5,t+2.5],["L",e-5,t],["L",e,t],["L",e,t-3],["L",e,t+3],["L",e+6.5,t+3]]}var FX=function(e,t,n){return[["M",e-n,t-n],["L",e+n,t],["L",e-n,t+n],["Z"]]};function RX(e){var t="default";if(ey(e)&&e instanceof Image)t="image";else if(fr(e))t="symbol";else if(tr(e)){var n=new RegExp("data:(image|text)");e.match(n)?t="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?t="url":t="symbol"}return t}function $X(e){var t=RX(e);return["base64","url","image"].includes(t)?"image":e&&t==="symbol"?"path":null}var Qe=function(e){Rt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o,l=this.getSubShapeStyle(n),c=l.symbol,u=l.size,f=u===void 0?16:u,d=Sn(l,["symbol","size"]),h=$X(c);gr(!!h,Pe(r),function(p){p.maybeAppendByClassName("marker",h).attr("className","marker ".concat(h,"-marker")).call(function(v){if(h==="image"){var g=f*2;v.styles({img:c,width:g,height:g,x:a-f,y:s-f})}else{var g=f/2,y=fr(c)?c:t.getSymbol(c);v.styles(re({d:y==null?void 0:y(a,s,g)},d))}})})},t.MARKER_SYMBOL_MAP=new Map,t.registerSymbol=function(n,r){t.MARKER_SYMBOL_MAP.set(n,r)},t.getSymbol=function(n){return t.MARKER_SYMBOL_MAP.get(n)},t.getSymbols=function(){return Array.from(t.MARKER_SYMBOL_MAP.keys())},t}(kn);Qe.registerSymbol("cross",MX),Qe.registerSymbol("hyphen",CX),Qe.registerSymbol("line",VP),Qe.registerSymbol("plus",PX),Qe.registerSymbol("tick",AX),Qe.registerSymbol("circle",HP),Qe.registerSymbol("point",xX),Qe.registerSymbol("bowtie",EX),Qe.registerSymbol("hexagon",kX),Qe.registerSymbol("square",wX),Qe.registerSymbol("diamond",OX),Qe.registerSymbol("triangle",_X),Qe.registerSymbol("triangle-down",SX),Qe.registerSymbol("line",VP),Qe.registerSymbol("dot",UP),Qe.registerSymbol("dash",TX),Qe.registerSymbol("smooth",LX),Qe.registerSymbol("hv",NX),Qe.registerSymbol("vh",IX),Qe.registerSymbol("hvh",jX),Qe.registerSymbol("vhv",DX);var zX=function(e){Rt(t,e);function t(n){var r=this,i=n.style,a=Sn(n,["style"]);return r=e.call(this,Z({},{type:"column"},re({style:i},a)))||this,r.columnsGroup=new bn({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return t.prototype.render=function(){var n=this.attributes,r=n.columns,i=n.x,a=n.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),Pe(this.columnsGroup).selectAll(".column").data(r.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()})},t.prototype.update=function(n){this.attr(Pa({},this.attributes,n)),this.render()},t.prototype.clear=function(){this.removeChildren()},t}(xt),BX=function(e){Rt(t,e);function t(n){var r=this,i=n.style,a=Sn(n,["style"]);return r=e.call(this,Z({},{type:"lines"},re({style:i},a)))||this,r.linesGroup=r.appendChild(new bn),r.areasGroup=r.appendChild(new bn),r.render(),r}return t.prototype.render=function(){var n=this.attributes,r=n.lines,i=n.areas,a=n.x,o=n.y;this.style.transform="translate(".concat(a,", ").concat(o,")"),r&&this.renderLines(r),i&&this.renderAreas(i)},t.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},t.prototype.update=function(n){this.attr(Pa({},this.attributes,n)),this.render()},t.prototype.renderLines=function(n){Pe(this.linesGroup).selectAll(".line").data(n).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},t.prototype.renderAreas=function(n){Pe(this.linesGroup).selectAll(".area").data(n).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},t}(xt);function YX(e,t){var n,r=t.x,i=t.y,a=$(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=$([o,s],2),s=n[0],o=n[1]),e.map(function(l){var c=l.map(function(u,f){return[r.map(f),wi(i.map(u),s,o)]});return c})}function uf(e,t){t===void 0&&(t=!1);var n=t?e.length-1:0,r=e.map(function(i,a){return me([a===n?"M":"L"],$(i),!1)});return t?r.reverse():r}function Gp(e,t){if(t===void 0&&(t=!1),e.length<=2)return uf(e);for(var n=[],r=e.length,i=0;i<r;i+=1){var a=t?e[r-i-1]:e[i];rh(a,n.slice(-2))||n.push.apply(n,me([],$(a),!1))}var o=iX(n,!1);return t?o.unshift(me(["M"],$(e[r-1]),!1)):o.unshift(me(["M"],$(e[0]),!1)),o}function E1(e,t,n){var r=du(e);return r.push(["L",t,n],["L",0,n],["Z"]),r}function WX(e,t,n,r){return e.map(function(i){return E1(t?Gp(i):uf(i),n,r)})}function GX(e,t,n){for(var r=[],i=e.length-1;i>=0;i-=1){var a=e[i],o=uf(a),s=void 0;if(i===0)s=E1(o,t,n);else{var l=e[i-1],c=uf(l,!0);c[0][0]="L",s=me(me(me([],$(o),!1),$(c),!1),[["Z"]],!1)}r.push(s)}return r}function HX(e,t,n){for(var r=[],i=e.length-1;i>=0;i-=1){var a=e[i],o=Gp(a),s=void 0;if(i===0)s=E1(o,t,n);else{var l=e[i-1],c=Gp(l,!0),u=a[0];c[0][0]="L",s=me(me(me([],$(o),!1),$(c),!1),[me(["M"],$(u),!1),["Z"]],!1)}r.push(s)}return r}function XP(e){return e.length===0?[0,0]:[T_(z$(e,function(t){return T_(t)||0})),C_($$(e,function(t){return C_(t)||0}))]}function qP(e){for(var t=du(e),n=t[0].length,r=$([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],a=r[1],o=0;o<t.length;o+=1)for(var s=t[o],l=0;l<n;l+=1)s[l]>=0?(s[l]+=i[l],i[l]=s[l]):(s[l]+=a[l],a[l]=s[l]);return t}var VX=function(e){Rt(t,e);function t(n){return e.call(this,n,{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(t.prototype,"rawData",{get:function(){var n=this.attributes.data;if(!n||(n==null?void 0:n.length)===0)return[[]];var r=du(n);return _n(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.attributes.isStack?qP(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseline",{get:function(){var n=this.scales.y,r=$(n.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?n.map(a):n.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerShape",{get:function(){var n=this.attributes,r=n.width,i=n.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linesStyle",{get:function(){var n=this,r=this.attributes,i=r.type,a=r.isStack,o=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var s=$e(this.attributes,"area"),l=$e(this.attributes,"line"),c=this.containerShape.width,u=this.data;if(u[0].length===0)return{lines:[],areas:[]};var f=this.scales,d=f.x,h=f.y,p=YX(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?HX(p,c,g):GX(p,c,g):v=WX(p,o,c,g)}return{lines:p.map(function(y,m){return re({stroke:n.getColor(m),d:o?Gp(y):uf(y)},l)}),areas:v.map(function(y,m){return re({d:y,fill:n.getColor(m)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsStyle",{get:function(){var n=this,r=$e(this.attributes,"column"),i=this.attributes,a=i.isStack,o=i.type,s=i.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,c=this.rawData;if(!c)return{columns:[]};a&&(c=qP(c));var u=this.createScales(c),f=u.x,d=u.y,h=$(XP(c),2),p=h[0],v=h[1],g=new bt({domain:[0,v-(p>0?0:p)],range:[0,l*s]}),y=f.getBandWidth(),m=this.rawData;return{columns:c.map(function(b,x){return b.map(function(w,O){var _=y/c.length,S=function(){return{x:f.map(O)+_*x,y:w>=0?d.map(w):d.map(0),width:_,height:g.map(Math.abs(w))}},k=function(){return{x:f.map(O),y:d.map(w),width:y,height:g.map(m[x][O])}};return re(re({fill:n.getColor(x)},r),a?k():S())})})}},enumerable:!1,configurable:!0}),t.prototype.render=function(n,r){fX(r,".container","rect").attr("className","container").node();var i=n.type,a=n.x,o=n.y,s="spark".concat(i),l=re({x:a,y:o},i==="line"?this.linesStyle:this.columnsStyle);Pe(r).selectAll(".spark").data([i]).join(function(c){return c.append(function(u){return u==="line"?new BX({className:s,style:l}):new zX({className:s,style:l})}).attr("className","spark ".concat(s))},function(c){return c.update(l)},function(c){return c.remove()})},t.prototype.getColor=function(n){var r=this.attributes.color;return er(r)?r[n%r.length]:fr(r)?r.call(null,n):r},t.prototype.createScales=function(n){var r,i,a=this.attributes,o=a.type,s=a.scale,l=a.range,c=l===void 0?[]:l,u=a.spacing,f=this.containerShape,d=f.width,h=f.height,p=$(XP(n),2),v=p[0],g=p[1],y=new bt({domain:[(r=c[0])!==null&&r!==void 0?r:v,(i=c[1])!==null&&i!==void 0?i:g],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new bt({domain:[0,n[0].length-1],range:[0,d]}),y}:{type:o,x:new Al({domain:n[0].map(function(m,b){return b}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y}},t.tag="sparkline",t}(kn);function UX(e){return typeof e=="boolean"?!1:"enter"in e&&"update"in e&&"exit"in e}function KP(e){if(!e)return{enter:!1,update:!1,exit:!1};var t=["enter","update","exit"],n=Object.fromEntries(Object.entries(e).filter(function(r){var i=$(r,1),a=i[0];return!t.includes(a)}));return Object.fromEntries(t.map(function(r){return UX(e)?e[r]===!1?[r,!1]:[r,re(re({},e[r]),n)]:[r,n]}))}function Kl(e,t){e?e.finished.then(t):t()}function XX(e,t){e.length===0?t():Promise.all(e.map(function(n){return n==null?void 0:n.finished})).then(t)}function ZP(e,t){"update"in e?e.update(t):e.attr(t)}function QP(e,t,n){if(t.length===0)return null;if(!n){var r=t.slice(-1)[0];return ZP(e,{style:r}),null}return e.animate(t,n)}function qX(e,t){return!(e.nodeName!=="text"||t.nodeName!=="text"||e.attributes.text!==t.attributes.text)}function KX(e,t,n,r){if(r===void 0&&(r="destroy"),qX(e,t))return e.remove(),[null];var i=function(){r==="destroy"?e.destroy():r==="hide"&&_o(e),t.isVisible()&&sf(t)};if(!n)return i(),[null];var a=n.duration,o=a===void 0?0:a,s=n.delay,l=s===void 0?0:s,c=Math.ceil(+o/2),u=+o/4,f=$(e.getGeometryBounds().center,2),d=f[0],h=f[1],p=$(t.getGeometryBounds().center,2),v=p[0],g=p[1],y=$([(d+v)/2-d,(h+g)/2-h],2),m=y[0],b=y[1],x=e.style.opacity,w=x===void 0?1:x,O=t.style.opacity,_=O===void 0?1:O,S=e.style.transform||"",k=t.style.transform||"",E=e.animate([{opacity:w,transform:"translate(0, 0) ".concat(S)},{opacity:0,transform:"translate(".concat(m,", ").concat(b,") ").concat(S)}],re(re({fill:"both"},n),{duration:l+c+u})),M=t.animate([{opacity:0,transform:"translate(".concat(-m,", ").concat(-b,") ").concat(k),offset:.01},{opacity:_,transform:"translate(0, 0) ".concat(k)}],re(re({fill:"both"},n),{duration:c+u,delay:l+c-u}));return Kl(M,i),[E,M]}function Pi(e,t,n){var r={},i={};return Object.entries(t).forEach(function(a){var o=$(a,2),s=o[0],l=o[1];if(!Ze(l)){var c=e.style[s]||e.parsedStyle[s]||0;c!==l&&(r[s]=c,i[s]=l)}}),n?QP(e,[r,i],re({fill:"both"},n)):(ZP(e,i),null)}function Hp(e,t){return e.style.opacity||(e.style.opacity=1),Pi(e,{opacity:0},t)}var JP={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},eC={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},tC={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},ra=ni({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),So=ni({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),ZX=function(e){Rt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){var i=n.x,a=n.y,o=n.size,s=o===void 0?10:o,l=n.radius,c=l===void 0?s/4:l,u=n.orientation,f=Sn(n,["x","y","size","radius","orientation"]),d=s,h=d*2.4,p=Pe(r).maybeAppendByClassName(So.iconRect,"rect").styles(re(re({},f),{width:d,height:h,radius:c,x:i-d/2,y:a-h/2,transformOrigin:"center"})),v=i+1/3*d-d/2,g=i+2/3*d-d/2,y=a+1/4*h-h/2,m=a+3/4*h-h/2;p.maybeAppendByClassName("".concat(So.iconLine,"-1"),"line").styles(re({x1:v,x2:v,y1:y,y2:m},f)),p.maybeAppendByClassName("".concat(So.iconLine,"-2"),"line").styles(re({x1:g,x2:g,y1:y,y2:m},f)),u==="vertical"&&(p.node().style.transform="rotate(90)")},t}(kn),nC=function(e){Rt(t,e);function t(n){return e.call(this,n,tC)||this}return t.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.showLabel,l=$e(this.attributes,"label"),c=l.x,u=c===void 0?0:c,f=l.y,d=f===void 0?0:f,h=l.transform,p=l.transformOrigin,v=Sn(l,["x","y","transform","transformOrigin"]),g=$(Ta(v,[]),2),y=g[0],m=g[1],b=Pe(n).maybeAppendByClassName(So.labelGroup,"g").styles(m),x=re(re({},eC),y),w=x.text,O=Sn(x,["text"]);gr(!!s,b,function(_){r.label=_.maybeAppendByClassName(So.label,"text").styles(re(re({},O),{x:a+u,y:o+d,transform:h,transformOrigin:p,text:"".concat(w)})),r.label.on("mousedown",function(S){S.stopPropagation()}),r.label.on("touchstart",function(S){S.stopPropagation()})})},t.prototype.renderIcon=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.orientation,s=r.type,l=re(re({x:i,y:a,orientation:o},JP),$e(this.attributes,"icon")),c=this.attributes.iconShape,u=c===void 0?function(){return new ZX({style:l})}:c,f=Pe(n).maybeAppendByClassName(So.iconGroup,"g");f.selectAll(So.icon.class).data([u]).join(function(d){return d.append(typeof u=="string"?u:function(){return u(s)}).attr("className",So.icon.name)},function(d){return d.update(l)},function(d){return d.remove()})},t.prototype.render=function(n,r){this.renderIcon(r),this.renderLabel(r)},t}(kn),rC=function(e){Rt(t,e);function t(n){var r=e.call(this,n,re(re(re({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.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},na(tC,"handle")),na(JP,"handleIcon")),na(eC,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(Yp(a));var o=r.availableSpace,s=o.x,l=o.y,c=r.getBBox(),u=c.x,f=c.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([s,l])-r.getOrientVal([+u,+f])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,o=a.slidable,s=a.brushable,l=a.type;i.stopPropagation();var c=r.getOrientVal(Yp(i)),u=c-r.prevPos;if(u){var f=r.getRatio(u);switch(r.target){case"start":o&&r.setValuesOffset(f);break;case"end":o&&r.setValuesOffset(0,f);break;case"selection":o&&r.setValuesOffset(f,f);break;case"track":if(!s)return;r.selectionWidth+=f,l==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break}r.prevPos=c}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,o=a.onChange,s=a.type,l=s==="range"?i:i[1],c=s==="range"?r.getValues():r.getValues()[1],u=new dt("valuechange",{detail:{oldValue:l,value:c}});r.dispatchEvent(u),o==null||o(c)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(t.prototype,"values",{get:function(){return this.attributes.values},set:function(n){this.attributes.values=this.clampValues(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sparklineStyle",{get:function(){var n=this.attributes.orientation;if(n!=="horizontal")return null;var r=$e(this.attributes,"sparkline");return re(re({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var n=this.attributes,r=n.trackLength,i=n.trackSize,a=$(this.getOrientVal([[r,i],[i,r]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes;n.x,n.y;var r=n.padding,i=$(In(r),4),a=i[0],o=i[1],s=i[2],l=i[3],c=this.shape,u=c.width,f=c.height;return{x:l,y:a,width:u-(l+o),height:f-(a+s)}},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.values},t.prototype.setValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1),this.attributes.values=n;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},t.prototype.updateSelectionArea=function(n){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(ra.selection.class).each(function(i,a){Pi(this,r[a],n)})},t.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&Pi(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&Pi(this.endHandle,this.getHandleStyle("end"),n))},t.prototype.innerSetValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(n);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},t.prototype.renderTrack=function(n){var r=this.attributes,i=r.x,a=r.y,o=$e(this.attributes,"track");this.trackShape=Pe(n).maybeAppendByClassName(ra.track,"rect").styles(re(re({x:i,y:a},this.shape),o))},t.prototype.renderBrushArea=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.brushable;this.brushArea=Pe(n).maybeAppendByClassName(ra.brushArea,"rect").styles(re({x:i,y:a,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},t.prototype.renderSparkline=function(n){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.orientation,l=Pe(n).maybeAppendByClassName(ra.sparklineGroup,"g");gr(s==="horizontal",l,function(c){var u=re(re({},r.sparklineStyle),{x:a,y:o});c.maybeAppendByClassName(ra.sparkline,function(){return new VX({style:u})}).update(u)})},t.prototype.renderHandles=function(){var n=this,r,i=this.attributes,a=i.showHandle,o=i.type,s=o==="range"?["start","end"]:["end"],l=a?s:[],c=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(ra.handle.class).data(l.map(function(u){return{type:u}}),function(u){return u.type}).join(function(u){return u.append(function(f){var d=f.type;return new nC({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(ra.handle.name," ").concat(d,"-handle"));var h="".concat(d,"Handle");c[h]=this,this.addEventListener("pointerdown",c.onDragStart(d))})},function(u){return u.each(function(f){var d=f.type;this.update(c.getHandleStyle(d))})},function(u){return u.each(function(f){var d=f.type,h="".concat(d,"Handle");c[h]=void 0}).remove()})},t.prototype.renderSelection=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.type,s=r.selectionType;this.foregroundGroup=Pe(n).maybeAppendByClassName(ra.foreground,"g");var l=$e(this.attributes,"selection"),c=function(f){return f.style("visibility",function(d){return d.show?"visible":"hidden"}).style("cursor",function(d){return s==="select"?"grab":s==="invert"?"crosshair":"default"}).styles(re(re({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},u=this;this.foregroundGroup.selectAll(ra.selection.class).data(o==="value"?[]:this.calcSelectionArea().map(function(f,d){return{style:re({},f),index:d,show:s==="select"?d===1:d!==1}}),function(f){return f.index}).join(function(f){return f.append("rect").attr("className",ra.selection.name).call(c).each(function(d,h){var p=this;h===1?(u.selectionShape=Pe(this),this.on("pointerdown",function(v){p.attr("cursor","grabbing"),u.onDragStart("selection")(v)}),u.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),u.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),u.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){p.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){p.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){p.attr("cursor","pointer")})):this.on("pointerdown",u.onDragStart("track"))})},function(f){return f.call(c)},function(f){return f.remove()}),this.updateSelectionArea(!1),this.renderHandles()},t.prototype.render=function(n,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},t.prototype.clampValues=function(n,r){var i;r===void 0&&(r=4);var a=$(this.range,2),o=a[0],s=a[1],l=$(this.getValues().map(function(g){return _1(g,r)}),2),c=l[0],u=l[1],f=Array.isArray(n)?n:[c,n!=null?n:u],d=$((f||[c,u]).map(function(g){return _1(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,wi(p,o,s)];h>p&&(i=$([p,h],2),h=i[0],p=i[1]);var v=p-h;return v>s-o?[o,s]:h<o?c===o&&u===p?[o,p]:[o,v+o]:p>s?u===s&&c===h?[h,s]:[s-v,s]:[h,p]},t.prototype.calcSelectionArea=function(n){var r=$(this.clampValues(n),2),i=r[0],a=r[1],o=this.availableSpace,s=o.x,l=o.y,c=o.width,u=o.height;return this.getOrientVal([[{y:l,height:u,x:s,width:i*c},{y:l,height:u,x:i*c+s,width:(a-i)*c},{y:l,height:u,x:a*c,width:(1-a)*c}],[{x:s,width:c,y:l,height:i*u},{x:s,width:c,y:i*u+l,height:(a-i)*u},{x:s,width:c,y:a*u,height:(1-a)*u}]])},t.prototype.calcHandlePosition=function(n){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,o=i.y,s=i.width,l=i.height,c=$(this.clampValues(),2),u=c[0],f=c[1],d=n==="start"?-r:r,h=(n==="start"?u:f)*this.getOrientVal([s,l])+d;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([l/2,h])}},t.prototype.inferTextStyle=function(n){var r=this.attributes.orientation;return r==="horizontal"?{}:n==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:n==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},t.prototype.calcHandleText=function(n){var r,i=this.attributes,a=i.type,o=i.orientation,s=i.formatter,l=i.autoFitLabel,c=$e(this.attributes,"handle"),u=$e(c,"label"),f=c.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new b1({style:re(re(re({},u),this.inferTextStyle(n)),{text:v})}),y=g.getBBox(),m=y.width,b=y.height;if(g.destroy(),!l){if(a==="value")return{text:v,x:0,y:-b-f};var x=f+d+(o==="horizontal"?m/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-x:x,r}var w=0,O=0,_=this.availableSpace,S=_.width,k=_.height,E=this.calcSelectionArea()[1],M=E.x,P=E.y,A=E.width,L=E.height,N=f+d;if(o==="horizontal"){var T=N+m/2;if(n==="start"){var I=M-N-m;w=I>0?-T:T}else{var C=S-M-A-N>m;w=C?T:-T}}else{var j=N,D=b+N;n==="start"?O=P-d>b?-D:j:O=k-(P+L)-d>b?D:-j}return{x:w,y:O,text:v}},t.prototype.getHandleLabelStyle=function(n){var r=$e(this.attributes,"handleLabel");return re(re(re({},r),this.calcHandleText(n)),this.inferTextStyle(n))},t.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=$e(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return re({cursor:i,shape:n,size:a},r)},t.prototype.getHandleStyle=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.showLabel,s=r.showLabelOnInteraction,l=r.orientation,c=this.calcHandlePosition(n),u=c.x,f=c.y,d=this.calcHandleText(n),h=o;return!o&&s&&(this.target?h=!0:h=!1),re(re(re({},na(this.getHandleIconStyle(),"icon")),na(re(re({},this.getHandleLabelStyle(n)),d),"label")),{transform:"translate(".concat(u+i,", ").concat(f+a,")"),orientation:l,showLabel:h,type:n,zIndex:3})},t.prototype.getHandleSize=function(){var n=this.attributes,r=n.handleIconSize,i=n.width,a=n.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},t.prototype.getOrientVal=function(n){var r=$(n,2),i=r[0],a=r[1],o=this.attributes.orientation;return o==="horizontal"?i:a},t.prototype.setValuesOffset=function(n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=this.attributes.type,o=$(this.getValues(),2),s=o[0],l=o[1],c=a==="range"?n:0,u=[s+c,l+r].sort();i?this.setValues(u):this.innerSetValues(u,!0)},t.prototype.getRatio=function(n){var r=this.availableSpace,i=r.width,a=r.height;return n/this.getOrientVal([i,a])},t.prototype.dispatchCustomEvent=function(n,r,i){var a=this;n.on(r,function(o){o.stopPropagation(),a.dispatchEvent(new dt(i,{detail:o}))})},t.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var n=this.brushArea;this.dispatchCustomEvent(n,"click","trackClick"),this.dispatchCustomEvent(n,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(n,"pointerleave","trackMouseleave"),n.on("pointerdown",this.onDragStart("track"))},t.prototype.onScroll=function(n){var r=this.attributes.scrollable;if(r){var i=n.deltaX,a=n.deltaY,o=a||i,s=this.getRatio(o);this.setValuesOffset(s,s,!0)}},t.tag="slider",t}(kn),QX=function(e){Rt(t,e);function t(n){var r=e.call(this,n,{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 r.range=[0,1],r.onValueChange=function(i){var a=r.attributes.value;if(i!==a){var o={detail:{oldValue:i,value:a}};r.dispatchEvent(new dt("scroll",o)),r.dispatchEvent(new dt("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=$(r.getLocalPosition(),2),s=o[0],l=o[1],c=$(r.padding,4),u=c[0],f=c[3],d=r.getOrientVal([s+f,l+u]),h=r.getOrientVal(Yp(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new dt("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new dt("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new dt("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new dt("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(t.prototype,"padding",{get:function(){var n=this.attributes.padding;return In(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){var n=this.attributes.value,r=$(this.range,2),i=r[0],a=r[1];return wi(n,i,a)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackLength",{get:function(){var n=this.attributes,r=n.viewportLength,i=n.trackLength,a=i===void 0?r:i;return a},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes.trackSize,r=this.trackLength,i=$(this.padding,4),a=i[0],o=i[1],s=i[2],l=i[3],c=$(this.getOrientVal([[r,n],[n,r]]),2),u=c[0],f=c[1];return{x:l,y:a,width:+u-(l+o),height:+f-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trackRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.trackSize;return r?i/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thumbRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.thumbRadius;if(!r)return 0;var a=this.availableSpace,o=a.width,s=a.height;return i||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),t.prototype.getValues=function(n){n===void 0&&(n=this.value);var r=this.attributes,i=r.viewportLength,a=r.contentLength,o=i/a,s=$(this.range,2),l=s[0],c=s[1],u=n*(c-l-o);return[u,u+o]},t.prototype.getValue=function(){return this.value},t.prototype.renderSlider=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.orientation,s=r.trackSize,l=r.padding,c=r.slidable,u=$e(this.attributes,"track"),f=$e(this.attributes,"thumb"),d=re(re({x:i,y:a,brushable:!1,orientation:o,padding:l,selectionRadius:this.thumbRadius,showHandle:!1,slidable:c,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:s,values:this.getValues()},na(u,"track")),na(f,"selection"));this.slider=Pe(n).maybeAppendByClassName("scrollbar",function(){return new rC({style:d})}).update(d).node()},t.prototype.render=function(n,r){this.renderSlider(r)},t.prototype.setValue=function(n,r){r===void 0&&(r=!1);var i=this.attributes.value,a=$(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(wi(n,o,s)),r),this.onValueChange(i)},t.prototype.bindEvents=function(){var n=this;this.slider.addEventListener("trackClick",function(r){r.stopPropagation(),n.onTrackClick(r.detail)}),this.onHover()},t.prototype.getOrientVal=function(n){var r=this.attributes.orientation;return r==="horizontal"?n[0]:n[1]},t.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)},t.tag="scrollbar",t}(kn),M1={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 Xn({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:[]};Z({},M1,{style:{type:"arc"}}),Z({},M1,{style:{}});var at=ni({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"),Zl=ni({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function iC(e){return e.reduce(function(t,n,r){return t.push(me([r===0?"M":"L"],$(n),!1)),t},[])}function JX(e,t,n){var r=t.connect,i=r===void 0?"line":r,a=t.center;if(i==="line")return iC(e);if(!a)return[];var o=cf(e[0],a),s=n?0:1;return e.reduce(function(l,c,u){return u===0?l.push(me(["M"],$(c),!1)):l.push(me(["A",o,o,0,0,s],$(c),!1)),l},[])}function A1(e,t,n){return t.type==="surround"?JX(e,t,n):iC(e)}function eq(e,t,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],l=$([A1(e,n),A1(t.slice().reverse(),n,!0)],2),c=l[0],u=l[1],f=$([e[0],t.slice(-1)[0]],2),d=f[0],h=f[1],p=function(m,b){return[c,m,u,b,s].flat()};if(i==="line"||r==="surround")return p([me(["L"],$(h),!1)],[me(["L"],$(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=$([cf(h,a),cf(d,a)],2),g=v[0],y=v[1];return p([me(["A",g,g,0,0,1],$(h),!1),me(["L"],$(h),!1)],[me(["A",y,y,0,0,0],$(d),!1),me(["L"],$(d),!1)])}function tq(e,t,n,r){var i=n.animate,a=n.isBillboard,o=t.map(function(s,l){return{id:s.id||"grid-line-".concat(l),d:A1(s.points,n)}});return e.selectAll(Zl.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(l,c){var u=ti(zP(re({d:l.d},r)),[l,c,o]);this.attr(re({class:Zl.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(l,c){var u=ti(zP(re({d:l.d},r)),[l,c,o]);return Pi(this,u,i.update)})},function(s){return s.transition(function(){var l=this,c=Hp(this,i.exit);return Kl(c,function(){return l.remove()}),c})}).transitions()}function nq(e,t,n){var r=n.animate,i=n.connect,a=n.areaFill;if(t.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(p){return o[p%o.length]},l=[],c=0;c<t.length-1;c++){var u=$([t[c].points,t[c+1].points],2),f=u[0],d=u[1],h=eq(f,d,n);l.push({d:h,fill:s(c)})}return e.selectAll(Zl.region.class).data(l,function(p,v){return v}).join(function(p){return p.append("path").each(function(v,g){var y=ti(v,[v,g,l]);this.attr(y)}).attr("className",Zl.region.name)},function(p){return p.transition(function(v,g){var y=ti(v,[v,g,l]);return Pi(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=Hp(this,r.exit);return Kl(g,function(){return v.remove()}),g})}).transitions()}function rq(e){var t=e.data,n=t===void 0?[]:t,r=e.closed;return r?n.map(function(i){var a=i.points,o=$(a,1),s=o[0];return re(re({},i),{points:me(me([],$(a),!1),[s],!1)})}):n}var iq=function(e){Rt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(n,r){n.type,n.center,n.areaFill,n.closed;var i=Sn(n,["type","center","areaFill","closed"]),a=rq(n),o=Pe(r).maybeAppendByClassName(Zl.lineGroup,"g"),s=Pe(r).maybeAppendByClassName(Zl.regionGroup,"g"),l=tq(o,a,n,i),c=nq(s,a,n);return me(me([],$(l),!1),$(c),!1)},t}(kn);function aC(e,t){return Object.fromEntries(Object.entries(e).map(function(n){var r=$(n,2),i=r[0],a=r[1];return[i,ti(a,t)]}))}function P1(e,t){return t&&fr(t)?e.filter(t):e}function oC(e,t){var n=t.startAngle,r=t.endAngle;return(r-n)*e+n}function Vp(e,t){if(t.type==="linear"){var n=$(t.startPos,2),r=n[0],i=n[1],a=$(t.endPos,2),o=a[0],s=a[1],l=$([o-r,s-i],2),c=l[0],u=l[1];return RP([c,u])}var f=ql(oC(e,t));return[-Math.sin(f),Math.cos(f)]}function C1(e,t,n){var r=Vp(e,n);return nX(r,t!=="positive")}function ff(e,t){return C1(e,t.labelDirection,t)}function aq(e,t){var n=$(t.startPos,2),r=n[0],i=n[1],a=$(t.endPos,2),o=a[0],s=a[1],l=$([o-r,s-i],2),c=l[0],u=l[1];return[r+c*e,i+u*e]}function oq(e,t){var n=t.radius,r=$(t.center,2),i=r[0],a=r[1],o=ql(oC(e,t));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function Up(e,t){return t.type==="linear"?aq(e,t):oq(e,t)}function sC(e){return Vp(0,e)[1]===0}function lC(e){return Vp(0,e)[0]===0}function cC(e,t){return t-e===360}function uC(e,t,n,r,i){var a=t-e,o=$([i,i],2),s=o[0],l=o[1],c=$([ql(e),ql(t)],2),u=c[0],f=c[1],d=function(k){return[n+i*Math.cos(k),r+i*Math.sin(k)]},h=$(d(u),2),p=h[0],v=h[1],g=$(d(f),2),y=g[0],m=g[1];if(cC(e,t)){var b=(f+u)/2,x=$(d(b),2),w=x[0],O=x[1];return[["M",p,v],["A",s,l,0,1,0,w,O],["A",s,l,0,1,0,y,m]]}var _=a>180?1:0,S=e>t?0:1;return"M".concat(p,",").concat(v,",A").concat(s,",").concat(l,",0,").concat(_,",").concat(S,",").concat(y,",").concat(m)}function sq(e){var t=e.attributes,n=t.startAngle,r=t.endAngle,i=t.center,a=t.radius;return me(me([n,r],$(i),!1),[a],!1)}function lq(e,t,n,r){var i=t.startAngle,a=t.endAngle,o=t.center,s=t.radius;return e.selectAll(at.line.class).data([{d:uC.apply(void 0,me(me([i,a],$(o),!1),[s],!1))}],function(l,c){return c}).join(function(l){return l.append("path").attr("className",at.line.name).styles(t).styles({d:function(c){return c.d}})},function(l){return l.transition(function(){var c=this,u=QU(this,sq(this),me(me([i,a],$(o),!1),[s],!1),r.update);if(u){var f=function(){var d=Ot(c.attributes,"__keyframe_data__");c.style.d=uC.apply(void 0,me([],$(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(t)},function(l){return l.remove()}).styles(n).transitions()}function cq(e,t){t.truncRange,t.truncShape,t.lineExtension}function uq(e,t,n){n===void 0&&(n=[0,0]);var r=$([e,t,n],3),i=$(r[0],2),a=i[0],o=i[1],s=$(r[1],2),l=s[0],c=s[1],u=$(r[2],2),f=u[0],d=u[1],h=$([l-a,c-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),y=$([-f/g,d/g],2),m=y[0],b=y[1];return[m*p,m*v,b*p,b*v]}function fC(e){var t=$(e,2),n=$(t[0],2),r=n[0],i=n[1],a=$(t[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function fq(e,t,n,r){var i=t.showTrunc,a=t.startPos,o=t.endPos,s=t.truncRange,l=t.lineExtension,c=$([a,o],2),u=$(c[0],2),f=u[0],d=u[1],h=$(c[1],2),p=h[0],v=h[1],g=$(l?uq(a,o,l):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],x=g[3],w=function(C){return e.selectAll(at.line.class).data(C,function(j,D){return D}).join(function(j){return j.append("line").attr("className",function(D){return"".concat(at.line.name," ").concat(D.className)}).styles(n).transition(function(D){return Pi(this,fC(D.line),!1)})},function(j){return j.styles(n).transition(function(D){var F=D.line;return Pi(this,fC(F),r.update)})},function(j){return j.remove()}).transitions()};if(!i||!s)return w([{line:[[f+y,d+m],[p+b,v+x]],className:at.line.name}]);var O=$(s,2),_=O[0],S=O[1],k=p-f,E=v-d,M=$([f+k*_,d+E*_],2),P=M[0],A=M[1],L=$([f+k*S,d+E*S],2),N=L[0],T=L[1],I=w([{line:[[f+y,d+m],[P,A]],className:at.lineFirst.name},{line:[[N,T],[p+b,v+x]],className:at.lineSecond.name}]);return cq(e,t),I}function dq(e,t,n,r){var i=n.showArrow,a=n.showTrunc,o=n.lineArrow,s=n.lineArrowOffset,l=n.lineArrowSize,c;if(t==="arc"?c=e.select(at.line.class):a?c=e.select(at.lineSecond.class):c=e.select(at.line.class),!i||!o||n.type==="arc"&&cC(n.startAngle,n.endAngle)){var u=c.node();u&&(u.style.markerEnd=void 0);return}var f=Is(o);f.attr(r),S1(f,l),c.style("markerEnd",f).style("markerEndOffset",-s)}function hq(e,t,n){var r=t.type,i,a=$e(t,"line");return r==="linear"?i=fq(e,t,$P(a,"arrow"),n):i=lq(e,t,$P(a,"arrow"),n),dq(e,r,t,a),i}function pq(e,t){return C1(e,t.gridDirection,t)}function dC(e){var t=e.type,n=e.gridCenter;return t==="linear"?n:n||e.center}function vq(e,t){var n=t.gridLength;return e.map(function(r,i){var a=r.value,o=$(Up(a,t),2),s=o[0],l=o[1],c=$(Ca(pq(a,t),n),2),u=c[0],f=c[1];return{id:i,points:[[s,l],[s+u,l+f]]}})}function gq(e,t){var n=t.gridControlAngles,r=dC(t);if(!r)throw new Error("grid center is not provide");if(e.length<2)throw new Error("Invalid grid data");if(!n||n.length===0)throw new Error("Invalid gridControlAngles");var i=$(r,2),a=i[0],o=i[1];return e.map(function(s,l){var c=s.value,u=$(Up(c,t),2),f=u[0],d=u[1],h=$([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(y){var m=ql(y),b=$([Math.cos(m),Math.sin(m)],2),x=b[0],w=b[1],O=p*x-v*w+a,_=p*w+v*x+o;g.push([O,_])}),{points:g,id:l}})}function yq(e,t,n,r){var i=$e(n,"grid"),a=i.type,o=i.areaFill,s=dC(n),l=P1(t,n.gridFilter),c=a==="segment"?vq(l,n):gq(l,n),u=re(re({},i),{center:s,areaFill:fr(o)?l.map(function(f,d){return ti(o,[f,d,l])}):o,animate:r,data:c});return e.selectAll(at.grid.class).data([1]).join(function(f){return f.append(function(){return new iq({style:u})}).attr("className",at.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}var T1=function(){function e(t,n,r,i){this.set(t,n,r,i)}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),e.prototype.rotatedPoints=function(t,n,r){var i=this,a=i.x1,o=i.y1,s=i.x2,l=i.y2,c=Math.cos(t),u=Math.sin(t),f=n-n*c+r*u,d=r-n*u-r*c,h=[[c*a-u*l+f,u*a+c*l+d],[c*s-u*l+f,u*s+c*l+d],[c*a-u*o+f,u*a+c*o+d],[c*s-u*o+f,u*s+c*o+d]];return h},e.prototype.set=function(t,n,r,i){return r<t?(this.x2=t,this.x1=r):(this.x1=t,this.x2=r),i<n?(this.y2=n,this.y1=i):(this.y1=n,this.y2=i),this},e.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},e}();function L1(e,t){var n=e.getEulerAngles()||0;e.setEulerAngles(0);var r=e.getBounds(),i=$(r.min,2),a=i[0],o=i[1],s=$(r.max,2),l=s[0],c=s[1],u=e.getBBox(),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=jP(e);if(m){h-=1.5;var b=m.style.textAlign,x=m.style.textBaseline;b==="center"?g=(a+l)/2:(b==="right"||b==="end")&&(g=l),x==="middle"?y=(o+c)/2:x==="bottom"&&(y=c)}var w=$(In(t),4),O=w[0],_=O===void 0?0:O,S=w[1],k=S===void 0?0:S,E=w[2],M=E===void 0?_:E,P=w[3],A=P===void 0?k:P,L=new T1((p+=a)-A,(v+=o)-_,p+f+k,v+h+M);return e.setEulerAngles(n),L.rotatedPoints(ql(n),g,y)}function df(e,t){return t[0]<=Math.max(e[0][0],e[1][0])&&t[0]<=Math.min(e[0][0],e[1][0])&&t[1]<=Math.max(e[0][1],e[1][1])&&t[1]<=Math.min(e[0][1],e[1][1])}function hf(e,t,n){var r=(t[1]-e[1])*(n[0]-t[0])-(t[0]-e[0])*(n[1]-t[1]);return r===0?0:r<0?2:1}function mq(e,t){var n=hf(e[0],e[1],t[0]),r=hf(e[0],e[1],t[1]),i=hf(t[0],t[1],e[0]),a=hf(t[0],t[1],e[1]);return!!(n!==r&&i!==a||n===0&&df(e,t[0])||r===0&&df(e,t[1])||i===0&&df(t,e[0])||a===0&&df(t,e[1]))}function bq(e,t){var n=e.length;if(n<3)return!1;var r=[t,[9999,t[1]]],i=0,a=0;do{var o=[e[a],e[(a+1)%n]];if(mq(o,r)){if(hf(o[0],t,o[1])===0)return df(o,t);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function xq(e,t){return t.every(function(n){return bq(e,n)})}function wq(e,t,n){var r=e.x1,i=e.x2,a=e.y1,o=e.y2,s=[[r,a],[i,a],[i,o],[r,o]],l=L1(t,n);return xq(s,l)}function Oq(e,t){var n=$(e,4),r=n[0],i=n[1],a=n[2],o=n[3],s=$(t,4),l=s[0],c=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-l,v=f-c,g=d*v-p*h;if(g===0)return!1;var y=g>0,m=r-l,b=i-c,x=d*b-h*m;if(x<0===y)return!1;var w=p*b-v*m;return!(w<0===y||x>g===y||w>g===y)}function _q(e,t){var n=[[e[0],e[1],e[2],e[3]],[e[2],e[3],e[4],e[5]],[e[4],e[5],e[6],e[7]],[e[6],e[7],e[0],e[1]]];return n.some(function(r){return Oq(t,r)})}function Sq(e,t,n){var r,i,a=L1(e,n).flat(1),o=L1(t,n).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=of(s),c=l.next();!c.done;c=l.next()){var u=c.value;if(_q(o,u))return!0}}catch(f){r={error:f}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!1}function kq(e,t){var n=e.type,r=e.labelDirection,i=e.crossSize;if(!i)return!1;if(n==="arc"){var a=e.center,o=e.radius,s=$(a,2),l=s[0],c=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=$(In(t),4),p=h[0],v=h[1],g=h[2],y=h[3];return new T1(l+f-y,c+f-p,l+d+v,c+d+g)}var m=$(e.startPos,2),b=m[0],x=m[1],w=$(e.endPos,2),O=w[0],_=w[1],S=$(lC(e)?[-t,0,t,0]:[0,t,0,-t],4),k=S[0],E=S[1],M=S[2],P=S[3],A=ff(0,e),L=Ca(A,i),N=new T1(b,x,O,_);return N.x1+=P,N.y1+=k,N.x2+=E+L[0],N.y2+=M+L[1],N}function Xp(e,t,n){var r,i,a=t.crossPadding,o=new Set,s=null,l=kq(t,a),c=function(p){return l?wq(l,p):!0},u=function(p,v){return!p||!p.firstChild?!0:!Sq(p.firstChild,v.firstChild,In(n))};try{for(var f=of(e),d=f.next();!d.done;d=f.next()){var h=d.value;c(h)?!s||u(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(o)}function N1(e,t){return t===void 0&&(t={}),Ze(e)?0:typeof e=="number"?e:Math.floor(VU(e,t))}function Eq(e,t,n,r){if(!(e.length<=1)){var i=t.suffix,a=i===void 0?"...":i,o=t.minLength,s=t.maxLength,l=s===void 0?1/0:s,c=t.step,u=c===void 0?" ":c,f=t.margin,d=f===void 0?[0,0,0,0]:f,h=IP(r.getTextShape(e[0])),p=N1(u,h),v=o?N1(o,h):p,g=N1(l,h);(Ze(g)||g===1/0)&&(g=Math.max.apply(null,e.map(function(O){return O.getBBox().width})));var y=e.slice(),m=$(d,4);m[0],m[1],m[2],m[3];for(var b=function(O){if(y.forEach(function(_){r.ellipsis(r.getTextShape(_),O,a)}),y=Xp(e,n,d),y.length<1)return{value:void 0}},x=g;x>v+p;x-=p){var w=b(x);if(typeof w=="object")return w.value}}}var Mq={parity:function(e,t){var n=t.seq,r=n===void 0?2:n;return e.filter(function(i,a){return a%r?(_o(i),!1):!0})}},Aq=function(e){return e.filter(NP)};function Pq(e,t,n,r){var i=e.length,a=t.keepHeader,o=t.keepTail;if(!(i<=1||i===2&&a&&o)){var s=Mq.parity,l=function(b){return b.forEach(r.show),b},c=2,u=e.slice(),f=e.slice(),d=Math.min.apply(Math,me([1],$(e.map(function(b){return b.getBBox().width})),!1));if(n.type==="linear"&&(sC(n)||lC(n))){var h=BP(e[0]).left,p=BP(e[i-1]).right,v=Math.abs(p-h)||1;c=Math.max(Math.floor(i*d/v),c)}var g,y;for(a&&(g=u.splice(0,1)[0]),o&&(y=u.splice(-1,1)[0],u.reverse()),l(u);c<e.length&&Xp(Aq(y?me(me([y],$(f),!1),[g],!1):me([g],$(f),!1)),n,t==null?void 0:t.margin).length;){if(y&&!g&&c%2===0){var m=u.splice(0,1);m.forEach(r.hide)}else if(y&&g){var m=u.splice(0,1);m.forEach(r.hide)}f=s(l(u),{seq:c}),c++}}}function Cq(e,t,n,r){var i,a,o=t.optionalAngles,s=o===void 0?[0,45,90]:o,l=t.margin,c=t.recoverWhenFailed,u=c===void 0?!0:c,f=e.map(function(y){return y.getLocalEulerAngles()}),d=function(){return Xp(e,n,l).length<1},h=function(y){return e.forEach(function(m,b){var x=Array.isArray(y)?y[b]:y;r.rotate(m,+x)})};try{for(var p=of(s),v=p.next();!v.done;v=p.next()){var g=v.value;if(h(g),d())return}}catch(y){i={error:y}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}u&&h(f)}function Tq(e){var t=e.type,n=e.labelDirection;return t==="linear"&&sC(e)?n==="negative"?"bottom":"top":"middle"}function Lq(e,t,n,r){var i=t.wordWrapWidth,a=i===void 0?50:i,o=t.maxLines,s=o===void 0?3:o,l=t.recoverWhenFailed,c=l===void 0?!0:l,u=t.margin,f=u===void 0?[0,0,0,0]:u,d=e.map(function(m){return m.attr("maxLines")||1}),h=Math.min.apply(Math,me([],$(d),!1)),p=function(){return Xp(e,n,f).length<1},v=Tq(n),g=function(m){return e.forEach(function(b,x){var w=Array.isArray(m)?m[x]:m;r.wrap(b,a,w,v)})};if(!(h>s)){for(var y=h;y<=s;y++)if(g(y),p())return;c&&g(d)}}var Nq=new Map([["hide",Pq],["rotate",Cq],["ellipsis",Eq],["wrap",Lq]]);function Iq(e,t,n){return t.labelOverlap.length<1?!1:n==="hide"?!GU(e[0]):n==="rotate"?!e.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):n==="ellipsis"||n==="wrap"?e.filter(function(r){return r.querySelector("text")}).length>1:!0}function jq(e,t,n){var r=t.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=Nq.get(o);Iq(e,t,o)&&(s==null||s(e,a,t,n))})}function Dq(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(r){return r==="positive"?-1:1};return e.reduce(function(r,i){return r*n(i)},1)}function hC(e){for(var t=e;t<0;)t+=360;return Math.round(t%360)}function I1(e,t){var n=$(e,2),r=n[0],i=n[1],a=$(t,2),o=a[0],s=a[1],l=$([r*o+i*s,r*s-i*o],2),c=l[0],u=l[1];return Math.atan2(u,c)}function Fq(e){var t=(e+360)%180;return Nn(t,-90,90)||(t+=180),t}function Rq(e,t,n){var r,i=n.labelAlign,a=(r=t.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return t.getLocalEulerAngles();var o=0,s=ff(e.value,n),l=Vp(e.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=I1([1,0],s):o=I1([l[0]<0?-1:1,0],l),Fq(TP(o)))}function pC(e,t,n){var r=n.type,i=n.labelAlign,a=ff(e,n),o=hC(t),s=hC(TP(I1([1,0],a))),l="center",c="middle";return r==="linear"?[90,270].includes(s)&&o===0?(l="center",c=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?l="center":s===0?(Nn(o,0,90,!1,!0)||Nn(o,0,90)||Nn(o,270,360))&&(l="start"):s===90?Nn(o,0,90,!1,!0)?l="start":(Nn(o,90,180)||Nn(o,270,360))&&(l="end"):s===270?Nn(o,0,90,!1,!0)?l="end":(Nn(o,90,180)||Nn(o,270,360))&&(l="start"):s===180&&(o===90?l="start":(Nn(o,0,90)||Nn(o,270,360))&&(l="end")):i==="parallel"?Nn(s,0,180,!0)?c="top":c="bottom":i==="horizontal"?Nn(s,90,270,!1)?l="end":(Nn(s,270,360,!1)||Nn(s,0,90))&&(l="start"):i==="perpendicular"&&(Nn(s,90,270)?l="end":l="start"),{textAlign:l,textBaseline:c}}function $q(e,t,n){t.setLocalEulerAngles(e);var r=t.__data__.value,i=pC(r,e,n),a=t.querySelector(at.labelItem.class);a&&gC(a,i)}function vC(e,t,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=t.indexOf(e),c=ti(s,[e,l,t]),u=$([ff(e.value,n),Dq(o,a)],2),f=u[0],d=u[1],h=d===1?ti(r?i:0,[e,l,t]):0,p=$(lf(Ca(f,c+h),Up(e.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function zq(e,t,n,r){var i=r.labelFormatter,a=fr(i)?function(){return Is(ti(i,[e,t,n,ff(e.value,r)]))}:function(){return Is(e.label||"")};return a}function gC(e,t){e.nodeName==="text"&&e.attr(t)}function yC(e){jq(this.node().childNodes,e,{hide:_o,show:sf,rotate:function(t,n){$q(+n,t,e)},ellipsis:function(t,n,r){t&&x1(t,n||1/0,r)},wrap:function(t,n,r){t&&UU(t,n,r)},getTextShape:function(t){return t.querySelector("text")}})}function mC(e,t,n,r,i){var a=n.indexOf(t),o=Pe(e).append(zq(t,a,n,i)).attr("className",at.labelItem.name).node(),s=$(Ta(aC(r,[t,a,n])),2),l=s[0],c=s[1],u=c.transform,f=Sn(c,["transform"]);WP(o,u);var d=Rq(t,o,i);return o.getLocalEulerAngles()||o.setLocalEulerAngles(d),gC(o,re(re({},pC(t.value,d,i)),l)),e.attr(f),o}function Bq(e,t,n,r){var i=P1(t,n.labelFilter),a=$e(n,"label");return e.selectAll(at.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",at.label.name).transition(function(s){mC(this,s,t,a,n);var l=vC(s,t,n),c=l.x,u=l.y;return this.style.transform="translate(".concat(c,", ").concat(u,")"),null}).call(function(){yC.call(e,n)})},function(o){return o.transition(function(s){var l=this.querySelector(at.labelItem.class),c=mC(this,s,t,a,n),u=KX(l,c,r.update),f=vC(s,t,n),d=f.x,h=f.y,p=Pi(this,{transform:"translate(".concat(d,", ").concat(h,")")},r.update);return me(me([],$(u),!1),[p],!1)}).call(function(s){var l=Ot(s,"_transitions").flat().filter(NP);XX(l,function(){yC.call(e,n)})})},function(o){return o.transition(function(){var s=this,l=Hp(this.childNodes[0],r.exit);return Kl(l,function(){return Pe(s).remove()}),l})}).transitions()}function bC(e,t){return C1(e,t.tickDirection,t)}function Yq(e,t){var n=$(e,2),r=n[0],i=n[1];return[[0,0],[r*t,i*t]]}function Wq(e,t,n,r,i){var a=i.tickLength,o=$(Yq(r,ti(a,[e,t,n])),2),s=$(o[0],2),l=s[0],c=s[1],u=$(o[1],2),f=u[0],d=u[1];return{x1:l,x2:f,y1:c,y2:d}}function Gq(e,t,n,r,i){var a=i.tickFormatter,o=bC(t.value,i),s="line";return fr(a)&&(s=function(){return ti(a,[t,n,r,o])}),e.append(s).attr("className",at.tickItem.name)}function Hq(e,t,n,r,i,a,o){var s=bC(e.value,a),l=Wq(e,t,n,s,a),c=l.x1,u=l.x2,f=l.y1,d=l.y2,h=$(Ta(aC(o,[e,t,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles(re({x1:c,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function xC(e,t,n,r,i,a){var o=Gq(Pe(this),e,t,n,r);Hq(e,t,n,o,this,r,i);var s=$(Up(e.value,r),2),l=s[0],c=s[1];return Pi(this,{transform:"translate(".concat(l,", ").concat(c,")")},a)}function Vq(e,t,n,r){var i=P1(t,n.tickFilter),a=$e(n,"tick");return e.selectAll(at.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",at.tick.name).transition(function(s,l){return xC.call(this,s,l,i,n,a,!1)})},function(o){return o.transition(function(s,l){return this.removeChildren(),xC.call(this,s,l,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,l=Hp(this.childNodes[0],r.exit);return Kl(l,function(){return s.remove()}),l})}).transitions()}var wC=ni({text:"text"},"title");function qp(e){return/\S+-\S+/g.test(e)?e.split("-").map(function(t){return t[0]}):e.length>2?[e[0]]:e.split("")}function Uq(e,t){var n=e.attributes,r=n.position,i=n.spacing,a=n.inset,o=n.text,s=e.getBBox(),l=t.getBBox(),c=qp(r),u=$(In(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=$(In(a),4),g=v[0],y=v[1],m=v[2],b=v[3],x=$([p+d,f+h],2),w=x[0],O=x[1],_=$([b+y,g+m],2),S=_[0],k=_[1];if(c[0]==="l")return new Tt(s.x,s.y,l.width+s.width+w+S,Math.max(l.height+k,s.height));if(c[0]==="t")return new Tt(s.x,s.y,Math.max(l.width+S,s.width),l.height+s.height+O+k);var E=$([t.attributes.width||l.width,t.attributes.height||l.height],2),M=E[0],P=E[1];return new Tt(l.x,l.y,M+s.width+w+S,P+s.height+O+k)}function Xq(e,t){var n=Object.entries(t).reduce(function(r,i){var a=$(i,2),o=a[0],s=a[1],l=e.node().attr(o);return l||(r[o]=s),r},{});e.styles(n)}function qq(e){var t,n,r,i,a=e,o=a.width,s=a.height,l=a.position,c=$([+o/2,+s/2],2),u=c[0],f=c[1],d=$([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],y=qp(l);return y.includes("l")&&(t=$([0,"start"],2),h=t[0],v=t[1]),y.includes("r")&&(n=$([+o,"end"],2),h=n[0],v=n[1]),y.includes("t")&&(r=$([0,"top"],2),p=r[0],g=r[1]),y.includes("b")&&(i=$([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var OC=function(e){Rt(t,e);function t(n){return e.call(this,n,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return t.prototype.getAvailableSpace=function(){var n=this,r=this.attributes,i=r.width,a=r.height,o=r.position,s=r.spacing,l=r.inset,c=n.querySelector(wC.text.class);if(!c)return new Tt(0,0,+i,+a);var u=c.getBBox(),f=u.width,d=u.height,h=$(In(s),4),p=h[0],v=h[1],g=h[2],y=h[3],m=$([0,0,+i,+a],4),b=m[0],x=m[1],w=m[2],O=m[3],_=qp(o);if(_.includes("i"))return new Tt(b,x,w,O);_.forEach(function(T,I){var C,j,D,F;T==="t"&&(C=$(I===0?[d+g,+a-d-g]:[0,+a],2),x=C[0],O=C[1]),T==="r"&&(j=$([+i-f-y],1),w=j[0]),T==="b"&&(D=$([+a-d-p],1),O=D[0]),T==="l"&&(F=$(I===0?[f+v,+i-f-v]:[0,+i],2),b=F[0],w=F[1])});var S=$(In(l),4),k=S[0],E=S[1],M=S[2],P=S[3],A=$([P+E,k+M],2),L=A[0],N=A[1];return new Tt(b+P,x+k,w-L,O-N)},t.prototype.getBBox=function(){return this.title?this.title.getBBox():new Tt(0,0,0,0)},t.prototype.render=function(n,r){var i=this;n.width,n.height,n.position,n.spacing;var a=Sn(n,["width","height","position","spacing"]),o=$(Ta(a),1),s=o[0],l=qq(n),c=l.x,u=l.y,f=l.textAlign,d=l.textBaseline;gr(!!a.text,Pe(r),function(h){i.title=h.maybeAppendByClassName(wC.text,"text").styles(s).call(Xq,{x:c,y:u,textAlign:f,textBaseline:d}).node()})},t}(kn);function Kq(e,t,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=qp(i),s=e.node().getLocalBounds(),l=$(s.min,2),c=l[0],u=l[1],f=$(s.halfExtents,2),d=f[0],h=f[1],p=$(t.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],y=$([c+d,u+h],2),m=y[0],b=y[1],x=$(In(a),4),w=x[0],O=x[1],_=x[2],S=x[3];if(["start","end"].includes(i)&&n.type==="linear"){var k=n.startPos,E=n.endPos,M=$(i==="start"?[k,E]:[E,k],2),P=M[0],A=M[1],L=RP([-A[0]+P[0],-A[1]+P[1]]),N=$(Ca(L,w),2),T=N[0],I=N[1];return{x:P[0]+T,y:P[1]+I}}return o.includes("t")&&(b-=h+g+w),o.includes("r")&&(m+=d+v+O),o.includes("l")&&(m-=d+v+S),o.includes("b")&&(b+=h+g+_),{x:m,y:b}}function Zq(e,t,n){var r=e.getGeometryBounds().halfExtents,i=r[1]*2;if(t==="vertical"){if(n==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(n==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function _C(e,t,n,r,i){var a=$e(r,"title"),o=$(Ta(a),2),s=o[0],l=o[1],c=l.transform,u=l.transformOrigin,f=Sn(l,["transform","transformOrigin"]);t.styles(f);var d=c||Zq(e.node(),s.direction,s.position);e.styles(re(re({},s),{transformOrigin:u})),WP(e.node(),d);var h=Kq(Pe(n._offscreen||n.querySelector(at.mainGroup.class)),t,r),p=h.x,v=h.y,g=Pi(t.node(),{transform:"translate(".concat(p,", ").concat(v,")")},i);return g}function Qq(e,t,n,r){var i=n.titleText;return e.selectAll(at.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,o){return a.title}).join(function(a){return a.append(function(){return Is(i)}).attr("className",at.title.name).transition(function(){return _C(Pe(this),e,t,n,r.enter)})},function(a){return a.transition(function(){return _C(Pe(this),e,t,n,r.update)})},function(a){return a.remove()}).transitions()}function SC(e,t,n,r){var i=e.showLine,a=e.showTick,o=e.showLabel,s=t.maybeAppendByClassName(at.lineGroup,"g"),l=gr(i,s,function(h){return hq(h,e,r)})||[],c=t.maybeAppendByClassName(at.tickGroup,"g"),u=gr(a,c,function(h){return Vq(h,n,e,r)})||[],f=t.maybeAppendByClassName(at.labelGroup,"g"),d=gr(o,f,function(h){return Bq(h,n,e,r)})||[];return me(me(me([],$(l),!1),$(u),!1),$(d),!1).filter(function(h){return!!h})}var j1=function(e){Rt(t,e);function t(n){return e.call(this,n,M1)||this}return t.prototype.render=function(n,r,i){var a=this,o=n.titleText,s=n.data,l=n.animate,c=n.showTitle,u=n.showGrid,f=n.dataThreshold,d=n.truncRange,h=sX(s,f).filter(function(w){var O=w.value;return!(d&&O>d[0]&&O<d[1])}),p=KP(i===void 0?l:i),v=Pe(r).maybeAppendByClassName(at.gridGroup,"g"),g=gr(u,v,function(w){return yq(w,h,n,p)})||[],y=Pe(r).maybeAppendByClassName(at.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&SC(n,Pe(this.offscreenGroup),h,KP(!1));var m=SC(n,Pe(y.node()),h,p),b=Pe(r).maybeAppendByClassName(at.titleGroup,"g"),x=gr(c,b,function(w){return Qq(w,a,n,p)})||[];return me(me(me([],$(g),!1),$(m),!1),$(x),!1).flat().filter(function(w){return!!w})},t}(kn),ri=ni({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"),Jq=function(e){Rt(t,e);function t(n){var r=e.call(this,n,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:FX(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return r.playState="idle",r.contentGroup=r.appendChild(new bn({class:ri.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new bn({class:ri.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(t.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return wi(n,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageShape",{get:function(){var n=this.pageViews,r=$(mX(n.map(function(f){var d=f.getBBox(),h=d.width,p=d.height;return[h,p]})).map(function(f){return Math.max.apply(Math,me([],$(f),!1))}),2),i=r[0],a=r[1],o=this.attributes,s=o.pageWidth,l=s===void 0?i:s,c=o.pageHeight,u=c===void 0?a:c;return{pageWidth:l,pageHeight:u}},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(t.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=e.prototype.getBBox.call(this),r=n.x,i=n.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,l=o.pageHeight;return new Tt(r,i,s+a.width,l)},t.prototype.goTo=function(n){var r=this,i=this.attributes.animate,a=this,o=a.currPage,s=a.playState,l=a.playWindow,c=a.pageViews;if(s!=="idle"||n<0||c.length<=0||n>=c.length)return null;c[o].setLocalPosition(0,0),this.prepareFollowingPage(n);var u=$(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=QP(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Kl(h,function(){r.innerCurrPage=n,r.playState="idle",r.setVisiblePages([n]),r.updatePageInfo()}),h},t.prototype.prev=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i<=0)return null;var a=n?(i-1+r)%r:wi(i-1,0,r);return this.goTo(a)},t.prototype.next=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i>=r-1)return null;var a=n?(i+1)%r:wi(i+1,0,r);return this.goTo(a)},t.prototype.renderClipPath=function(n){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=n.maybeAppendByClassName(ri.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},t.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(r,i){n.includes(i)?sf(r):_o(r)})},t.prototype.adjustControllerLayout=function(){var n=this,r=n.prevBtnGroup,i=n.nextBtnGroup,a=n.pageInfoGroup,o=this.attributes,s=o.orientation,l=o.controllerPadding,c=a.getBBox(),u=c.width;c.height;var f=$(s==="horizontal"?[-180,0]:[-90,90],2),d=f[0],h=f[1];r.setLocalEulerAngles(d),i.setLocalEulerAngles(h);var p=r.getBBox(),v=p.width,g=p.height,y=i.getBBox(),m=y.width,b=y.height,x=Math.max(v,u,m),w=s==="horizontal"?{offset:[[0,0],[v/2+l,0],[v+u+l*2,0]],textAlign:"start"}:{offset:[[x/2,-g-l],[x/2,0],[x/2,b+l]],textAlign:"center"},O=$(w.offset,3),_=$(O[0],2),S=_[0],k=_[1],E=$(O[1],2),M=E[0],P=E[1],A=$(O[2],2),L=A[0],N=A[1],T=w.textAlign,I=a.querySelector("text");I&&(I.style.textAlign=T),r.setLocalPosition(S,k),a.setLocalPosition(M,P),i.setLocalPosition(L,N)},t.prototype.updatePageInfo=function(){var n,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((n=this.pageInfoGroup.querySelector(ri.pageInfo.class))===null||n===void 0||n.attr("text",o(i+1,a.length)),this.adjustControllerLayout())},t.prototype.getFollowingPageDiff=function(n){var r=this.currPage;if(r===n)return[0,0];var i=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=n<r?-1:1;return i==="horizontal"?[l*o,0]:[0,l*s]},t.prototype.prepareFollowingPage=function(n){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([n,i]),n!==i){var o=$(this.getFollowingPageDiff(n),2),s=o[0],l=o[1];a[n].setLocalPosition(s,l)}},t.prototype.renderController=function(n){var r=this,i=this.attributes.controllerSpacing,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,l=this.pageViews.length>=2,c=n.maybeAppendByClassName(ri.controller,"g");if(zp(c.node(),l),!!l){var u=$e(this.attributes,"button"),f=$e(this.attributes,"pageNum"),d=$(Ta(u),2),h=d[0],p=d[1],v=h.size,g=Sn(h,["size"]),y=!c.select(ri.prevBtnGroup.class).node(),m=c.maybeAppendByClassName(ri.prevBtnGroup,"g").styles(p);this.prevBtnGroup=m.node();var b=m.maybeAppendByClassName(ri.prevBtn,"path"),x=c.maybeAppendByClassName(ri.nextBtnGroup,"g").styles(p);this.nextBtnGroup=x.node();var w=x.maybeAppendByClassName(ri.nextBtn,"path");[b,w].forEach(function(_){_.styles(re(re({},g),{transformOrigin:"center"})),S1(_.node(),v)});var O=c.maybeAppendByClassName(ri.pageInfoGroup,"g");this.pageInfoGroup=O.node(),O.maybeAppendByClassName(ri.pageInfo,"text").styles(f),this.updatePageInfo(),c.node().setLocalPosition(o+i,s/2),y&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},t.prototype.render=function(n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o;this.attr("transform","translate(".concat(a,", ").concat(s,")"));var l=Pe(r);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},t.prototype.bindEvents=function(){var n=this,r=I_(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(je.INSERTED,r),this.playWindow.addEventListener(je.REMOVED,r)},t}(kn);function eK(e,t,n){var r=Math.round((e-n)/t);return n+r*t}function tK(e,t,n){var r=1.4,i=r*n;return[["M",e-n,t-i],["L",e+n,t-i],["L",e+n,t+i],["L",e-n,t+i],["Z"]]}var kC=1.4,EC=.4;function nK(e,t,n){var r=n,i=r*kC,a=r/2,o=r/6,s=e+i*EC;return[["M",e,t],["L",s,t+a],["L",e+i,t+a],["L",e+i,t-a],["L",s,t-a],["Z"],["M",s,t+o],["L",e+i-2,t+o],["M",s,t-o],["L",e+i-2,t-o]]}function rK(e,t,n){var r=n,i=r*kC,a=r/2,o=r/6,s=t+i*EC;return[["M",e,t],["L",e-a,s],["L",e-a,t+i],["L",e+a,t+i],["L",e+a,s],["Z"],["M",e-o,s],["L",e-o,t+i-2],["M",e+o,s],["L",e+o,t+i-2]]}Qe.registerSymbol("hiddenHandle",tK),Qe.registerSymbol("verticalHandle",nK),Qe.registerSymbol("horizontalHandle",rK);function iK(e,t,n,r){var i,a=$(e,2),o=a[0],s=a[1],l=$(t,2),c=l[0],u=l[1],f=$(n,2),d=f[0],h=f[1],p=$([c,u],2),v=p[0],g=p[1],y=g-v;return v>g&&(i=$([g,v],2),v=i[0],g=i[1]),y>s-o?[o,s]:v<o?d===o&&h===g?[o,g]:[o,y+o]:g>s?h===s&&d===v?[v,s]:[s-y,s]:[v,g]}function ia(e,t,n){return e===void 0&&(e="horizontal"),e==="horizontal"?t:n}var Pr=ni({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function aK(e){var t=e.querySelector(Pr.marker.class);return t?t.style:{}}var oK=function(e){Rt(t,e);function t(n){return e.call(this,n,{span:[1,1],marker:function(){return new Aa({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(t.prototype,"showValue",{get:function(){var n=this.attributes.valueText;return n?typeof n=="string"||typeof n=="number"?n!=="":typeof n=="function"?!0:n.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actualSpace",{get:function(){var n=this.labelGroup,r=this.valueGroup,i=this.attributes.markerSize,a=n.node().getBBox(),o=a.width,s=a.height,l=r.node().getBBox(),c=l.width,u=l.height;return{markerWidth:i,labelWidth:o,valueWidth:c,height:Math.max(i,s,u)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"span",{get:function(){var n=this.attributes.span;if(!n)return[1,1];var r=$(In(n),2),i=r[0],a=r[1],o=this.showValue?a:0,s=i+o;return[i/s,o/s]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var n,r=this.attributes,i=r.markerSize,a=r.width,o=this.actualSpace,s=o.markerWidth,l=o.height,c=this.actualSpace,u=c.labelWidth,f=c.valueWidth,d=$(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=$(this.span,2),y=g[0],m=g[1];n=$([y*v,m*v],2),u=n[0],f=n[1]}var b=s+u+f+h+p;return{width:b,height:l,markerWidth:s,labelWidth:u,valueWidth:f}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){var n=this.attributes.spacing;if(!n)return[0,0];var r=$(In(n),2),i=r[0],a=r[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){var n=this.shape,r=n.markerWidth,i=n.labelWidth,a=n.valueWidth,o=n.width,s=n.height,l=$(this.spacing,2),c=l[0],u=l[1];return{height:s,width:o,markerWidth:r,labelWidth:i,valueWidth:a,position:[r/2,r+c,r+i+c+u]}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleSize",{get:function(){var n=aK(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,o=a===void 0?n.strokeWidth:a,s=r.markerLineWidth,l=s===void 0?n.lineWidth:s,c=r.markerStroke,u=c===void 0?n.stroke:c,f=+(o||l||(u?1:0))*Math.sqrt(2),d=this.markerGroup.node().getBBox(),h=d.width,p=d.height;return(1-f/Math.max(h,p))*i},enumerable:!1,configurable:!0}),t.prototype.renderMarker=function(n){var r=this,i=this.attributes.marker,a=$e(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(Pr.markerGroup,"g").style("zIndex",0),gr(!!i,this.markerGroup,function(){var o,s=r.markerGroup.node(),l=(o=s.childNodes)===null||o===void 0?void 0:o[0],c=typeof i=="string"?new Qe({style:{symbol:i},className:Pr.marker.name}):i();l?c.nodeName===l.nodeName?l instanceof Qe?l.update(re(re({},a),{symbol:i})):(hX(l,c),Pe(l).styles(a)):(l.remove(),Pe(c).attr("className",Pr.marker.name).styles(a),s.appendChild(c)):(c instanceof Qe||Pe(c).attr("className",Pr.marker.name).styles(a),s.appendChild(c)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]);var u=S1(r.markerGroup.node(),r.scaleSize);r.markerGroup.node().style._transform="scale(".concat(u,")")})},t.prototype.renderLabel=function(n){var r=$e(this.attributes,"label"),i=r.text,a=Sn(r,["text"]);this.labelGroup=n.maybeAppendByClassName(Pr.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Pr.label,function(){return Is(i)}).styles(a)},t.prototype.renderValue=function(n){var r=this,i=$e(this.attributes,"value"),a=i.text,o=Sn(i,["text"]);this.valueGroup=n.maybeAppendByClassName(Pr.valueGroup,"g").style("zIndex",0),gr(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(Pr.value,function(){return Is(a)}).styles(o)})},t.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=$e(this.attributes,"background");this.background=n.maybeAppendByClassName(Pr.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Pr.background,"rect").styles(re({width:i,height:a},o))},t.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=$(n.position,3),s=o[0],l=o[1],c=o[2],u=a/2;this.markerGroup.styles({transform:"translate(".concat(s,", ").concat(u,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(u,")")}),x1(this.labelGroup.select(Pr.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(c,", ").concat(u,")")}),x1(this.valueGroup.select(Pr.value.class).node(),Math.ceil(i)))},t.prototype.render=function(n,r){var i=Pe(r),a=n.x,o=a===void 0?0:a,s=n.y,l=s===void 0?0:s;i.styles({transform:"translate(".concat(o,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},t}(kn),Fs=ni({page:"item-page",navigator:"navigator",item:"item"},"items"),MC=function(e,t,n){return n===void 0&&(n=!0),e?t(e):n},sK=function(e){Rt(t,e);function t(n){var r=e.call(this,n,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:ay,mouseenter:ay,mouseleave:ay})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){var n=this.attributes,r=n.gridRow,i=n.gridCol,a=n.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderData",{get:function(){var n=this.attributes,r=n.data,i=n.layout,a=$e(this.attributes,"item"),o=r.map(function(s,l){var c=s.id,u=c===void 0?l:c,f=s.label,d=s.value;return{id:"".concat(u),index:l,style:re({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=$(h,2),v=p[0],g=p[1];return[v,ti(g,[s,l,r])]})))}});return o},enumerable:!1,configurable:!0}),t.prototype.getGridLayout=function(){var n=this,r=this.attributes,i=r.orientation,a=r.width,o=r.rowPadding,s=r.colPadding,l=$(this.navigatorShape,1),c=l[0],u=$(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(v,g){var y,m,b=Math.floor(g/h),x=g%h,w=n.ifHorizontal(d,f),O=[Math.floor(x/w),x%w];i==="vertical"&&O.reverse();var _=$(O,2),S=_[0],k=_[1],E=(a-c-(d-1)*s)/d,M=v.getBBox().height,P=$([0,0],2),A=P[0],L=P[1];return i==="horizontal"?(y=$([p,S*(M+o)],2),A=y[0],L=y[1],p=k===d-1?0:p+E+s):(m=$([k*(E+s),p],2),A=m[0],L=m[1],p=S===f-1?0:p+M+o),{page:b,index:g,row:S,col:k,pageIndex:x,width:E,height:M,x:A,y:L}})},t.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=$(this.navigatorShape,1),l=s[0],c=$(this.grid,2),u=c[0],f=c[1],d=$([r-l,i],2),h=d[0],p=d[1],v=$([0,0,0,0,0,0,0,0],8),g=v[0],y=v[1],m=v[2],b=v[3],x=v[4],w=v[5],O=v[6],_=v[7];return this.pageViews.children.map(function(S,k){var E,M,P,A,L=S.getBBox(),N=L.width,T=L.height,I=O===0?0:o,C=O+I+N;if(C<=h&&MC(x,function(D){return D<f}))return E=$([O+I,_,C],3),g=E[0],y=E[1],O=E[2],{width:N,height:T,x:g,y,page:m,index:k,pageIndex:b++,row:w,col:x++};M=$([w+1,0,0,_+T+a],4),w=M[0],x=M[1],O=M[2],_=M[3];var j=_+T;return j<=p&&MC(w,function(D){return D<u})?(P=$([O,_,N],3),g=P[0],y=P[1],O=P[2],{width:N,height:T,x:g,y,page:m,index:k,pageIndex:b++,row:w,col:x++}):(A=$([0,0,N,0,m+1,0,0,0],8),g=A[0],y=A[1],O=A[2],_=A[3],m=A[4],b=A[5],w=A[6],x=A[7],{width:N,height:T,x:g,y,page:m,index:k,pageIndex:b++,row:w,col:x++})})},Object.defineProperty(t.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var n=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=n.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],n.call(this)):r},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(n,r){var i=this.attributes.orientation;return ia(i,n,r)},t.prototype.flattenPage=function(n){n.querySelectorAll(Fs.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(Fs.page.class).forEach(function(r){var i=n.removeChild(r);i.destroy()})},t.prototype.renderItems=function(n){var r=this.attributes,i=r.click,a=r.mouseenter,o=r.mouseleave;this.flattenPage(n);var s=this.dispatchCustomEvent.bind(this);Pe(n).selectAll(Fs.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(c){var u=c.style;return new oK({style:u})}).attr("className",Fs.item.name).on("click",function(){i==null||i(this),s("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),s("itemMouseenter",{item:this})}).on("pointerleave",function(){o==null||o(this),s("itemMouseleave",{item:this})})},function(l){return l.each(function(c){var u=c.style;this.update(u)})},function(l){return l.remove()})},t.prototype.relayoutNavigator=function(){var n,r=this.attributes,i=r.layout,a=r.width,o=((n=this.pageViews.children[0])===null||n===void 0?void 0:n.getBBox().height)||0,s=$(this.navigatorShape,2),l=s[0],c=s[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:o-c}:{})},t.prototype.adjustLayout=function(){var n=this,r=Object.entries(XU(this.itemsLayout,"page")).map(function(a){var o=$(a,2),s=o[0],l=o[1];return{page:s,layouts:l}}),i=me([],$(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new bn({className:Fs.page.name}));o.forEach(function(l){var c=l.x,u=l.y,f=l.index,d=l.width,h=l.height,p=i[f];s.appendChild(p),U$(p,"__layout__",l),p.update({x:c,y:u,width:d,height:h})})}),this.relayoutNavigator()},t.prototype.renderNavigator=function(n){var r=this.attributes.orientation,i=$e(this.attributes,"nav"),a=Pa({orientation:r},i),o=this;return n.selectAll(Fs.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new Jq({style:a})}).attr("className",Fs.navigator.name).each(function(){o.navigator=this})},function(s){return s.each(function(){this.update(a)})},function(s){return s.remove()}),this.navigator},t.prototype.getBBox=function(){return this.navigator.getBBox()},t.prototype.render=function(n,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Pe(r));this.renderItems(a.getContainer()),this.adjustLayout()}},t.prototype.dispatchCustomEvent=function(n,r){var i=new dt(n,{detail:r});this.dispatchEvent(i)},t}(kn),pf=ni({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),AC={showLabel:!0,formatter:function(e){return e.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},lK=function(e){Rt(t,e);function t(n){return e.call(this,n,AC)||this}return t.prototype.render=function(n,r){var i=Pe(r).maybeAppendByClassName(pf.markerGroup,"g");this.renderMarker(i);var a=Pe(r).maybeAppendByClassName(pf.labelGroup,"g");this.renderLabel(a)},t.prototype.renderMarker=function(n){var r=this,i=this.attributes,a=i.orientation,o=i.markerSymbol,s=o===void 0?ia(a,"horizontalHandle","verticalHandle"):o;gr(!!s,n,function(l){var c=$e(r.attributes,"marker"),u=re({symbol:s},c);r.marker=l.maybeAppendByClassName(pf.marker,function(){return new Qe({style:u})}).update(u)})},t.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.showLabel,o=i.orientation,s=i.spacing,l=s===void 0?0:s,c=i.formatter;gr(a,n,function(u){var f,d=$e(r.attributes,"label"),h=d.text,p=Sn(d,["text"]),v=((f=u.select(pf.marker.class))===null||f===void 0?void 0:f.node().getBBox())||{},g=v.width,y=g===void 0?0:g,m=v.height,b=m===void 0?0:m,x=$(ia(o,[0,b+l,"center","top"],[y+l,0,"start","middle"]),4),w=x[0],O=x[1],_=x[2],S=x[3];u.maybeAppendByClassName(pf.label,"text").styles(re(re({},p),{x:w,y:O,text:c(h).toString(),textAlign:_,textBaseline:S}))})},t}(kn),PC={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},cK=Pa({},PC,{}),uK=Pa({},PC,na(AC,"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"}),fK=.01,jn=ni({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"),dK=function(e){Rt(t,e);function t(n){return e.call(this,n,cK)||this}return t.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,l=$e(this.attributes,"title"),c=$(Ta(l),2),u=c[0],f=c[1];this.titleGroup=n.maybeAppendByClassName(jn.titleGroup,"g").styles(f);var d=re(re({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(jn.title,function(){return new OC({style:d})}).update(d)},t.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,l=$e(this.attributes,"title",!0),c=$(Ta(l),2),u=c[0],f=c[1],d=re(re({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(jn.itemsGroup,"g").styles(re(re({},f),{transform:"translate(".concat(i,", ").concat(a,")")}));var h=this;this.itemsGroup.selectAll(jn.items.class).data(["items"]).join(function(p){return p.append(function(){return new sK({style:d})}).attr("className",jn.items.name).each(function(){h.items=Pe(this)})},function(p){return p.update(d)},function(p){return p.remove()})},t.prototype.adjustLayout=function(){var n=this.attributes.showTitle;if(n){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(t.prototype,"availableSpace",{get:function(){var n=this.attributes,r=n.showTitle,i=n.width,a=n.height;return r?this.title.node().getAvailableSpace():new Tt(0,0,i,a)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n,r,i=(n=this.title)===null||n===void 0?void 0:n.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?e.prototype.getBBox.call(this):Uq(i,a)},t.prototype.render=function(n,r){var i=this.attributes,a=i.width,o=i.height,s=i.x,l=s===void 0?0:s,c=i.y,u=c===void 0?0:c,f=Pe(r);r.style.transform="translate(".concat(l,", ").concat(u,")"),this.renderTitle(f,a,o),this.renderItems(f,this.availableSpace),this.adjustLayout()},t}(kn),hK={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(e){return e.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},D1=ni({background:"background",labelGroup:"label-group",label:"label"},"indicator"),pK=function(e){Rt(t,e);function t(n){var r=e.call(this,n,hK)||this;return r.point=[0,0],r.group=r.appendChild(new bn({})),r.isMutationObserved=!0,r}return t.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=$(In(i),4),o=a[0],s=a[1],l=a[2],c=a[3],u=this.label.node().getLocalBounds(),f=u.min,d=u.max,h=new Tt(f[0]-c,f[1]-o,d[0]+s-f[0]+c,d[1]+l-f[1]+o),p=this.getPath(r,h),v=$e(this.attributes,"background");this.background=Pe(this.group).maybeAppendByClassName(D1.background,"path").styles(re(re({},v),{d:p})),this.group.appendChild(this.label.node())}},t.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=$e(this.attributes,"label"),o=$(Ta(a),2),s=o[0],l=o[1];s.text;var c=Sn(s,["text"]);if(this.label=Pe(this.group).maybeAppendByClassName(D1.labelGroup,"g").styles(l),!!i){var u=this.label.maybeAppendByClassName(D1.label,function(){return Is(r(i))}).style("text",r(i).toString());u.selectAll("text").styles(c)}},t.prototype.adjustLayout=function(){var n=$(this.point,2),r=n[0],i=n[1],a=this.attributes,o=a.x,s=a.y;this.group.attr("transform","translate(".concat(o-r,", ").concat(s-i,")"))},t.prototype.getPath=function(n,r){var i=this.attributes.radius,a=r.x,o=r.y,s=r.width,l=r.height,c=[["M",a+i,o],["L",a+s-i,o],["A",i,i,0,0,1,a+s,o+i],["L",a+s,o+l-i],["A",i,i,0,0,1,a+s-i,o+l],["L",a+i,o+l],["A",i,i,0,0,1,a,o+l-i],["L",a,o+i],["A",i,i,0,0,1,a+i,o],["Z"]],u={top:4,right:6,bottom:0,left:2},f=u[n],d=this.createCorner([c[f].slice(-2),c[f+1].slice(-2)]);return c.splice.apply(c,me([f+1,1],$(d),!1)),c[0][0]="M",c},t.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=dX.apply(void 0,me([],$(n),!1)),o=$(n,2),s=$(o[0],2),l=s[0],c=s[1],u=$(o[1],2),f=u[0],d=u[1],h=$(a?[f-l,[l,f]]:[d-c,[c,d]],2),p=h[0],v=$(h[1],2),g=v[0],y=v[1],m=p/2,b=p/Math.abs(p),x=r*b,w=x/2,O=x*Math.sqrt(3)/2*i,_=$([g,g+m-w,g+m,g+m+w,y],5),S=_[0],k=_[1],E=_[2],M=_[3],P=_[4];return a?(this.point=[E,c-O],[["L",S,c],["L",k,c],["L",E,c-O],["L",M,c],["L",P,c]]):(this.point=[l+O,E],[["L",l,S],["L",l,k],["L",l+O,E],["L",l,M],["L",l,P]])},t.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?_o(this):sf(this)},t.prototype.bindEvents=function(){this.label.on(je.BOUNDS_CHANGED,this.renderBackground)},t.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},t}(kn);function vK(e,t){for(var n=1;n<e.length;n+=1){var r=e[n-1],i=e[n];if(t>=r&&t<=i)return[r,i]}return[t,t]}function gK(e,t,n){var r=Array.from(t),i=e.length;return new Array(i).fill(0).reduce(function(a,o,s){var l=r[s%r.length];return a+=" ".concat(e[s],":").concat(l).concat(s<i-1?" ".concat(e[s+1],":").concat(l):"")},"l(".concat(n==="horizontal"?"0":"270",")"))}function CC(e,t){var n=$(vK(e,t),2),r=n[0],i=n[1];return{tick:t>(r+i)/2?i:r,range:[r,i]}}var vf=ni({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function TC(e){var t=e.orientation,n=e.size,r=e.length;return ia(t,[r,n],[n,r])}function LC(e){var t=e.type,n=$(TC(e),2),r=n[0],i=n[1];return t==="size"?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}function yK(e){return LC(e)}function mK(e){var t=e.orientation,n=e.color,r=e.block,i=e.partition,a;if(fr(n)){var o=20;a=new Array(o).fill(0).map(function(c,u,f){return n(u/(f.length-1))})}else a=n;var s=a.length,l=a.map(function(c){return bo(c).toString()});return s?s===1?l[0]:r?gK(i,l,t):l.reduce(function(c,u,f){return c+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(ia(t,"0","270"),")")):""}function bK(e){var t=e.orientation,n=e.range;if(!n)return[];var r=$(TC(e),2),i=r[0],a=r[1],o=$(n,2),s=o[0],l=o[1],c=ia(t,s*i,0),u=ia(t,0,s*a),f=ia(t,l*i,i),d=ia(t,a,l*a);return[["M",c,u],["L",c,d],["L",f,d],["L",f,u],["Z"]]}function xK(e,t){var n=$e(t,"track");e.maybeAppendByClassName(vf.track,"path").styles(re({d:LC(t)},n))}function wK(e,t){var n=$e(t,"selection"),r=mK(t),i=e.maybeAppendByClassName(vf.selection,"path").styles(re({d:yK(t),fill:r},n)),a=i.maybeAppendByClassName(vf.clipPath,"path").styles({d:bK(t)}).node();i.style("clipPath",a)}var OK=function(e){Rt(t,e);function t(n){return e.call(this,n,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return t.prototype.render=function(n,r){var i=Pe(r).maybeAppendByClassName(vf.trackGroup,"g");xK(i,n);var a=Pe(r).maybeAppendByClassName(vf.selectionGroup,"g");wK(a,n)},t}(kn);function _K(e){return{min:Math.min.apply(Math,me([],$(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,me([],$(e.map(function(t){return t.value})),!1))}}var SK=function(e){Rt(t,e);function t(n){var r=e.call(this,n,uK)||this;return r.eventToOffsetScale=new bt({}),r.innerRibbonScale=new bt({}),r.cacheLabelBBox=null,r.cacheHandleBBox=null,r.onHovering=function(i){var a=r.attributes,o=a.data,s=a.block;i.stopPropagation();var l=r.getValueByCanvasPoint(i);if(s){var c=CC(o.map(function(d){var h=d.value;return h}),l).range,u=r.getRealSelection(c);r.showIndicator((c[0]+c[1])/2,"".concat(u[0],"-").concat(u[1])),r.dispatchIndicated(l,c)}else{var f=r.getTickValue(l);r.showIndicator(f,"".concat(r.getRealValue(f))),r.dispatchIndicated(f)}},r.onDragStart=function(i){return function(a){a.stopPropagation(),r.attributes.slidable&&(r.target=i,r.prevValue=r.getTickValue(r.getValueByCanvasPoint(a)),document.addEventListener("mousemove",r.onDragging),document.addEventListener("touchmove",r.onDragging),document.addEventListener("mouseleave",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("touchend",r.onDragEnd))}},r.onDragging=function(i){var a=r.target;r.updateMouse();var o=$(r.selection,2),s=o[0],l=o[1],c=r.getTickValue(r.getValueByCanvasPoint(i)),u=c-r.prevValue;a==="start"?s!==c&&r.updateSelection(c,l):a==="end"?l!==c&&r.updateSelection(s,c):a==="ribbon"&&u!==0&&(r.prevValue=c,r.updateSelection(u,u,!0))},r.onDragEnd=function(){r.style.cursor="pointer",document.removeEventListener("mousemove",r.onDragging),document.removeEventListener("touchmove",r.onDragging),document.removeEventListener("mouseup",r.onDragEnd),document.removeEventListener("touchend",r.onDragEnd)},r}return Object.defineProperty(t.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=this.attributes,r=n.width,i=n.height;return new Tt(0,0,r,i)},t.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(Pe(r));var o=this.availableSpace,s=o.x,l=o.y,c=Pe(r).maybeAppendByClassName(jn.contentGroup,"g").styles({transform:"translate(".concat(s,", ").concat(l,")")}),u=c.maybeAppendByClassName(jn.labelGroup,"g").styles({zIndex:1});gr(!!a,u,function(d){i.renderLabel(d)});var f=c.maybeAppendByClassName(jn.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=c.maybeAppendByClassName(jn.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(f),this.renderIndicator(c),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(t.prototype,"range",{get:function(){var n=this.attributes,r=n.data,i=n.domain;return i?{min:i[0],max:i[1]}:_K(r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonScale",{get:function(){var n=this.range,r=n.min,i=n.max;return this.innerRibbonScale.update({domain:[r,i],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonRange",{get:function(){var n=$(this.selection,2),r=n[0],i=n[1],a=this.ribbonScale;return[a.map(r),a.map(i)]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selection",{get:function(){var n=this.range,r=n.min,i=n.max,a=this.attributes.defaultValue,o=a===void 0?[r,i]:a,s=$(o,2),l=s[0],c=s[1];return[l,c]},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(n,r){return ia(this.attributes.orientation,typeof n=="function"?n():n,typeof r=="function"?r():r)},t.prototype.renderTitle=function(n){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.width,s=r.height,l=$e(this.attributes,"title"),c=re(re({},l),{width:o,height:s,text:a}),u=this;n.selectAll(jn.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new OC({style:c})}).attr("className",jn.title.name).each(function(){u.title=this})},function(f){return f.update(c)},function(f){return f.each(function(){u.title=void 0}).remove()})},Object.defineProperty(t.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var n=this.attributes,r=n.width,i=n.height;return new Tt(0,0,r,i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelFixedSpacing",{get:function(){var n=this.attributes.showTick;return n?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelPosition",{get:function(){var n=this.attributes,r=n.orientation,i=n.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[r][i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelBBox",{get:function(){var n,r=this.attributes.showLabel;if(!r)return new Tt(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(at.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new Tt(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelShape",{get:function(){var n=this.attributes,r=n.showLabel,i=n.labelSpacing,a=i===void 0?0:i;if(!r)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,l=o.height,c=this.ifHorizontal(l,s)+a+this.labelFixedSpacing,u=this.ifHorizontal(s,l);return{width:s,height:l,size:c,length:u}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonBBox",{get:function(){var n=this.attributes,r=n.showHandle,i=n.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,l=this.labelShape,c=l.size,u=l.length,f=$(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},v=p.size,g=p.length,y=this.handleOffsetRatio,m=0,b=this.labelPosition;i?m=i:["bottom","right"].includes(b)?m=Math.min(d-c,(d-v)/y):d*(1-y)>v?m=Math.max(d-c,0):m=Math.max((d-c-v)/y,0);var x=Math.max(g,u),w=h-x,O=$(this.ifHorizontal([w,m],[m,w]),2),_=O[0],S=O[1],k=["top","left"].includes(b)?c:0,E=$(this.ifHorizontal([x/2,k],[k,x/2]),2),M=E[0],P=E[1];return new Tt(M,P,_,S)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ribbonShape",{get:function(){var n=this.ribbonBBox,r=n.width,i=n.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),t.prototype.renderRibbon=function(n){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,l=r.block,c=$e(this.attributes,"ribbon"),u=this.range,f=u.min,d=u.max,h=this.ribbonBBox,p=h.x,v=h.y,g=this.ribbonShape,y=g.length,m=g.size,b=Pa({transform:"translate(".concat(p,", ").concat(v,")"),length:y,size:m,type:a,orientation:o,color:s,block:l,partition:i.map(function(x){return(x.value-f)/(d-f)}),range:this.ribbonRange},c);this.ribbon=n.maybeAppendByClassName(jn.ribbon,function(){return new OK({style:b})}).update(b)},t.prototype.getHandleClassName=function(n){return"".concat(jn.prefix("".concat(n,"-handle")))},t.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=$e(this.attributes,"handle"),o=$(this.selection,2),s=o[0],l=o[1],c=re(re({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?lK:nC,h=this;this.handlesGroup.selectAll(jn.handle.class).data(r?[{value:s,type:"start"},{value:l,type:"end"}]:[],function(p){return p.type}).join(function(p){return p.append(function(){return new d({style:c})}).attr("className",function(v){var g=v.type;return"".concat(jn.handle," ").concat(h.getHandleClassName(g))}).each(function(v){var g=v.type,y=v.value;this.update({labelText:y});var m="".concat(g,"Handle");h[m]=this,this.addEventListener("pointerdown",h.onDragStart(g))})},function(p){return p.update(c).each(function(v){var g=v.value;this.update({labelText:g})})},function(p){return p.each(function(v){var g=v.type,y="".concat(g,"Handle");h[y]=void 0}).remove()})},t.prototype.adjustHandles=function(){var n=$(this.selection,2),r=n[0],i=n[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i)},Object.defineProperty(t.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new Tt(0,0,0,0);var n=this.startHandle.getBBox(),r=n.width,i=n.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,l=$([Math.max(r,o),Math.max(i,s)],2),c=l[0],u=l[1];return this.cacheHandleBBox=new Tt(0,0,c,u),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"handleShape",{get:function(){var n=this.handleBBox,r=n.width,i=n.height,a=$(this.ifHorizontal([i,r],[r,i]),2),o=a[0],s=a[1];return{width:r,height:i,size:o,length:s}},enumerable:!1,configurable:!0}),t.prototype.setHandlePosition=function(n,r){var i=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,l=this.ribbonShape.size,c=this.getOffset(r),u=$(this.ifHorizontal([o+c,s+l*this.handleOffsetRatio],[o+l*this.handleOffsetRatio,s+c]),2),f=u[0],d=u[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(n))).node();h==null||h.update({transform:"translate(".concat(f,", ").concat(d,")"),formatter:i})},t.prototype.renderIndicator=function(n){var r=$e(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(jn.indicator,function(){return new pK({})}).update(r)},Object.defineProperty(t.prototype,"labelData",{get:function(){var n=this,r=this.attributes.data;return r.reduce(function(i,a,o,s){var l,c,u=(l=a==null?void 0:a.id)!==null&&l!==void 0?l:o.toString();if(i.push(re(re({},a),{id:u,index:o,type:"value",label:(c=a==null?void 0:a.label)!==null&&c!==void 0?c:a.value.toString(),value:n.ribbonScale.map(a.value)})),o<s.length-1){var f=s[o+1],d=$([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push(re(re({},a),{id:u,index:o,type:"range",range:[h,p],label:[h,p].join("~"),value:n.ribbonScale.map(v)}))}return i},[])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"labelStyle",{get:function(){var n=$(["center","middle"],2),r=n[0],i=n[1],a=this.labelPosition;return a==="top"?i="bottom":a==="bottom"?i="top":a==="left"?r="end":a==="right"&&(r="start"),{labelTextAlign:r,labelTextBaseline:i}},enumerable:!1,configurable:!0}),t.prototype.renderLabel=function(n){var r=this.attributes,i=r.showTick,a=i===void 0?!1:i,o=r.labelFilter,s=r.labelFormatter,l=$e(this.attributes,"tick"),c=$e(this.attributes,"label"),u=c.align,f=Pa(re({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),na(l,"tick"),na(c,"label"),{data:this.labelData}),d={tickFilter:function(p,v,g){return(p==null?void 0:p.type)!=="value"?!1:o?o(p,p.index,g.filter(function(y){return y.type!=="value"})):!0},labelFilter:function(p,v,g){return(p==null?void 0:p.type)!==u?!1:o?o(p,p.index,g.filter(function(y){return y.type===u})):!0},labelFormatter:s},h=re(re(re({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(jn.label,function(){return new j1({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(t.prototype,"labelAxisStyle",{get:function(){var n=this.attributes,r=n.showTick,i=n.labelDirection,a=n.labelSpacing,o=n.tickLength,s=this.ribbonShape.size,l=this.labelPosition,c=this.labelFixedSpacing,u=$([0,0,0],3),f=u[0],d=u[1],h=u[2],p=o!=null?o:s;return r?(h=p,d=c,i==="positive"?l==="right"?(f=p,h=p):l==="bottom"&&(f=h):i==="negative"&&(l==="top"||l==="left")&&(f=s)):i==="positive"?l==="right"?d=p:l==="bottom"&&(f=s+c,d=a):i==="negative"&&(l==="left"||l==="top")&&(d=a),{offset:f,spacing:d,tickLength:h}},enumerable:!1,configurable:!0}),t.prototype.adjustLabel=function(){var n=this.attributes.showLabel;if(n){var r=this.ribbonBBox,i=r.x,a=r.y,o=r.width,s=r.height,l=this.labelAxisStyle,c=l.offset,u=l.spacing,f=l.tickLength,d=$(this.ifHorizontal([[i,a+c],[i+o,a+c]],[[i+c,a+s],[i+c,a]]),2),h=d[0],p=d[1];this.label.update({startPos:h,endPos:p,tickLength:f,labelSpacing:u},!1)}},t.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)},t.prototype.showIndicator=function(n,r){r===void 0&&(r="".concat(n));var i=this.attributes.showIndicator;if(!i||typeof n!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,l=this.ribbonBBox,c=l.x,u=l.y,f=wi(n,o,s),d=this.getOffset(f),h=this.ifHorizontal([d+c,u],[c,d+u]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:r}),sf(this.indicator.node())},t.prototype.hideIndicator=function(){_o(this.indicator.node())},t.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},t.prototype.setSelection=function(n,r){this.updateSelection(n,r)},t.prototype.updateSelection=function(n,r,i){var a;i===void 0&&(i=!1);var o=$(this.selection,2),s=o[0],l=o[1],c=$([n,r],2),u=c[0],f=c[1];i&&(u+=s,f+=l);var d=this.range,h=d.min,p=d.max;a=$(iK([h,p],[u,f],this.selection),2),u=a[0],f=a[1],this.update({defaultValue:[u,f]}),this.dispatchSelection()},Object.defineProperty(t.prototype,"step",{get:function(){var n=this.attributes.step,r=n===void 0?1:n,i=this.range,a=i.min,o=i.max;return nh(r)?_1((o-a)*fK,0):r},enumerable:!1,configurable:!0}),t.prototype.getTickValue=function(n){var r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?CC(i.map(function(s){var l=s.value;return l}),n).tick:eK(n,this.step,o)},t.prototype.getValueByCanvasPoint=function(n){var r=this.range,i=r.min,a=r.max,o=$(this.ribbon.node().getPosition(),2),s=o[0],l=o[1],c=this.ifHorizontal(s,l),u=this.ifHorizontal.apply(this,me([],$(Yp(n)),!1)),f=u-c,d=wi(this.getOffset(f,!0),i,a);return d},t.prototype.getOffset=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=this.ribbonShape.length,l=this.eventToOffsetScale;return l.update({domain:[a,o],range:[0,s]}),r?l.invert(n):l.map(n)},t.prototype.getRealSelection=function(n){var r=this.range.max,i=$(n,2),a=i[0],o=i[1];return this.ifHorizontal([a,o],[r-o,r-a])},t.prototype.getRealValue=function(n){var r=this.range.max;return this.ifHorizontal(n,r-n)},t.prototype.dispatchSelection=function(){var n=this.getRealSelection(this.selection),r=new dt("valuechange",{detail:{value:n}});this.dispatchEvent(r)},t.prototype.dispatchIndicated=function(n,r){var i=this,a=this.range.max,o=this.ifHorizontal(function(){return{value:n,range:r}},function(){return{value:a-n,range:r?i.getRealSelection(r):void 0}}),s=new dt("indicate",{detail:o});this.dispatchEvent(s)},t}(kn);function F1(e){return e===void 0&&(e=""),{CONTAINER:"".concat(e,"tooltip"),TITLE:"".concat(e,"tooltip-title"),LIST:"".concat(e,"tooltip-list"),LIST_ITEM:"".concat(e,"tooltip-list-item"),NAME:"".concat(e,"tooltip-list-item-name"),MARKER:"".concat(e,"tooltip-list-item-marker"),NAME_LABEL:"".concat(e,"tooltip-list-item-name-label"),VALUE:"".concat(e,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(e,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(e,"tooltip-crosshair-y")}}var NC={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function kK(e){var t;e===void 0&&(e="");var n=F1(e);return t={},t[".".concat(n.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"},t[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},t[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},t[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},t[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},t[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},t[".".concat(n.NAME_LABEL)]=re({flex:1},NC),t[".".concat(n.VALUE)]=re({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},NC),t[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t}var EK=function(e){Rt(t,e);function t(n){var r=this,i,a,o=(a=(i=n.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,s=F1(o);return r=e.call(this,n,{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}>
52
+ <span class="`).concat(s.NAME,`">
53
+ <span class="`).concat(s.MARKER,`" style="background:{color}"></span>
54
+ <span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
55
+ </span>
56
+ <span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
57
+ </li>`)},style:kK(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(t.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.element},Object.defineProperty(t.prototype,"elementSize",{get:function(){var n=this.element.offsetWidth,r=this.element.offsetHeight;return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HTMLTooltipItemsElements",{get:function(){var n=this.attributes,r=n.data,i=n.template;return r.map(function(a,o){var s=a.name,l=s===void 0?"":s,c=a.color,u=c===void 0?"black":c,f=a.index,d=Sn(a,["name","color","index"]),h=re({name:l,color:u,index:f!=null?f:o},d);return aS(B$(i.item,h))})},enumerable:!1,configurable:!0}),t.prototype.render=function(n,r){this.renderHTMLTooltipElement(),this.updatePosition()},t.prototype.destroy=function(){var n;(n=this.element)===null||n===void 0||n.remove(),e.prototype.destroy.call(this)},t.prototype.show=function(n,r){var i=this;if(n!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=n!=null?n:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},t.prototype.hide=function(n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(n,r)||(this.element.style.visibility="hidden")},t.prototype.initShape=function(){var n=this.attributes.template;this.element=aS(n.container),this.id&&this.element.setAttribute("id",this.id)},t.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var n=this.attributes.content;n&&(typeof n=="string"?this.element.innerHTML=n:GP(this.element,n))}},t.prototype.renderHTMLTooltipElement=function(){var n,r,i=this.attributes,a=i.template,o=i.title,s=i.enterable,l=i.style,c=i.content,u=F1(a.prefixCls),f=this.element;if(this.element.style.pointerEvents=s?"auto":"none",c)this.renderCustomContent();else{o?(f.innerHTML=a.title,f.getElementsByClassName(u.TITLE)[0].innerHTML=o):(r=(n=f.getElementsByClassName(u.TITLE))===null||n===void 0?void 0:n[0])===null||r===void 0||r.remove();var d=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=u.LIST,GP(h,d);var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}gX(f,l)},t.prototype.getRelativeOffsetFromCursor=function(n){var r=this.attributes,i=r.position,a=r.offset,o=n||i,s=o.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},c=this.elementSize,u=c.width,f=c.height,d=[-u/2,-f/2];return s.forEach(function(h){var p=$(d,2),v=p[0],g=p[1],y=$(l[h],2),m=y[0],b=y[1];d=[v+(u/2+a[0])*m,g+(f/2+a[1])*b]}),d},t.prototype.setOffsetPosition=function(n){var r=$(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=s===void 0?0:s,c=o.y,u=c===void 0?0:c,f=o.container,d=f.x,h=f.y;this.element.style.left="".concat(+l+d+i,"px"),this.element.style.top="".concat(+u+h+a,"px")},t.prototype.updatePosition=function(){var n=this.attributes.showDelay,r=n===void 0?60:n,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},t.prototype.autoPosition=function(n){var r=$(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position;if(!c)return[i,a];var f=this.element,d=f.offsetWidth,h=f.offsetHeight,p=$([+s+i,+l+a],2),v=p[0],g=p[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},m=c.x,b=c.y,x=c.width,w=c.height,O={left:v<m,right:v+d>m+x,top:g<b,bottom:g+h>b+w},_=[];u.split("-").forEach(function(k){O[k]?_.push(y[k]):_.push(k)});var S=_.join("-");return this.getRelativeOffsetFromCursor(S)},t.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,l=i.height;return new Tt(a,o,s,l).isPointIn(n,r)}return!1},t.prototype.closeTransition=function(n){var r=this,i=this.element.style.transition;this.element.style.transition="none",n(),setTimeout(function(){r.element.style.transition=i},10)},t.tag="tooltip",t}(kn),MK=function(e){Rt(t,e);function t(n){var r=e.call(this,n)||this;r.layoutEvents=[je.BOUNDS_CHANGED,je.INSERTED,je.REMOVED],r.$margin=In(0),r.$padding=In(0);var i=n.style||{},a=i.margin,o=a===void 0?0:a,s=i.padding,l=s===void 0?0:s;return r.margin=o,r.padding=l,r.isMutationObserved=!0,r.bindEvents(),r}return Object.defineProperty(t.prototype,"margin",{get:function(){return this.$margin},set:function(n){this.$margin=In(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=In(n)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var n=this.attributes,r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a,s=n.width,l=n.height,c=$(this.$margin,4),u=c[0],f=c[1],d=c[2],h=c[3];return new Tt(i-h,o-u,s+h+f,l+u+d)},t.prototype.appendChild=function(n,r){return n.isMutationObserved=!0,e.prototype.appendChild.call(this,n,r),n},t.prototype.getAvailableSpace=function(){var n=this.attributes,r=n.width,i=n.height,a=$(this.$padding,4),o=a[0],s=a[1],l=a[2],c=a[3],u=$(this.$margin,4),f=u[0],d=u[3];return new Tt(c+d,o+f,r-c-s,i-o-l)},t.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(o){return!o.isConnected}))try{var n=this.attributes,r=n.x,i=n.y;this.style.transform="translate(".concat(r,", ").concat(i,")");var a=tX(this.getAvailableSpace(),this.children.map(function(o){return o.getBBox()}),this.attributes);this.children.forEach(function(o,s){var l=a[s],c=l.x,u=l.y;o.style.transform="translate(".concat(c,", ").concat(u,")")})}catch(o){}},t.prototype.bindEvents=function(){var n=this;this.layoutEvents.forEach(function(r){n.addEventListener(r,function(i){i.target&&(i.target.isMutationObserved=!0,n.layout())})})},t.prototype.attributeChangedCallback=function(n,r,i){n==="margin"?this.margin=i:n==="padding"&&(this.padding=i),this.layout()},t}(bn),R1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function AK(e){const{min:[t,n],max:[r,i]}=e.getLocalBounds();let a=0,o=0;return t>0&&(a=t),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}function PK(e,t=[]){const[n=0,r=0,i=n,a=r]=t,o=e.parentNode,s=o.getEulerAngles();o.setEulerAngles(0);const{min:l,halfExtents:c}=e.getLocalBounds(),[u,f]=l,[d,h]=c;return o.setEulerAngles(s),{x:u-a,y:f-n,width:d*2+a+r,height:h*2+n+i}}function CK(e,t,n,r,i=!0,a=!0){const o=f=>ys()(f);if(!t[0]&&!t[1])return o([AK(e),t]);if(!n.length)return o([[0,0],t]);const[s,l]=n,c=[...l],u=[...s];if(l[0]!==s[0]){const f=i?-4:4;c[1]=l[1],a&&!i&&(c[0]=Math.max(s[0],l[0]-f),l[1]<s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.max(u[0],c[0]-f))),!a&&!i&&(c[0]=Math.max(s[0],l[0]-f),l[1]>s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.max(u[0],c[0]-f))),!a&&i&&(c[0]=Math.min(s[0],l[0]-f),l[1]>s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.min(u[0],c[0]-f))),a&&i&&(c[0]=Math.min(s[0],l[0]-f),l[1]<s[1]?u[1]=c[1]:(u[1]=s[1],u[0]=Math.min(u[0],c[0]-f)))}return o([l,c,u,s,t])}const IC=Xl(e=>{const t=e.attributes,{className:n,class:r,transform:i,rotate:a,labelTransform:o,labelTransformOrigin:s,x:l,y:c,x0:u=l,y0:f=c,text:d,background:h,connector:p,startMarker:v,endMarker:g,coordCenter:y,innerHTML:m}=t,b=R1(t,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(e.style.transform=`translate(${l}, ${c})`,[l,c,u,f].some(C=>!_n(C))){e.children.forEach(C=>C.remove());return}const x=le(b,"background"),{padding:w}=x,O=R1(x,["padding"]),_=le(b,"connector"),{points:S=[]}=_,k=R1(_,["points"]);let E;m?E=we(e).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(ve,Object.assign({transform:o,transformOrigin:s},b)).node():E=we(e).maybeAppend("text","text").style("zIndex",0).style("text",d).call(ve,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const M=we(e).maybeAppend("background","rect").style("zIndex",-1).call(ve,PK(E,w)).call(ve,h?O:{}).node(),P=+u<y[0],A=+f<y[1],L=[+u-+l,+f-+c],N=CK(M,L,S,y,P,A),T=v&&new Qe({id:"startMarker",style:Object.assign({x:0,y:0},le(b,"startMarker"))}),I=g&&new Qe({id:"endMarker",style:Object.assign({x:0,y:0},le(b,"endMarker"))});we(e).maybeAppend("connector","path").style("zIndex",0).style("d",N).style("markerStart",T).style("markerEnd",I).call(ve,p?k:{})}),jC=(e,t)=>{const{coordinate:n}=t;return(r,i,a)=>{const{color:o,text:s="",fontSize:l,rotate:c=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:l},[[d,h]]=r;return we(new IC).style("x",d).style("y",h).call(ve,a).style("transform",`${u}rotate(${+c})`).style("coordCenter",n.getCenter()).call(ve,f).call(ve,e).node()}};jC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var $1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function TK(e){const t=e/Math.sqrt(2),n=e*Math.sqrt(2),[r,i]=[-t,t-n],[a,o]=[0,0],[s,l]=[t,t-n];return[["M",r,i],["A",e,e,0,1,1,s,l],["L",a,o],["Z"]]}function LK(e){const{min:t,max:n}=e.getLocalBounds();return[(t[0]+n[0])*.5,(t[1]+n[1])*.5]}const NK=Xl(e=>{const t=e.attributes,n=$1(t,["class","x","y","transform"]),r=le(n,"marker"),{size:i=24}=r,a=()=>TK(i/2),o=we(e).maybeAppend("marker",()=>new Qe({})).call(c=>c.node().update(Object.assign({symbol:a},r))).node(),[s,l]=LK(o);we(e).maybeAppend("text","text").style("x",s).style("y",l).call(ve,n)}),DC=(e,t)=>{const n=$1(e,[]);return(r,i,a)=>{const{color:o}=a,s=$1(a,["color"]),{color:l=o,text:c=""}=i,u={text:String(c),stroke:l,fill:l},[[f,d]]=r;return we(new NK).call(ve,s).style("transform",`translate(${f},${d})`).call(ve,u).call(ve,n).node()}};DC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const FC=(e,t)=>{const{coordinate:n}=t;return(r,i,a)=>{const{color:o,text:s="",fontSize:l,rotate:c=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:l,textAlign:"center",textBaseline:"middle"},[[d,h]]=r;return we(new qr).style("x",d).style("y",h).call(ve,a).style("transformOrigin","center center").style("transform",`${u}rotate(${c}deg)`).style("coordCenter",n.getCenter()).call(ve,f).call(ve,e).node()}};FC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var IK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function jK(e,t){const n=[],r=[],i=[];let a=!1,o=null;const s=e.length/2;for(let l=0;l<s;l++){const c=e[l],u=e[l+s];if([...c,...u].some(f=>!t(f)))a=!0;else{if(n.push(c),r.push(u),a&&o){a=!1;const[f,d]=o;i.push([f,c,d,u])}o=[c,u]}}return[n.concat(r),i]}const RC=Xl(e=>{const{areaPath:t,connectPath:n,areaStyle:r,connectStyle:i}=e.attributes,a=e.ownerDocument;we(e).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(ve,i),we(e).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",t).call(ve,r)}),Ci=(e,t)=>{const{curve:n,gradient:r=!1,defined:i=c=>!Number.isNaN(c)&&c!==void 0&&c!==null,connect:a=!1}=e,o=IK(e,["curve","gradient","defined","connect"]),{coordinate:s,document:l}=t;return(c,u,f)=>{const{color:d}=f,{color:h=d,seriesColor:p,seriesX:v,seriesY:g}=u,y=kt(s),m=CA(s,u),b=r&&p?PA(p,v,g,r,void 0,y):h,x=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:b,fill:b}),m&&{transform:m}),o),[w,O]=jK(c,i),_=le(x,"connect"),S=!!O.length,k=E=>we(l.createElement("path",{})).style("d",E||"").call(ve,x).node();if(st(s)){const E=M=>{const P=s.getCenter(),A=M.slice(0,M.length/2),L=M.slice(M.length/2);return H7().angle((N,T)=>Pl(Yt(A[T],P))).outerRadius((N,T)=>jt(A[T],P)).innerRadius((N,T)=>jt(L[T],P)).defined((N,T)=>[...A[T],...L[T]].every(i)).curve(n)(L)};return!S||a&&!Object.keys(_).length?k(E(w)):S&&!a?k(E(c)):we(new RC).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},_),o)).style("areaPath",E(c)).style("connectPath",O.map(E).join("")).node()}else{const E=M=>{const P=M.slice(0,M.length/2),A=M.slice(M.length/2);return y?Qy().y((L,N)=>P[N][1]).x1((L,N)=>P[N][0]).x0((L,N)=>A[N][0]).defined((L,N)=>[...P[N],...A[N]].every(i)).curve(n)(P):Qy().x((L,N)=>P[N][0]).y1((L,N)=>P[N][1]).y0((L,N)=>A[N][1]).defined((L,N)=>[...P[N],...A[N]].every(i)).curve(n)(P)};return!S||a&&!Object.keys(_).length?k(E(w)):S&&!a?k(E(c)):we(new RC).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},_),o)).style("areaPath",E(c)).style("connectPath",O.map(E).join("")).node()}}};Ci.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $C=(e,t)=>{const{coordinate:n}=t;return(...r)=>{const i=st(n)?rm:Ru;return Ci(Object.assign({curve:i},e),t)(...r)}};$C.props=Object.assign(Object.assign({},Ci.props),{defaultMarker:"square"});var DK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const zC=(e,t)=>{const n=DK(e,[]),{coordinate:r}=t;return(...i)=>{const a=st(r)?Kk:kt(r)?iE:rE;return Ci(Object.assign({curve:a},n),t)(...i)}};zC.props=Object.assign(Object.assign({},Ci.props),{defaultMarker:"smooth"});const BC=(e,t)=>(...n)=>Ci(Object.assign({curve:aE},e),t)(...n);BC.props=Object.assign(Object.assign({},Ci.props),{defaultMarker:"hvh"});const YC=(e,t)=>(...n)=>Ci(Object.assign({curve:oE},e),t)(...n);YC.props=Object.assign(Object.assign({},Ci.props),{defaultMarker:"vh"});const WC=(e,t)=>(...n)=>Ci(Object.assign({curve:sE},e),t)(...n);WC.props=Object.assign(Object.assign({},Ci.props),{defaultMarker:"hv"});const GC=(e,t)=>{const{arrow:n=!1}=e;return(...r)=>g1(Object.assign(Object.assign({},e),{arrow:n}),t)(...r)};GC.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var HC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const VC=(e,t)=>{const n=HC(e,[]),{document:r}=t;return(i,a,o)=>{const{color:s}=o,l=HC(o,["color"]),{color:c=s,transform:u}=a,[f,d]=i,h=Gr();return h.moveTo(f[0],f[1]),h.bezierCurveTo(f[0]/2+d[0]/2,f[1],f[0]/2+d[0]/2,d[1],d[0],d[1]),we(r.createElement("path",{})).call(ve,l).style("d",h.toString()).style("stroke",c).style("transform",u).call(ve,n).node()}};VC.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var UC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function FK(e,t,n,r){const i=Gr();if(st(n)){const a=n.getCenter(),o=jt(e,a),l=(jt(t,a)-o)*r+o;return i.moveTo(e[0],e[1]),nf(i,e,t,a,l),i.lineTo(t[0],t[1]),i}return kt(n)?(i.moveTo(e[0],e[1]),i.lineTo(e[0]+(t[0]-e[0])*r,e[1]),i.lineTo(e[0]+(t[0]-e[0])*r,t[1]),i.lineTo(t[0],t[1]),i):(i.moveTo(e[0],e[1]),i.lineTo(e[0],e[1]+(t[1]-e[1])*r),i.lineTo(t[0],e[1]+(t[1]-e[1])*r),i.lineTo(t[0],t[1]),i)}const XC=(e,t)=>{const{cornerRatio:n=1/3}=e,r=UC(e,["cornerRatio"]),{coordinate:i,document:a}=t;return(o,s,l)=>{const{defaultColor:c}=l,u=UC(l,["defaultColor"]),{color:f=c,transform:d}=s,[h,p]=o,v=FK(h,p,i,n);return we(a.createElement("path",{})).call(ve,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(ve,r).node()}};XC.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var qC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const KC=(e,t)=>{const n=qC(e,[]),{coordinate:r,document:i}=t;return(a,o,s)=>{const{color:l}=s,c=qC(s,["color"]),{color:u=l,transform:f}=o,[d,h]=a,p=Gr();if(p.moveTo(d[0],d[1]),st(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=Lk(d,h),g=jt(d,h)/2;nf(p,d,h,v,g)}return we(i.createElement("path",{})).call(ve,c).style("d",p.toString()).style("stroke",u).style("transform",f).call(ve,n).node()}};KC.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function ZC(e={}){const{shapes:t}=e;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function ar(e={}){return[...ZC(e),{name:"title",scale:"identity"}]}function ko(){return[{type:yh,channel:"color"},{type:bh,channel:["x","y"]}]}function Ql(){return[{type:yh,channel:"x"},{type:bh,channel:["y"]}]}function RK(){return[{type:yh,channel:"color"},{type:bh,channel:["position"]}]}function Jl(e={}){return ZC(e)}function Kt(){return[{type:_S}]}function on(){return[]}function z1(e,t){return e.getBandWidth(e.invert(t))}function Rs(e,t,n={}){const{x:r,y:i,series:a}=t,{x:o,y:s,series:l}=e,{style:{bandOffset:c=l?0:.5,bandOffsetX:u=c,bandOffsetY:f=c}={}}=n,d=!!(o!=null&&o.getBandWidth),h=!!(s!=null&&s.getBandWidth),p=!!(l!=null&&l.getBandWidth);return!d&&!h?v=>v:(v,g)=>{const y=d?z1(o,r[g]):0,m=h?z1(s,i[g]):0,x=p&&a?(z1(l,a[g])/2+ +a[g])*y:0,[w,O]=v;return[w+u*y+x,O+f*m]}}function Kp(e){return parseFloat(e)/100}function B1(e,t,n,r){const{x:i,y:a}=n,{innerWidth:o,innerHeight:s}=r.getOptions(),l=Array.from(e,c=>{const u=i[c],f=a[c],d=typeof u=="string"?Kp(u)*o:+u,h=typeof f=="string"?Kp(f)*s:+f;return[[d,h]]});return[e,l]}function aa(e){return typeof e=="function"?e:t=>t[e]}function Y1(e,t){return Array.from(e,aa(t))}function W1(e,t){const{source:n=u=>u.source,target:r=u=>u.target,value:i=u=>u.value}=t,{links:a,nodes:o}=e,s=Y1(a,n),l=Y1(a,r),c=Y1(a,i);return{links:a.map((u,f)=>({target:l[f],source:s[f],value:c[f]})),nodes:o||Array.from(new Set([...s,...l]),u=>({key:u}))}}var $K=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const QC=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s}=o,l=$K(o,["color"]),{color:c=s,src:u="",size:f=32,transform:d=""}=a;let{width:h=f,height:p=f}=e;const[[v,g]]=i,[y,m]=n.getSize();h=typeof h=="string"?Kp(h)*y:h,p=typeof p=="string"?Kp(p)*m:p;const b=v-Number(h)/2,x=g-Number(p)/2;return we(r.createElement("image",{})).call(ve,l).style("x",b).style("y",x).style("src",u).style("stroke",c).style("transform",d).call(ve,e).style("width",h).style("height",p).node()}};QC.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var zK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function BK(e,t){const n=Gr();if(st(t)){const r=t.getCenter(),i=[...e,e[0]],a=i.map(o=>jt(o,r));return i.forEach((o,s)=>{if(s===0){n.moveTo(o[0],o[1]);return}const l=a[s],c=e[s-1],u=a[s-1];u!==void 0&&Math.abs(l-u)<1e-10?nf(n,c,o,r,l):n.lineTo(o[0],o[1])}),n.closePath(),n}return PU(n,e)}const JC=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s}=o,l=zK(o,["color"]),{color:c=s,transform:u}=a,f=BK(i,n);return we(r.createElement("path",{})).call(ve,l).style("d",f.toString()).style("stroke",c).style("fill",c).style("transform",u).call(ve,e).node()}};JC.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var eT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function YK(e,t){const[n,r,i,a]=e,o=Gr();if(st(t)){const s=t.getCenter(),l=jt(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),nf(o,i,a,s,l),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),nf(o,r,n,s,l),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(n[0],n[1]),o.closePath(),o}const tT=(e,t)=>{const n=eT(e,[]),{coordinate:r,document:i}=t;return(a,o,s)=>{const{color:l}=s,c=eT(s,["color"]),{color:u=l,transform:f}=o,d=YK(a,r);return we(i.createElement("path",{})).call(ve,c).style("d",d.toString()).style("fill",u||l).style("stroke",u||l).style("transform",f).call(ve,n).node()}};tT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var WK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function GK(e,t){const n=Gr();if(!st(t))n.moveTo(...e[0]),n.lineTo(...e[1]),n.moveTo(...e[2]),n.lineTo(...e[3]),n.moveTo(...e[4]),n.lineTo(...e[5]),n.lineTo(...e[6]),n.lineTo(...e[7]),n.closePath(),n.moveTo(...e[8]),n.lineTo(...e[9]),n.moveTo(...e[10]),n.lineTo(...e[11]),n.moveTo(...e[12]),n.lineTo(...e[13]);else{const r=t.getCenter(),[i,a]=r,o=Wr(Yt(e[0],r)),s=Wr(Yt(e[1],r)),l=jt(r,e[2]),c=jt(r,e[3]),u=jt(r,e[8]),f=jt(r,e[10]),d=jt(r,e[11]);n.moveTo(...e[0]),n.arc(i,a,l,o,s),n.arc(i,a,l,s,o,!0),n.moveTo(...e[2]),n.lineTo(...e[3]),n.moveTo(...e[4]),n.arc(i,a,c,o,s),n.lineTo(...e[6]),n.arc(i,a,f,s,o,!0),n.closePath(),n.moveTo(...e[8]),n.arc(i,a,u,o,s),n.arc(i,a,u,s,o,!0),n.moveTo(...e[10]),n.lineTo(...e[11]),n.moveTo(...e[12]),n.arc(i,a,d,o,s),n.arc(i,a,d,s,o,!0)}return n}const nT=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s,transform:l}=a,{color:c,fill:u=c,stroke:f=c}=o,d=WK(o,["color","fill","stroke"]),h=GK(i,n);return we(r.createElement("path",{})).call(ve,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",l).call(ve,e).node()}};nT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var HK=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function VK(e,t,n=4){const r=Gr();if(!st(t))return r.moveTo(...e[2]),r.lineTo(...e[3]),r.lineTo(e[3][0]-n,e[3][1]),r.lineTo(e[10][0]-n,e[10][1]),r.lineTo(e[10][0]+n,e[10][1]),r.lineTo(e[3][0]+n,e[3][1]),r.lineTo(...e[3]),r.closePath(),r.moveTo(...e[10]),r.lineTo(...e[11]),r.moveTo(e[3][0]+n/2,e[8][1]),r.arc(e[3][0],e[8][1],n/2,0,Math.PI*2),r.closePath(),r;const i=t.getCenter(),[a,o]=i,s=jt(i,e[3]),l=jt(i,e[8]),c=jt(i,e[10]),u=Wr(Yt(e[2],i)),f=Math.asin(n/l),d=u-f,h=u+f;r.moveTo(...e[2]),r.lineTo(...e[3]),r.moveTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.arc(a,o,s,d,h),r.lineTo(Math.cos(h)*c+a,Math.sin(h)*c+o),r.arc(a,o,c,h,d,!0),r.lineTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.closePath(),r.moveTo(...e[10]),r.lineTo(...e[11]);const p=(d+h)/2;return r.moveTo(Math.cos(p)*(l+n/2)+a,Math.sin(p)*(l+n/2)+o),r.arc(Math.cos(p)*l+a,Math.sin(p)*l+o,n/2,p,Math.PI*2+p),r.closePath(),r}const rT=(e,t)=>{const{coordinate:n,document:r}=t;return(i,a,o)=>{const{color:s,transform:l}=a,c=4,{color:u,fill:f=u,stroke:d=u}=o,h=HK(o,["color","fill","stroke"]),p=VK(i,n,c);return we(r.createElement("path",{})).call(ve,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",l).call(ve,e).node()}};rT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var iT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function UK(e,t,n){return e.createElement("path",{style:Object.assign({d:`M ${t},${t} L -${t},0 L ${t},-${t} L 0,0 Z`,transformOrigin:"center"},n)})}function XK(e,t){if(!st(t))return ys().x(r=>r[0]).y(r=>r[1])(e);const n=t.getCenter();return Dh()({startAngle:0,endAngle:Math.PI*2,outerRadius:jt(e[0],n),innerRadius:jt(e[1],n)})}function qK(e,t){if(!st(e))return t;const[n,r]=e.getCenter();return`translate(${n}, ${r}) ${t||""}`}const G1=(e,t)=>{const{arrow:n,arrowSize:r=4}=e,i=iT(e,["arrow","arrowSize"]),{coordinate:a,document:o}=t;return(s,l,c)=>{const{color:u,lineWidth:f}=c,d=iT(c,["color","lineWidth"]),{color:h=u,size:p=f}=l,v=n?UK(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},le(i,"arrow"))):null,g=XK(s,a),y=qK(a,l.transform);return we(o.createElement("path",{})).call(ve,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(ve,i).node()}};G1.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var aT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function KK(e,t,n){return[["M",e,t],["L",e+2*n,t-n],["L",e+2*n,t+n],["Z"]]}function ZK(e){return ys().x(t=>t[0]).y(t=>t[1])(e)}function QK(e,t,n,r,i=0){const[[a,o],[s,l]]=t;if(kt(e)){const d=a+n,h=s+r,p=d+i;return[[d,o],[p,o],[p,l],[h,l]]}const c=o-n,u=l-r,f=c-i;return[[a,c],[a,f],[s,f],[s,u]]}const oT=(e,t)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=e,s=aT(e,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:l}=t;return(c,u,f)=>{const{color:d,connectLength1:h}=f,p=aT(f,["color","connectLength1"]),{color:v,transform:g}=u,y=QK(l,c,r,i,a!=null?a:h),m=le(Object.assign(Object.assign({},s),f),"endMarker");return we(new Xn).call(ve,p).style("d",ZK(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new Qe({className:"marker",style:Object.assign(Object.assign({},m),{symbol:KK})}):null).call(ve,s).node()}};oT.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function sT(e){return e.replace(/-(\w)/g,function(t,n){return n.toUpperCase()})}function JK(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function eZ(e,t,n,r){const i=t.length/2,a=t.slice(0,i),o=t.slice(i);let s=Ol(a,(h,p)=>Math.abs(h[1]-o[p][1]));s=Math.max(Math.min(s,i-2),1);const l=h=>[a[h][0],(a[h][1]+o[h][1])/2],c=l(s),u=l(s-1),f=l(s+1),d=Wr(Yt(f,u))/Math.PI*180;return{x:c[0],y:c[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function lT(e,t,n,r){const{bounds:i}=n,[[a,o],[s,l]]=i,c=s-a,u=l-o,f=d=>{const{x:h,y:p}=d,v=hS(n.x,c),g=hS(n.y,u);return Object.assign(Object.assign({},d),{x:(v||h)+a,y:(g||p)+o})};return f(e==="left"?{x:0,y:u/2,textAlign:"start",textBaseline:"middle"}:e==="right"?{x:c,y:u/2,textAlign:"end",textBaseline:"middle"}:e==="top"?{x:c/2,y:0,textAlign:"center",textBaseline:"top"}:e==="bottom"?{x:c/2,y:u,textAlign:"center",textBaseline:"bottom"}:e==="top-left"?{x:0,y:0,textAlign:"start",textBaseline:"top"}:e==="top-right"?{x:c,y:0,textAlign:"end",textBaseline:"top"}:e==="bottom-left"?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:e==="bottom-right"?{x:c,y:u,textAlign:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function cT(e,t,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,l=r.getCenter(),c=Ls(r,t,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=c,p=e==="inside"?(d+h)/2:h,v=H1(p,o,s),g=(()=>{const[y,m]=t,b=u+(f-u)*.5,[x,w]=e==="inside"?gf(l,p,b):Lk(y,m);return{x,y:w}})();return Object.assign(Object.assign({},g),{textAlign:e==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function gf(e,t,n){return[e[0]+Math.sin(t)*n,e[1]-Math.cos(t)*n]}function H1(e,t,n){if(!t)return 0;const r=n?0:Math.sin(e)<0?90:-90;return e/Math.PI*180+r}function tZ(e,t,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:l=.5,offset:c=0}=n,u=Ls(r,t,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:H1(p,o,s)},{innerRadius:y,outerRadius:m}=u,x=y+(m-y)*l+c,[w,O]=gf(h,p,x);return Object.assign({x:w,y:O},g)}function uT(e){return e===void 0?null:e}function fT(e,t,n,r){const{bounds:i}=n,[a]=i;return{x:uT(a[0]),y:uT(a[1])}}function La(e,t,n,r){const{bounds:i}=n;return i.length===1?fT(e,t,n):($h(r)?cT:Ll(r)?tZ:lT)(e,t,n,r)}function nZ(e,t,n,r,i){const[a,o]=gf(e,t,n),[s,l]=gf(e,t,r),c=Math.sin(t)>0?1:-1;return[[a,o],[s,l],[s+c*i,l]]}function dT(e,t,n){const r=Ls(n,e,[t.y,t.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function hT(e,t,n){const r=Ls(n,e,[t.y,t.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function V1(e,t,n,r){const{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,f=r.getCenter(),d=hT(t,n,r),h=Math.sin(d)>0?1:-1,p=H1(d,i,a),v={textAlign:h>0||$h(r)?"start":"end",textBaseline:"middle",rotate:p},g=dT(t,n,r),y=g+(s?l:o),[[m,b],[x,w],[O,_]]=nZ(f,d,g,y,s?c:0),S=s?+u*h:0,k=O+S,E=_,M={connector:s,connectorPoints:[[x-k,w-E],[O-k,_-E]]};return Object.assign(Object.assign({x0:m,y0:b,x:O+S,y:_},v),M)}function rZ(e,t,n,r){const{bounds:i}=n;return i.length===1?fT(e,t,n):($h(r)?cT:Ll(r)?V1:lT)(e,t,n,r)}function pT(e,t={}){const{labelHeight:n=14,height:r}=t,i=_i(e,c=>c.y),a=i.length,o=new Array(a);for(let c=0;c<a;c++){const u=i[c],{y:f}=u;o[c]={y:f,y1:f+n,labels:[f]}}let s=!0;for(;s;){s=!1;for(let c=o.length-1;c>0;c--){const u=o[c],f=o[c-1];if(f.y1>u.y){s=!0,f.labels.push(...u.labels),o.splice(c,1),f.y1+=u.y1-u.y;const d=f.y1-f.y;f.y1=Math.max(Math.min(f.y1,r),d),f.y=f.y1-d}}}let l=0;for(const c of o){const{y:u,labels:f}=c;let d=u-n;for(const h of f){const p=i[l++],g=d+n-h;p.connectorPoints[0][1]-=g,p.y=d+n,d+=n}}}function vT(e,t){const n=_i(e,s=>s.y),{height:r,labelHeight:i=14}=t,a=Math.ceil(r/i);if(n.length<=a)return pT(n,t);const o=[];for(let s=0;s<n.length;s++)s<n.length-a?(n[s].opacity=0,n[s].connector=!1):o.push(n[s]);pT(o,t)}var iZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Zp=new WeakMap;function aZ(e,t,n){const{connectorLength:r,connectorLength2:i,connectorDistance:a}=t,o=iZ(V1("outside",e,t,n),[]),s=n.getCenter(),l=dT(e,t,n),c=hT(e,t,n),u=l+r+i,f=Math.sin(c)>0?1:-1,d=s[0]+(u+ +a)*f,{x:h}=o,p=d-h;return o.x+=p,o.connectorPoints[0][0]-=p,o}function oZ(e,t,n,r,i,a){if(!Ll(r))return{};if(Zp.has(t))return Zp.get(t);const o=a.map(d=>aZ(d,n,r)),{width:s,height:l}=r.getOptions(),c=o.filter(d=>d.x<s/2),u=o.filter(d=>d.x>=s/2),f=Object.assign(Object.assign({},i),{height:l});return vT(c,f),vT(u,f),o.forEach((d,h)=>Zp.set(a[h],d)),Zp.get(t)}var sZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function lZ(e,t,n,r){if(!Ll(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=sZ(V1("outside",t,n,r),[]),{x0:l,y0:c}=s,u=r.getCenter(),d=X7(r)+i,h=Pl([l-u[0],c-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=gf(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}const cZ=Object.freeze(Object.defineProperty({__proto__:null,area:eZ,bottom:La,bottomLeft:La,bottomRight:La,inside:La,left:La,outside:rZ,right:La,spider:oZ,surround:lZ,top:La,topLeft:La,topRight:La},Symbol.toStringTag,{value:"Module"}));var gT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function uZ(e,t){return e!==void 0?e:Ll(t)?"inside":kt(t)?"right":"top"}function fZ(e,t,n,r,i,a){const{position:o}=t,{render:s}=i,l=uZ(o,n),u=r[s?"htmlLabel":l==="inside"?"innerLabel":"label"],f=Object.assign({},u,t),d=cZ[sT(l)];if(!d)throw new Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},u),d(l,e,f,n,i,a))}const yT=(e,t)=>{const{coordinate:n,theme:r}=t,{render:i}=e;return(a,o,s,l)=>{const{text:c,x:u,y:f,transform:d="",transformOrigin:h,className:p=""}=o,v=gT(o,["text","x","y","transform","transformOrigin","className"]),g=fZ(a,o,n,r,e,l),{rotate:y=0,transform:m=""}=g,b=gT(g,["rotate","transform"]);return we(new IC).call(ve,b).style("text",`${c}`).style("className",`${p} g2-label`).style("innerHTML",i?i(c,o.datum,o.index):void 0).style("labelTransform",`${m} rotate(${+y}) ${d}`.trim()).style("labelTransformOrigin",h).style("coordCenter",n.getCenter()).call(ve,v).node()}};yT.props={defaultMarker:"point"};var mT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const U1=(e,t)=>{const{arrow:n,colorAttribute:r}=e,i=mT(e,["arrow","colorAttribute"]),{coordinate:a,document:o}=t;return(s,l,c)=>{const{color:u,stroke:f}=c,d=mT(c,["color","stroke"]),{d:h,color:p=u}=l,[v,g]=a.getSize();return we(o.createElement("path",{})).call(ve,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(ve,i).node()}};U1.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const bT=(e,t)=>U1(Object.assign({colorAttribute:"fill"},e),t);bT.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const xT=(e,t)=>U1(Object.assign({fill:"none",colorAttribute:"stroke"},e),t);xT.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var dZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const wT=(e,t)=>{const{document:n}=t;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,l=dZ(a,["color"]),{color:c=s}=i,[u,...f]=r,d=Gr();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),we(n.createElement("path",{})).call(ve,l).style("d",d.toString()).style("stroke",c||s).style("fill",c||s).style("fillOpacity",.4).style("transform",o).call(ve,e).node()}};wT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};function OT(e){var t,n,r,i=e||1;function a(s,l){++t>i&&(r=n,o(1),++t),n[s]=l}function o(s){t=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var l=n[s];if(l!==void 0)return l;if((l=r[s])!==void 0)return a(s,l),l},set:function(s,l){n[s]!==void 0?n[s]=l:a(s,l)}}}OT(3);function hZ(e,t=(...r)=>`${r[0]}`,n=16){const r=OT(n);return(...i)=>{const a=t(...i);let o=r.get(a);return r.has(a)?r.get(a):(o=e(...i),r.set(a,o),o)}}function pZ(e){return typeof e=="string"?e.split(" ").map(t=>{const[n,r]=t.split(":");return[+n,r]}):e}function Qp(e,t,n){const r=e?e():document.createElement("canvas");return r.width=t,r.height=n,r}const vZ=hZ((e,t,n)=>{const r=Qp(n,e*2,e*2),i=r.getContext("2d"),a=e,o=e;if(t===1)i.beginPath(),i.arc(a,o,e,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const s=i.createRadialGradient(a,o,e*t,a,o,e);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=s,i.fillRect(0,0,2*e,2*e)}return r},e=>`${e}`);function gZ(e,t){const r=Qp(t,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return pZ(e).forEach(([a,o])=>{i.addColorStop(a,o)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}function yZ(e,t,n,r,i,a){const{blur:o}=i;let s=r.length;for(;s--;){const{x:l,y:c,value:u,radius:f}=r[s],d=Math.min(u,n),h=l-f,p=c-f,v=vZ(f,1-o,a),g=(d-t)/(n-t);e.globalAlpha=Math.max(g,.001),e.drawImage(v,h,p)}return e}function mZ(e,t,n,r,i){const{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:l}=i,c=0,u=0,f=t,d=n,h=e.getImageData(c,u,f,d),p=h.data,v=p.length;for(let g=3;g<v;g+=4){const y=p[g],m=y*4;if(!m)continue;const b=o||Math.max(0,Math.min(s,Math.max(a,y)));p[g-3]=r[m],p[g-2]=r[m+1],p[g-1]=r[m+2],p[g]=l?r[m+3]:b}return h}function bZ(e,t,n,r,i,a,o){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const c=Qp(o,e,t).getContext("2d"),u=gZ(s.gradient,o);c.clearRect(0,0,e,t),yZ(c,n,r,i,s,o);const f=mZ(c,e,t,u,s),h=Qp(o,e,t).getContext("2d");return h.putImageData(f,0,0),h}var xZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function wZ(e,t){return Object.keys(e).reduce((n,r)=>{const i=e[r];return t(i,r)||(n[r]=i),n},{})}const _T=(e,t)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=e,l=xZ(e,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:c,createCanvas:u,document:f}=t;return(d,h,p)=>{const{transform:v}=h,[g,y]=c.getSize(),m=d.map(_=>({x:_[0],y:_[1],value:_[2],radius:_[3]})),b=kr(d,_=>_[2]),x=tt(d,_=>_[2]),O=g&&y?bZ(g,y,b,x,m,wZ({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},_=>_===void 0),u):{canvas:null};return we(f.createElement("image",{})).call(ve,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",O.canvas).style("transform",v).call(ve,l).node()}};_T.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var OZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ST=(e,t)=>{const{render:n}=e,r=OZ(e,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),t)}};ST.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const kT=5e3;function ET(e,t,n){return e+(t-e)*n}function _Z(e,t,n,r){return t===0?[[e+1/2*n/Math.PI/2,r/2],[e+1/2*n/Math.PI,r],[e+n/4,r]]:t===1?[[e+1/2*n/Math.PI/2*(Math.PI-2),r],[e+1/2*n/Math.PI/2*(Math.PI-1),r/2],[e+n/4,0]]:t===2?[[e+1/2*n/Math.PI/2,-r/2],[e+1/2*n/Math.PI,-r],[e+n/4,-r]]:[[e+1/2*n/Math.PI/2*(Math.PI-2),-r],[e+1/2*n/Math.PI/2*(Math.PI-1),-r/2],[e+n/4,0]]}function SZ(e,t,n,r,i,a,o){const s=Math.ceil(2*e/n*4)*4,l=[];let c=r;for(;c<-Math.PI*2;)c+=Math.PI*2;for(;c>0;)c-=Math.PI*2;c=c/Math.PI/2*n;const u=a-e+c-e*2;l.push(["M",u,t]);let f=0;for(let d=0;d<s;++d){const h=d%4,p=_Z(d*n/4,h,n,i);l.push(["C",p[0][0]+u,-p[0][1]+t,p[1][0]+u,-p[1][1]+t,p[2][0]+u,-p[2][1]+t]),d===s-1&&(f=p[2][0])}return l.push(["L",f+u,o+e]),l.push(["L",u,o+e]),l.push(["Z"]),l}function kZ(e,t,n,r,i,a,o,s,l,c,u){const{fill:f,fillOpacity:d,opacity:h}=i;for(let p=0;p<r;p++){const v=r<=1?1:p/(r-1),g=SZ(s,o+s*n,l,0,s/40,e,t),y=u.createElement("path",{style:{d:g,fill:f,opacity:ET(.2,.9,v)*Number(h||d)}});a.appendChild(y);try{const m=[{transform:"translate(0, 0)"},{transform:`translate(${l*2}, 0)`}];y.animate(m,{duration:ET(.5*kT,kT,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function EZ(e,t,n){return`
58
+ M ${e} ${t-n}
59
+ a ${n} ${n} 0 1 0 0 ${n*2}
60
+ a ${n} ${n} 0 1 0 0 ${-n*2}
61
+ Z
62
+ `}function MZ(e,t,n){const i=n*.618;return`
63
+ M ${e-i} ${t-n}
64
+ L ${e+i} ${t-n}
65
+ L ${e+i} ${t+n}
66
+ L ${e-i} ${t+n}
67
+ Z
68
+ `}function AZ(e,t,n){return`
69
+ M ${e} ${t-n}
70
+ L ${e+n} ${t}
71
+ L ${e} ${t+n}
72
+ L ${e-n} ${t}
73
+ Z
74
+ `}function PZ(e,t,n){return`
75
+ M ${e} ${t-n}
76
+ L ${e+n} ${t+n}
77
+ L ${e-n} ${t+n}
78
+ Z
79
+ `}function CZ(e,t,n){const r=n*4/3,i=Math.max(r,n*2),a=r/2,o=e,s=a+t-i/2,l=Math.asin(a/((i-a)*.85)),c=Math.sin(l)*a,u=Math.cos(l)*a,f=o-u,d=s+c,h=e,p=s+a/Math.sin(l);return`
80
+ M ${f} ${d}
81
+ A ${a} ${a} 0 1 1 ${f+u*2} ${d}
82
+ Q ${h} ${p} ${e} ${t+i/2}
83
+ Q ${h} ${p} ${f} ${d}
84
+ Z
85
+ `}const MT={pin:CZ,rect:MZ,circle:EZ,diamond:AZ,triangle:PZ};var AT=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const TZ=(e="circle")=>MT[e]||MT.circle,PT=(e,t)=>{if(!t)return;const{coordinate:n}=t,{liquidOptions:r,styleOptions:i}=e,{liquidShape:a,percent:o}=r,{background:s,outline:l={},wave:c={}}=i,u=AT(i,["background","outline","wave"]),{border:f=2,distance:d=0}=l,h=AT(l,["border","distance"]),{length:p=192,count:v=3}=c;return(g,y,m)=>{const{document:b}=t.canvas,{color:x,fillOpacity:w}=m,O=Object.assign(Object.assign({fill:x},m),u),_=b.createElement("g",{}),[S,k]=n.getCenter(),E=n.getSize(),M=Math.min(...E)/2,A=(fr(a)?a:TZ(a))(S,k,M,...E);if(Object.keys(s).length){const T=b.createElement("path",{style:Object.assign({d:A,fill:"#fff"},s)});_.appendChild(T)}if(o>0){const T=b.createElement("path",{style:{d:A}});_.appendChild(T),_.style.clipPath=T,kZ(S,k,1-o,v,O,_,T.getBBox().y,M*2,p,!0,b)}const L=b.createElement("path",{style:{d:A,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),N=b.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:A,stroke:x,strokeOpacity:w,lineWidth:f},O),h),{fill:"transparent"})});return _.appendChild(L),_.appendChild(N),_}};PT.props={};const CT=(e,t)=>Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))/2,LZ=(e,t)=>{if(!t)return;const{coordinate:n}=t;if(!(n!=null&&n.getCenter))return;const r=n.getCenter();return(i,a,o)=>{const{document:s}=t.canvas,{color:l,index:c}=a,u=s.createElement("g",{}),f=CT(i[0],i[1]),d=CT(i[0],r)*2,h=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...i[0]],["A",f,f,0,1,0,...i[1]],["A",d+f*2,d+f*2,0,0,0,...i[2]],["A",f,f,0,1,c===0?0:1,...i[3]],["A",d,d,0,0,1,...i[0]],["Z"]]},o),iy(e,["shape","last","first"])),{fill:l||o.color})});return u.appendChild(h),u}};function TT(e,t){return e.getBandWidth(e.invert(t))}const LT={rect:Ns,hollow:Rp,funnel:s1,pyramid:NA},NT=()=>(e,t,n,r)=>{const{x:i,y:a,y1:o,series:s,size:l}=n,c=t.x,u=t.series,[f]=r.getSize(),d=l?l.map(v=>+v/f):null,h=l?(v,g,y)=>{const m=v+g/2,b=d[y];return[m-b/2,m+b/2]}:(v,g,y)=>[v,v+g],p=Array.from(e,v=>{const g=TT(c,i[v]),y=u?TT(u,s==null?void 0:s[v]):1,m=g*y,b=(+(s==null?void 0:s[v])||0)*g,x=+i[v]+b,[w,O]=h(x,m,v),_=+a[v],S=+o[v];return[[w,_],[O,_],[O,S],[w,S]].map(A=>r.map(A))});return[e,p]};NT.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:LT,channels:[...ar({shapes:Object.keys(LT)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Kt(),{type:bu},{type:ds}],postInference:[...on(),...Ql()],interaction:{shareTooltip:!0}};const IT={rect:Ns,hollow:Rp},jT=()=>(e,t,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n,l=Array.from(e,c=>{const u=[+i[c],+o[c]],f=[+a[c],+o[c]],d=[+a[c],+s[c]],h=[+i[c],+s[c]];return[u,f,d,h].map(p=>r.map(p))});return[e,l]};jT.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:IT,channels:[...ar({shapes:Object.keys(IT)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt(),{type:bu}],postInference:[...on(),...Ql()],interaction:{shareTooltip:!0}};const DT={line:jA,smooth:DA,hv:FA,vh:RA,hvh:$A,trail:zA},NZ=(e,t,n,r)=>{var i,a;const{series:o,x:s,y:l}=n,{x:c,y:u}=t;if(s===void 0||l===void 0)throw new Error("Missing encode for x or y channel.");const f=o?Array.from(_t(e,g=>o[g]).values()):[e],d=f.map(g=>g[0]).filter(g=>g!==void 0),h=(((i=c==null?void 0:c.getBandWidth)===null||i===void 0?void 0:i.call(c))||0)/2,p=(((a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))||0)/2,v=Array.from(f,g=>g.map(y=>r.map([+s[y]+h,+l[y]+p])));return[d,v,f]},IZ=(e,t,n,r)=>{const i=Object.entries(n).filter(([o])=>o.startsWith("position")).map(([,o])=>o);if(i.length===0)throw new Error("Missing encode for position channel.");const a=Array.from(e,o=>{const s=i.map(u=>+u[o]),l=r.map(s),c=[];for(let u=0;u<l.length;u+=2)c.push([l[u],l[u+1]]);return c});return[e,a]},FT=()=>(e,t,n,r)=>(zh(r)?IZ:NZ)(e,t,n,r);FT.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:DT,channels:[...ar({shapes:Object.keys(DT)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Kt(),{type:LS},{type:Py}],postInference:[...on(),...Ql(),...RK()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const RT={hollow:uP,hollowDiamond:lP,hollowHexagon:cP,hollowSquare:fP,hollowTriangleDown:hP,hollowTriangle:dP,hollowBowtie:sP,hollowCircle:vP,point:_P,plus:OP,diamond:mP,square:SP,triangle:EP,hexagon:bP,cross:yP,bowtie:gP,hyphen:xP,line:wP,tick:kP,triangleDown:MP,circle:v1},$T=e=>(t,n,r,i)=>{const{x:a,y:o,x1:s,y1:l,size:c,dx:u,dy:f}=r,[d,h]=i.getSize(),p=Rs(n,r,e),v=y=>{const m=+((u==null?void 0:u[y])||0),b=+((f==null?void 0:f[y])||0),x=s?(+a[y]+ +s[y])/2:+a[y],w=l?(+o[y]+ +l[y])/2:+o[y],O=x+m,_=w+b;return[O,_]},g=c?Array.from(t,y=>{const[m,b]=v(y),x=+c[y],w=x/d,O=x/h,_=[m-w,b-O],S=[m+w,b+O];return[i.map(p(_,y)),i.map(p(S,y))]}):Array.from(t,y=>[i.map(p(v(y),y))]);return[t,g]};$T.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:RT,channels:[...ar({shapes:Object.keys(RT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...Kt(),{type:ds},{type:mh}],postInference:[...on(),{type:OS},...ko()]};const zT={text:jC,badge:DC,tag:FC},BT=e=>{const{cartesian:t=!1}=e;return t?B1:(n,r,i,a)=>{const{x:o,y:s}=i,l=Rs(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};BT.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:zT,channels:[...ar({shapes:Object.keys(zT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...Kt(),{type:wh},{type:xh}],postInference:[...on(),...ko()]};const YT={cell:Ns,hollow:Rp},WT=()=>(e,t,n,r)=>{const{x:i,y:a}=n,o=t.x,s=t.y,l=Array.from(e,c=>{const u=o.getBandWidth(o.invert(+i[c])),f=s.getBandWidth(s.invert(+a[c])),d=+i[c],h=+a[c],p=[d,h],v=[d+u,h],g=[d+u,h+f],y=[d,h+f];return[p,v,g,y].map(m=>r.map(m))});return[e,l]};WT.props={defaultShape:"cell",defaultLabelShape:"label",shape:YT,composite:!1,channels:[...ar({shapes:Object.keys(YT)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Kt(),{type:ds},{type:mh},{type:Cy}],postInference:[...on(),...ko()]};const GT={area:$C,smooth:zC,hvh:BC,vh:YC,hv:WC},HT=()=>(e,t,n,r)=>{var i,a;const{x:o,y:s,y1:l,series:c}=n,{x:u,y:f}=t,d=c?Array.from(_t(e,y=>c[y]).values()):[e],h=d.map(y=>y[0]).filter(y=>y!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,v=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,g=Array.from(d,y=>{const m=y.length,b=new Array(m*2);for(let x=0;x<y.length;x++){const w=y[x];b[x]=r.map([+o[w]+p,+s[w]+v]),b[m+x]=r.map([+o[w]+p,+l[w]+v])}return b});return[h,g,d]};HT.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:GT,channels:[...ar({shapes:Object.keys(GT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Kt(),{type:Py},{type:bu},{type:Cy}],postInference:[...on(),...Ql()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const VT={link:GC,arc:KC,smooth:VC,vhv:XC},X1=e=>(t,n,r,i)=>{const{x:a,y:o,x1:s=a,y1:l=o}=r,c=Rs(n,r,e),u=t.map(f=>[i.map(c([+a[f],+o[f]],f)),i.map(c([+s[f],+l[f]],f))]);return[t,u]};X1.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:VT,channels:[...ar({shapes:Object.keys(VT)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt(),{type:ES},{type:MS}],postInference:[...on(),...ko()]};const UT={image:QC},XT=e=>{const{cartesian:t}=e;return t?B1:(n,r,i,a)=>{const{x:o,y:s}=i,l=Rs(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};XT.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:UT,channels:[...ar({shapes:Object.keys(UT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Kt(),{type:wh},{type:xh}],postInference:[...on(),...ko()]};const qT={polygon:JC,ribbon:tT},KT=()=>(e,t,n,r)=>{const i=Object.entries(n).filter(([s])=>s.startsWith("x")).map(([,s])=>s),a=Object.entries(n).filter(([s])=>s.startsWith("y")).map(([,s])=>s),o=e.map(s=>{const l=[];for(let c=0;c<i.length;c++){const u=i[c][s];if(u===void 0)break;const f=a[c][s];l.push(r.map([+u,+f]))}return l});return[e,o]};KT.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:qT,channels:[...ar({shapes:Object.keys(qT)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt()],postInference:[...on(),...ko()]};const ZT={box:nT,violin:rT},QT=()=>(e,t,n,r)=>{const{x:i,y:a,y1:o,y2:s,y3:l,y4:c,series:u}=n,f=t.x,d=t.series,h=Array.from(e,p=>{const v=f.getBandWidth(f.invert(+i[p])),g=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,y=v*g,m=(+(u==null?void 0:u[p])||0)*v,b=+i[p]+m+y/2,[x,w,O,_,S]=[+a[p],+o[p],+s[p],+l[p],+c[p]];return[[b-y/2,S],[b+y/2,S],[b,S],[b,_],[b-y/2,_],[b+y/2,_],[b+y/2,w],[b-y/2,w],[b-y/2,O],[b+y/2,O],[b,w],[b,x],[b-y/2,x],[b+y/2,x]].map(E=>r.map(E))});return[e,h]};QT.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:ZT,channels:[...ar({shapes:Object.keys(ZT)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Kt(),{type:ds}],postInference:[...on(),...Ql()],interaction:{shareTooltip:!0}};const JT={vector:g1},e3=()=>(e,t,n,r)=>{const{x:i,y:a,size:o,rotate:s}=n,[l,c]=r.getSize(),u=e.map(f=>{const d=+s[f]/180*Math.PI,h=+o[f],p=h/l,v=h/c,g=p*Math.cos(d),y=-v*Math.sin(d);return[r.map([+i[f]-g/2,+a[f]-y/2]),r.map([+i[f]+g/2,+a[f]+y/2])]});return[e,u]};e3.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:JT,channels:[...ar({shapes:Object.keys(JT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Kt()],postInference:[...on(),...ko()]};const t3={line:G1},n3=e=>(t,n,r,i)=>{const{y:a}=r,o=Rs(n,r,Z({style:{bandOffset:0}},e)),s=Array.from(t,l=>{const c=[0,a[l]],u=[1,a[l]];return[c,u].map(f=>i.map(o(f,l)))});return[t,s]};n3.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:t3,channels:[...Jl({shapes:Object.keys(t3)}),{name:"y",required:!0}],preInference:[...Kt(),{type:SS}],postInference:[...on()]};const r3={line:G1},i3=e=>(t,n,r,i)=>{const{x:a}=r,o=Rs(n,r,Z({style:{bandOffset:0}},e)),s=Array.from(t,l=>{const c=[a[l],1],u=[a[l],0];return[c,u].map(f=>i.map(o(f,l)))});return[t,s]};i3.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:r3,channels:[...Jl({shapes:Object.keys(r3)}),{name:"x",required:!0}],preInference:[...Kt(),{type:kS}],postInference:[...on()]};const a3={connector:oT},o3=(...e)=>X1(...e);o3.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:a3,channels:[...Jl({shapes:Object.keys(a3)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt()],postInference:[...on()]};function s3(e,t,n,r){if(t)return()=>[0,1];const{[e]:i,[`${e}1`]:a}=n;return o=>{var s;const l=((s=r.getBandWidth)===null||s===void 0?void 0:s.call(r,r.invert(+a[o])))||0;return[i[o],a[o]+l]}}function q1(e={}){const{extendX:t=!1,extendY:n=!1}=e;return(r,i,a,o)=>{const s=s3("x",t,a,i.x),l=s3("y",n,a,i.y),c=Array.from(r,u=>{const[f,d]=s(u),[h,p]=l(u);return[[f,h],[d,h],[d,p],[f,p]].map(b=>o.map(b))});return[r,c]}}const l3={range:Ns},c3=()=>q1();c3.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:l3,channels:[...Jl({shapes:Object.keys(l3)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt()],postInference:[...on()]};const u3={range:Ns},f3=()=>q1({extendY:!0});f3.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:u3,channels:[...Jl({shapes:Object.keys(u3)}),{name:"x",required:!0}],preInference:[...Kt(),{type:AS}],postInference:[...on()]};const d3={range:Ns},h3=()=>q1({extendX:!0});h3.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:d3,channels:[...Jl({shapes:Object.keys(d3)}),{name:"y",required:!0}],preInference:[...Kt(),{type:PS}],postInference:[...on()]};function jZ(e){return e.target.depth}function DZ(e){return e.depth}function FZ(e,t){return t-1-e.height}function Jp(e,t){return e.sourceLinks.length?e.depth:t-1}function RZ(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?kr(e.sourceLinks,jZ)-1:0}function ev(e){return function(){return e}}function p3(e,t){return tv(e.source,t.source)||e.index-t.index}function v3(e,t){return tv(e.target,t.target)||e.index-t.index}function tv(e,t){return e.y0-t.y0}function K1(e){return e.value}function $Z(e){return e.index}function zZ(e){return e.nodes}function BZ(e){return e.links}function g3(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function y3({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function YZ(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=$Z,l=Jp,c,u,f,d=zZ,h=BZ,p=6;function v(T){const I={nodes:d(T),links:h(T)};return g(I),y(I),m(I),b(I),O(I),y3(I),I}v.update=function(T){return y3(T),T},v.nodeId=function(T){return arguments.length?(s=typeof T=="function"?T:ev(T),v):s},v.nodeAlign=function(T){return arguments.length?(l=typeof T=="function"?T:ev(T),v):l},v.nodeDepth=function(T){return arguments.length?(c=T,v):c},v.nodeSort=function(T){return arguments.length?(u=T,v):u},v.nodeWidth=function(T){return arguments.length?(i=+T,v):i},v.nodePadding=function(T){return arguments.length?(a=o=+T,v):a},v.nodes=function(T){return arguments.length?(d=typeof T=="function"?T:ev(T),v):d},v.links=function(T){return arguments.length?(h=typeof T=="function"?T:ev(T),v):h},v.linkSort=function(T){return arguments.length?(f=T,v):f},v.size=function(T){return arguments.length?(e=t=0,n=+T[0],r=+T[1],v):[n-e,r-t]},v.extent=function(T){return arguments.length?(e=+T[0][0],n=+T[1][0],t=+T[0][1],r=+T[1][1],v):[[e,t],[n,r]]},v.iterations=function(T){return arguments.length?(p=+T,v):p};function g({nodes:T,links:I}){T.forEach((j,D)=>{j.index=D,j.sourceLinks=[],j.targetLinks=[]});const C=new Map(T.map(j=>[s(j),j]));if(I.forEach((j,D)=>{j.index=D;let{source:F,target:R}=j;typeof F!="object"&&(F=j.source=g3(C,F)),typeof R!="object"&&(R=j.target=g3(C,R)),F.sourceLinks.push(j),R.targetLinks.push(j)}),f!=null)for(const{sourceLinks:j,targetLinks:D}of T)j.sort(f),D.sort(f)}function y({nodes:T}){for(const I of T)I.value=I.fixedValue===void 0?Math.max(Yr(I.sourceLinks,K1),Yr(I.targetLinks,K1)):I.fixedValue}function m({nodes:T}){const I=T.length;let C=new Set(T),j=new Set,D=0;for(;C.size;){if(C.forEach(F=>{F.depth=D;for(const{target:R}of F.sourceLinks)j.add(R)}),++D>I)throw new Error("circular link");C=j,j=new Set}if(c){const F=Math.max(tt(T,z=>z.depth)+1,0);let R;for(let z=0;z<T.length;z++)R=T[z],R.depth=c.call(null,R,F)}}function b({nodes:T}){const I=T.length;let C=new Set(T),j=new Set,D=0;for(;C.size;){if(C.forEach(F=>{F.height=D;for(const{source:R}of F.targetLinks)j.add(R)}),++D>I)throw new Error("circular link");C=j,j=new Set}}function x({nodes:T}){const I=Math.max(tt(T,D=>D.depth)+1,0),C=(n-e-i)/(I-1),j=new Array(I).fill(0).map(()=>[]);for(const D of T){const F=Math.max(0,Math.min(I-1,Math.floor(l.call(null,D,I))));D.layer=F,D.x0=e+F*C,D.x1=D.x0+i,j[F]?j[F].push(D):j[F]=[D]}if(u)for(const D of j)D.sort(u);return j}function w(T){const I=kr(T,C=>(r-t-(C.length-1)*o)/Yr(C,K1));for(const C of T){let j=t;for(const D of C){D.y0=j,D.y1=j+D.value*I,j=D.y1+o;for(const F of D.sourceLinks)F.width=F.value*I}j=(r-j+o)/(C.length+1);for(let D=0;D<C.length;++D){const F=C[D];F.y0+=j*(D+1),F.y1+=j*(D+1)}A(C)}}function O(T){const I=x(T);o=Math.min(a,(r-t)/(tt(I,C=>C.length)-1)),w(I);for(let C=0;C<p;++C){const j=Math.pow(.99,C),D=Math.max(1-j,(C+1)/p);S(I,j,D),_(I,j,D)}}function _(T,I,C){for(let j=1,D=T.length;j<D;++j){const F=T[j];for(const R of F){let z=0,H=0;for(const{source:X,value:V}of R.targetLinks){const q=V*(R.layer-X.layer);z+=L(X,R)*q,H+=q}if(!(H>0))continue;const W=(z/H-R.y0)*I;R.y0+=W,R.y1+=W,P(R)}u===void 0&&F.sort(tv),F.length&&k(F,C)}}function S(T,I,C){for(let j=T.length,D=j-2;D>=0;--D){const F=T[D];for(const R of F){let z=0,H=0;for(const{target:X,value:V}of R.sourceLinks){const q=V*(X.layer-R.layer);z+=N(R,X)*q,H+=q}if(!(H>0))continue;const W=(z/H-R.y0)*I;R.y0+=W,R.y1+=W,P(R)}u===void 0&&F.sort(tv),F.length&&k(F,C)}}function k(T,I){const C=T.length>>1,j=T[C];M(T,j.y0-o,C-1,I),E(T,j.y1+o,C+1,I),M(T,r,T.length-1,I),E(T,t,0,I)}function E(T,I,C,j){for(;C<T.length;++C){const D=T[C],F=(I-D.y0)*j;F>1e-6&&(D.y0+=F,D.y1+=F),I=D.y1+o}}function M(T,I,C,j){for(;C>=0;--C){const D=T[C],F=(D.y1-I)*j;F>1e-6&&(D.y0-=F,D.y1-=F),I=D.y0-o}}function P({sourceLinks:T,targetLinks:I}){if(f===void 0){for(const{source:{sourceLinks:C}}of I)C.sort(v3);for(const{target:{targetLinks:C}}of T)C.sort(p3)}}function A(T){if(f===void 0)for(const{sourceLinks:I,targetLinks:C}of T)I.sort(v3),C.sort(p3)}function L(T,I){let C=T.y0-(T.sourceLinks.length-1)*o/2;for(const{target:j,width:D}of T.sourceLinks){if(j===I)break;C+=D+o}for(const{source:j,width:D}of I.targetLinks){if(j===T)break;C-=D}return C}function N(T,I){let C=I.y0-(I.targetLinks.length-1)*o/2;for(const{source:j,width:D}of I.targetLinks){if(j===T)break;C+=D+o}for(const{target:j,width:D}of T.sourceLinks){if(j===I)break;C-=D}return C}return v}const WZ={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:e=>e.nodes,links:e=>e.links,nodeSort:void 0,linkSort:void 0,iterations:6},GZ={left:DZ,right:FZ,center:RZ,justify:Jp};function HZ(e){const t=typeof e;return t==="string"?GZ[e]||Jp:t==="function"?e:Jp}const m3=e=>t=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:l,links:c,linkSort:u,iterations:f}=Object.assign({},WZ,e),d=YZ().nodeSort(r).linkSort(u).links(c).nodes(l).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(HZ(i)).iterations(f).extent([[0,0],[1,1]]);typeof n=="function"&&d.nodeId(n);const h=d(t),{nodes:p,links:v}=h,g=p.map(m=>{const{x0:b,x1:x,y0:w,y1:O}=m;return Object.assign(Object.assign({},m),{x:[b,x,x,b],y:[w,w,O,O]})}),y=v.map(m=>{const{source:b,target:x}=m,w=b.x1,O=x.x0,_=m.width/2;return Object.assign(Object.assign({},m),{x:[w,w,O,O],y:[m.y0+_,m.y0-_,m.y1+_,m.y1-_]})});return{nodes:g,links:y}};m3.props={};function oa(e,t,n={},r=!1){if(ka(e)||Array.isArray(e)&&r)return e;const i=le(e,t);return Z(n,i)}function nv(e,t={}){return ka(e)||Array.isArray(e)||!b3(e)?e:Z(t,e)}function b3(e){if(Object.keys(e).length===0)return!0;const{title:t,items:n}=e;return t!==void 0||n!==void 0}function sa(e,t){return typeof e=="object"?le(e,t):e}var VZ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const UZ={nodeId:e=>e.key,nodeWidth:.02,nodePadding:.02},XZ={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},qZ={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},KZ={textAlign:e=>e.x[0]<.5?"start":"end",position:e=>e.x[0]<.5?"right":"left",fontSize:10},x3=e=>{const{data:t,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={},interaction:u}=e,{links:f,nodes:d}=W1(t,n),h=le(n,"node"),p=le(n,"link"),{key:v=E=>E.key,color:g=v}=h,{links:y,nodes:m}=m3(Object.assign(Object.assign(Object.assign({},UZ),{nodeId:aa(v)}),a))({links:f,nodes:d}),b=le(i,"label"),{text:x=v,spacing:w=5}=b,O=VZ(b,["text","spacing"]),_=aa(v),S=oa(c,"node",{title:_,items:[{field:"value"}]},!0),k=oa(c,"link",{title:"",items:[E=>({name:"source",value:_(E.source)}),E=>({name:"target",value:_(E.target)})]});return[Z({},XZ,{data:m,encode:Object.assign(Object.assign({},h),{color:g}),scale:r,style:le(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},KZ),{text:x,dx:E=>E.x[0]<.5?w:-w}),O),...o],tooltip:S,animate:sa(l,"node"),axis:!1,interaction:u}),Z({},qZ,{data:y,encode:p,labels:s,style:Object.assign({fill:p.color?void 0:"#aaa",lineWidth:0},le(i,"link")),tooltip:k,animate:sa(l,"link"),interaction:u})]};x3.props={};function ZZ(e,t){return t.value-e.value}function QZ(e,t){return t.frequency-e.frequency}function JZ(e,t){return`${e.id}`.localeCompare(`${t.id}`)}function eQ(e,t){return`${e.name}`.localeCompare(`${t.name}`)}const tQ=Object.freeze(Object.defineProperty({__proto__:null,frequency:QZ,id:JZ,name:eQ,weight:ZZ},Symbol.toStringTag,{value:"Module"})),nQ={y:0,thickness:.05,weight:!1,marginRatio:.1,id:e=>e.id,source:e=>e.source,target:e=>e.target,sourceWeight:e=>e.value||1,targetWeight:e=>e.value||1,sortBy:null};function rQ(e){const{y:t,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:l,targetWeight:c,sortBy:u}=Object.assign(Object.assign({},nQ),e);function f(g){const y=g.nodes.map(b=>Object.assign({},b)),m=g.edges.map(b=>Object.assign({},b));return d(y,m),h(y),p(y,m),v(y,m),{nodes:y,edges:m}}function d(g,y){y.forEach(x=>{x.source=o(x),x.target=s(x),x.sourceWeight=l(x),x.targetWeight=c(x)});const m=_t(y,x=>x.source),b=_t(y,x=>x.target);return g.forEach(x=>{x.id=a(x);const w=m.has(x.id)?m.get(x.id):[],O=b.has(x.id)?b.get(x.id):[];x.frequency=w.length+O.length,x.value=Yr(w,_=>_.sourceWeight)+Yr(O,_=>_.targetWeight)}),{nodes:g,edges:y}}function h(g,y){const m=typeof u=="function"?u:tQ[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw Sl("Invalid nodes: it's empty!");if(!r){const w=1/m;return g.forEach((O,_)=>{O.x=(_+.5)*w,O.y=t}),{nodes:g,edges:y}}const b=i/(2*m),x=g.reduce((w,O)=>w+=O.value,0);return g.reduce((w,O)=>{O.weight=O.value/x,O.width=O.weight*(1-i),O.height=n;const _=b+w,S=_+O.width,k=t-n/2,E=k+n;return O.x=[_,S,S,_],O.y=[k,k,E,E],w+O.width+2*b},0),{nodes:g,edges:y}}function v(g,y){const m=new Map(g.map(w=>[w.id,w]));if(!r)return y.forEach(w=>{const O=o(w),_=s(w),S=m.get(O),k=m.get(_);S&&k&&(w.x=[S.x,k.x],w.y=[S.y,k.y])}),{nodes:g,edges:y};y.forEach(w=>{w.x=[0,0,0,0],w.y=[t,t,t,t]});const b=_t(y,w=>w.source),x=_t(y,w=>w.target);g.forEach(w=>{const{edges:O,width:_,x:S,y:k,value:E,id:M}=w,P=b.get(M)||[],A=x.get(M)||[];let L=0;P.map(N=>{const T=N.sourceWeight/E*_;N.x[0]=S[0]+L,N.x[1]=S[0]+L+T,L+=T}),A.forEach(N=>{const T=N.targetWeight/E*_;N.x[3]=S[0]+L,N.x[2]=S[0]+L+T,L+=T})})}return f}const Z1=e=>t=>rQ(e)(t);Z1.props={};var w3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Q1={y:0,thickness:.05,marginRatio:.1,id:e=>e.key,source:e=>e.source,target:e=>e.target,sourceWeight:e=>e.value||1,targetWeight:e=>e.value||1,sortBy:null},iQ={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},aQ={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},oQ={position:"outside",fontSize:10},O3=(e,t)=>{const{data:n,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:s=[],linkLabels:l=[],animate:c={},tooltip:u={}}=e,{nodes:f,links:d}=W1(n,r),h=le(r,"node"),p=le(r,"link"),{key:v=N=>N.key,color:g=v}=h,{linkEncodeColor:y=N=>N.source}=p,{nodeWidthRatio:m=Q1.thickness,nodePaddingRatio:b=Q1.marginRatio}=o,x=w3(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:O}=Z1(Object.assign(Object.assign(Object.assign(Object.assign({},Q1),{id:aa(v),thickness:m,marginRatio:b}),x),{weight:!0}))({nodes:f,edges:d}),_=le(a,"label"),{text:S=v}=_,k=w3(_,["text"]),E=oa(u,"node",{title:"",items:[N=>({name:N.key,value:N.value})]},!0),M=oa(u,"link",{title:"",items:[N=>({name:`${N.source} -> ${N.target}`,value:N.value})]}),{height:P,width:A}=t,L=Math.min(P,A);return[Z({},aQ,{data:O,encode:Object.assign(Object.assign({},p),{color:y}),labels:l,style:Object.assign({fill:y?void 0:"#aaa"},le(a,"link")),tooltip:M,animate:sa(c,"link")}),Z({},iQ,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:le(a,"node"),coordinate:{type:"polar",outerRadius:(L-20)/L,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},oQ),{text:S}),k),...s],tooltip:E,animate:sa(c,"node"),axis:!1})]};O3.props={};const _3={path:bT,hollow:xT},S3=e=>(t,n,r,i)=>[t,t.map(()=>[[0,0]])];S3.props={defaultShape:"path",defaultLabelShape:"label",shape:_3,composite:!1,channels:[...ar({shapes:Object.keys(_3)}),{name:"d",scale:"identity"}],preInference:[...Kt()],postInference:[...on()]};function sQ(e,t){return e.parent===t.parent?1:2}function lQ(e){return e.reduce(cQ,0)/e.length}function cQ(e,t){return e+t.x}function uQ(e){return 1+e.reduce(fQ,0)}function fQ(e,t){return Math.max(e,t.y)}function dQ(e){for(var t;t=e.children;)e=t[0];return e}function hQ(e){for(var t;t=e.children;)e=t[t.length-1];return e}function pQ(){var e=sQ,t=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=lQ(h),d.y=uQ(h)):(d.x=o?s+=e(d,o):0,d.y=0,o=d)});var l=dQ(a),c=hQ(a),u=l.x-e(l,c)/2,f=c.x+e(c,l)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*t,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-u)/(f-u)*t,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(e=a,i):e},i.size=function(a){return arguments.length?(r=!1,t=+a[0],n=+a[1],i):r?null:[t,n]},i.nodeSize=function(a){return arguments.length?(r=!0,t=+a[0],n=+a[1],i):r?[t,n]:null},i}function vQ(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function gQ(){return this.eachAfter(vQ)}function yQ(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function mQ(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function bQ(e,t){for(var n=this,r=[n],i=[],a,o,s,l=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function xQ(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function wQ(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function OQ(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function _Q(e){for(var t=this,n=SQ(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function SQ(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function kQ(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function EQ(){return Array.from(this)}function MQ(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function AQ(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*PQ(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function ec(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=LQ)):t===void 0&&(t=TQ);for(var n=new tc(e),r,i=[n],a,o,s,l;r=i.pop();)if((o=t(r.data))&&(l=(o=Array.from(o)).length))for(r.children=o,s=l-1;s>=0;--s)i.push(a=o[s]=new tc(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(k3)}function CQ(){return ec(this).eachBefore(NQ)}function TQ(e){return e.children}function LQ(e){return Array.isArray(e)?e[1]:null}function NQ(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function k3(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function tc(e){this.data=e,this.depth=this.height=0,this.parent=null}tc.prototype=ec.prototype={constructor:tc,count:gQ,each:yQ,eachAfter:bQ,eachBefore:mQ,find:xQ,sum:wQ,sort:OQ,path:_Q,ancestors:kQ,descendants:EQ,leaves:MQ,links:AQ,copy:CQ,[Symbol.iterator]:PQ};function rv(e){return e==null?null:E3(e)}function E3(e){if(typeof e!="function")throw new Error;return e}function $s(){return 0}function nc(e){return function(){return e}}const IQ=1664525,jQ=1013904223,M3=4294967296;function DQ(){let e=1;return()=>(e=(IQ*e+jQ)%M3)/M3}function FQ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function RQ(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function $Q(e,t){for(var n=0,r=(e=RQ(Array.from(e),t)).length,i=[],a,o;n<r;)a=e[n],o&&A3(o,a)?++n:(o=BQ(i=zQ(i,a)),n=0);return o}function zQ(e,t){var n,r;if(J1(t,e))return[t];for(n=0;n<e.length;++n)if(iv(t,e[n])&&J1(yf(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(iv(yf(e[n],e[r]),t)&&iv(yf(e[n],t),e[r])&&iv(yf(e[r],t),e[n])&&J1(P3(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function iv(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function A3(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function J1(e,t){for(var n=0;n<t.length;++n)if(!A3(e,t[n]))return!1;return!0}function BQ(e){switch(e.length){case 1:return YQ(e[0]);case 2:return yf(e[0],e[1]);case 3:return P3(e[0],e[1],e[2])}}function YQ(e){return{x:e.x,y:e.y,r:e.r}}function yf(e,t){var n=e.x,r=e.y,i=e.r,a=t.x,o=t.y,s=t.r,l=a-n,c=o-r,u=s-i,f=Math.sqrt(l*l+c*c);return{x:(n+a+l/f*u)/2,y:(r+o+c/f*u)/2,r:(f+i+s)/2}}function P3(e,t,n){var r=e.x,i=e.y,a=e.r,o=t.x,s=t.y,l=t.r,c=n.x,u=n.y,f=n.r,d=r-o,h=r-c,p=i-s,v=i-u,g=l-a,y=f-a,m=r*r+i*i-a*a,b=m-o*o-s*s+l*l,x=m-c*c-u*u+f*f,w=h*p-d*v,O=(p*x-v*b)/(w*2)-r,_=(v*g-p*y)/w,S=(h*b-d*x)/(w*2)-i,k=(d*y-h*g)/w,E=_*_+k*k-1,M=2*(a+O*_+S*k),P=O*O+S*S-a*a,A=-(Math.abs(E)>1e-6?(M+Math.sqrt(M*M-4*E*P))/(2*E):P/M);return{x:r+O+_*A,y:i+S+k*A,r:A}}function C3(e,t,n){var r=e.x-t.x,i,a,o=e.y-t.y,s,l,c=r*r+o*o;c?(a=t.r+n.r,a*=a,l=e.r+n.r,l*=l,a>l?(i=(c+l-a)/(2*c),s=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-s*o,n.y=e.y-i*o+s*r):(i=(c+a-l)/(2*c),s=Math.sqrt(Math.max(0,a/c-i*i)),n.x=t.x+i*r-s*o,n.y=t.y+i*o+s*r)):(n.x=t.x+n.r,n.y=t.y)}function T3(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function L3(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function av(e){this._=e,this.next=null,this.previous=null}function WQ(e,t){if(!(a=(e=FQ(e)).length))return 0;var n,r,i,a,o,s,l,c,u,f,d;if(n=e[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;C3(r,n,i=e[2]),n=new av(n),r=new av(r),i=new av(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(l=3;l<a;++l){C3(n._,r._,i=e[l]),i=new av(i),c=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(T3(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue e}f+=c._.r,c=c.next}else{if(T3(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue e}d+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=L3(n);(i=i.next)!==r;)(s=L3(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=$Q(n,t),l=0;l<a;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function GQ(e){return Math.sqrt(e.value)}function HQ(){var e=null,t=1,n=1,r=$s;function i(a){const o=DQ();return a.x=t/2,a.y=n/2,e?a.eachBefore(N3(e)).eachAfter(eb(r,.5,o)).eachBefore(I3(1)):a.eachBefore(N3(GQ)).eachAfter(eb($s,1,o)).eachAfter(eb(r,a.r/Math.min(t,n),o)).eachBefore(I3(Math.min(t,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(e=rv(a),i):e},i.size=function(a){return arguments.length?(t=+a[0],n=+a[1],i):[t,n]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:nc(+a),i):r},i}function N3(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function eb(e,t,n){return function(r){if(i=r.children){var i,a,o=i.length,s=e(r)*t||0,l;if(s)for(a=0;a<o;++a)i[a].r+=s;if(l=WQ(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=l+s}}}function I3(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function j3(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function mf(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,c=e.value&&(r-t)/e.value;++s<l;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*c}function VQ(){var e=1,t=1,n=0,r=!1;function i(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=e,o.y1=t/s,o.eachBefore(a(t,s)),r&&o.eachBefore(j3),o}function a(o,s){return function(l){l.children&&mf(l,l.x0,o*(l.depth+1)/s,l.x1,o*(l.depth+2)/s);var c=l.x0,u=l.y0,f=l.x1-n,d=l.y1-n;f<c&&(c=f=(c+f)/2),d<u&&(u=d=(u+d)/2),l.x0=c,l.y0=u,l.x1=f,l.y1=d}}return i.round=function(o){return arguments.length?(r=!!o,i):r},i.size=function(o){return arguments.length?(e=+o[0],t=+o[1],i):[e,t]},i.padding=function(o){return arguments.length?(n=+o,i):n},i}var UQ={depth:-1},D3={},tb={};function XQ(e){return e.id}function qQ(e){return e.parentId}function nb(){var e=XQ,t=qQ,n;function r(i){var a=Array.from(i),o=e,s=t,l,c,u,f,d,h,p,v,g=new Map;if(n!=null){const y=a.map((x,w)=>KQ(n(x,w,i))),m=y.map(F3),b=new Set(y).add("");for(const x of m)b.has(x)||(b.add(x),y.push(x),m.push(F3(x)),a.push(tb));o=(x,w)=>y[w],s=(x,w)=>m[w]}for(u=0,l=a.length;u<l;++u)c=a[u],h=a[u]=new tc(c),(p=o(c,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?D3:h)),(p=s(c,u,i))!=null&&(p+="")&&(h.parent=p);for(u=0;u<l;++u)if(h=a[u],p=h.parent){if(d=g.get(p),!d)throw new Error("missing: "+p);if(d===D3)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(n!=null){for(;f.data===tb&&f.children.length===1;)f=f.children[0],--l;for(let y=a.length-1;y>=0&&(h=a[y],h.data===tb);--y)h.data=null}if(f.parent=UQ,f.eachBefore(function(y){y.depth=y.parent.depth+1,--l}).eachBefore(k3),f.parent=null,l>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(e=rv(i),r):e},r.parentId=function(i){return arguments.length?(t=rv(i),r):t},r.path=function(i){return arguments.length?(n=rv(i),r):n},r}function KQ(e){e=`${e}`;let t=e.length;return rb(e,t-1)&&!rb(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function F3(e){let t=e.length;if(t<2)return"";for(;--t>1&&!rb(e,t););return e.slice(0,t)}function rb(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if(!(n&1))return!0}return!1}function ZQ(e,t){return e.parent===t.parent?1:2}function ib(e){var t=e.children;return t?t[0]:e.t}function ab(e){var t=e.children;return t?t[t.length-1]:e.t}function QQ(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function JQ(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function eJ(e,t,n){return e.a.parent===t.parent?e.a:n}function ov(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}ov.prototype=Object.create(tc.prototype);function tJ(e){for(var t=new ov(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=new Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new ov(a[o],o)),i.parent=n;return(t.parent=new ov(null,0)).children=[t],t}function nJ(){var e=ZQ,t=1,n=1,r=null;function i(c){var u=tJ(c);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)c.eachBefore(l);else{var f=c,d=c,h=c;c.eachBefore(function(m){m.x<f.x&&(f=m),m.x>d.x&&(d=m),m.depth>h.depth&&(h=m)});var p=f===d?1:e(f,d)/2,v=p-f.x,g=t/(d.x+p+v),y=n/(h.depth||1);c.eachBefore(function(m){m.x=(m.x+v)*g,m.y=m.depth*y})}return c}function a(c){var u=c.children,f=c.parent.children,d=c.i?f[c.i-1]:null;if(u){JQ(c);var h=(u[0].z+u[u.length-1].z)/2;d?(c.z=d.z+e(c._,d._),c.m=c.z-h):c.z=h}else d&&(c.z=d.z+e(c._,d._));c.parent.A=s(c,d,c.parent.A||f[0])}function o(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,f){if(u){for(var d=c,h=c,p=u,v=d.parent.children[0],g=d.m,y=h.m,m=p.m,b=v.m,x;p=ab(p),d=ib(d),p&&d;)v=ib(v),h=ab(h),h.a=c,x=p.z+m-d.z-g+e(p._,d._),x>0&&(QQ(eJ(p,c,f),c,x),g+=x,y+=x),m+=p.m,g+=d.m,b+=v.m,y+=h.m;p&&!ab(h)&&(h.t=p,h.m+=m-y),d&&!ib(v)&&(v.t=d,v.m+=g-b,f=c)}return f}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function sv(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,c=e.value&&(i-n)/e.value;++s<l;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*c}var R3=(1+Math.sqrt(5))/2;function $3(e,t,n,r,i,a){for(var o=[],s=t.children,l,c,u=0,f=0,d=s.length,h,p,v=t.value,g,y,m,b,x,w,O;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(y=m=g,w=Math.max(p/h,h/p)/(v*e),O=g*g*w,x=Math.max(m/O,O/y);f<d;++f){if(g+=c=s[f].value,c<y&&(y=c),c>m&&(m=c),O=g*g*w,b=Math.max(m/O,O/y),b>x){g-=c;break}x=b}o.push(l={value:g,dice:h<p,children:s.slice(u,f)}),l.dice?mf(l,n,r,i,v?r+=p*g/v:a):sv(l,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}const z3=function e(t){function n(r,i,a,o,s){$3(t,r,i,a,o,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(R3);function rJ(){var e=z3,t=!1,n=1,r=1,i=[0],a=$s,o=$s,s=$s,l=$s,c=$s;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],t&&d.eachBefore(j3),d}function f(d){var h=i[d.depth],p=d.x0+h,v=d.y0+h,g=d.x1-h,y=d.y1-h;g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),d.x0=p,d.y0=v,d.x1=g,d.y1=y,d.children&&(h=i[d.depth+1]=a(d)/2,p+=c(d)-h,v+=o(d)-h,g-=s(d)-h,y-=l(d)-h,g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),e(d,p,v,g,y))}return u.round=function(d){return arguments.length?(t=!!d,u):t},u.size=function(d){return arguments.length?(n=+d[0],r=+d[1],u):[n,r]},u.tile=function(d){return arguments.length?(e=E3(d),u):e},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(a=typeof d=="function"?d:nc(+d),u):a},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:nc(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:nc(+d),u):s},u.paddingBottom=function(d){return arguments.length?(l=typeof d=="function"?d:nc(+d),u):l},u.paddingLeft=function(d){return arguments.length?(c=typeof d=="function"?d:nc(+d),u):c},u}function iJ(e,t,n,r,i){var a=e.children,o,s=a.length,l,c=new Array(s+1);for(c[0]=l=o=0;o<s;++o)c[o+1]=l+=a[o].value;u(0,s,e.value,t,n,r,i);function u(f,d,h,p,v,g,y){if(f>=d-1){var m=a[f];m.x0=p,m.y0=v,m.x1=g,m.y1=y;return}for(var b=c[f],x=h/2+b,w=f+1,O=d-1;w<O;){var _=w+O>>>1;c[_]<x?w=_+1:O=_}x-c[w-1]<c[w]-x&&f+1<w&&--w;var S=c[w]-b,k=h-S;if(g-p>y-v){var E=h?(p*k+g*S)/h:g;u(f,w,S,p,v,E,y),u(w,d,k,E,v,g,y)}else{var M=h?(v*k+y*S)/h:y;u(f,w,S,p,v,g,M),u(w,d,k,p,M,g,y)}}}function aJ(e,t,n,r,i){(e.depth&1?sv:mf)(e,t,n,r,i)}const oJ=function e(t){function n(r,i,a,o,s){if((l=r._squarify)&&l.ratio===t)for(var l,c,u,f,d=-1,h,p=l.length,v=r.value;++d<p;){for(c=l[d],u=c.children,f=c.value=0,h=u.length;f<h;++f)c.value+=u[f].value;c.dice?mf(c,i,a,o,v?a+=(s-a)*c.value/v:s):sv(c,i,a,v?i+=(o-i)*c.value/v:o,s),v-=c.value}else r._squarify=l=$3(t,r,i,a,o,s),l.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(R3);function sJ(e,t){return Array.isArray(e)?typeof t=="function"?nb().path(t)(e):nb()(e):ec(e)}function B3(e,t=[e.data.name]){e.id=e.id||e.data.name,e.path=t,e.children&&e.children.forEach(n=>{n.id=`${e.id}/${n.data.name}`,n.path=[...t,n.data.name],B3(n,n.path)})}function Y3(e){const t=Ot(e,["data","name"]);t.replaceAll&&(e.path=t.replaceAll(".","/").split("/")),e.children&&e.children.forEach(n=>{Y3(n)})}function lJ(e,t){const n={treemapBinary:iJ,treemapDice:mf,treemapSlice:sv,treemapSliceDice:aJ,treemapSquarify:z3,treemapResquarify:oJ},r=e==="treemapSquarify"?n[e].ratio(t):n[e];if(!r)throw new TypeError("Invalid tile method!");return r}function W3(e,t,n){const{value:r}=n,i=lJ(t.tile,t.ratio),a=sJ(e,t.path);er(e)?Y3(a):B3(a),r?a.sum(l=>t.ignoreParentValue&&l.children?0:aa(r)(l)).sort(t.sort):a.count(),rJ().tile(i).size(t.size).round(t.round).paddingInner(t.paddingInner).paddingOuter(t.paddingOuter).paddingTop(t.paddingTop).paddingRight(t.paddingRight).paddingBottom(t.paddingBottom).paddingLeft(t.paddingLeft)(a);const o=a.descendants().map(l=>Object.assign(l,{id:l.id.replace(/^\//,""),x:[l.x0,l.x1],y:[l.y0,l.y1]}));return[o.filter(typeof t.layer=="function"?t.layer:l=>l.height===t.layer),o]}var cJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const uJ=(e,t)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[e,t],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(n,r)=>r.value-n.value,layer:0}),fJ=(e,t)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:n=>n.path[1]},scale:{x:{domain:[0,e],range:[0,1]},y:{domain:[0,t],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),dJ={fontSize:10,text:e=>fu(e.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:e=>e.x1-e.x0},hJ={title:e=>{var t,n;return(n=(t=e.path)===null||t===void 0?void 0:t.join)===null||n===void 0?void 0:n.call(t,".")},items:[{field:"value"}]},pJ={title:e=>fu(e.path),items:[{field:"value"}]},G3=(e,t)=>{const{width:n,height:r,options:i}=t,{data:a,encode:o={},scale:s,style:l={},layout:c={},labels:u=[],tooltip:f={}}=e,d=cJ(e,["data","encode","scale","style","layout","labels","tooltip"]),h=Ot(i,["interaction","treemapDrillDown"]),p=Z({},uJ(n,r),c,{layer:h?m=>m.depth===1:c.layer}),[v,g]=W3(a,p,o),y=le(l,"label");return Z({},fJ(n,r),Object.assign(Object.assign({data:v,scale:s,style:l,labels:[Object.assign(Object.assign({},dJ),y),...u]},d),{encode:o,tooltip:nv(f,hJ),axis:!1}),h?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:p}):void 0}),encode:Object.assign({color:m=>fu(m.path)},o),tooltip:nv(f,pJ)}:{})};G3.props={};var vJ=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const gJ=(e,t)=>({size:[e,t],padding:0,sort:(n,r)=>r.value-n.value}),yJ=(e,t,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,e]},y:{domain:[0,t]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:n.color?void 0:r=>r.height===0?"":"#000"}}),mJ={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:e=>e.r*2},bJ={title:e=>e.data.name,items:[{field:"value"}]},xJ=(e,t,n)=>{const{value:r}=n,i=er(e)?nb().path(t.path)(e):ec(e);return r?i.sum(a=>aa(r)(a)).sort(t.sort):i.count(),HQ().size(t.size).padding(t.padding)(i),i.descendants()},H3=(e,t)=>{const{width:n,height:r}=t,{data:i,encode:a={},scale:o={},style:s={},layout:l={},labels:c=[],tooltip:u={}}=e,f=vJ(e,["data","encode","scale","style","layout","labels","tooltip"]),d=yJ(n,r,a),h=xJ(i,Z({},gJ(n,r),l),Z({},d.encode,a)),p=le(s,"label");return Z({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},mJ),p),...c]},f),{tooltip:nv(u,bJ),axis:!1}))};H3.props={};var V3=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function wJ(e,t){return kr(e,n=>t[n])}function OJ(e,t){return tt(e,n=>t[n])}function U3(e,t){const n=ob(e,t)*2.5-sb(e,t)*1.5;return kr(e,r=>t[r]>=n?t[r]:NaN)}function ob(e,t){return gh(e,.25,n=>t[n])}function _J(e,t){return gh(e,.5,n=>t[n])}function sb(e,t){return gh(e,.75,n=>t[n])}function X3(e,t){const n=sb(e,t)*2.5-ob(e,t)*1.5;return tt(e,r=>t[r]<=n?t[r]:NaN)}function SJ(){return(e,t)=>{const{encode:n}=t,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(_t(e,c=>o[+c]).values()).flatMap(c=>{const u=U3(c,a),f=X3(c,a);return c.filter(d=>a[d]<u||a[d]>f)}),t]}}const q3=e=>{const{data:t,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=e,s=V3(e,["data","encode","style","tooltip","transform","animate"]),{point:l=!0}=r,c=V3(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:ob,y2:_J,y3:sb},h=oa(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=oa(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!l)return Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:wJ},d),{y4:OJ})],encode:Object.assign(Object.assign({},n),f),style:c,tooltip:h},s);const v=le(c,"box"),g=le(c,"point");return[Object.assign({type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:U3},d),{y4:X3})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:sa(o,"box")},s),{type:"point",data:t,transform:[{type:SJ}],encode:n,style:Object.assign({},g),tooltip:p,animate:sa(o,"point")}]};q3.props={};const kJ={shape:ST},K3=e=>{const{cartesian:t}=e;return t?B1:(n,r,i,a)=>{const{x:o,y:s}=i,l=Rs(r,i,e),c=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(l(f,u))]});return[n,c]}};K3.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:kJ,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Kt(),{type:wh},{type:xh},{type:TS}]};function EJ(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=n.length,s,l=0,c=0;for(a=0;a<o;++a)s=n[a],l+=s.x,c+=s.y;for(l=(l/o-e)*r,c=(c/o-t)*r,a=0;a<o;++a)s=n[a],s.x-=l,s.y-=c}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(e=+a,i):e},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function MJ(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return Z3(this.cover(t,n),t,n,e)}function Z3(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,l=e._y0,c=e._x1,u=e._y1,f,d,h,p,v,g,y,m;if(!a)return e._root=o,e;for(;a.length;)if((v=t>=(f=(s+c)/2))?s=f:c=f,(g=n>=(d=(l+u)/2))?l=d:u=d,i=a,!(a=a[y=g<<1|v]))return i[y]=o,e;if(h=+e._x.call(null,a.data),p=+e._y.call(null,a.data),t===h&&n===p)return o.next=a,i?i[y]=o:e._root=o,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(v=t>=(f=(s+c)/2))?s=f:c=f,(g=n>=(d=(l+u)/2))?l=d:u=d;while((y=g<<1|v)===(m=(p>=d)<<1|h>=f));return i[m]=a,i[y]=o,e}function AJ(e){var t,n,r=e.length,i,a,o=new Array(r),s=new Array(r),l=1/0,c=1/0,u=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<l&&(l=i),i>u&&(u=i),a<c&&(c=a),a>f&&(f=a));if(l>u||c>f)return this;for(this.cover(l,c).cover(u,f),n=0;n<r;++n)Z3(this,o[n],s[n],e[n]);return this}function PJ(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,l,c;n>e||e>=i||r>t||t>=a;)switch(c=(t<r)<<1|e<n,l=new Array(4),l[c]=s,s=l,o*=2,c){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function CJ(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function TJ(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function or(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function LJ(e,t,n){var r,i=this._x0,a=this._y0,o,s,l,c,u=this._x1,f=this._y1,d=[],h=this._root,p,v;for(h&&d.push(new or(h,i,a,u,f)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,f=t+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>u||(s=p.y0)>f||(l=p.x1)<i||(c=p.y1)<a))if(h.length){var g=(o+l)/2,y=(s+c)/2;d.push(new or(h[3],g,y,l,c),new or(h[2],o,y,g,c),new or(h[1],g,s,l,y),new or(h[0],o,s,g,y)),(v=(t>=y)<<1|e>=g)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=p)}else{var m=e-+this._x.call(null,h.data),b=t-+this._y.call(null,h.data),x=m*m+b*b;if(x<n){var w=Math.sqrt(n=x);i=e-w,a=t-w,u=e+w,f=t+w,r=h.data}}return r}function NJ(e){if(isNaN(u=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,l=this._x1,c=this._y1,u,f,d,h,p,v,g,y;if(!n)return this;if(n.length)for(;;){if((p=u>=(d=(o+l)/2))?o=d:l=d,(v=f>=(h=(s+c)/2))?s=h:c=h,t=n,!(n=n[g=v<<1|p]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,y=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=a,this)}function IJ(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function jJ(){return this._root}function DJ(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function FJ(e){var t=[],n,r=this._root,i,a,o,s,l;for(r&&t.push(new or(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,l=n.y1)&&r.length){var c=(a+s)/2,u=(o+l)/2;(i=r[3])&&t.push(new or(i,c,u,s,l)),(i=r[2])&&t.push(new or(i,a,u,c,l)),(i=r[1])&&t.push(new or(i,c,o,s,u)),(i=r[0])&&t.push(new or(i,a,o,c,u))}return this}function RJ(e){var t=[],n=[],r;for(this._root&&t.push(new or(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,l=r.x1,c=r.y1,u=(o+l)/2,f=(s+c)/2;(a=i[0])&&t.push(new or(a,o,s,u,f)),(a=i[1])&&t.push(new or(a,u,s,l,f)),(a=i[2])&&t.push(new or(a,o,f,u,c)),(a=i[3])&&t.push(new or(a,u,f,l,c))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function $J(e){return e[0]}function zJ(e){return arguments.length?(this._x=e,this):this._x}function BJ(e){return e[1]}function YJ(e){return arguments.length?(this._y=e,this):this._y}function Q3(e,t,n){var r=new lb(t==null?$J:t,n==null?BJ:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function lb(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function J3(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var sr=Q3.prototype=lb.prototype;sr.copy=function(){var e=new lb(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=J3(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=J3(r));return e},sr.add=MJ,sr.addAll=AJ,sr.cover=PJ,sr.data=CJ,sr.extent=TJ,sr.find=LJ,sr.remove=NJ,sr.removeAll=IJ,sr.root=jJ,sr.size=DJ,sr.visit=FJ,sr.visitAfter=RJ,sr.x=zJ,sr.y=YJ;function Cr(e){return function(){return e}}function rc(e){return(e()-.5)*1e-6}function WJ(e){return e.index}function eL(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function GJ(e){var t=WJ,n=f,r,i=Cr(30),a,o,s,l,c,u=1;e==null&&(e=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var y=0,m=e.length;y<u;++y)for(var b=0,x,w,O,_,S,k,E;b<m;++b)x=e[b],w=x.source,O=x.target,_=O.x+O.vx-w.x-w.vx||rc(c),S=O.y+O.vy-w.y-w.vy||rc(c),k=Math.sqrt(_*_+S*S),k=(k-a[b])/k*g*r[b],_*=k,S*=k,O.vx-=_*(E=l[b]),O.vy-=S*E,w.vx+=_*(E=1-E),w.vy+=S*E}function h(){if(o){var g,y=o.length,m=e.length,b=new Map(o.map((w,O)=>[t(w,O,o),w])),x;for(g=0,s=new Array(y);g<m;++g)x=e[g],x.index=g,typeof x.source!="object"&&(x.source=eL(b,x.source)),typeof x.target!="object"&&(x.target=eL(b,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(g=0,l=new Array(m);g<m;++g)x=e[g],l[g]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(m),p(),a=new Array(m),v()}}function p(){if(o)for(var g=0,y=e.length;g<y;++g)r[g]=+n(e[g],g,e)}function v(){if(o)for(var g=0,y=e.length;g<y;++g)a[g]=+i(e[g],g,e)}return d.initialize=function(g,y){o=g,c=y,h()},d.links=function(g){return arguments.length?(e=g,h(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Cr(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Cr(+g),v(),d):i},d}var HJ={value:()=>{}};function tL(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new lv(n)}function lv(e){this._=e}function VJ(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}lv.prototype=tL.prototype={constructor:lv,on:function(e,t){var n=this._,r=VJ(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=UJ(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=nL(n[i],e.name,t);else if(t==null)for(i in n)n[i]=nL(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new lv(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function UJ(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function nL(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=HJ,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var ic=0,bf=0,xf=0,rL=1e3,cv,wf,uv=0,zs=0,fv=0,Of=typeof performance=="object"&&performance.now?performance:Date,iL=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function aL(){return zs||(iL(XJ),zs=Of.now()+fv)}function XJ(){zs=0}function cb(){this._call=this._time=this._next=null}cb.prototype=oL.prototype={constructor:cb,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?aL():+n)+(t==null?0:+t),!this._next&&wf!==this&&(wf?wf._next=this:cv=this,wf=this),this._call=e,this._time=n,ub()},stop:function(){this._call&&(this._call=null,this._time=1/0,ub())}};function oL(e,t,n){var r=new cb;return r.restart(e,t,n),r}function qJ(){aL(),++ic;for(var e=cv,t;e;)(t=zs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ic}function sL(){zs=(uv=Of.now())+fv,ic=bf=0;try{qJ()}finally{ic=0,ZJ(),zs=0}}function KJ(){var e=Of.now(),t=e-uv;t>rL&&(fv-=t,uv=e)}function ZJ(){for(var e,t=cv,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:cv=n);wf=e,ub(r)}function ub(e){if(!ic){bf&&(bf=clearTimeout(bf));var t=e-zs;t>24?(e<1/0&&(bf=setTimeout(sL,e-Of.now()-fv)),xf&&(xf=clearInterval(xf))):(xf||(uv=Of.now(),xf=setInterval(KJ,rL)),ic=1,iL(sL))}}const QJ=1664525,JJ=1013904223,lL=4294967296;function eee(){let e=1;return()=>(e=(QJ*e+JJ)%lL)/lL}function tee(e){return e.x}function nee(e){return e.y}var ree=10,iee=Math.PI*(3-Math.sqrt(5));function aee(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,l=oL(f),c=tL("tick","end"),u=eee();e==null&&(e=[]);function f(){d(),c.call("tick",t),n<r&&(l.stop(),c.call("end",t))}function d(v){var g,y=e.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,s.forEach(function(x){x(n)}),g=0;g<y;++g)m=e[g],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return t}function h(){for(var v=0,g=e.length,y;v<g;++v){if(y=e[v],y.index=v,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var m=ree*Math.sqrt(.5+v),b=v*iee;y.x=m*Math.cos(b),y.y=m*Math.sin(b)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(v){return v.initialize&&v.initialize(e,u),v}return h(),t={tick:d,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(v){return arguments.length?(e=v,h(),s.forEach(p),t):e},alpha:function(v){return arguments.length?(n=+v,t):n},alphaMin:function(v){return arguments.length?(r=+v,t):r},alphaDecay:function(v){return arguments.length?(i=+v,t):+i},alphaTarget:function(v){return arguments.length?(a=+v,t):a},velocityDecay:function(v){return arguments.length?(o=1-v,t):1-o},randomSource:function(v){return arguments.length?(u=v,s.forEach(p),t):u},force:function(v,g){return arguments.length>1?(g==null?s.delete(v):s.set(v,p(g)),t):s.get(v)},find:function(v,g,y){var m=0,b=e.length,x,w,O,_,S;for(y==null?y=1/0:y*=y,m=0;m<b;++m)_=e[m],x=v-_.x,w=g-_.y,O=x*x+w*w,O<y&&(S=_,y=O);return S},on:function(v,g){return arguments.length>1?(c.on(v,g),t):c.on(v)}}}function oee(){var e,t,n,r,i=Cr(-30),a,o=1,s=1/0,l=.81;function c(h){var p,v=e.length,g=Q3(e,tee,nee).visitAfter(f);for(r=h,p=0;p<v;++p)t=e[p],g.visit(d)}function u(){if(e){var h,p=e.length,v;for(a=new Array(p),h=0;h<p;++h)v=e[h],a[v.index]=+i(v,h,e)}}function f(h){var p=0,v,g,y=0,m,b,x;if(h.length){for(m=b=x=0;x<4;++x)(v=h[x])&&(g=Math.abs(v.value))&&(p+=v.value,y+=g,m+=g*v.x,b+=g*v.y);h.x=m/y,h.y=b/y}else{v=h,v.x=v.data.x,v.y=v.data.y;do p+=a[v.data.index];while(v=v.next)}h.value=p}function d(h,p,v,g){if(!h.value)return!0;var y=h.x-t.x,m=h.y-t.y,b=g-p,x=y*y+m*m;if(b*b/l<x)return x<s&&(y===0&&(y=rc(n),x+=y*y),m===0&&(m=rc(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)),t.vx+=y*h.value*r/x,t.vy+=m*h.value*r/x),!0;if(h.length||x>=s)return;(h.data!==t||h.next)&&(y===0&&(y=rc(n),x+=y*y),m===0&&(m=rc(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)));do h.data!==t&&(b=a[h.data.index]*r/x,t.vx+=y*b,t.vy+=m*b);while(h=h.next)}return c.initialize=function(h,p){e=h,n=p,u()},c.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Cr(+h),u(),c):i},c.distanceMin=function(h){return arguments.length?(o=h*h,c):Math.sqrt(o)},c.distanceMax=function(h){return arguments.length?(s=h*h,c):Math.sqrt(s)},c.theta=function(h){return arguments.length?(l=h*h,c):Math.sqrt(l)},c}function see(e){var t=Cr(.1),n,r,i;typeof e!="function"&&(e=Cr(e==null?0:+e));function a(s){for(var l=0,c=n.length,u;l<c;++l)u=n[l],u.vx+=(i[l]-u.x)*r[l]*s}function o(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Cr(+s),o(),a):t},a.x=function(s){return arguments.length?(e=typeof s=="function"?s:Cr(+s),o(),a):e},a}function lee(e){var t=Cr(.1),n,r,i;typeof e!="function"&&(e=Cr(e==null?0:+e));function a(s){for(var l=0,c=n.length,u;l<c;++l)u=n[l],u.vy+=(i[l]-u.y)*r[l]*s}function o(){if(n){var s,l=n.length;for(r=new Array(l),i=new Array(l),s=0;s<l;++s)r[s]=isNaN(i[s]=+e(n[s],s,n))?0:+t(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Cr(+s),o(),a):t},a.y=function(s){return arguments.length?(e=typeof s=="function"?s:Cr(+s),o(),a):e},a}var cee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const uee={joint:!0},fee={type:"link",axis:!1,legend:!1,encode:{x:[e=>e.source.x,e=>e.target.x],y:[e=>e.source.y,e=>e.target.y]},style:{stroke:"#999",strokeOpacity:.6}},dee={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},hee={text:""};function pee(e,t,n){const{nodes:r,links:i}=e,{joint:a,nodeStrength:o,linkStrength:s}=t,{nodeKey:l=p=>p.id,linkKey:c=p=>p.id}=n,u=oee(),f=GJ(i).id(aa(c));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=aee(r).force("link",f).force("charge",u);a?d.force("center",EJ()):d.force("x",see()).force("y",lee()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const cL=e=>{const{data:t,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=e,{nodeKey:u=O=>O.id,linkKey:f=O=>O.id}=n,d=cee(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=le(h,"node"),v=le(h,"link"),{links:g,nodes:y}=W1(t,h),{nodesData:m,linksData:b}=pee({links:g,nodes:y},Z({},uee,a),h),x=oa(c,"link",{items:[O=>({name:"source",value:aa(f)(O.source)}),O=>({name:"target",value:aa(f)(O.target)})]}),w=oa(c,"node",{items:[O=>({name:"key",value:aa(u)(O)})]},!0);return[Z({},fee,{data:b,encode:v,labels:s,style:le(i,"link"),tooltip:x,animate:sa(l,"link")}),Z({},dee,{data:m,encode:Object.assign({},p),scale:r,style:le(i,"node"),tooltip:w,labels:[Object.assign(Object.assign({},hee),le(i,"label")),...o],animate:sa(l,"link")})]};cL.props={};const uL=e=>t=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=t,[l,c]=s,u=ec(n,p=>p.children).sum(p=>p[r]).sort(o),f=e();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(u);const d=[];u.each(p=>{p[l]=p.x,p[c]=p.y,p.name=p.data.name,d.push(p)});const h=u.links();return h.forEach(p=>{p[l]=[p.source[l],p.target[l]],p[c]=[p.source[c],p.target[c]]}),{nodes:d,edges:h}},fL=e=>uL(pQ)(e);fL.props={};const dL=e=>uL(nJ)(e);dL.props={};const vee={sortBy:(e,t)=>t.value-e.value},gee={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},yee={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},mee={text:"",fontSize:10},hL=e=>{const{data:t,encode:n={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:l={},tooltip:c={}}=e,u=n==null?void 0:n.value,{nodes:f,edges:d}=dL(Object.assign(Object.assign(Object.assign({},vee),a),{field:u}))(t),h=oa(c,"node",{title:"name",items:["value"]},!0),p=oa(c,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[Z({},yee,{data:d,encode:le(n,"link"),scale:le(r,"link"),labels:s,style:Object.assign({stroke:"#999"},le(i,"link")),tooltip:p,animate:sa(l,"link")}),Z({},gee,{data:f,scale:le(r,"node"),encode:le(n,"node"),labels:[Object.assign(Object.assign({},mee),le(i,"label")),...o],style:Object.assign({},le(i,"node")),tooltip:h,animate:sa(l,"node")})]};hL.props={};var bee=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},xee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function wee(e,t){const{text:n="text",value:r="value"}=t;return e.map(i=>Object.assign(Object.assign({},i),{text:i[n],value:i[r]}))}const Oee=()=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:e=>e.fontFamily}}),fb=(e,t)=>bee(void 0,void 0,void 0,function*(){const{width:n,height:r}=t,{data:i,encode:a={},scale:o,style:s={},layout:l={}}=e,c=xee(e,["data","encode","scale","style","layout"]),u=wee(i,a);return Z({},Oee(),Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[n,r]},l)]},encode:a,scale:o,style:s},c),{axis:!1}))});fb.props={};var _f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const _ee=(e,t)=>{const{shape:n,radius:r}=e,i=_f(e,["shape","radius"]),a=le(i,"pointer"),o=le(i,"pin"),{shape:s}=a,l=_f(a,["shape"]),{shape:c}=o,u=_f(o,["shape"]),{coordinate:f,theme:d}=t;return(h,p)=>{const v=h.map(L=>f.invert(L)),[g,y,m]=q7(f,"polar"),b=f.clone(),{color:x}=p,w=Q0({startAngle:g,endAngle:y,innerRadius:m,outerRadius:r});w.push(["cartesian"]),b.update({transformations:w});const O=v.map(L=>b.map(L)),[_,S]=o1(O),[k,E]=f.getCenter(),M=Object.assign(Object.assign({x1:_,y1:S,x2:k,y2:E,stroke:x},l),i),P=Object.assign(Object.assign({cx:k,cy:E,stroke:x},u),i),A=we(new bn);return ka(s)||(typeof s=="function"?A.append(()=>s(O,p,b,d)):A.append("line").call(ve,M).node()),ka(c)||(typeof c=="function"?A.append(()=>c(O,p,b,d)):A.append("circle").call(ve,P).node()),A.node()}},pL={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},See={style:{shape:_ee,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},kee={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},tooltip:!1};function Eee(e){if(_n(e)){const t=Math.max(0,Math.min(e,1));return{percent:t,target:t,total:1}}return e}function Mee(e,t){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=Eee(e),s=a||r,l=a?1:i,c=Object.assign({y:{domain:[0,l]}},t);return o.length?{targetData:[{x:n,y:s,color:"target"}],totalData:o.map((u,f)=>({x:n,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:l,scale:c}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:l-s,color:"total"}],target:s,total:l,scale:c}}function Aee(e,{target:t,total:n}){const{content:r}=e;return r?r(t,n):t.toString()}const vL=e=>{const{data:t={},scale:n={},style:r={},animate:i={},transform:a=[]}=e,o=_f(e,["data","scale","style","animate","transform"]),{targetData:s,totalData:l,target:c,total:u,scale:f}=Mee(t,n),d=le(r,"text"),{tooltip:h}=d,p=_f(d,["tooltip"]),v=bB(r,["pointer","pin"]),g=le(r,"arc"),y=g.shape;return[Z({},pL,Object.assign({type:"interval",transform:[{type:"stackY"}],data:l,scale:f,style:y==="round"?Object.assign(Object.assign({},g),{shape:LZ}):g,animate:typeof i=="object"?le(i,"arc"):i},o)),Z({},pL,See,Object.assign({type:"point",data:s,scale:f,style:v,animate:typeof i=="object"?le(i,"indicator"):i},o)),Z({},kee,{style:Object.assign({text:Aee(p,{target:c,total:u})},p),tooltip:h,animate:typeof i=="object"?le(i,"text"):i})]};vL.props={};const gL={density:wT},yL=()=>(e,t,n,r)=>{const{x:i,series:a}=n,o=Object.entries(n).filter(([f])=>f.startsWith("y")).map(([,f])=>f),s=Object.entries(n).filter(([f])=>f.startsWith("size")).map(([,f])=>f);if(i===void 0||o===void 0||s===void 0)throw new Error("Missing encode for x or y or size channel.");const l=t.x,c=t.series,u=Array.from(e,f=>{const d=l.getBandWidth(l.invert(+i[f])),h=c?c.getBandWidth(c.invert(+(a==null?void 0:a[f]))):1,p=d*h,v=(+(a==null?void 0:a[f])||0)*d,g=+i[f]+v+p/2;return[...o.map((m,b)=>[g+ +s[b][f]/e.length,+o[b][f]]),...o.map((m,b)=>[g-+s[b][f]/e.length,+o[b][f]]).reverse()].map(m=>r.map(m))});return[e,u]};yL.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:gL,channels:[...ar({shapes:Object.keys(gL)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...Kt(),{type:bu},{type:ds}],postInference:[...on(),...Ql()],interaction:{shareTooltip:!0}};const mL={heatmap:_T},bL=e=>(t,n,r,i)=>{const{x:a,y:o,size:s,color:l}=r,c=Array.from(t,u=>{const f=s?+s[u]:40;return[...i.map([+a[u],+o[u]]),l[u],f]});return[[0],[c]]};bL.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:mL,channels:[...ar({shapes:Object.keys(mL)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...Kt(),{type:ds},{type:mh}],postInference:[...on(),...ko()]};var Pee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Cee={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:PT},animate:{enter:{type:"fadeIn"}}},Tee={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},xL=e=>{const{data:t={},style:n={},animate:r}=e,i=Pee(e,["data","style","animate"]),a=Math.max(0,_n(t)?t:t==null?void 0:t.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},le(n,"text")),le(n,"content")),l=le(n,"outline"),c=le(n,"wave"),u=le(n,"background");return[Z({},Cee,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:n==null?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:l,wave:c,background:u})},animate:r},i)),Z({},Tee,{style:Object.assign({text:`${jp(a*100)} %`},s),animate:r})]};xL.props={};const wL=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];wL.props={};const OL=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];OL.props={};const _L=e=>new Al(e);_L.props={};const SL=e=>new bt(e);SL.props={};const kL=e=>new rk(e);kL.props={};const EL=e=>new ak(e);EL.props={};const ML=e=>new sk(e);ML.props={};const AL=e=>new Z9(e);AL.props={};const PL=e=>new R9(e);PL.props={};const CL=e=>new lk(e);CL.props={};const TL=e=>new Ah(e);TL.props={};const LL=e=>new uk(e);LL.props={};const NL=e=>new ck(e);NL.props={};const IL=e=>new D9(e);IL.props={};const jL=e=>new Wy(e);jL.props={};const DL=e=>new $y(e);DL.props={};function db({colorDefault:e,colorBlack:t,colorWhite:n,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:s,alpha90:l,alpha65:c,alpha45:u,alpha25:f,alpha10:d,category10:h,category20:p,sizeDefault:v=1,padding:g="auto",margin:y=16}){return{padding:g,margin:y,size:v,color:e,category10:h,category20:p,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:t,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,lineWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,lineWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:t,gridStrokeOpacity:d,labelAlign:"horizontal",labelFill:t,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:t,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:t,tickOpacity:u,titleFill:t,titleOpacity:l,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:t,itemLabelFillOpacity:l,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[a,a],itemValueFill:t,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:t,navButtonFillOpacity:.65,navPageNumFill:t,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:t,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:t,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:t,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:t,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:t,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:t,labelFillOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:l,tickStroke:t,tickStrokeOpacity:u},label:{fill:t,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:t,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:t,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:t,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:t,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:t,titleFillOpacity:l,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:t,subtitleFillOpacity:c,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"},tooltip:{css:{".g2-tooltip":{"font-family":"sans-serif"}}}}}const Lee=db({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),hb=e=>Z({},Lee,e);hb.props={};const FL=e=>Z({},hb(),{category10:"category10",category20:"category20"},e);FL.props={};const Nee=db({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),RL=e=>Z({},Nee,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},e),$L=e=>Object.assign({},RL(),{category10:"category10",category20:"category20"},e);$L.props={};const Iee=db({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),zL=e=>Z({},Iee,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,n)=>n!==0},axisRight:{gridFilter:(t,n)=>n!==0},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},e);zL.props={};function jee(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function dv(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Dee(e){return e=dv(Math.abs(e)),e?e[1]:NaN}function Fee(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Ree(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var $ee=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pb(e){if(!(t=$ee.exec(e)))throw new Error("invalid format: "+e);var t;return new vb({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}pb.prototype=vb.prototype;function vb(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vb.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function zee(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var BL;function Bee(e,t){var n=dv(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(BL=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+dv(e,Math.max(0,t+a-1))[0]}function YL(e,t){var n=dv(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const WL={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:jee,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>YL(e*100,t),r:YL,s:Bee,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GL(e){return e}var HL=Array.prototype.map,VL=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Yee(e){var t=e.grouping===void 0||e.thousands===void 0?GL:Fee(HL.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?GL:Ree(HL.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=pb(f);var d=f.fill,h=f.align,p=f.sign,v=f.symbol,g=f.zero,y=f.width,m=f.comma,b=f.precision,x=f.trim,w=f.type;w==="n"?(m=!0,w="g"):WL[w]||(b===void 0&&(b=12),x=!0,w="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=v==="$"?n:v==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",_=v==="$"?r:/[%p]/.test(w)?o:"",S=WL[w],k=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(M){var P=O,A=_,L,N,T;if(w==="c")A=S(M)+A,M="";else{M=+M;var I=M<0||1/M<0;if(M=isNaN(M)?l:S(Math.abs(M),b),x&&(M=zee(M)),I&&+M==0&&p!=="+"&&(I=!1),P=(I?p==="("?p:s:p==="-"||p==="("?"":p)+P,A=(w==="s"?VL[8+BL/3]:"")+A+(I&&p==="("?")":""),k){for(L=-1,N=M.length;++L<N;)if(T=M.charCodeAt(L),48>T||T>57){A=(T===46?i+M.slice(L+1):M.slice(L))+A,M=M.slice(0,L);break}}}m&&!g&&(M=t(M,1/0));var C=P.length+M.length+A.length,j=C<y?new Array(y-C+1).join(d):"";switch(m&&g&&(M=t(j+M,j.length?y-A.length:1/0),j=""),h){case"<":M=P+M+A+j;break;case"=":M=P+j+M+A;break;case"^":M=j.slice(0,C=j.length>>1)+P+M+A+j.slice(C);break;default:M=j+P+M+A;break}return a(M)}return E.toString=function(){return f+""},E}function u(f,d){var h=c((f=pb(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Dee(d)/3)))*3,v=Math.pow(10,-p),g=VL[8+p/3];return function(y){return h(v*y)+g}}return{format:c,formatPrefix:u}}var hv,Eo;Wee({thousands:",",grouping:[3],currency:["$",""]});function Wee(e){return hv=Yee(e),Eo=hv.format,hv.formatPrefix,hv}var Gee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Hee(e){return class extends Qu{constructor(t){super(t),this.descriptor=e}connectedCallback(){var t,n;(n=(t=this.descriptor).render)===null||n===void 0||n.call(t,this.attributes,this)}update(t={}){var n,r;this.attr(Z({},this.attributes,t)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function UL(e,t,n){return e.querySelector(t)?we(e).select(t):we(e).append(n)}function pv(e){return Array.isArray(e)?e.join(", "):`${e||""}`}function XL(e,t){const n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=n;const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return e in o&&([r,i,a]=o[e]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},t)}class qL extends MK{get child(){var t;return(t=this.children)===null||t===void 0?void 0:t[0]}update(t){var n;this.attr(t);const{subOptions:r}=t;(n=this.child)===null||n===void 0||n.update(r)}}class Vee extends qL{update(t){var n;const{subOptions:r}=t;this.attr(t),(n=this.child)===null||n===void 0||n.update(r)}}function la(e,t){var n;return(n=e.filter(r=>r.getOptions().name===t))===null||n===void 0?void 0:n[0]}function Uee(e){return e==="horizontal"||e===0}function Xee(e){return e==="vertical"||e===-Math.PI/2}function KL(e,t,n){const{bbox:r}=e,{position:i="top",size:a,length:o}=t,s=["top","bottom","center"].includes(i),[l,c]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=a||u||l,h=o||f||c,p=s?"horizontal":"vertical",[v,g]=s?[h,d]:[d,h];return{orientation:p,width:v,height:g,size:d,length:h}}function qee(e){return e.find(t=>t.getOptions().domain.length>0).getOptions().domain}function vv(e){const t=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=e,r=Gee(e,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{t.includes(a)?i[`show${eo(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var ZL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function QL(e,t){const{eulerAngles:n,origin:r}=t;r&&e.setOrigin(r),n&&e.rotate(n[0],n[1],n[2])}function JL(e){const{innerWidth:t,innerHeight:n,depth:r}=e.getOptions();return[t,n,r]}function Kee(e,t){const{width:n,height:r}=t.getOptions();return i=>{if(!cE(t))return i;const a=e==="bottom"?[i,1]:[0,i],o=t.map(a);if(e==="bottom"){const s=o[0];return new bt({domain:[0,n],range:[0,1]}).map(s)}else if(e==="left"){const s=o[1];return new bt({domain:[0,r],range:[0,1]}).map(s)}return i}}function Zee(e,t,n){if(e.getTicks)return e.getTicks();if(!n)return t;const[r,i]=Sa(t,o=>+o),{tickCount:a}=e.getOptions();return n(r,i,a)}function Qee(e,t){if(st(t))return h=>h;const n=t.getOptions(),{innerWidth:r,innerHeight:i,insetTop:a,insetBottom:o,insetLeft:s,insetRight:l}=n,[c,u,f]=e==="left"||e==="right"?[a,o,i]:[s,l,r],d=new bt({domain:[0,1],range:[c/f,1-u/f]});return h=>d.map(h)}function e5(e,t,n,r,i,a,o,s){var l;(n!==void 0||a!==void 0)&&e.update(Object.assign(Object.assign({},n&&{tickCount:n}),a&&{tickMethod:a}));const c=Zee(e,t,a),u=i?c.filter(i):c,f=y=>y instanceof Date?String(y):typeof y=="object"&&y?y:String(y),d=r||((l=e.getFormatter)===null||l===void 0?void 0:l.call(e))||f,h=Qee(o,s),p=Kee(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return st(s)||kt(s)?u.map((y,m,b)=>{var x,w;const O=((x=e.getBandWidth)===null||x===void 0?void 0:x.call(e,y))/2||0,_=h(e.map(y)+O);return{value:$h(s)&&o==="center"||kt(s)&&((w=e.getTicks)===null||w===void 0?void 0:w.call(e))&&v(o)||kt(s)&&g(o)?1-_:_,label:f(d(jp(y),m,b)),id:String(m)}}):u.map((y,m,b)=>{var x;const w=((x=e.getBandWidth)===null||x===void 0?void 0:x.call(e,y))/2||0,O=p(h(e.map(y)+w));return{value:g(o)?1-O:O,label:f(d(jp(y),m,b)),id:String(m)}})}function Jee(e,t,n="xy"){const[r,i,a]=JL(t);return n==="xy"?e.includes("bottom")||e.includes("top")?i:r:n==="xz"?e.includes("bottom")||e.includes("top")?a:r:e.includes("bottom")||e.includes("top")?i:a}function ete(e=[],t){if(e.length>0)return e;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=t,o=[],s=(l,c)=>{c&&o.push(Object.assign(Object.assign({},l),c))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},i),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},a),o}function tte(e,t,n,r,i){const{x:a,y:o,width:s,height:l}=t,c=[a+s/2,o+l/2],u=Math.min(s,l)/2,[f,d]=am(i),[h,p]=JL(i),v=Math.min(h,p)/2,g={center:c,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*v};if(e==="inner"){const{insetLeft:y,insetTop:m}=i.getOptions();return Object.assign(Object.assign({},g),{center:[c[0]-y,c[1]-m],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}function nte(e,t,n){return U7(t)||zh(t)?!1:e===void 0?!!n.getTicks:e}function rte(e){const{depth:t}=e.getOptions();return t?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function ite(e,t,n,r,i){const{x:a,y:o,width:s,height:l}=n;if(e==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(e==="left")return{startPos:[a+s,o+l],endPos:[a+s,o]};if(e==="right")return{startPos:[a,o+l],endPos:[a,o]};if(e==="top")return{startPos:[a,o+l],endPos:[a+s,o+l]};if(e==="center"){if(t==="vertical")return{startPos:[a,o],endPos:[a,o+l]};if(t==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof t=="number"){const[c,u]=r.getCenter(),[f,d]=Bh(r),[h,p]=am(r),v=Math.min(s,l)/2,{insetLeft:g,insetTop:y}=r.getOptions(),m=f*v,b=d*v,[x,w]=[c+a-g,u+o-y],[O,_]=[Math.cos(t),Math.sin(t)],S=[x+b*O,w+b*_],k=[x+m*O,w+m*_],E=()=>{const{domain:P}=i.getOptions();return P.length},M=st(r)&&i?E():3;return{startPos:S,endPos:k,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[x,w],gridControlAngles:new Array(M).fill(0).map((P,A,L)=>(p-h)/M*A)}}}return{}}const ate=e=>{const{order:t,size:n,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:s,tickMethod:l,important:c={},style:u={},indexBBox:f,title:d,grid:h=!1}=e,p=ZL(e,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[v],value:g,coordinate:y,theme:m})=>{const{bbox:b}=g,{domain:x}=v.getOptions(),w=e5(v,x,s,a,o,l,r,y),O=f?w.map((A,L)=>{const N=f.get(L);return!N||N[0]!==A.label?A:Object.assign(Object.assign({},A),{bbox:N[1]})}):w,[_,S]=Bh(y),k=tte(r,b,_,S,y),{axis:E,axisArc:M={}}=m,P=vv(Z({},E,M,k,Object.assign(Object.assign({type:"arc",data:O,titleText:pv(d),grid:h},p),c)));return new j1({style:iy(P,["transform"])})}};function ote(e,t,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${Ey(i)}`]:n.axisLinear,l=e.getOptions().name,c=n[`axis${eo(l)}`]||{};return Object.assign({},o,s,c)}function ste(e,t,n,r,i,a){const o=ote(e,t,n,r,i);return i==="center"?Object.assign(Object.assign(Object.assign(Object.assign({},o),{labelDirection:r==="right"?"negative":"positive"}),r==="center"?{labelTransform:"translate(50%,0)"}:null),{tickDirection:r==="right"?"negative":"positive",labelSpacing:r==="center"?0:4,titleSpacing:Xee(a)?10:0,tick:r==="center"?!1:void 0}):o}const lte=e=>{const{direction:t="left",important:n={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:s,size:l,style:c={},title:u,tickCount:f,tickFilter:d,tickMethod:h,transform:p,indexBBox:v}=e,g=ZL(e,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:y,value:m,coordinate:b,theme:x})=>{const{bbox:w}=m,[O]=y,{domain:_,xScale:S}=O.getOptions(),k=ste(O,b,x,t,s,a),E=Object.assign(Object.assign(Object.assign({},k),c),g),M=Jee(o||s,b,e.plane),P=ite(s,a,w,b,S),A=rte(b),L=e5(O,_,f,r,d,h,s,b),N=v?L.map((C,j)=>{const D=v.get(j);return!D||D[0]!==C.label?C:Object.assign(Object.assign({},C),{bbox:D[1]})}):L,T=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:N,crossSize:l,titleText:pv(u),labelOverlap:ete(p,E),grid:nte(E.grid,b,O),gridLength:M,line:!0,indexBBox:v}),E.line?null:{lineOpacity:0}),P),A),n);return T.labelOverlap.find(C=>C.type==="hide")&&(T.crossSize=!1),new j1({className:"axis",style:vv(T)})}},t5=e=>t=>{const{labelFormatter:n,labelFilter:r=()=>!0}=t;return i=>{var a;const{scales:[o]}=i,s=((a=o.getTicks)===null||a===void 0?void 0:a.call(o))||o.getOptions().domain,l=typeof n=="string"?Eo(n):n,c=(f,d,h)=>r(s[d],d,s),u=Object.assign(Object.assign({},t),{labelFormatter:l,labelFilter:c,scale:o});return e(u)(i)}},Mo=t5(lte),n5=t5(ate);Mo.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},n5.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const r5=e=>(...t)=>{const n=Mo(Object.assign({},{crossPadding:50},e))(...t);return QL(n,e),n};r5.props=Object.assign(Object.assign({},Mo.props),{defaultPosition:"bottom"});const i5=e=>(...t)=>{const n=Mo(Object.assign({},{crossPadding:10},e))(...t);return QL(n,e),n};i5.props=Object.assign(Object.assign({},Mo.props),{defaultPosition:"left"});var cte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function ute(e){const t=e%(Math.PI*2);return t===Math.PI/2?{titleTransform:"translate(0, 50%)"}:t>-Math.PI/2&&t<Math.PI/2?{titleTransform:"translate(50%, 0)"}:t>Math.PI/2&&t<Math.PI*3/2?{titleTransform:"translate(-50%, 0)"}:{}}function fte(e,t,n,r){const{radar:i}=e,[a]=r,o=a.getOptions().name,[s,l]=am(n),{axisRadar:c={}}=t;return Object.assign(Object.assign({},c),{grid:o==="position",gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((u,f)=>(l-s)/i.count*f)})}const a5=e=>{const{important:t={}}=e,n=cte(e,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return Mo(Object.assign(Object.assign(Object.assign({},n),ute(e.orientation)),{important:Object.assign(Object.assign({},fte(e,i,a,o)),t)}))(r)}};a5.props=Object.assign(Object.assign({},Mo.props),{defaultPosition:"center"});var dte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function hte(e,t){const n=la(e,"shape"),r=la(e,"color"),i=n?n.clone():null,a=[];for(const[s,l]of t){const c=s.type,f=((r==null?void 0:r.getOptions().domain.length)>0?r==null?void 0:r.getOptions().domain:l.data).map((d,h)=>{var p;return i?i.map(d||"point"):((p=s==null?void 0:s.style)===null||p===void 0?void 0:p.shape)||l.defaultShape||"point"});typeof c=="string"&&a.push([c,f])}if(a.length===0)return["point",["point"]];if(a.length===1||!n)return a[0];const{range:o}=n.getOptions();return a.map(([s,l])=>{let c=0;for(let u=0;u<a.length;u++){const f=o[u%o.length];l[u]===f&&c++}return[c/l.length,[s,l]]}).sort((s,l)=>l[0]-s[0])[0][1]}function pte(e,t){const{scales:n,library:r,markState:i}=t,[a,o]=hte(n,i),{itemMarker:s,itemMarkerSize:l}=e,c=(d,h)=>{var p,v,g;const y=((g=(v=(p=r[`mark.${a}`])===null||p===void 0?void 0:p.props)===null||v===void 0?void 0:v.shape[d])===null||g===void 0?void 0:g.props.defaultMarker)||fu(d.split(".")),m=typeof l=="function"?l(h):l;return()=>$U(y,{color:h.color})(0,0,m)},u=d=>`${o[d]}`;return la(n,"shape")&&!s?(d,h)=>c(u(h),d):typeof s=="function"?(d,h)=>{const p=s(d.id,h);return typeof p=="string"?c(p,d):p}:(d,h)=>c(s||u(h),d)}function vte(e){const t=la(e,"opacity");if(t){const{range:n}=t.getOptions();return(r,i)=>n[i]}}function gte(e,t){const n=la(e,"size");return n instanceof ak?n.map(NaN)*2:t}function yte(e,t){const{labelFormatter:n=d=>`${d}`}=e,{scales:r,theme:i}=t,a=i.legendCategory.itemMarkerSize,o=gte(r,a),s={itemMarker:pte(Object.assign(Object.assign({},e),{itemMarkerSize:o}),t),itemMarkerSize:o,itemMarkerOpacity:vte(r)},l=typeof n=="string"?Eo(n):n,c=la(r,"color"),u=qee(r),f=c?d=>c.map(d):()=>t.theme.color;return Object.assign(Object.assign({},s),{data:u.map(d=>({id:d,label:l(d),color:f(d)}))})}function mte(e,t,n){const{position:r}=t;if(r==="center"){const{bbox:o}=e,{width:s,height:l}=o;return{width:s,height:l}}const{width:i,height:a}=KL(e,t,n);return{width:i,height:a}}const gb=e=>{const{labelFormatter:t,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:l,itemMarker:c}=e,u=dte(e,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=u;return d=>{const{value:h,theme:p}=d,{bbox:v}=h,{width:g,height:y}=mte(h,e,gb),m=XL(a,n),b=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:g,height:y,layout:l!==void 0?"grid":"flex"},l!==void 0&&{gridCol:l}),f!==void 0&&{gridRow:f}),{titleText:pv(s)}),yte(e,d)),{legendCategory:x={}}=p,w=vv(Object.assign({},x,b,u)),O=new Vee({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:w})});return O.appendChild(new dK({className:"legend-category",style:w})),O}};gb.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var bte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function xte(e,t,n){return e.size=t,Uee(n)?e.height=t:e.width=t,e}function wte(e,t,n){const{size:r}=t,i=KL(e,t,n);return xte(i,r,i.orientation)}function Ote(e){return t=>({value:t/e,label:String(t)})}function _te(e,t,n,r,i){const a=t.thresholds,o=Ote(r);return Object.assign(Object.assign({},e),{color:i,data:[n,...a,r].map(o)})}function Ste(e,t,n){const i=[-1/0,...t.thresholds,1/0].map((a,o)=>({value:o,label:a}));return Object.assign(Object.assign({},e),{data:i,color:n,labelFilter:(a,o)=>o>0&&o<i.length-1})}function yb(e){const{domain:t}=e.getOptions(),[n,r]=[t[0],vS(t)];return[n,r]}function kte(e,t){const n=e.getOptions(),r=e.clone();return r.update(Object.assign(Object.assign({},n),{range:[bo(t).toString()]})),r}function Ete(e,t,n,r,i,a){const{length:o}=e,s=n||r,l=i.color?a.legendContinuous.ribbonFill||"black":a.color,c=t||kte(s,l),[u,f]=yb(c),[d,h]=yb([t,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof $y)));return Object.assign(Object.assign({},e),{domain:[d,h],data:c.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,v)=>{const g=(f-u)/(o-1)*v+u,y=c.map(g)||l,m=r?r.map(g):1;return y.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(b,x,w,O)=>`rgba(${x}, ${w}, ${O}, ${m})`)})})}function Mte(e,t,n,r,i,a){const o=la(e,"color"),s=wte(n,r,i);if(o instanceof Ah){const{range:u}=o.getOptions(),[f,d]=yb(o);return o instanceof ck||o instanceof uk?_te(s,o,f,d,u):Ste(s,o,u)}const l=la(e,"size"),c=la(e,"opacity");return Ete(s,o,l,c,t,a)}const Ao=e=>{const{labelFormatter:t,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:l,crossPadding:c,padding:u}=e,f=bte(e,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:v})=>{const{bbox:g}=h,{x:y,y:m,width:b,height:x}=g,w=XL(a,n),{legendContinuous:O={}}=p,_=vv(Object.assign({},O,Object.assign(Object.assign({titleText:pv(s),labelAlign:"value",labelFormatter:typeof t=="string"?k=>Eo(t)(k.label):t},Mte(d,v,h,e,Ao,p)),l),f)),S=new qL({style:Object.assign(Object.assign({x:y,y:m,width:b,height:x},w),{subOptions:_})});return S.appendChild(new SK({className:"legend-continuous",style:_})),S}};Ao.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const o5=e=>(...t)=>Ao(Object.assign({},{block:!0},e))(...t);o5.props=Object.assign(Object.assign({},Ao.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const mb=e=>t=>{const{scales:n}=t,r=la(n,"size");return Ao(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},e))(t)};mb.props=Object.assign(Object.assign({},Ao.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const s5=e=>mb(Object.assign({},{block:!0},e));s5.props=Object.assign(Object.assign({},Ao.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var Ate=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function l5(e,t,n,r){switch(r){case"center":return{x:e+n/2,y:t,textAlign:"middle"};case"right":return{x:e+n,y:t,textAlign:"right"};default:return{x:e,y:t,textAlign:"left"}}}const Pte=Hee({render(e,t){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left",x:s,y:l}=e,c=Ate(e,["width","title","subtitle","spacing","align","x","y"]);t.style.transform=`translate(${s}, ${l})`;const u=le(c,"title"),f=le(c,"subtitle"),h=UL(t,".title","text").attr("className","title").call(ve,Object.assign(Object.assign(Object.assign({},l5(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();UL(t,".sub-title","text").attr("className","sub-title").call(p=>{if(!i)return p.node().remove();p.node().attr(Object.assign(Object.assign(Object.assign({},l5(0,h.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),f))})}}),c5=e=>({value:t,theme:n})=>{const{x:r,y:i,width:a,height:o}=t.bbox;return new Pte({style:Z({},n.title,Object.assign({x:r,y:i,width:a,height:o},e))})};c5.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};function Cte(e,t,n){return Math.min(n,Math.max(t,e))}function Sf(e){return!!e.getBandWidth}function ac(e,t,n){if(!Sf(e))return e.invert(t);const{adjustedRange:r}=e,{domain:i}=e.getOptions(),a=n?-1:0,o=e.getStep(),s=n?r:r.map(u=>u+o),l=Vz(s,t),c=Cte(l+a,0,i.length-1);return i[c]}function Po(e,t,n){if(!t)return e.getOptions().domain;if(!Sf(e)){const l=_i(t);if(!n)return l;const[c]=l,{range:u}=e.getOptions(),[f,d]=u,h=f>d?-1:1,p=e.invert(e.map(c)+h*n);return[c,p]}const{domain:r}=e.getOptions(),i=t[0],a=r.indexOf(i);if(n){const l=a+Math.round(r.length*n);return r.slice(a,l)}const o=t[t.length-1],s=r.indexOf(o);return r.slice(a,s+1)}function gv(e,t,n,r,i,a){const{x:o,y:s}=i,l=(h,p)=>{const[v,g]=a.invert(h);return[ac(o,v,p),ac(s,g,p)]},c=l([e,t],!0),u=l([n,r],!1),f=Po(o,[c[0],u[0]]),d=Po(s,[c[1],u[1]]);return[f,d]}function yv(e,t){const[n,r]=e,i=a=>a.getStep?a.getStep():0;return[t.map(n),t.map(r)+i(t)]}function Tte(e,t,n){const{x:r,y:i}=t,[a,o]=e,s=yv(a,r),l=yv(o,i),c=[s[0],l[0]],u=[s[1],l[1]],[f,d]=n.map(c),[h,p]=n.map(u);return[f,d,h,p]}var Lte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Nte(e,t,n){const{x:r,y:i,width:a,height:o}=e;if(t==="left")return[r+a-n,i];if(t==="right")return[r,i];if(t==="bottom")return[r,i];if(t==="top")return[r,i+o-n]}const kf=e=>{const{orientation:t,labelFormatter:n,size:r,style:i={},position:a}=e,o=Lte(e,["orientation","labelFormatter","size","style","position"]);return s=>{var l;const{scales:[c],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:v}=h,{slider:g={}}=f,y=((l=c.getFormatter)===null||l===void 0?void 0:l.call(c))||(S=>S+""),m=typeof n=="string"?Eo(n):n,b=t==="horizontal",x=kt(d)&&b,{trackSize:w=g.trackSize}=i,[O,_]=Nte(h,a,w);return new rC({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:O,y:_,trackLength:b?p:v,orientation:t,formatter:S=>{const k=m||y,E=x?1-S:S,M=ac(c,E,!0);return k(M)},sparklineData:jte(e,s)},i),o))})}};function Ite(e,t){const[n]=Array.from(e.entries()).filter(([i])=>i.type==="line"||i.type==="area").filter(([i])=>i.slider).map(([i])=>{const{encode:a,slider:o}=i;if(o!=null&&o.x){const s=l=>{const c=a[l];return[l,c?c.value:void 0]};return Object.fromEntries(t.map(s))}});if(!(n!=null&&n.series))return n==null?void 0:n.y;const r=n.series.reduce((i,a,o)=>(i[a]=i[a]||[],i[a].push(n.y[o]),i),{});return Object.values(r)}function jte(e,t){const{markState:n}=t;return er(e.sparklineData)?e.sparklineData:Ite(n,["y","series"])}kf.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const u5=e=>kf(Object.assign(Object.assign({},e),{orientation:"horizontal"}));u5.props=Object.assign(Object.assign({},kf.props),{defaultPosition:"bottom"});const f5=e=>kf(Object.assign(Object.assign({},e),{orientation:"vertical"}));f5.props=Object.assign(Object.assign({},kf.props),{defaultPosition:"left"});var Dte=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ef=e=>{const{orientation:t,labelFormatter:n,style:r}=e,i=Dte(e,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:l}=o,{x:c,y:u,width:f,height:d}=l,{scrollbar:h={}}=s,{ratio:p,range:v}=a.getOptions(),g=t==="horizontal"?f:d,y=g/p,[m,b]=v,x=b>m?0:1;return new QX({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:c,y:u,trackLength:g,value:x}),i),{orientation:t,contentLength:y,viewportLength:g}))})}};Ef.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const d5=e=>Ef(Object.assign(Object.assign({},e),{orientation:"horizontal"}));d5.props=Object.assign(Object.assign({},Ef.props),{defaultPosition:"bottom"});const h5=e=>Ef(Object.assign(Object.assign({},e),{orientation:"vertical"}));h5.props=Object.assign(Object.assign({},Ef.props),{defaultPosition:"left"});const p5=e=>()=>new bn;p5.props={};const bb=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kt(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f}];return s.animate(p,Object.assign(Object.assign({},o),e))}},Fte=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kt(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),e))}},v5=(e,t)=>{const{coordinate:r}=t;return sA.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:ce.NUMBER}),(i,a,o)=>{const[s]=i,l=u=>{const{__data__:f,style:d}=u,{radius:h=0,inset:p=0,fillOpacity:v=1,strokeOpacity:g=1,opacity:y=1}=d,{points:m,y:b,y1:x}=f,w=Ls(r,m,[b,x]),{innerRadius:O,outerRadius:_}=w,S=Dh().cornerRadius(h).padAngle(p*Math.PI/180),k=new Xn({}),E=A=>(k.attr({d:S(A)}),NM(k)),M=[{scaleInYRadius:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:O+1e-4,fillOpacity:v,strokeOpacity:g,opacity:y,offset:.01},{scaleInYRadius:_,fillOpacity:v,strokeOpacity:g,opacity:y}],P=u.animate(M,Object.assign(Object.assign({},o),e));return P.onframe=function(){u.style.d=E(Object.assign(Object.assign({},w),{outerRadius:Number(u.style.scaleInYRadius)}))},P.onfinish=function(){u.style.d=E(Object.assign(Object.assign({},w),{outerRadius:_}))},P},c=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,y]=kt(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],m=[{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{transform:`${d} scale(1, 1)`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v}];return u.animate(m,Object.assign(Object.assign({},o),e))};return st(r)?l(s):c(s)}},Rte=(e,t)=>{const{coordinate:r}=t;return(i,a,o)=>{const[s]=i,{transform:l="",fillOpacity:c=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kt(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],p=[{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.99},{transform:`${l} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),e))}},g5=e=>(t,n,r)=>{const[i]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}];return i.animate(l,Object.assign(Object.assign({},r),e))};g5.props={};const y5=e=>(t,n,r)=>{const[i]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,l=[{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(l,Object.assign(Object.assign({},r),e))};y5.props={};const $te={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},zte={[U.CIRCLE]:["cx","cy","r"],[U.ELLIPSE]:["cx","cy","rx","ry"],[U.RECT]:["x","y","width","height"],[U.IMAGE]:["x","y","width","height"],[U.LINE]:["x1","y1","x2","y2"],[U.POLYLINE]:["points"],[U.POLYGON]:["points"]};function oc(e,t,n=!1){const r={};for(const i of t){const a=e.style[i];a?r[i]=a:n&&(r[i]=$te[i])}return r}const Mf=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function xb(e){const{min:t,max:n}=e.getLocalBounds(),[r,i]=t,[a,o]=n,s=o-i,l=a-r;return[r,i,l,s]}function Bte(e){const[t,n,r,i]=e;return`
86
+ M ${t} ${n}
87
+ L ${t+r} ${n}
88
+ L ${t+r} ${n+i}
89
+ L ${t} ${n+i}
90
+ Z
91
+ `}function Yte(e,t){const[n,r,i,a]=xb(e),o=a/i,s=Math.ceil(Math.sqrt(t/o)),l=Math.ceil(t/s),c=[],u=a/l;let f=0,d=t;for(;d>0;){const h=Math.min(d,s),p=i/h;for(let v=0;v<h;v++){const g=n+v*p,y=r+f*u;c.push(Bte([g,y,p,u]))}d-=h,f+=1}return c}function Wte(e="pack"){return typeof e=="function"?e:Yte}function Gte(e,t,n){let{transform:r}=e.style;const{transform:i}=t.style;m5(t,e);let a=Mf;if(e.nodeName===U.GROUP){const[l,c,u,f]=xb(e),[d,h,p,v]=xb(t),g=l-d,y=c-h,m=u/p,b=f/v;r=`translate(${g}, ${y}) scale(${m}, ${b})`}else a=a.concat(zte[e.nodeName]||[]);const o=[Object.assign({transform:r!=null?r:"none"},oc(e,a,!0)),Object.assign({transform:i!=null?i:"none"},oc(t,a,!0))];return t.animate(o,n)}function m5(e,t){e.__data__=t.__data__,e.className=t.className,e.markType=t.markType,t.parentNode.replaceChild(e,t)}function Hte(e,t){const{nodeName:n}=e;if(n==="path")return e;const r=new Xn({style:Object.assign(Object.assign({},oc(e,Mf)),{d:t})});return m5(r,e),r}function b5(e,t){const n=e.indexOf(t),r=e.lastIndexOf(t);return n===r}function Vte(e){return!b5(e,"m")||!b5(e,"M")}function x5(e){const t=NM(e);if(t&&!Vte(t))return t}function w5(e){const{nodeName:t}=e;if(t==="path"){const n=Ot(e,"attributes");return n.markerEnd||n.markerStart}return!1}function wb(e,t,n,r){const{nodeName:i}=t,{nodeName:a}=n,o=x5(t),s=x5(n),l=i===a&&i!=="path",c=o===void 0||s===void 0,u=w5(t)||w5(n);if(l||c||u)return Gte(t,n,r);const f=Hte(e,o),d=[Object.assign({},oc(t,Mf)),Object.assign({},oc(n,Mf))];if(o!==s){d[0].d=o,d[1].d=s;const h=f.animate(d,r);return h.onfinish=()=>{const p=f.style.d;My(f,n),f.style.d=p,f.style.transform="none"},f.style.transform="none",h}return null}function Ute(e,t,n,r){e.style.visibility="hidden";const i=r(e,t.length);return t.map((a,o)=>{const s=new Xn({style:Object.assign({d:i[o]},oc(e,Mf))});return wb(a,s,a,n)})}function Xte(e,t,n,r){const i=r(t,e.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style,l=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],c=t.animate(l,n);return[...e.map((f,d)=>{const h=new Xn({style:{d:i[d],fill:t.style.fill}});return wb(f,f,h,n)}),c]}const O5=e=>(t,n,r)=>{const i=Wte(e.split),a=Object.assign(Object.assign({},r),e),{length:o}=t,{length:s}=n;if(o===1&&s===1||o>1&&s>1){const[l]=t,[c]=n;return wb(l,l,c,a)}if(o===1&&s>1){const[l]=t;return Ute(l,n,a,i)}if(o>1&&s===1){const[l]=n;return Xte(t,l,a,i)}return null};O5.props={};const _5=(e,t)=>{sA.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:ce.NUMBER});const{coordinate:r}=t;return(i,a,o)=>{const[s]=i;if(!st(r))return bb(e,t)(i,a,o);const{__data__:l,style:c}=s,{radius:u=0,inset:f=0,fillOpacity:d=1,strokeOpacity:h=1,opacity:p=1}=c,{points:v,y:g,y1:y}=l,m=Dh().cornerRadius(u).padAngle(f*Math.PI/180),b=Ls(r,v,[g,y]),{startAngle:x,endAngle:w}=b,O=[{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:d,strokeOpacity:h,opacity:p,offset:.01},{waveInArcAngle:w,fillOpacity:d,strokeOpacity:h,opacity:p}],_=s.animate(O,Object.assign(Object.assign({},o),e));return _.onframe=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:Number(s.style.waveInArcAngle)}))},_.onfinish=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:w}))},_}};_5.props={};const qte=e=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c}];return a.animate(f,Object.assign(Object.assign({},i),e))},Kte=e=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,u="center center",f=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(f,Object.assign(Object.assign({},i),e))},S5=e=>(t,n,r)=>{var i,a;const[o]=t,s=((a=(i=o).getTotalLength)===null||a===void 0?void 0:a.call(i))||0,l=[{lineDash:[0,s]},{lineDash:[s,0]}];return o.animate(l,Object.assign(Object.assign({},r),e))};S5.props={};const k5=(e,t)=>(n,r,i)=>{const[a]=n,{min:[o,s],halfExtents:l}=a.getLocalBounds(),c=l[0]*2,u=l[1]*2,f=new Xn({style:{d:`M${o},${s}L${o+c},${s}L${o+c},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,bb(e,t)([f],r,i)};k5.props={};const E5=(e,t)=>(n,r,i)=>{const[a]=n,{min:[o,s],halfExtents:l}=a.getLocalBounds(),c=l[0]*2,u=l[1]*2,f=new Xn({style:{d:`M${o},${s}L${o+c},${s}L${o+c},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,v5(e,t)([f],r,i)};E5.props={};const M5="main-layer",Ob="label-layer",Na="element",_b="view",Af="plot",A5="component",Sb="label",P5="area";/*!
92
+ * @antv/g-plugin-canvas-path-generator
93
+ * @description A G plugin of path generator with Canvas2D API
94
+ * @version 2.1.10
95
+ * @date 12/20/2024, 6:52:26 AM
96
+ * @author AntVis
97
+ * @docs https://g.antv.antgroup.com/
98
+ */function Zte(e,t){var n=t.cx,r=n===void 0?0:n,i=t.cy,a=i===void 0?0:i,o=t.r;e.arc(r,a,o,0,Math.PI*2,!1)}function Qte(e,t){var n=t.cx,r=n===void 0?0:n,i=t.cy,a=i===void 0?0:i,o=t.rx,s=t.ry;if(e.ellipse)e.ellipse(r,a,o,s,0,0,Math.PI*2,!1);else{var l=o>s?o:s,c=o>s?1:o/s,u=o>s?s/o:1;e.save(),e.scale(c,u),e.arc(r,a,l,0,Math.PI*2)}}function Jte(e,t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.markerStart,s=t.markerEnd,l=t.markerStartOffset,c=t.markerEndOffset,u=0,f=0,d=0,h=0,p=0,v,g;o&&Ue(o)&&l&&(v=i-n,g=a-r,p=Math.atan2(g,v),u=Math.cos(p)*(l||0),f=Math.sin(p)*(l||0)),s&&Ue(s)&&c&&(v=n-i,g=r-a,p=Math.atan2(g,v),d=Math.cos(p)*(c||0),h=Math.sin(p)*(c||0)),e.moveTo(n+u,r+f),e.lineTo(i+d,a+h)}function ene(e,t){var n=t.markerStart,r=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,o=t.d,s=o.absolutePath,l=o.segments,c=0,u=0,f=0,d=0,h=0,p,v;if(n&&Ue(n)&&i){var g=n.parentNode.getStartTangent(),y=Ce(g,2),m=y[0],b=y[1];p=m[0]-b[0],v=m[1]-b[1],h=Math.atan2(v,p),c=Math.cos(h)*(i||0),u=Math.sin(h)*(i||0)}if(r&&Ue(r)&&a){var x=r.parentNode.getEndTangent(),w=Ce(x,2),O=w[0],_=w[1];p=O[0]-_[0],v=O[1]-_[1],h=Math.atan2(v,p),f=Math.cos(h)*(a||0),d=Math.sin(h)*(a||0)}for(var S=0;S<s.length;S++){var k=s[S],E=k[0],M=s[S+1],P=S===0&&(c!==0||u!==0),A=(S===s.length-1||M&&(M[0]==="M"||M[0]==="Z"))&&f!==0&&d!==0,L=P?[c,u]:[0,0],N=Ce(L,2),T=N[0],I=N[1],C=A?[f,d]:[0,0],j=Ce(C,2),D=j[0],F=j[1];switch(E){case"M":e.moveTo(k[1]+T,k[2]+I);break;case"L":e.lineTo(k[1]+D,k[2]+F);break;case"Q":e.quadraticCurveTo(k[1],k[2],k[3]+D,k[4]+F);break;case"C":e.bezierCurveTo(k[1],k[2],k[3],k[4],k[5]+D,k[6]+F);break;case"A":{var R=l[S].arcParams,z=R.cx,H=R.cy,W=R.rx,X=R.ry,V=R.startAngle,q=R.endAngle,ie=R.xRotation,Q=R.sweepFlag;if(e.ellipse)e.ellipse(z,H,W,X,ie,V,q,!!(1-Q));else{var ne=W>X?W:X,ae=W>X?1:W/X,fe=W>X?X/W:1;e.translate(z,H),e.rotate(ie),e.scale(ae,fe),e.arc(0,0,ne,V,q,!!(1-Q)),e.scale(1/ae,1/fe),e.rotate(-ie),e.translate(-z,-H)}A&&e.lineTo(k[6]+f,k[7]+d);break}case"Z":e.closePath();break}}}function tne(e,t){var n=t.markerStart,r=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,o=t.points.points,s=o.length,l=o[0][0],c=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,v=0,g=0,y,m;n&&Ue(n)&&i&&(y=o[1][0]-o[0][0],m=o[1][1]-o[0][1],g=Math.atan2(m,y),d=Math.cos(g)*(i||0),h=Math.sin(g)*(i||0)),r&&Ue(r)&&a&&(y=o[s-1][0]-o[0][0],m=o[s-1][1]-o[0][1],g=Math.atan2(m,y),p=Math.cos(g)*(a||0),v=Math.sin(g)*(a||0)),e.moveTo(l+(d||p),c+(h||v));for(var b=1;b<s-1;b++){var x=o[b];e.lineTo(x[0],x[1])}e.lineTo(u,f)}function nne(e,t){var n=t.markerStart,r=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,o=t.points.points,s=o.length,l=o[0][0],c=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,v=0,g=0,y,m;n&&Ue(n)&&i&&(y=o[1][0]-o[0][0],m=o[1][1]-o[0][1],g=Math.atan2(m,y),d=Math.cos(g)*(i||0),h=Math.sin(g)*(i||0)),r&&Ue(r)&&a&&(y=o[s-2][0]-o[s-1][0],m=o[s-2][1]-o[s-1][1],g=Math.atan2(m,y),p=Math.cos(g)*(a||0),v=Math.sin(g)*(a||0)),e.moveTo(l+d,c+h);for(var b=1;b<s-1;b++){var x=o[b];e.lineTo(x[0],x[1])}e.lineTo(u+p,f+v)}function rne(e,t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.radius,s=t.width,l=t.height,c=s,u=l,f=o&&o.some(function(w){return w!==0});if(!f)e.rect(r,a,c,u);else{var d=s>0?1:-1,h=l>0?1:-1,p=d+h===0,v=o.map(function(w){return wi(w,0,Math.min(Math.abs(c)/2,Math.abs(u)/2))}),g=Ce(v,4),y=g[0],m=g[1],b=g[2],x=g[3];e.moveTo(d*y+r,a),e.lineTo(c-d*m+r,a),m!==0&&e.arc(c-d*m+r,h*m+a,m,-h*Math.PI/2,d>0?0:Math.PI,p),e.lineTo(c+r,u-h*b+a),b!==0&&e.arc(c-d*b+r,u-h*b+a,b,d>0?0:Math.PI,h>0?Math.PI/2:1.5*Math.PI,p),e.lineTo(d*x+r,u+a),x!==0&&e.arc(d*x+r,u-h*x+a,x,h>0?Math.PI/2:-Math.PI/2,d>0?Math.PI:0,p),e.lineTo(r,h*y+a),y!==0&&e.arc(d*y+r,h*y+a,y,d>0?Math.PI:0,h>0?Math.PI*1.5:Math.PI/2,p)}}var ine=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="canvas-path-generator",n}return Ne(t,e),ee(t,[{key:"init",value:function(){var r,i=(r={},de(de(de(de(de(de(de(de(de(de(r,U.CIRCLE,Zte),U.ELLIPSE,Qte),U.RECT,rne),U.LINE,Jte),U.POLYLINE,nne),U.POLYGON,tne),U.PATH,ene),U.TEXT,void 0),U.GROUP,void 0),U.IMAGE,void 0),de(de(de(r,U.HTML,void 0),U.MESH,void 0),U.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(yo);/*!
99
+ * @antv/g-plugin-canvas-picker
100
+ * @description A G plugin for picking in canvas
101
+ * @version 2.1.12
102
+ * @date 12/20/2024, 6:54:25 AM
103
+ * @author AntVis
104
+ * @docs https://g.antv.antgroup.com/
105
+ */var ane=Ye(),one=Ye(),sne=Ye(),lne=it(),C5=function(){function e(){var t=this;J(this,e),this.isHit=function(n,r,i,a){var o=t.context.pointInPathPickerFactory[n.nodeName];if(o){var s=Oi(lne,i),l=zt(one,Wn(sne,r[0],r[1],0),s);if(o(n,new Ln(l[0],l[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(n,r){var i=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),a=t.context.pathGeneratorFactory[n.nodeName];return a&&(i.beginPath(),a(i,n.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return ee(e,[{key:"apply",value:function(n,r){var i,a=this,o=n.renderingService,s=n.renderingContext;this.context=n,this.runtime=r;var l=(i=s.root)===null||i===void 0?void 0:i.ownerDocument;o.hooks.pick.tapPromise(e.tag,function(){var c=go(Tn().mark(function u(f){return Tn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",a.pick(l,f));case 1:case"end":return h.stop()}},u)}));return function(u){return c.apply(this,arguments)}}()),o.hooks.pickSync.tap(e.tag,function(c){return a.pick(l,c)})}},{key:"pick",value:function(n,r){var i=r.topmost,a=r.position,o=a.x,s=a.y,l=Wn(ane,o,s,0),c=n.elementsFromBBox(l[0],l[1],l[0],l[1]),u=[],f=Os(c),d;try{for(f.s();!(d=f.n()).done;){var h=d.value,p=h.getWorldTransform(),v=this.isHit(h,l,p,!1);if(v){var g=GM(h);if(g){var y=g.parsedStyle.clipPath,m=this.isHit(y,l,y.getWorldTransform(),!0);if(m){if(i)return r.picked=[h],r;u.push(h)}}else{if(i)return r.picked=[h],r;u.push(h)}}}}catch(b){f.e(b)}finally{f.f()}return r.picked=u,r}}])}();C5.tag="CanvasPicker";function cne(e,t,n){var r=e.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,l=r.r,c=r.fill,u=r.stroke,f=r.lineWidth,d=f===void 0?1:f,h=r.increasedLineWidthForHitTesting,p=h===void 0?0:h,v=r.pointerEvents,g=v===void 0?"auto":v,y=(d+p)/2,m=Ma(a,s,t.x,t.y),b=Ms(g,c,u),x=Ce(b,2),w=x[0],O=x[1];return w&&O||n?m<=l+y:w?m<=l:O?m>=l-y&&m<=l+y:!1}function mv(e,t,n,r){return e/(n*n)+t/(r*r)}function une(e,t,n){var r=e.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,l=r.rx,c=r.ry,u=r.fill,f=r.stroke,d=r.lineWidth,h=d===void 0?1:d,p=r.increasedLineWidthForHitTesting,v=p===void 0?0:p,g=r.pointerEvents,y=g===void 0?"auto":g,m=t.x,b=t.y,x=Ms(y,u,f),w=Ce(x,2),O=w[0],_=w[1],S=(h+v)/2,k=(m-a)*(m-a),E=(b-s)*(b-s);return O&&_||n?mv(k,E,l+S,c+S)<=1:O?mv(k,E,l,c)<=1:_?mv(k,E,l-S,c-S)>=1&&mv(k,E,l+S,c+S)<=1:!1}function Bs(e,t,n,r,i,a){return i>=e&&i<=e+n&&a>=t&&a<=t+r}function fne(e,t,n,r,i,a,o){var s=i/2;return Bs(e-s,t-s,n,i,a,o)||Bs(e+n-s,t-s,i,r,a,o)||Bs(e+s,t+r-s,n,i,a,o)||Bs(e-s,t+s,i,r,a,o)}function bv(e,t,n,r,i,a,o,s){var l=(Math.atan2(s-t,o-e)+Math.PI*2)%(Math.PI*2),c={x:e+n*Math.cos(l),y:t+n*Math.sin(l)};return Ma(c.x,c.y,o,s)<=a/2}function Co(e,t,n,r,i,a,o){var s=Math.min(e,n),l=Math.max(e,n),c=Math.min(t,r),u=Math.max(t,r),f=i/2;return a>=s-f&&a<=l+f&&o>=c-f&&o<=u+f?hW(e,t,n,r,a,o)<=i/2:!1}function T5(e,t,n,r,i){var a=e.length;if(a<2)return!1;for(var o=0;o<a-1;o++){var s=e[o][0],l=e[o][1],c=e[o+1][0],u=e[o+1][1];if(Co(s,l,c,u,t,n,r))return!0}if(i){var f=e[0],d=e[a-1];if(Co(f[0],f[1],d[0],d[1],t,n,r))return!0}return!1}var dne=1e-6;function kb(e){return Math.abs(e)<dne?0:e<0?-1:1}function hne(e,t,n){return(n[0]-e[0])*(t[1]-e[1])===(t[0]-e[0])*(n[1]-e[1])&&Math.min(e[0],t[0])<=n[0]&&n[0]<=Math.max(e[0],t[0])&&Math.min(e[1],t[1])<=n[1]&&n[1]<=Math.max(e[1],t[1])}function L5(e,t,n){var r=!1,i=e.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o=e[a],s=e[(a+1)%i];if(hne(o,s,[t,n]))return!0;kb(o[1]-n)>0!=kb(s[1]-n)>0&&kb(t-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function N5(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];if(r=L5(a,t,n),r)break}return r}function pne(e,t,n){var r=e.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,l=r.lineWidth,c=l===void 0?1:l,u=r.increasedLineWidthForHitTesting,f=u===void 0?0:u,d=r.pointerEvents,h=d===void 0?"auto":d,p=r.fill,v=r.stroke,g=Ms(h,p,v),y=Ce(g,2),m=y[1];return!m&&!n||!c?!1:Co(i,a,o,s,c+f,t.x,t.y)}function vne(e,t,n,r,i){for(var a=!1,o=t/2,s=0;s<e.length;s++){var l=e[s],c=l.currentPoint,u=l.params,f=l.prePoint,d=l.box;if(!(d&&!Bs(d.x-o,d.y-o,d.width+t,d.height+t,n,r)))switch(l.command){case"L":case"Z":if(a=Co(f[0],f[1],c[0],c[1],t,n,r),a)return!0;break;case"Q":var h=xW(f[0],f[1],u[1],u[2],u[3],u[4],n,r);if(a=h<=t/2,a)return!0;break;case"C":var p=iM(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i);if(a=p<=t/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=iS(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var v=l.cubicParams,g=f,y=0;y<v.length;y+=6){var m=iM(g[0],g[1],v[y],v[y+1],v[y+2],v[y+3],v[y+4],v[y+5],n,r,i);if(g=[v[y+4],v[y+5]],a=m<=t/2,a)return!0}break}}return a}function gne(e,t,n,r,i,a){var o=e.parsedStyle,s=o.lineWidth,l=s===void 0?1:s,c=o.increasedLineWidthForHitTesting,u=c===void 0?0:c,f=o.stroke,d=o.fill,h=o.d,p=o.pointerEvents,v=p===void 0?"auto":p,g=h.segments,y=h.hasArc,m=h.polylines,b=h.polygons,x=Ms(v,(b==null?void 0:b.length)&&d,f),w=Ce(x,2),O=w[0],_=w[1],S=Nm(e),k=!1;return O||n?(y?k=r(e,t):k=N5(b,t.x,t.y)||N5(m,t.x,t.y),k):((_||n)&&(k=vne(g,l+u,t.x,t.y,S)),k)}function yne(e,t,n){var r=e.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=o===void 0?1:o,l=r.increasedLineWidthForHitTesting,c=l===void 0?0:l,u=r.points,f=r.pointerEvents,d=f===void 0?"auto":f,h=Ms(d,a,i),p=Ce(h,2),v=p[0],g=p[1],y=!1;return(g||n)&&(y=T5(u.points,s+c,t.x,t.y,!0)),!y&&(v||n)&&(y=L5(u.points,t.x,t.y)),y}function mne(e,t,n){var r=e.parsedStyle,i=r.lineWidth,a=i===void 0?1:i,o=r.increasedLineWidthForHitTesting,s=o===void 0?0:o,l=r.points,c=r.pointerEvents,u=c===void 0?"auto":c,f=r.fill,d=r.stroke,h=Ms(u,f,d),p=Ce(h,2),v=p[1];return!v&&!n||!a?!1:T5(l.points,a+s,t.x,t.y,!1)}function bne(e,t,n,r,i){var a=e.parsedStyle,o=a.radius,s=a.fill,l=a.stroke,c=a.lineWidth,u=c===void 0?1:c,f=a.increasedLineWidthForHitTesting,d=f===void 0?0:f,h=a.x,p=h===void 0?0:h,v=a.y,g=v===void 0?0:v,y=a.width,m=a.height,b=a.pointerEvents,x=b===void 0?"auto":b,w=Ms(x,s,l),O=Ce(w,2),_=O[0],S=O[1],k=o&&o.some(function(A){return A!==0}),E=u+d;if(k){var P=!1;return(S||n)&&(P=xne(p,g,y,m,o.map(function(A){return wi(A,0,Math.min(Math.abs(y)/2,Math.abs(m)/2))}),E,t.x,t.y)),!P&&(_||n)&&(P=r(e,t)),P}else{var M=E/2;if(_&&S||n)return Bs(p-M,g-M,y+M,m+M,t.x,t.y);if(_)return Bs(p,g,y,m,t.x,t.y);if(S)return fne(p,g,y,m,E,t.x,t.y)}return!1}function xne(e,t,n,r,i,a,o,s){var l=Ce(i,4),c=l[0],u=l[1],f=l[2],d=l[3];return Co(e+c,t,e+n-u,t,a,o,s)||Co(e+n,t+u,e+n,t+r-f,a,o,s)||Co(e+n-f,t+r,e+d,t+r,a,o,s)||Co(e,t+r-d,e,t+c,a,o,s)||bv(e+n-u,t+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||bv(e+n-f,t+r-f,f,0,.5*Math.PI,a,o,s)||bv(e+d,t+r-d,d,.5*Math.PI,Math.PI,a,o,s)||bv(e+c,t+c,c,Math.PI,1.5*Math.PI,a,o,s)}function wne(e,t,n,r,i,a){var o=e.parsedStyle,s=o.pointerEvents,l=s===void 0?"auto":s,c=o.x,u=c===void 0?0:c,f=o.y,d=f===void 0?0:f,h=o.width,p=o.height;if(l==="non-transparent-pixel"){var v=i.config.offscreenCanvas,g=a.offscreenCanvasCreator.getOrCreateCanvas(v),y=a.offscreenCanvasCreator.getOrCreateContext(v,{willReadFrequently:!0});g.width=h,g.height=p,i.defaultStyleRendererFactory[U.IMAGE].render(y,Te(Te({},e.parsedStyle),{},{x:0,y:0}),e,void 0,void 0,void 0);var m=y.getImageData(t.x-u,t.y-d,1,1).data;return m.every(function(b){return b!==0})}return!0}function One(e,t,n,r){var i=e.getGeometryBounds();return t.x>=i.min[0]&&t.y>=i.min[1]&&t.x<=i.max[0]&&t.y<=i.max[1]}var _ne=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="canvas-picker",n}return Ne(t,e),ee(t,[{key:"init",value:function(){var r,i=(r={},de(de(de(de(de(de(de(de(de(de(r,U.CIRCLE,cne),U.ELLIPSE,une),U.RECT,bne),U.LINE,pne),U.POLYLINE,mne),U.POLYGON,yne),U.PATH,gne),U.TEXT,One),U.GROUP,null),U.IMAGE,wne),de(de(r,U.HTML,null),U.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new C5)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(yo);function ca(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Sne=0;function kne(e){return"__private_"+Sne+++"_"+e}/*!
106
+ * @antv/g-plugin-image-loader
107
+ * @description A G plugin for loading image
108
+ * @version 2.1.12
109
+ * @date 12/20/2024, 6:52:51 AM
110
+ * @author AntVis
111
+ * @docs https://g.antv.antgroup.com/
112
+ */var Ene=function(){function e(){J(this,e),this.cacheStore=new Map}return ee(e,[{key:"onRefAdded",value:function(n){}},{key:"has",value:function(n){return this.cacheStore.has(n)}},{key:"put",value:function(n,r,i){return this.cacheStore.has(n)?!1:(this.cacheStore.set(n,{value:r,counter:new Set([i])}),this.onRefAdded(i),!0)}},{key:"get",value:function(n,r){var i=this.cacheStore.get(n);return i?(i.counter.has(r)||(i.counter.add(r),this.onRefAdded(r)),i.value):null}},{key:"update",value:function(n,r,i){var a=this.cacheStore.get(n);return a?(a.value=Te(Te({},a.value),r),a.counter.has(i)||(a.counter.add(i),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(n,r){var i=this.cacheStore.get(n);return i?(i.counter.delete(r),i.counter.size<=0&&this.cacheStore.delete(n),!0):!1}},{key:"releaseRef",value:function(n){var r=this;Array.from(this.cacheStore.keys()).forEach(function(i){r.release(i,n)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),Eb=[],Mb=[],Ab=function(){function e(){J(this,e)}return ee(e,null,[{key:"stop",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.api;e.rafId&&(n.cancelAnimationFrame(e.rafId),e.rafId=null)}},{key:"executeTask",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.api;Eb.length<=0&&Mb.length<=0||(Mb.forEach(function(r){return r()}),Mb=Eb.splice(0,e.TASK_NUM_PER_FRAME),e.rafId=n.requestAnimationFrame(function(){e.executeTask(n)}))}},{key:"sliceImage",value:function(n,r,i,a){for(var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:e.api,l=n.naturalWidth||n.width,c=n.naturalHeight||n.height,u=r-o,f=i-o,d=Math.ceil(l/u),h=Math.ceil(c/f),p={tileSize:[r,i],gridSize:[h,d],tiles:Array(h).fill(null).map(function(){return Array(d).fill(null)})},v=function(m){for(var b=function(O){Eb.push(function(){var _=O*u,S=m*f,k=[Math.min(r,l-_),Math.min(i,c-S)],E=k[0],M=k[1],P=s.createCanvas();P.width=r,P.height=i;var A=P.getContext("2d");A.drawImage(n,_,S,E,M,0,0,E,M),p.tiles[m][O]={x:_,y:S,tileX:O,tileY:m,data:P},a()})},x=0;x<d;x++)b(x)},g=0;g<h;g++)v(g);return e.stop(),e.executeTask(),p}}])}();Ab.TASK_NUM_PER_FRAME=10;var Tr=new Ene;Tr.onRefAdded=function(t){var n=this;t.addEventListener(je.DESTROY,function(){n.releaseRef(t)},{once:!0})};var Pb=function(){function e(t,n){J(this,e),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=n}return ee(e,[{key:"getImageSync",value:function(n,r,i){var a=tr(n)?n:n.src;if(Tr.has(a)){var o=Tr.get(a,r);if(o.img.complete)return i==null||i(o),o}return this.getOrCreateImage(n,r).then(function(s){i==null||i(s)}).catch(function(){}),null}},{key:"getOrCreateImage",value:function(n,r){var i=this,a=tr(n)?n:n.src;if(!tr(n)&&!Tr.has(a)){var o={img:n,size:[n.naturalWidth||n.width,n.naturalHeight||n.height],tileSize:xv(n)};Tr.put(a,o,r)}if(Tr.has(a)){var s=Tr.get(a,r);return s.img.complete?Promise.resolve(s):new Promise(function(l,c){s.img.addEventListener("load",function(){s.size=[s.img.naturalWidth||s.img.width,s.img.naturalHeight||s.img.height],s.tileSize=xv(s.img),l(s)}),s.img.addEventListener("error",function(u){c(u)})})}return new Promise(function(l,c){var u=i.context.config.createImage();if(u){var f={img:u,size:[0,0],tileSize:xv(u)};Tr.put(a,f,r),u.onload=function(){f.size=[u.naturalWidth||u.width,u.naturalHeight||u.height],f.tileSize=xv(f.img),l(f)},u.onerror=function(d){c(d)},u.crossOrigin="Anonymous",u.src=a}})}},{key:"createDownSampledImage",value:function(){var t=go(Tn().mark(function r(i,a){var o,s,l,c,u,f,d,h,p,v,g,y,m,b;return Tn().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.next=2,this.getOrCreateImage(i,a);case 2:if(o=w.sent,typeof o.downSamplingRate=="undefined"){w.next=5;break}return w.abrupt("return",o);case 5:if(s=this.context.config.enableLargeImageOptimization,l=typeof s=="boolean"?{}:s,c=l.maxDownSampledImageSize,u=c===void 0?2048:c,f=l.downSamplingRateThreshold,d=f===void 0?.5:f,h=this.runtime.globalThis.createImageBitmap,p=Ce(o.size,2),v=p[0],g=p[1],y=o.img,m=Math.min((u+u)/(v+g),Math.max(.01,Math.min(d,.5))),b=Te(Te({},o),{},{downSamplingRate:m}),Tr.update(o.img.src,b,a),!h){w.next=25;break}return w.prev=14,w.next=17,h(o.img,{resizeWidth:v*m,resizeHeight:g*m});case 17:y=w.sent,w.next=23;break;case 20:w.prev=20,w.t0=w.catch(14),m=1;case 23:w.next=26;break;case 25:m=1;case 26:return b=Te(Te({},this.getImageSync(i,a)),{},{downSampled:y,downSamplingRate:m}),Tr.update(o.img.src,b,a),w.abrupt("return",b);case 29:case"end":return w.stop()}},r,this,[[14,20]])}));function n(r,i){return t.apply(this,arguments)}return n}()},{key:"createImageTiles",value:function(){var t=go(Tn().mark(function r(i,a,o,s){var l,c,u,f,d;return Tn().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,this.getOrCreateImage(i,s);case 2:return l=p.sent,c=s.ownerDocument.defaultView,u=c.requestAnimationFrame,f=c.cancelAnimationFrame,Ab.api={requestAnimationFrame:u,cancelAnimationFrame:f,createCanvas:function(){return Xm.createCanvas()}},d=Te(Te({},l),Ab.sliceImage(l.img,l.tileSize[0],l.tileSize[0],o)),Tr.update(l.img.src,d,s),p.abrupt("return",d);case 8:case"end":return p.stop()}},r,this)}));function n(r,i,a,o){return t.apply(this,arguments)}return n}()},{key:"releaseImage",value:function(n,r){Tr.release(tr(n)?n:n.src,r)}},{key:"releaseImageRef",value:function(n){Tr.releaseRef(n)}},{key:"getOrCreatePatternSync",value:function(n,r,i,a,o,s,l){var c=this.generatePatternKey(r);if(c&&this.patternCache[c])return this.patternCache[c];var u=r.image,f=r.repetition,d=r.transform,h,p=!1;if(tr(u)){var v=this.getImageSync(u,n,l);h=v==null?void 0:v.img}else a?(h=a,p=!0):h=u;var g=h&&i.createPattern(h,f);if(g){var y;d?y=QM(FM(d),new xt({})):y=to(it()),p&&z_(y,y,[1/o,1/o,1]),g.setTransform({a:y[0],b:y[1],c:y[4],d:y[5],e:y[12]+s[0],f:y[13]+s[1]})}return c&&g&&(this.patternCache[c]=g),g}},{key:"getOrCreateGradient",value:function(n,r){var i=this.generateGradientKey(n),a=n.type,o=n.steps,s=n.min,l=n.width,c=n.height,u=n.angle,f=n.cx,d=n.cy,h=n.size;if(this.gradientCache[i])return this.gradientCache[i];var p=null;if(a===mo.LinearGradient){var v=nG(s,l,c,u),g=v.x1,y=v.y1,m=v.x2,b=v.y2;p=r.createLinearGradient(g,y,m,b)}else if(a===mo.RadialGradient){var x=rG(s,l,c,f,d,h),w=x.x,O=x.y,_=x.r;p=r.createRadialGradient(w,O,0,w,O,_)}return p&&(o.forEach(function(S){var k=S.offset,E=S.color;if(k.unit===ue.kPercentage){var M;(M=p)===null||M===void 0||M.addColorStop(k.value/100,E.toString())}}),this.gradientCache[i]=p),this.gradientCache[i]}},{key:"generateGradientKey",value:function(n){var r=n.type,i=n.min,a=n.width,o=n.height,s=n.steps,l=n.angle,c=n.cx,u=n.cy,f=n.size;return"gradient-".concat(r,"-").concat((l==null?void 0:l.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat((f==null?void 0:f.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(o,"-").concat(s.map(function(d){var h=d.offset,p=d.color;return"".concat(h).concat(p)}).join("-"))}},{key:"generatePatternKey",value:function(n){var r=n.image,i=n.repetition;if(tr(r))return"pattern-".concat(r,"-").concat(i);if(r.nodeName==="rect")return"pattern-".concat(r.entity,"-").concat(i)}}])}();Pb.isSupportTile=!!Xm.createCanvas();function xv(e){if(!e.complete)return[0,0];var t=e.naturalWidth||e.width,n=e.naturalHeight||e.height,r=256;return[256,512].forEach(function(i){var a=Math.ceil(n/i),o=Math.ceil(t/i);a*o<1e3&&(r=i)}),[r,r]}var I5=function(){function e(){J(this,e)}return ee(e,[{key:"apply",value:function(n){var r=n.renderingService,i=n.renderingContext,a=n.imagePool,o=i.root.ownerDocument.defaultView,s=function(f,d,h){var p=f.parsedStyle,v=p.width,g=p.height;v&&!g?f.setAttribute("height",h/d*v):!v&&g&&f.setAttribute("width",d/h*g)},l=function(f){var d=f.target,h=d.nodeName,p=d.attributes;if(h===U.IMAGE){var v=p.src,g=p.keepAspectRatio;a.getImageSync(v,d,function(y){var m=y.img,b=m.width,x=m.height;g&&s(d,b,x),d.renderable.dirty=!0,r.dirtify()})}},c=function(f){var d=f.target,h=f.attrName,p=f.prevValue,v=f.newValue;d.nodeName!==U.IMAGE||h!=="src"||(p!==v&&a.releaseImage(p,d),tr(v)&&a.getOrCreateImage(v,d).then(function(g){var y=g.img,m=y.width,b=y.height;d.attributes.keepAspectRatio&&s(d,m,b),d.renderable.dirty=!0,r.dirtify()}).catch(function(){}))};r.hooks.init.tap(e.tag,function(){o.addEventListener(je.MOUNTED,l),o.addEventListener(je.ATTR_MODIFIED,c)}),r.hooks.destroy.tap(e.tag,function(){o.removeEventListener(je.MOUNTED,l),o.removeEventListener(je.ATTR_MODIFIED,c)})}}])}();I5.tag="LoadImage";var Mne=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="image-loader",n}return Ne(t,e),ee(t,[{key:"init",value:function(r){this.context.imagePool=new Pb(this.context,r),this.addRenderingPlugin(new I5)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(yo);/*!
113
+ * @antv/g-plugin-canvas-renderer
114
+ * @description A G plugin of renderer implementation with Canvas2D API
115
+ * @version 2.2.12
116
+ * @date 12/20/2024, 6:53:36 AM
117
+ * @author AntVis
118
+ * @docs https://g.antv.antgroup.com/
119
+ */var sn=kne("renderState"),j5=function(){function e(t){J(this,e),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,sn,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=it(),this.dprMatrix=it(),this.tmpMat4=it(),this.vec3a=Ye(),this.vec3b=Ye(),this.vec3c=Ye(),this.vec3d=Ye(),this.canvasRendererPluginOptions=t}return ee(e,[{key:"apply",value:function(n,r){var i=this;this.context=n;var a=this.context,o=a.config,s=a.camera,l=a.renderingService,c=a.renderingContext,u=a.rBushRoot,f=a.pathGeneratorFactory,d=o.renderer.getConfig().enableRenderingOptimization;o.renderer.getConfig().enableDirtyCheck=!1,o.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=u,this.pathGeneratorFactory=f;var h=n.contextService,p=c.root.ownerDocument.defaultView,v=function(b){var x=b.target,w=x.rBushNode;w.aabb&&i.removedRBushNodeAABBs.push(w.aabb)},g=function(b){var x=b.target,w=x.rBushNode;w.aabb&&i.removedRBushNodeAABBs.push(w.aabb)};l.hooks.init.tap(e.tag,function(){p.addEventListener(je.UNMOUNTED,v),p.addEventListener(je.CULLED,g);var m=h.getDPR(),b=o.width,x=o.height,w=h.getContext();i.clearRect(w,0,0,b*m,x*m,o.background)}),l.hooks.destroy.tap(e.tag,function(){p.removeEventListener(je.UNMOUNTED,v),p.removeEventListener(je.CULLED,g),i.renderQueue=[],i.removedRBushNodeAABBs=[],ca(i,sn)[sn]={restoreStack:[],prevObject:null,currentContext:null}}),l.hooks.beginFrame.tap(e.tag,function(){var m,b=h.getContext(),x=h.getDPR(),w=o.width,O=o.height,_=i.canvasRendererPluginOptions,S=_.dirtyObjectNumThreshold,k=_.dirtyObjectRatioThreshold,E=l.getStats(),M=E.total,P=E.rendered,A=P/M;i.clearFullScreen=i.clearFullScreenLastFrame||!((m=p.context.renderingPlugins[1])!==null&&m!==void 0&&m.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||P>S&&A>k,b&&(typeof b.resetTransform=="function"?b.resetTransform():b.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(b,0,0,w*x,O*x,o.background))});var y=function(b,x){for(var w=[b];w.length>0;){var O=w.pop();O.isVisible()&&!O.isCulled()&&(d?i.renderDisplayObjectOptimized(O,x,i.context,ca(i,sn)[sn],r):i.renderDisplayObject(O,x,i.context,ca(i,sn)[sn],r));for(var _=O.sortable.sorted||O.childNodes,S=_.length-1;S>=0;S--)w.push(_[S])}};l.hooks.endFrame.tap(e.tag,function(){if(c.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}d=o.renderer.getConfig().enableRenderingOptimization,ca(i,sn)[sn]={restoreStack:[],prevObject:null,currentContext:ca(i,sn)[sn].currentContext},ca(i,sn)[sn].currentContext.clear(),i.clearFullScreenLastFrame=!1;var m=h.getContext(),b=h.getDPR();if(no(i.dprMatrix,[b,b,1]),Yn(i.vpMatrix,i.dprMatrix,s.getOrthoMatrix()),i.clearFullScreen)d?(m.save(),y(c.root,m),m.restore()):y(c.root,m),i.removedRBushNodeAABBs=[];else{var x=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat(vt(i.removedRBushNodeAABBs.map(function(W){var X=W.minX,V=W.minY,q=W.maxX,ie=W.maxY,Q=new rn;return Q.setMinMax([X,V,0],[q,ie,0]),Q}))));if(i.removedRBushNodeAABBs=[],rn.isEmpty(x)){i.renderQueue=[];return}var w=i.convertAABB2Rect(x),O=w.x,_=w.y,S=w.width,k=w.height,E=zt(i.vec3a,[O,_,0],i.vpMatrix),M=zt(i.vec3b,[O+S,_,0],i.vpMatrix),P=zt(i.vec3c,[O,_+k,0],i.vpMatrix),A=zt(i.vec3d,[O+S,_+k,0],i.vpMatrix),L=Math.min(E[0],M[0],A[0],P[0]),N=Math.min(E[1],M[1],A[1],P[1]),T=Math.max(E[0],M[0],A[0],P[0]),I=Math.max(E[1],M[1],A[1],P[1]),C=Math.floor(L),j=Math.floor(N),D=Math.ceil(T-L),F=Math.ceil(I-N);m.save(),i.clearRect(m,C,j,D,F,o.background),m.beginPath(),m.rect(C,j,D,F),m.clip(),m.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var R=o.renderer.getConfig(),z=R.enableDirtyRectangleRenderingDebug;z&&p.dispatchEvent(new dt(Kr.DIRTY_RECTANGLE,{dirtyRect:{x:C,y:j,width:D,height:F}}));var H=i.searchDirtyObjects(x);H.sort(function(W,X){return W.sortable.renderOrder-X.sortable.renderOrder}).forEach(function(W){W&&W.isVisible()&&!W.isCulled()&&i.renderDisplayObject(W,m,i.context,ca(i,sn)[sn],r)}),m.restore(),i.renderQueue.forEach(function(W){i.saveDirtyAABB(W)}),i.renderQueue=[]}ca(i,sn)[sn].restoreStack.forEach(function(){m.restore()}),ca(i,sn)[sn].restoreStack=[]}),l.hooks.render.tap(e.tag,function(m){i.clearFullScreen||i.renderQueue.push(m)})}},{key:"clearRect",value:function(n,r,i,a,o,s){n.clearRect(r,i,a,o),s&&(n.fillStyle=s,n.fillRect(r,i,a,o))}},{key:"renderDisplayObjectOptimized",value:function(n,r,i,a,o){var s=n.nodeName,l=!1,c=!1,u=this.context.styleRendererFactory[s],f=this.pathGeneratorFactory[s],d=n.parsedStyle.clipPath;if(d){l=!a.prevObject||!uy(d.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(r,d),a.prevObject=null);var h=this.pathGeneratorFactory[d.nodeName];h&&(r.save(),c=!0,r.beginPath(),h(r,d.parsedStyle),r.closePath(),r.clip())}if(u){l=!a.prevObject||!uy(n.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(r,n);var p=!a.prevObject;if(!p){var v=a.prevObject.nodeName;s===U.TEXT?p=v!==U.TEXT:s===U.IMAGE?p=v!==U.IMAGE:p=v===U.TEXT||v===U.IMAGE}u.applyStyleToContext(r,n,p,a),a.prevObject=n}f&&(r.beginPath(),f(r,n.parsedStyle),s!==U.LINE&&s!==U.PATH&&s!==U.POLYLINE&&r.closePath()),u&&u.drawToContext(r,n,ca(this,sn)[sn],this,o),c&&r.restore(),n.renderable.dirty=!1}},{key:"renderDisplayObject",value:function(n,r,i,a,o){var s=n.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(n.compareDocumentPosition(l)&Ft.DOCUMENT_POSITION_CONTAINS)&&(r.restore(),a.restoreStack.pop());var c=this.context.styleRendererFactory[s],u=this.pathGeneratorFactory[s],f=n.parsedStyle.clipPath;if(f){this.applyWorldTransform(r,f);var d=this.pathGeneratorFactory[f.nodeName];d&&(r.save(),a.restoreStack.push(n),r.beginPath(),d(r,f.parsedStyle),r.closePath(),r.clip())}c&&(this.applyWorldTransform(r,n),r.save(),this.applyAttributesToContext(r,n)),u&&(r.beginPath(),u(r,n.parsedStyle),s!==U.LINE&&s!==U.PATH&&s!==U.POLYLINE&&r.closePath()),c&&(c.render(r,n.parsedStyle,n,i,this,o),r.restore()),n.renderable.dirty=!1}},{key:"applyAttributesToContext",value:function(n,r){var i=r.parsedStyle,a=i.stroke,o=i.fill,s=i.opacity,l=i.lineDash,c=i.lineDashOffset;l&&n.setLineDash(l),Ze(c)||(n.lineDashOffset=c),Ze(s)||(n.globalAlpha*=s),!Ze(a)&&!Array.isArray(a)&&!a.isNone&&(n.strokeStyle=r.attributes.stroke),!Ze(o)&&!Array.isArray(o)&&!o.isNone&&(n.fillStyle=r.attributes.fill)}},{key:"convertAABB2Rect",value:function(n){var r=n.getMin(),i=n.getMax(),a=Math.floor(r[0]),o=Math.floor(r[1]),s=Math.ceil(i[0]),l=Math.ceil(i[1]),c=s-a,u=l-o;return{x:a,y:o,width:c,height:u}}},{key:"mergeDirtyAABBs",value:function(n){var r=new rn;return n.forEach(function(i){var a=i.getRenderBounds();r.add(a);var o=i.renderable.dirtyRenderBounds;o&&r.add(o)}),r}},{key:"searchDirtyObjects",value:function(n){var r=n.getMin(),i=Ce(r,2),a=i[0],o=i[1],s=n.getMax(),l=Ce(s,2),c=l[0],u=l[1],f=this.rBush.search({minX:a,minY:o,maxX:c,maxY:u});return f.map(function(d){var h=d.displayObject;return h})}},{key:"saveDirtyAABB",value:function(n){var r=n.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new rn);var i=n.getRenderBounds();i&&r.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(n,r,i){i?(bl(this.tmpMat4,r.getLocalTransform()),Yn(this.tmpMat4,i,this.tmpMat4),Yn(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(bl(this.tmpMat4,r.getWorldTransform()),Yn(this.tmpMat4,this.vpMatrix,this.tmpMat4)),n.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var n=new rn,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.forEach(function(o){n.add(o)}),n}}])}();j5.tag="CanvasRenderer";function wv(e,t,n,r,i,a,o){var s,l;if(e.image.nodeName==="rect"){var c=e.image.parsedStyle,u=c.width,f=c.height;l=r.contextService.getDPR();var d=r.config.offscreenCanvas;s=a.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*l,s.height=f*l;var h=a.offscreenCanvasCreator.getOrCreateContext(d),p={restoreStack:[],prevObject:null,currentContext:new Map};e.image.forEach(function(g){i.renderDisplayObject(g,h,r,p,a)}),p.restoreStack.forEach(function(){h.restore()})}var v=o.getOrCreatePatternSync(t,e,n,s,l,t.getGeometryBounds().min,function(){t.renderable.dirty=!0,r.renderingService.dirtify()});return v}function Ov(e,t,n,r){var i;if(e.type===mo.LinearGradient||e.type===mo.RadialGradient){var a=t.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1,l=a&&a.min||[0,0];i=r.getOrCreateGradient(Te(Te({type:e.type},e.value),{},{min:l,width:o,height:s}),n)}return i}var _v=["shadowBlur","shadowOffsetX","shadowOffsetY"],D5=["lineCap","lineJoin","miterLimit"],hn={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},F5={};function Gt(e,t,n,r){var i=r.has(t)?r.get(t):hn[t];return i!==n&&(t==="lineDash"?e.setLineDash(n):e[t]=n,r.set(t,n)),i}var Ane=function(){function e(t){J(this,e),this.imagePool=t}return ee(e,[{key:"applyAttributesToContext",value:function(n,r){}},{key:"render",value:function(n,r,i,a,o,s){}},{key:"applyCommonStyleToContext",value:function(n,r,i,a){var o=i?F5:a.prevObject.parsedStyle,s=r.parsedStyle;(i||s.opacity!==o.opacity)&&Gt(n,"globalAlpha",Ze(s.opacity)?hn.globalAlpha:s.opacity,a.currentContext),(i||s.blend!==o.blend)&&Gt(n,"globalCompositeOperation",Ze(s.blend)?hn.globalCompositeOperation:s.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(n,r,i,a){var o=i?F5:a.prevObject.parsedStyle,s=r.parsedStyle,l=s.lineWidth,c=l===void 0?hn.lineWidth:l,u=s.fill&&!s.fill.isNone,f=s.stroke&&!s.stroke.isNone&&c>0;if(f){if(i||r.attributes.stroke!==a.prevObject.attributes.stroke){var d=!Ze(s.stroke)&&!Array.isArray(s.stroke)&&!s.stroke.isNone?r.attributes.stroke:hn.strokeStyle;Gt(n,"strokeStyle",d,a.currentContext)}(i||s.lineWidth!==o.lineWidth)&&Gt(n,"lineWidth",Ze(s.lineWidth)?hn.lineWidth:s.lineWidth,a.currentContext),(i||s.lineDash!==o.lineDash)&&Gt(n,"lineDash",s.lineDash||hn.lineDash,a.currentContext),(i||s.lineDashOffset!==o.lineDashOffset)&&Gt(n,"lineDashOffset",Ze(s.lineDashOffset)?hn.lineDashOffset:s.lineDashOffset,a.currentContext);for(var h=0;h<D5.length;h++){var p=D5[h];(i||s[p]!==o[p])&&Gt(n,p,Ze(s[p])?hn[p]:s[p],a.currentContext)}}if(u&&(i||r.attributes.fill!==a.prevObject.attributes.fill)){var v=!Ze(s.fill)&&!Array.isArray(s.fill)&&!s.fill.isNone?r.attributes.fill:hn.fillStyle;Gt(n,"fillStyle",v,a.currentContext)}}},{key:"applyStyleToContext",value:function(n,r,i,a){var o=r.nodeName;this.applyCommonStyleToContext(n,r,i,a),o===U.IMAGE||this.applyStrokeFillStyleToContext(n,r,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(n,r,i,a){var o=r.parsedStyle;if(i){Gt(n,"shadowColor",o.shadowColor.toString(),a.currentContext);for(var s=0;s<_v.length;s++){var l=_v[s];Gt(n,l,o[l]||hn[l],a.currentContext)}}o.filter&&o.filter.length&&Gt(n,"filter",r.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(n,r,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(r){Gt(n,"shadowColor",hn.shadowColor,a.currentContext);for(var s=0;s<_v.length;s++){var l=_v[s];Gt(n,l,hn[l],a.currentContext)}}if(i)if(r&&o){var c=n.filter;!Ze(c)&&c.indexOf("drop-shadow")>-1&&Gt(n,"filter",c.replace(/drop-shadow\([^)]*\)/,"").trim()||hn.filter,a.currentContext)}else Gt(n,"filter",hn.filter,a.currentContext)}},{key:"fillToContext",value:function(n,r,i,a,o){var s=this,l=r.parsedStyle,c=l.fill,u=l.fillRule,f=null;if(Array.isArray(c)&&c.length>0)c.forEach(function(h){var p,v=Gt(n,"fillStyle",Ov(h,r,n,s.imagePool),i.currentContext);f=(p=f)!==null&&p!==void 0?p:v,u?n.fill(u):n.fill()});else{if(ks(c)){var d=wv(c,r,n,r.ownerDocument.defaultView.context,a,o,this.imagePool);d&&(n.fillStyle=d,f=!0)}u?n.fill(u):n.fill()}f!==null&&Gt(n,"fillStyle",f,i.currentContext)}},{key:"strokeToContext",value:function(n,r,i,a,o){var s=this,l=r.parsedStyle.stroke,c=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(h){var p,v=Gt(n,"strokeStyle",Ov(h,r,n,s.imagePool),i.currentContext);c=(p=c)!==null&&p!==void 0?p:v,n.stroke()});else{if(ks(l)){var u=wv(l,r,n,r.ownerDocument.defaultView.context,a,o,this.imagePool);if(u){var f,d=Gt(n,"strokeStyle",u,i.currentContext);c=(f=c)!==null&&f!==void 0?f:d}}n.stroke()}c!==null&&Gt(n,"strokeStyle",c,i.currentContext)}},{key:"drawToContext",value:function(n,r,i,a,o){var s,l=r.nodeName,c=r.parsedStyle,u=c.opacity,f=u===void 0?hn.globalAlpha:u,d=c.fillOpacity,h=d===void 0?hn.fillOpacity:d,p=c.strokeOpacity,v=p===void 0?hn.strokeOpacity:p,g=c.lineWidth,y=g===void 0?hn.lineWidth:g,m=c.fill&&!c.fill.isNone,b=c.stroke&&!c.stroke.isNone&&y>0;if(!(!m&&!b)){var x=!Ze(c.shadowColor)&&c.shadowBlur>0,w=c.shadowType==="inner",O=((s=c.fill)===null||s===void 0?void 0:s.alpha)===0,_=!!(c.filter&&c.filter.length),S=x&&b&&(l===U.PATH||l===U.LINE||l===U.POLYLINE||O||w),k=null;if(m){S||this.applyShadowAndFilterStyleToContext(n,r,x,i);var E=f*h;k=Gt(n,"globalAlpha",E,i.currentContext),this.fillToContext(n,r,i,a,o),S||this.clearShadowAndFilterStyleForContext(n,x,_,i)}if(b){var M=!1,P=f*v,A=Gt(n,"globalAlpha",P,i.currentContext);if(k=m?k:A,S&&(this.applyShadowAndFilterStyleToContext(n,r,x,i),M=!0,w)){var L=n.globalCompositeOperation;n.globalCompositeOperation="source-atop",this.strokeToContext(n,r,i,a,o),n.globalCompositeOperation=L,this.clearShadowAndFilterStyleForContext(n,x,_,i,!0)}this.strokeToContext(n,r,i,a,o),M&&this.clearShadowAndFilterStyleForContext(n,x,_,i)}k!==null&&Gt(n,"globalAlpha",k,i.currentContext)}}}])}(),Cb=function(e){function t(){return J(this,t),Le(this,t,arguments)}return Ne(t,e),ee(t,[{key:"render",value:function(r,i,a,o,s,l){var c=i.fill,u=i.fillRule,f=i.opacity,d=f===void 0?1:f,h=i.fillOpacity,p=h===void 0?1:h,v=i.stroke,g=i.strokeOpacity,y=g===void 0?1:g,m=i.lineWidth,b=m===void 0?1:m,x=i.lineCap,w=i.lineJoin,O=i.shadowType,_=i.shadowColor,S=i.shadowBlur,k=i.filter,E=i.miterLimit,M=c&&!c.isNone,P=v&&!v.isNone&&b>0,A=(c==null?void 0:c.alpha)===0,L=!!(k&&k.length),N=!Ze(_)&&S>0,T=a.nodeName,I=O==="inner",C=P&&N&&(T===U.PATH||T===U.LINE||T===U.POLYLINE||A||I);M&&(r.globalAlpha=d*p,C||Sv(a,r,N),R5(r,a,c,u,o,s,l,this.imagePool),C||this.clearShadowAndFilter(r,L,N)),P&&(r.globalAlpha=d*y,r.lineWidth=b,Ze(E)||(r.miterLimit=E),Ze(x)||(r.lineCap=x),Ze(w)||(r.lineJoin=w),C&&(I&&(r.globalCompositeOperation="source-atop"),Sv(a,r,!0),I&&(Tb(r,a,v,o,s,l,this.imagePool),r.globalCompositeOperation=hn.globalCompositeOperation,this.clearShadowAndFilter(r,L,!0))),Tb(r,a,v,o,s,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(r,i,a){if(a&&(r.shadowColor="transparent",r.shadowBlur=0),i){var o=r.filter;!Ze(o)&&o.indexOf("drop-shadow")>-1&&(r.filter=o.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(Ane);function Sv(e,t,n){var r=e.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,l=r.shadowOffsetY;i&&i.length&&(t.filter=e.style.filter),n&&(t.shadowColor=a.toString(),t.shadowBlur=o||0,t.shadowOffsetX=s||0,t.shadowOffsetY=l||0)}function R5(e,t,n,r,i,a,o,s){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(n)?n.forEach(function(c){e.fillStyle=Ov(c,t,e,s),l||(r?e.fill(r):e.fill())}):(ks(n)&&(e.fillStyle=wv(n,t,e,i,a,o,s)),l||(r?e.fill(r):e.fill()))}function Tb(e,t,n,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(n)?n.forEach(function(l){e.strokeStyle=Ov(l,t,e,o),s||e.stroke()}):(ks(n)&&(e.strokeStyle=wv(n,t,e,r,i,a,o)),s||e.stroke())}function Pne(e,t){var n=Ce(e,4),r=n[0],i=n[1],a=n[2],o=n[3],s=Ce(t,4),l=s[0],c=s[1],u=s[2],f=s[3],d=Math.max(r,l),h=Math.max(i,c),p=Math.min(r+a,l+u),v=Math.min(i+o,c+f);return p<=d||v<=h?null:[d,h,p-d,v-h]}function Cne(e,t){var n=zt(Ye(),[e[0],e[1],0],t),r=zt(Ye(),[e[0]+e[2],e[1],0],t),i=zt(Ye(),[e[0],e[1]+e[3],0],t),a=zt(Ye(),[e[0]+e[2],e[1]+e[3],0],t);return[Math.min(n[0],r[0],i[0],a[0]),Math.min(n[1],r[1],i[1],a[1]),Math.max(n[0],r[0],i[0],a[0])-Math.min(n[0],r[0],i[0],a[0]),Math.max(n[1],r[1],i[1],a[1])-Math.min(n[1],r[1],i[1],a[1])]}var Tne=function(e){function t(){return J(this,t),Le(this,t,arguments)}return Ne(t,e),ee(t,[{key:"renderDownSampled",value:function(r,i,a,o){var s=o.src,l=o.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(s,a).then(function(c){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()}).catch(function(){});return}r.drawImage(l.downSampled,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}},{key:"renderTile",value:function(r,i,a,o){var s=o.src,l=o.imageCache,c=o.imageRect,u=o.drawRect,f=l.size,d=r.getTransform(),h=d.a,p=d.b,v=d.c,g=d.d,y=d.e,m=d.f;if(r.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(s,[],function(){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()},a).catch(function(){});return}for(var b=[f[0]/c[2],f[1]/c[3]],x=[l.tileSize[0]/b[0],l.tileSize[1]/b[1]],w=[Math.floor((u[0]-c[0])/x[0]),Math.ceil((u[0]+u[2]-c[0])/x[0])],O=w[0],_=w[1],S=[Math.floor((u[1]-c[1])/x[1]),Math.ceil((u[1]+u[3]-c[1])/x[1])],k=S[0],E=S[1],M=k;M<=E;M++)for(var P=O;P<=_;P++){var A=l.tiles[M][P];if(A){var L=[Math.floor(c[0]+A.tileX*x[0]),Math.floor(c[1]+A.tileY*x[1]),Math.ceil(x[0]),Math.ceil(x[1])];r.drawImage(A.data,L[0],L[1],L[2],L[3])}}r.setTransform(h,p,v,g,y,m)}},{key:"render",value:function(r,i,a){var o=i.x,s=o===void 0?0:o,l=i.y,c=l===void 0?0:l,u=i.width,f=i.height,d=i.src,h=i.shadowColor,p=i.shadowBlur,v=this.imagePool.getImageSync(d,a),g=v==null?void 0:v.img,y=u,m=f;if(g){y||(y=g.width),m||(m=g.height);var b=!Ze(h)&&p>0;Sv(a,r,b);try{var x=a.ownerDocument.defaultView.getContextService().getDomElement(),w=x.width,O=x.height,_=r.getTransform(),S=_.a,k=_.b,E=_.c,M=_.d,P=_.e,A=_.f,L=F_(S,E,0,0,k,M,0,0,0,0,1,0,P,A,0,1),N=Cne([s,c,y,m],L),T=Pne([0,0,w,O],N);if(!T)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){t.renderFull(r,i,a,{image:g,drawRect:[s,c,y,m]});return}var I=N[2]/v.size[0];if(I<(v.downSamplingRate||.5)){this.renderDownSampled(r,i,a,{src:d,imageCache:v,drawRect:[s,c,y,m]});return}if(!Pb.isSupportTile){t.renderFull(r,i,a,{image:g,drawRect:[s,c,y,m]});return}this.renderTile(r,i,a,{src:d,imageCache:v,imageRect:N,drawRect:T})}catch(C){}}}},{key:"drawToContext",value:function(r,i,a,o,s){this.render(r,i.parsedStyle,i)}}],[{key:"renderFull",value:function(r,i,a,o){r.drawImage(o.image,Math.floor(o.drawRect[0]),Math.floor(o.drawRect[1]),Math.ceil(o.drawRect[2]),Math.ceil(o.drawRect[3]))}}])}(Cb),Lne=function(e){function t(){return J(this,t),Le(this,t,arguments)}return Ne(t,e),ee(t,[{key:"render",value:function(r,i,a,o,s,l){a.getBounds();var c=i.lineWidth,u=c===void 0?1:c,f=i.textAlign,d=f===void 0?"start":f,h=i.textBaseline,p=h===void 0?"alphabetic":h,v=i.lineJoin,g=v===void 0?"miter":v,y=i.miterLimit,m=y===void 0?10:y,b=i.letterSpacing,x=b===void 0?0:b,w=i.stroke,O=i.fill,_=i.fillRule,S=i.fillOpacity,k=S===void 0?1:S,E=i.strokeOpacity,M=E===void 0?1:E,P=i.opacity,A=P===void 0?1:P,L=i.metrics,N=i.x,T=N===void 0?0:N,I=i.y,C=I===void 0?0:I,j=i.dx,D=i.dy,F=i.shadowColor,R=i.shadowBlur,z=L.font,H=L.lines,W=L.height,X=L.lineHeight,V=L.lineMetrics;r.font=z,r.lineWidth=u,r.textAlign=d==="middle"?"center":d;var q=p;q==="alphabetic"&&(q="bottom"),r.lineJoin=g,Ze(m)||(r.miterLimit=m);var ie=C;p==="middle"?ie+=-W/2-X/2:p==="bottom"||p==="alphabetic"||p==="ideographic"?ie+=-W:(p==="top"||p==="hanging")&&(ie+=-X);var Q=T+(j||0);ie+=D||0,H.length===1&&(q==="bottom"?(q="middle",ie-=.5*W):q==="top"&&(q="middle",ie+=.5*W)),r.textBaseline=q;var ne=!Ze(F)&&R>0;Sv(a,r,ne);for(var ae=0;ae<H.length;ae++){var fe=u/2+Q;ie+=X,!Ze(w)&&!w.isNone&&u&&this.drawLetterSpacing(r,a,H[ae],V[ae],d,fe,ie,x,O,_,k,w,M,A,!0,o,s,l),Ze(O)||this.drawLetterSpacing(r,a,H[ae],V[ae],d,fe,ie,x,O,_,k,w,M,A,!1,o,s,l)}}},{key:"drawLetterSpacing",value:function(r,i,a,o,s,l,c,u,f,d,h,p,v,g,y,m,b,x){if(u===0){y?this.strokeText(r,i,a,l,c,p,v,m,b,x):this.fillText(r,i,a,l,c,f,d,h,g,m,b,x);return}var w=r.textAlign;r.textAlign="left";var O=l;s==="center"||s==="middle"?O=l-o.width/2:(s==="right"||s==="end")&&(O=l-o.width);for(var _=Array.from(a),S=r.measureText(a).width,k=0,E=0;E<_.length;++E){var M=_[E];y?this.strokeText(r,i,M,O,c,p,v,m,b,x):this.fillText(r,i,M,O,c,f,d,h,g,m,b,x),k=r.measureText(a.substring(E+1)).width,O+=S-k+u,S=k}r.textAlign=w}},{key:"fillText",value:function(r,i,a,o,s,l,c,u,f,d,h,p){R5(r,i,l,c,d,h,p,this.imagePool,!0);var v,g=!Ze(u)&&u!==1;g&&(v=r.globalAlpha,r.globalAlpha=u*f),r.fillText(a,o,s),g&&(r.globalAlpha=v)}},{key:"strokeText",value:function(r,i,a,o,s,l,c,u,f,d){Tb(r,i,l,u,f,d,this.imagePool,!0);var h,p=!Ze(c)&&c!==1;p&&(h=r.globalAlpha,r.globalAlpha=c),r.strokeText(a,o,s),p&&(r.globalAlpha=h)}},{key:"drawToContext",value:function(r,i,a,o,s){this.render(r,i.parsedStyle,i,i.ownerDocument.defaultView.context,o,s)}}])}(Cb),Nne=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),n=Le(this,t),n.name="canvas-renderer",n.options=r,n}return Ne(t,e),ee(t,[{key:"init",value:function(){var r,i=Te({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,o=new Cb(a),s=(r={},de(de(de(de(de(de(de(de(de(de(r,U.CIRCLE,o),U.ELLIPSE,o),U.RECT,o),U.IMAGE,new Tne(a)),U.TEXT,new Lne(a)),U.LINE,o),U.POLYLINE,o),U.POLYGON,o),U.PATH,o),U.GROUP,void 0),de(de(de(r,U.HTML,void 0),U.MESH,void 0),U.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=s,this.context.styleRendererFactory=s,this.addRenderingPlugin(new j5(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(yo);/*!
120
+ * @antv/g-plugin-dom-interaction
121
+ * @description A G plugin
122
+ * @version 2.1.15
123
+ * @date 12/20/2024, 6:52:38 AM
124
+ * @author AntVis
125
+ * @docs https://g.antv.antgroup.com/
126
+ */var $5=function(){function e(){J(this,e)}return ee(e,[{key:"apply",value:function(n,r){var i=this,a=n.renderingService,o=n.renderingContext,s=n.config;this.context=n;var l=o.root.ownerDocument.defaultView,c=function(S){a.hooks.pointerMove.call(S)},u=function(S){a.hooks.pointerUp.call(S)},f=function(S){a.hooks.pointerDown.call(S)},d=function(S){a.hooks.pointerOver.call(S)},h=function(S){a.hooks.pointerOut.call(S)},p=function(S){a.hooks.pointerCancel.call(S)},v=function(S){a.hooks.pointerWheel.call(S)},g=function(S){a.hooks.click.call(S)},y=function(S){r.globalThis.document.addEventListener("pointermove",c,!0),S.addEventListener("pointerdown",f,!0),S.addEventListener("pointerleave",h,!0),S.addEventListener("pointerover",d,!0),r.globalThis.addEventListener("pointerup",u,!0),r.globalThis.addEventListener("pointercancel",p,!0)},m=function(S){S.addEventListener("touchstart",f,!0),S.addEventListener("touchend",u,!0),S.addEventListener("touchmove",c,!0),S.addEventListener("touchcancel",p,!0)},b=function(S){r.globalThis.document.addEventListener("mousemove",c,!0),S.addEventListener("mousedown",f,!0),S.addEventListener("mouseout",h,!0),S.addEventListener("mouseover",d,!0),r.globalThis.addEventListener("mouseup",u,!0)},x=function(S){r.globalThis.document.removeEventListener("pointermove",c,!0),S.removeEventListener("pointerdown",f,!0),S.removeEventListener("pointerleave",h,!0),S.removeEventListener("pointerover",d,!0),r.globalThis.removeEventListener("pointerup",u,!0),r.globalThis.removeEventListener("pointercancel",p,!0)},w=function(S){S.removeEventListener("touchstart",f,!0),S.removeEventListener("touchend",u,!0),S.removeEventListener("touchmove",c,!0),S.removeEventListener("touchcancel",p,!0)},O=function(S){r.globalThis.document.removeEventListener("mousemove",c,!0),S.removeEventListener("mousedown",f,!0),S.removeEventListener("mouseout",h,!0),S.removeEventListener("mouseover",d,!0),r.globalThis.removeEventListener("mouseup",u,!0)};a.hooks.init.tap(e.tag,function(){var _=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(_.style.msContentZooming="none",_.style.msTouchAction="none"):l.supportsPointerEvents&&(_.style.touchAction="none"),l.supportsPointerEvents?y(_):b(_),l.supportsTouchEvents&&m(_),s.useNativeClickEvent&&_.addEventListener("click",g,!0),_.addEventListener("wheel",v,{passive:!0,capture:!0})}),a.hooks.destroy.tap(e.tag,function(){var _=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(_.style.msContentZooming="",_.style.msTouchAction=""):l.supportsPointerEvents&&(_.style.touchAction=""),l.supportsPointerEvents?x(_):O(_),l.supportsTouchEvents&&w(_),s.useNativeClickEvent&&_.removeEventListener("click",g,!0),_.removeEventListener("wheel",v,!0)})}}])}();$5.tag="DOMInteraction";var Ine=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="dom-interaction",n}return Ne(t,e),ee(t,[{key:"init",value:function(){this.addRenderingPlugin(new $5)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(yo);/*!
127
+ * @antv/g-plugin-html-renderer
128
+ * @description A G plugin for rendering HTML
129
+ * @version 2.1.15
130
+ * @date 12/20/2024, 6:52:47 AM
131
+ * @author AntVis
132
+ * @docs https://g.antv.antgroup.com/
133
+ */var jne="g-canvas-camera",z5=function(){function e(){J(this,e),this.displayObjectHTMLElementMap=new WeakMap}return ee(e,[{key:"joinTransformMatrix",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([n[0],n[1],n[4],n[5],n[12]+r[0],n[13]+r[1]].join(","),")")}},{key:"apply",value:function(n,r){var i=this,a=n.camera,o=n.renderingContext,s=n.renderingService;this.context=n;var l=o.root.ownerDocument.defaultView,c=l.context.eventService.nativeHTMLMap,u=function(y,m){m.style.transform=i.joinTransformMatrix(y.getWorldTransform(),y.getOrigin())},f=function(y){var m=y.target;if(m.nodeName===U.HTML){i.$camera||(i.$camera=i.createCamera(a));var b=i.getOrCreateEl(m);i.$camera.appendChild(b),Object.keys(m.attributes).forEach(function(x){i.updateAttribute(x,m)}),u(m,b),c.set(b,m)}},d=function(y){var m=y.target;if(m.nodeName===U.HTML&&i.$camera){var b=i.getOrCreateEl(m);b&&(b.remove(),c.delete(b))}},h=function(y){var m=y.target;if(m.nodeName===U.HTML){var b=y.attrName;i.updateAttribute(b,m)}},p=function(y){var m=y.target,b=m.nodeName===U.FRAGMENT?m.childNodes:[m];b.forEach(function(x){if(x.nodeName===U.HTML){var w=i.getOrCreateEl(x);u(x,w)}})},v=function(){if(i.$camera){var y=i.context.config,m=y.width,b=y.height;i.$camera.parentElement.style.width="".concat(m||0,"px"),i.$camera.parentElement.style.height="".concat(b||0,"px")}};s.hooks.init.tap(e.tag,function(){l.addEventListener(Kr.RESIZE,v),l.addEventListener(je.MOUNTED,f),l.addEventListener(je.UNMOUNTED,d),l.addEventListener(je.ATTR_MODIFIED,h),l.addEventListener(je.BOUNDS_CHANGED,p)}),s.hooks.endFrame.tap(e.tag,function(){i.$camera&&o.renderReasons.has(Vl.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),s.hooks.destroy.tap(e.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(Kr.RESIZE,v),l.removeEventListener(je.MOUNTED,f),l.removeEventListener(je.UNMOUNTED,d),l.removeEventListener(je.ATTR_MODIFIED,h),l.removeEventListener(je.BOUNDS_CHANGED,p)})}},{key:"createCamera",value:function(n){var r=this.context.config,i=r.document,a=r.width,o=r.height,s=this.context.contextService.getDomElement(),l=s.parentNode;if(l){var c=jne,u=l.querySelector("#".concat(c));if(!u){var f=(i||document).createElement("div");f.style.overflow="hidden",f.style.pointerEvents="none",f.style.position="absolute",f.style.left="0px",f.style.top="0px",f.style.width="".concat(a||0,"px"),f.style.height="".concat(o||0,"px");var d=(i||document).createElement("div");u=d,d.id=c,d.style.position="absolute",d.style.left="".concat(s.offsetLeft||0,"px"),d.style.top="".concat(s.offsetTop||0,"px"),d.style.transformOrigin="left top",d.style.transform=this.joinTransformMatrix(n.getOrthoMatrix()),d.style.pointerEvents="none",d.style.width="100%",d.style.height="100%",f.appendChild(d),l.appendChild(f)}return u}return null}},{key:"getOrCreateEl",value:function(n){var r=this.context.config.document,i=this.displayObjectHTMLElementMap.get(n);return i||(i=(r||document).createElement("div"),n.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(n,i),n.id&&(i.id=n.id),n.name&&i.setAttribute("name",n.name),n.className&&(i.className=n.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(n.getWorldTransform(),n.getOrigin())),i}},{key:"updateAttribute",value:function(n,r){var i=this.getOrCreateEl(r);switch(n){case"innerHTML":var a=r.parsedStyle.innerHTML;tr(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(r.parsedStyle.x,"px");break;case"y":i.style.top="".concat(r.parsedStyle.y,"px");break;case"transformOrigin":var o=r.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(o[0].buildCSSText(null,null,"")," ").concat(o[1].buildCSSText(null,null,""));break;case"width":var s=r.parsedStyle.width;i.style.width=_n(s)?"".concat(s,"px"):s.toString();break;case"height":var l=r.parsedStyle.height;i.style.height=_n(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var c=r.parsedStyle.zIndex;i.style["z-index"]="".concat(c);break;case"visibility":var u=r.parsedStyle.visibility;i.style.visibility=u;break;case"pointerEvents":var f=r.parsedStyle.pointerEvents,d=f===void 0?"auto":f;i.style.pointerEvents=d;break;case"opacity":var h=r.parsedStyle.opacity;i.style.opacity="".concat(h);break;case"fill":var p=r.parsedStyle.fill,v="";ip(p)?p.isNone?v="transparent":v=r.getAttribute("fill"):Array.isArray(p)?v=r.getAttribute("fill"):ks(p),i.style.background=v;break;case"stroke":var g=r.parsedStyle.stroke,y="";ip(g)?g.isNone?y="transparent":y=r.getAttribute("stroke"):Array.isArray(g)?y=r.getAttribute("stroke"):ks(g),i.style["border-color"]=y,i.style["border-style"]="solid";break;case"lineWidth":var m=r.parsedStyle.lineWidth;i.style["border-width"]="".concat(m||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var b=r.style.filter;i.style.filter=b;break;default:!Ze(r.style[n])&&r.style[n]!==""&&(i.style[n]=r.style[n])}}}])}();z5.tag="HTMLRendering";var Dne=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="html-renderer",n}return Ne(t,e),ee(t,[{key:"init",value:function(){this.addRenderingPlugin(new z5)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(yo);/*!
134
+ * @antv/g-canvas
135
+ * @description A renderer implemented by Canvas 2D API
136
+ * @version 2.0.33
137
+ * @date 12/20/2024, 6:55:09 AM
138
+ * @author AntVis
139
+ * @docs https://g.antv.antgroup.com/
140
+ */var Fne=function(){function e(t){J(this,e),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return ee(e,[{key:"init",value:function(){var n=this.canvasConfig,r=n.container,i=n.canvas;if(i)this.$canvas=i,r&&i.parentElement!==r&&r.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(r&&(this.$container=tr(r)?document.getElementById(r):r,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(n,r){var i=this.canvasConfig.devicePixelRatio;this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*n,this.$canvas.height=this.dpr*r,vH(this.$canvas,n,r)),this.renderingContext.renderReasons.add(Vl.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(n){this.$container&&this.$container.style&&(this.$container.style.cursor=n)}},{key:"toDataURL",value:function(){var t=go(Tn().mark(function r(){var i,a,o,s=arguments;return Tn().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return i=s.length>0&&s[0]!==void 0?s[0]:{},a=i.type,o=i.encoderOptions,c.abrupt("return",this.context.canvas.toDataURL(a,o));case 3:case"end":return c.stop()}},r,this)}));function n(){return t.apply(this,arguments)}return n}()}])}(),Rne=function(e){function t(){var n;J(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Le(this,t,[].concat(i)),n.name="canvas-context-register",n}return Ne(t,e),ee(t,[{key:"init",value:function(){this.context.ContextService=Fne}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(yo),B5=function(e){function t(n){var r;return J(this,t),r=Le(this,t,[n]),r.registerPlugin(new Rne),r.registerPlugin(new Mne),r.registerPlugin(new ine),r.registerPlugin(new Nne),r.registerPlugin(new Ine),r.registerPlugin(new _ne),r.registerPlugin(new Dne),r}return Ne(t,e),ee(t)}(SW);/*!
141
+ * @antv/g-plugin-dragndrop
142
+ * @description A G plugin for Drag n Drop implemented with PointerEvents
143
+ * @version 2.0.26
144
+ * @date 12/20/2024, 6:52:41 AM
145
+ * @author AntVis
146
+ * @docs https://g.antv.antgroup.com/
147
+ */var Y5=function(){function e(t){J(this,e),this.dragndropPluginOptions=t}return ee(e,[{key:"apply",value:function(n){var r=this,i=n.renderingService,a=n.renderingContext,o=a.root.ownerDocument,s=o.defaultView,l=function(u){var f=u.target,d=f===o,h=d&&r.dragndropPluginOptions.isDocumentDraggable?o:f.closest&&f.closest("[draggable=true]");if(h){var p=!1,v=u.timeStamp,g=[u.clientX,u.clientY],y=null,m=[u.clientX,u.clientY],b=function(){var w=go(Tn().mark(function O(_){var S,k,E,M,P,A;return Tn().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(p){N.next=8;break}if(S=_.timeStamp-v,k=zz([_.clientX,_.clientY],g),!(S<=r.dragndropPluginOptions.dragstartTimeThreshold||k<=r.dragndropPluginOptions.dragstartDistanceThreshold)){N.next=5;break}return N.abrupt("return");case 5:_.type="dragstart",h.dispatchEvent(_),p=!0;case 8:if(_.type="drag",_.dx=_.clientX-m[0],_.dy=_.clientY-m[1],h.dispatchEvent(_),m=[_.clientX,_.clientY],d){N.next=21;break}return E=r.dragndropPluginOptions.overlap==="pointer"?[_.canvasX,_.canvasY]:f.getBounds().center,N.next=17,o.elementsFromPoint(E[0],E[1]);case 17:M=N.sent,P=M[M.indexOf(f)+1],A=(P==null?void 0:P.closest("[droppable=true]"))||(r.dragndropPluginOptions.isDocumentDroppable?o:null),y!==A&&(y&&(_.type="dragleave",_.target=y,y.dispatchEvent(_)),A&&(_.type="dragenter",_.target=A,A.dispatchEvent(_)),y=A,y&&(_.type="dragover",_.target=y,y.dispatchEvent(_)));case 21:case"end":return N.stop()}},O)}));return function(_){return w.apply(this,arguments)}}();s.addEventListener("pointermove",b);var x=function(O){if(p){O.detail={preventClick:!0};var _=O.clone();y&&(_.type="drop",_.target=y,y.dispatchEvent(_)),_.type="dragend",h.dispatchEvent(_),p=!1}s.removeEventListener("pointermove",b)};f.addEventListener("pointerup",x,{once:!0}),f.addEventListener("pointerupoutside",x,{once:!0})}};i.hooks.init.tap(e.tag,function(){s.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(e.tag,function(){s.removeEventListener("pointerdown",l)})}}])}();Y5.tag="Dragndrop";var W5=function(e){function t(){var n,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return J(this,t),n=Le(this,t),n.name="dragndrop",n.options=r,n}return Ne(t,e),ee(t,[{key:"init",value:function(){this.addRenderingPlugin(new Y5(Te({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(r){Object.assign(this.plugins[0].dragndropPluginOptions,r)}}])}(yo),$ne="*",Lb=function(){function e(){this._events={}}return e.prototype.on=function(t,n,r){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:n,once:!!r}),this},e.prototype.once=function(t,n){return this.on(t,n,!0)},e.prototype.emit=function(t){for(var n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[t]||[],o=this._events[$ne]||[],s=function(l){for(var c=l.length,u=0;u<c;u++)if(l[u]){var f=l[u],d=f.callback,h=f.once;h&&(l.splice(u,1),l.length===0&&delete n._events[t],c--,u--),d.apply(n,r)}};s(a),s(o)},e.prototype.off=function(t,n){if(!t)this._events={};else if(!n)delete this._events[t];else{for(var r=this._events[t]||[],i=r.length,a=0;a<i;a++)r[a].callback===n&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[t]}return this},e.prototype.getEvents=function(){return this._events},e}();const nt={BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"},zne=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]];var Bne={}.toString,kv=function(e,t){return Bne.call(e)==="[object "+t+"]"};const G5=function(e){return kv(e,"Function")},H5=function(e){return Array.isArray?Array.isArray(e):kv(e,"Array")},Yne=function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"};function Wne(e,t){if(e){var n;if(H5(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(Yne(e)){for(var a in e)if(e.hasOwnProperty(a)&&(n=t(e[a],a),n===!1))break}}}var Gne=function(e){return typeof e=="object"&&e!==null},V5=function(e){if(!Gne(e)||!kv(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t};const Hne=function(e){return kv(e,"String")};var Vne=Object.values?function(e){return Object.values(e)}:function(e){var t=[];return Wne(e,function(n,r){G5(e)&&r==="prototype"||t.push(n)}),t};const Une=function(e,t){if(!G5(e))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=e.apply(this,r);return o.set(a,s),s};return n.cache=new Map,n};var Xne=5;function U5(e,t,n,r){n=n||0,r=r||Xne;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];a!==null&&V5(a)?(V5(e[i])||(e[i]={}),n<r?U5(e[i],a,n+1,r):e[i]=t[i]):H5(a)?(e[i]=[],e[i]=e[i].concat(a)):a!==void 0&&(e[i]=a)}}var X5=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r+=1)U5(e,t[r]);return e};const Nb=function(e){return e};var Ev;Une(function(e,t){t===void 0&&(t={});var n=t.fontSize,r=t.fontFamily,i=t.fontWeight,a=t.fontStyle,o=t.fontVariant;return Ev||(Ev=document.createElement("canvas").getContext("2d")),Ev.font=[a,o,i,n+"px",r].join(" "),Ev.measureText(Hne(e)?e:"").width},function(e,t){return t===void 0&&(t={}),$z([e],Vne(t)).join("")});function q5(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e?t.reduce(function(r,i){return function(a){return i(r(a))}},e):Nb}function K5(e){return e instanceof Float32Array||e instanceof Array}var Z5=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Q5=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function qne(e){return function(t){for(var n=[],r=0;r<t.length-1;r+=2){var i=[t[r],t[r+1]],a=e(i);n.push.apply(n,Q5([],Z5(a),!1))}return n}}function Kne(e){return function(t){for(var n=[],r=0;r<t.length-1;r+=3){var i=[t[r],t[r+1],t[r+2]],a=e(i);n.push.apply(n,Q5([],Z5(a),!1))}return n}}function J5(e,t,n){for(;e<t;)e+=Math.PI*2;for(;e>n;)e-=Math.PI*2;return e}var Zne=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Qne=function(e,t,n,r,i){var a=Zne(e,2),o=a[0],s=a[1],l=ml();return tz(l,[o,s])},eN=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Jne=function(e,t,n,r,i){var a=new bt({range:[t,t+r]}),o=new bt({range:[n,n+i]});return{transform:function(s){var l=eN(s,2),c=l[0],u=l[1];return[a.map(c),o.map(u)]},untransform:function(s){var l=eN(s,2),c=l[0],u=l[1];return[a.invert(c),o.invert(u)]}}},ere=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},tre=function(e,t,n,r,i){var a=ere(e,1),o=a[0];return o(t,n,r,i)},nre=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},rre=function(e,t,n,r,i){var a=nre(e,1),o=a[0];return o},Ib=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},ire=function(e,t,n,r,i){var a=Ib(e,4),o=a[0],s=a[1],l=a[2],c=a[3],u=new bt({range:[l,c]}),f=new bt({range:[o,s]}),d=i/r,h=d>1?1:d,p=d>1?1/d:1;return{transform:function(v){var g=Ib(v,2),y=g[0],m=g[1],b=f.map(y),x=u.map(m),w=x*Math.cos(b)*h,O=x*Math.sin(b)*p,_=w*.5+.5,S=O*.5+.5;return[_,S]},untransform:function(v){var g=Ib(v,2),y=g[0],m=g[1],b=(y-.5)*2/h,x=(m-.5)*2/p,w=Math.sqrt(Math.pow(b,2)+Math.pow(x,2)),O=Math.atan2(x,b),_=J5(O,o,s),S=f.invert(_),k=u.invert(w);return[S,k]}}},tN=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},are=function(e,t,n,r,i){return{transform:function(a){var o=tN(a,2),s=o[0],l=o[1];return[l,s]},untransform:function(a){var o=tN(a,2),s=o[0],l=o[1];return[l,s]}}},ore=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Mv=function(e,t,n,r,i){var a=ore(e,2),o=a[0],s=a[1],l=ml();return rz(l,[o,s])},jb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Db=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},sre=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Mv.apply(void 0,Db([[-1,-1]],jb(t),!1))},lre=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Mv.apply(void 0,Db([[-1,1]],jb(t),!1))},cre=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return Mv.apply(void 0,Db([[1,-1]],jb(t),!1))},ure=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},fre=function(e,t,n,r,i){var a=ure(e,1),o=a[0],s=ml();return nz(s,o)},Fb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},dre=function(e,t,n,r,i){var a=Fb(e,4),o=a[0],s=a[1],l=a[2],c=a[3],u=(s-0)/(2*Math.PI)+1,f=(c-l)/u,d=f/(Math.PI*2),h=new bt({range:[l,l+f*.99]}),p=new bt({range:[o,s]}),v=i/r,g=v>1?1:v,y=v>1?1/v:1;return{transform:function(m){var b=Fb(m,2),x=b[0],w=b[1],O=p.map(x),_=h.map(w),S=Math.cos(O)*(d*O+_)*g,k=Math.sin(O)*(d*O+_)*y,E=S*.5+.5,M=k*.5+.5;return[E,M]},untransform:function(m){var b=Fb(m,2),x=b[0],w=b[1],O=(x-.5)*2/g,_=(w-.5)*2/y,S=Math.sqrt(Math.pow(O,2)+Math.pow(_,2)),k=Math.atan2(_,O)+Math.floor(S/f)*Math.PI*2,E=J5(k,o,s),M=S-d*E,P=p.invert(E),A=h.invert(M);return[P,A]}}},hre=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},pre=function(e,t,n,r,i){var a=hre(e,4),o=a[0],s=a[1],l=a[2],c=a[3],u=new bt({range:[l,c]});return{transform:function(f){for(var d=[],h=f.length,p=new sk({domain:new Array(h).fill(0).map(function(b,x){return x}),range:[o,s]}),v=0;v<h;v++){var g=f[v],y=p.map(v),m=u.map(g);d.push(y,m)}return d},untransform:function(f){for(var d=[],h=0;h<f.length;h+=2){var p=f[h+1];d.push(u.invert(p))}return d}}},sc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};function nN(e){return 1/Math.tan(e)}var vre=function(e,t,n,r,i){var a=sc(e,1),o=a[0],s=nN(o);return{transform:function(l){var c=sc(l,2),u=c[0],f=c[1],d=u+f*s;return[d,f]},untransform:function(l){var c=sc(l,2),u=c[0],f=c[1],d=u-f*s;return[d,f]}}},gre=function(e,t,n,r,i){var a=sc(e,1),o=a[0],s=nN(o);return{transform:function(l){var c=sc(l,2),u=c[0],f=c[1],d=f+u*s;return[u,d]},untransform:function(l){var c=sc(l,2),u=c[0],f=c[1],d=f-u*s;return[u,d]}}},ii=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a};function Pf(e,t,n,r,i){var a=e<t,o=(a?t-r:i-t)||i-r,s=a?-1:1;return s*o*(n+1)/(n+o/((e-t)*s))+t}function Cf(e,t,n,r,i){var a=e<t,o=(a?t-r:i-t)||i-r,s=a?-1:1;return o/(o*(n+1)/(e-t)-n*s)+t}function Av(e,t,n){if(!n)return e;var r=new bt({range:[0,1],domain:[0,t]});return r.map(e)}var yre=function(e,t,n,r,i){var a=ii(e,3),o=a[0],s=a[1],l=a[2],c=l===void 0?!1:l,u=Av(o,r,c);return{transform:function(f){var d=ii(f,2),h=d[0],p=d[1],v=Pf(h,u,s,0,1);return[v,p]},untransform:function(f){var d=ii(f,2),h=d[0],p=d[1],v=Cf(h,u,s,0,1);return[v,p]}}},mre=function(e,t,n,r,i){var a=ii(e,3),o=a[0],s=a[1],l=a[2],c=l===void 0?!1:l,u=Av(o,i,c);return{transform:function(f){var d=ii(f,2),h=d[0],p=d[1],v=Pf(p,u,s,0,1);return[h,v]},untransform:function(f){var d=ii(f,2),h=d[0],p=d[1],v=Cf(p,u,s,0,1);return[h,v]}}},bre=function(e,t,n,r,i){var a=ii(e,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],f=u===void 0?!1:u,d=Av(o,r,f),h=Av(s,i,f);return{transform:function(p){var v=ii(p,2),g=v[0],y=v[1],m=Pf(g,d,l,0,1),b=Pf(y,h,c,0,1);return[m,b]},untransform:function(p){var v=ii(p,2),g=v[0],y=v[1],m=Cf(g,d,l,0,1),b=Cf(y,h,c,0,1);return[m,b]}}},xre=function(e,t,n,r,i){var a=ii(e,5),o=a[0],s=a[1],l=a[2],c=a[3],u=a[4],f=u===void 0?!1:u,d=new bt({range:[0,r]}),h=new bt({range:[0,i]}),p=f?o:d.map(o),v=f?s:h.map(s);return{transform:function(g){var y=ii(g,2),m=y[0],b=y[1],x=d.map(m)-p,w=h.map(b)-v,O=Math.sqrt(x*x+w*w);if(O>l)return[m,b];var _=Pf(O,0,c,0,l),S=Math.atan2(w,x),k=p+_*Math.cos(S),E=v+_*Math.sin(S);return[d.invert(k),h.invert(E)]},untransform:function(g){var y=ii(g,2),m=y[0],b=y[1],x=d.map(m)-p,w=h.map(b)-v,O=Math.sqrt(x*x+w*w);if(O>l)return[m,b];var _=Cf(O,0,c,0,l),S=Math.atan2(w,x),k=p+_*Math.cos(S),E=v+_*Math.sin(S);return[d.invert(k),h.invert(E)]}}},rN=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},wre=function(e,t,n,r,i,a,o){var s=new bt({range:[t,t+i]}),l=new bt({range:[n,n+a]}),c=new bt({range:[r,r+o]});return{transform:function(u){var f=rN(u,3),d=f[0],h=f[1],p=f[2];return[s.map(d),l.map(h),c.map(p)]},untransform:function(u){var f=rN(u,3),d=f[0],h=f[1],p=f[2];return[s.invert(d),l.invert(h),c.invert(p)]}}},Ore=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},_re=function(e,t,n,r,i,a,o){var s=Ore(e,3),l=s[0],c=s[1],u=s[2];return wa(it(),[l,c,u])},iN=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Sre=function(e,t,n,r,i,a,o){return{transform:function(s){var l=iN(s,3),c=l[0],u=l[1],f=l[2];return[u,c,f]},untransform:function(s){var l=iN(s,3),c=l[0],u=l[1],f=l[2];return[u,c,f]}}},kre=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},Ere=function(e,t,n,r,i,a,o){var s=kre(e,3),l=s[0],c=s[1],u=s[2];return no(it(),[l,c,u])},lc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},cc=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Mre=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Are=function(){function e(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Jne,translate:Qne,custom:tre,matrix:rre,polar:ire,transpose:are,scale:Mv,"shear.x":vre,"shear.y":gre,reflect:sre,"reflect.x":lre,"reflect.y":cre,rotate:fre,helix:dre,parallel:pre,fisheye:bre,"fisheye.x":yre,"fisheye.y":mre,"fisheye.circular":xre},this.update(t)}return e.prototype.update=function(t){this.options=X5({},this.options,t),this.recoordinate()},e.prototype.clone=function(){return new e(this.options)},e.prototype.getOptions=function(){return this.options},e.prototype.clear=function(){this.update({transformations:[]})},e.prototype.getSize=function(){var t=this.options,n=t.width,r=t.height;return[n,r]},e.prototype.getCenter=function(){var t=this.options,n=t.x,r=t.y,i=t.width,a=t.height;return[(n*2+i)/2,(r*2+a)/2]},e.prototype.transform=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.options.transformations;return this.update({transformations:cc(cc([],lc(r),!1),[cc([],lc(t),!1)],!1)}),this},e.prototype.map=function(t){return this.output(t)},e.prototype.invert=function(t){return this.input(t)},e.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},e.prototype.compose=function(t){var n,r;t===void 0&&(t=!1);var i=t?cc([],lc(this.options.transformations),!1).reverse():this.options.transformations,a=t?function(_){return _.untransform}:function(_){return _.transform},o=[],s=[],l=function(_,S){return S===void 0&&(S=!0),s.push(S?qne(_):_)};try{for(var c=Mre(i),u=c.next();!u.done;u=c.next()){var f=lc(u.value),d=f[0],h=f.slice(1),p=this.transformers[d];if(p){var v=this.options,g=v.x,y=v.y,m=v.width,b=v.height,x=p(cc([],lc(h),!1),g,y,m,b);if(K5(x))o.push(x);else{if(o.length){var w=this.createMatrixTransform(o,t);l(w),o.splice(0,o.length)}var O=a(x)||Nb;l(O,d!=="parallel")}}}}catch(_){n={error:_}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o.length){var O=this.createMatrixTransform(o,t);l(O)}return q5.apply(void 0,cc([],lc(s),!1))},e.prototype.createMatrixTransform=function(t,n){var r=ml();return n&&t.reverse(),t.forEach(function(i){return iz(r,r,i)}),n&&J$(r,Z$(r)),function(i){var a=[i[0],i[1],1];return J_(a,a,r),[a[0],a[1]]}},e}(),uc=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},fc=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Pre=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cre=function(){function e(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:wre,translate3D:_re,scale3D:Ere,transpose3D:Sre},this.update(t)}return e.prototype.update=function(t){this.options=X5({},this.options,t),this.recoordinate()},e.prototype.clone=function(){return new e(this.options)},e.prototype.getOptions=function(){return this.options},e.prototype.clear=function(){this.update({transformations:[]})},e.prototype.getSize=function(){var t=this.options,n=t.width,r=t.height,i=t.depth;return[n,r,i]},e.prototype.getCenter=function(){var t=this.options,n=t.x,r=t.y,i=t.z,a=t.width,o=t.height,s=t.depth;return[(n*2+a)/2,(r*2+o)/2,(i*2+s)/2]},e.prototype.transform=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this.options.transformations;return this.update({transformations:fc(fc([],uc(r),!1),[fc([],uc(t),!1)],!1)}),this},e.prototype.map=function(t){return this.output(t)},e.prototype.invert=function(t){return this.input(t)},e.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},e.prototype.compose=function(t){var n,r;t===void 0&&(t=!1);var i=t?fc([],uc(this.options.transformations),!1).reverse():this.options.transformations,a=t?function(k){return k.untransform}:function(k){return k.transform},o=[],s=[],l=function(k,E){return E===void 0&&(E=!0),s.push(E?Kne(k):k)};try{for(var c=Pre(i),u=c.next();!u.done;u=c.next()){var f=uc(u.value),d=f[0],h=f.slice(1),p=this.transformers[d];if(p){var v=this.options,g=v.x,y=v.y,m=v.z,b=v.width,x=v.height,w=v.depth,O=p(fc([],uc(h),!1),g,y,m,b,x,w);if(K5(O))o.push(O);else{if(o.length){var _=this.createMatrixTransform(o,t);l(_),o.splice(0,o.length)}var S=a(O)||Nb;l(S,!0)}}}}catch(k){n={error:k}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}if(o.length){var S=this.createMatrixTransform(o,t);l(S)}return q5.apply(void 0,fc([],uc(s),!1))},e.prototype.createMatrixTransform=function(t,n){var r=it();return n&&t.reverse(),t.forEach(function(i){return fy(r,r,i)}),n&&Oi(r,oy(r)),function(i){var a=[i[0],i[1],i[2],1];return Vi(a,a,r),[a[0],a[1],a[2]]}},e}(),Tre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Tf(e){return(t,...n)=>Z({},e(t,...n),t)}function Ys(e){return(t,...n)=>Z({},t,e(t,...n))}function Lre(e){return e instanceof Date?!1:typeof e=="object"}function Rb(e,t){if(!e)return t;if(Array.isArray(e))return e;if(Lre(e)){const{value:n=t}=e,r=Tre(e,["value"]);return Object.assign(Object.assign({},r),{value:n})}return e}var Nre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const aN=()=>e=>{const{children:t}=e;if(!Array.isArray(t))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=e;return t.map(s=>{var{data:l,x:c,y:u,width:f,height:d}=s,h=Nre(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:Rb(l,o),x:c!=null?c:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};aN.props={};var Ire=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const oN=()=>e=>{const{children:t}=e;if(!Array.isArray(t))return[];const{direction:n="row",ratio:r=t.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]=n==="col"?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((v,g)=>v+g),f=e[s]-i*(t.length-1),d=r.map(v=>f*(v/u)),h=[];let p=e[o]||0;for(let v=0;v<d.length;v+=1){const g=t[v],{data:y}=g,m=Ire(g,["data"]),b=Rb(y,a);h.push(Object.assign({[o]:p,[s]:d[v],[c]:e[c]||0,[l]:e[l],data:b},m)),p+=d[v]+i}return h};oN.props={};var $b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const sN=()=>e=>{const{children:t}=e,n=$b(e,["children"]);if(!Array.isArray(t))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:l=[]}=n,c=$b(n,["data","scale","axis","legend","encode","transform"]),u=t.map(f=>{var{data:d,scale:h={},axis:p={},legend:v={},encode:g={},transform:y=[]}=f,m=$b(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:Rb(d,r),scale:Z({},i,h),encode:Z({},s,g),transform:[...l,...y],axis:p&&a?Z({},a,p):!1,legend:v&&o?Z({},o,v):!1},m)});return[Object.assign(Object.assign({},c),{marks:u,type:"standardView"})]};sN.props={};var jre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const lN=({static:e=!1}={})=>t=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:l,padding:c,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,data:x,coordinate:w,theme:O,component:_,interaction:S,x:k,y:E,z:M,key:P,frame:A,labelTransform:L,parentKey:N,clip:T,viewStyle:I,title:C}=t,j=jre(t,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:k,y:E,z:M,key:P,width:n,height:r,depth:i,padding:c,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:l,theme:O,coordinate:w,component:_,interaction:S,frame:A,labelTransform:L,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,parentKey:N,clip:T,style:I},!e&&{title:C}),{marks:[Object.assign(Object.assign(Object.assign({},j),{key:`${P}-0`,data:x}),e&&{title:C})]})]};lN.props={};class Lf{constructor(t){this.$value=t}static of(t){return new Lf(t)}call(t,...n){return this.$value=t(this.$value,...n),this}value(){return this.$value}}var Dre=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Fre=Tf(e=>{const{encode:t,data:n,scale:r,shareSize:i=!1}=e,{x:a,y:o}=t,s=(l,c)=>{var u;if(l===void 0||!i)return{};const f=_t(n,p=>p[l]),d=((u=r==null?void 0:r[c])===null||u===void 0?void 0:u.domain)||Array.from(f.keys()),h=d.map(p=>f.has(p)?f.get(p).length:1);return{domain:d,flex:h}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:a===void 0?null:{position:"top"}},a===void 0&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:o===void 0?null:{position:"right"}},o===void 0&&{paddingInner:0}),s(o,"y"))}}}),zb=Ys(e=>{const{data:t,scale:n,legend:r}=e,i=[e];let a,o,s;for(;i.length;){const d=i.shift(),{children:h,encode:p={},scale:v={},legend:g={}}=d,{color:y}=p,{color:m}=v,{color:b}=g;y!==void 0&&(a=y),m!==void 0&&(o=m),b!==void 0&&(s=b),Array.isArray(h)&&i.push(...h)}const l=()=>{var d;const h=(d=n==null?void 0:n.color)===null||d===void 0?void 0:d.domain;if(h!==void 0)return[h];if(a===void 0)return[void 0];const p=typeof a=="function"?a:g=>g[a],v=t.map(p);return v.some(g=>typeof g=="number")?[Sa(v)]:[Array.from(new Set(v)),"ordinal"]},c=typeof a=="string"?a:"",[u,f]=l();return Object.assign({encode:{color:{type:"column",value:u!=null?u:[]}},scale:{color:Z({},o,{domain:u,type:f})}},r===void 0&&{legend:{color:Z({title:c},s)}})}),Bb=Tf(()=>({animate:{enterType:"fadeIn"}})),Yb=Ys(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Wb=Ys(()=>({type:"cell"})),cN=Ys(e=>{const{data:t}=e;return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{const{data:r,encode:i}=e,{x:a,y:o}=i,s=a?Array.from(new Set(r.map(u=>u[a]))):[],l=o?Array.from(new Set(r.map(u=>u[o]))):[];return(()=>{if(s.length&&l.length){const u=[];for(const f of s)for(const d of l)u.push({[a]:f,[o]:d});return u}if(s.length)return s.map(u=>({[a]:u}));if(l.length)return l.map(u=>({[o]:u}))})()}}]}}}),uN=Ys((e,t=Rre,n=$re,r=zre,i={})=>{const{data:a,encode:o,children:s,scale:l,x:c=0,y:u=0,shareData:f=!1,key:d}=e,{value:h}=a,{x:p,y:v}=o,{color:g}=l,{domain:y}=g;return{children:(b,x,w)=>{const{x:O,y:_}=x,{paddingLeft:S,paddingTop:k,marginLeft:E,marginTop:M}=w,{domain:P}=O.getOptions(),{domain:A}=_.getOptions(),L=fs(b),N=b.map(t),T=b.map(({x:R,y:z})=>[O.invert(R),_.invert(z)]),C=T.map(([R,z])=>H=>{const{[p]:W,[v]:X}=H;return(p!==void 0?W===R:!0)&&(v!==void 0?X===z:!0)}).map(R=>h.filter(R)),j=f?tt(C,R=>R.length):void 0,D=T.map(([R,z])=>({columnField:p,columnIndex:P.indexOf(R),columnValue:R,columnValuesLength:P.length,rowField:v,rowIndex:A.indexOf(z),rowValue:z,rowValuesLength:A.length})),F=D.map(R=>Array.isArray(s)?s:[s(R)].flat(1));return L.flatMap(R=>{const[z,H,W,X]=N[R],V=D[R],q=C[R];return F[R].map(Q=>{var ne,ae,{scale:fe,key:ge,facet:be=!0,axis:Fe={},legend:xe={}}=Q,Ee=Dre(Q,["scale","key","facet","axis","legend"]);const et=((ne=fe==null?void 0:fe.y)===null||ne===void 0?void 0:ne.guide)||Fe.y,cn=((ae=fe==null?void 0:fe.x)===null||ae===void 0?void 0:ae.guide)||Fe.x,On={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},At=be?q:q.length===0?[]:h,vn={color:{domain:y}},un={x:fN(cn,n)(V,At),y:fN(et,r)(V,At)};return Object.assign(Object.assign({key:`${ge}-${R}`,data:At,margin:0,x:z+S+c+E,y:H+k+u+M,parentKey:d,width:W,height:X,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!At.length,dataDomain:j,scale:Z(On,fe,vn),axis:Z({},Fe,un),legend:!1},Ee),i)})})}}});function Rre(e){const{points:t}=e;return Hy(t)}function Pv(e,t){return t.length?Z({title:!1,tick:null,label:null},e):Z({title:!1,tick:null,label:null,grid:null},e)}function $re(e){return(t,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=t;if(r!==i-1)return Pv(e,n);const s=a!==o-1?!1:void 0,l=n.length?void 0:null;return Z({title:s,grid:l},e)}}function zre(e){return(t,n)=>{const{rowIndex:r,columnIndex:i}=t;if(i!==0)return Pv(e,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return Z({title:a,grid:o},e)}}function fN(e,t){return typeof e=="function"?e:e===null||e===!1?()=>null:t(e)}const dN=()=>e=>[Lf.of(e).call(Wb).call(zb).call(Bb).call(Fre).call(Yb).call(cN).call(uN).value()];dN.props={};var Gb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Bre=Tf(e=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Yre=Ys(e=>{const{data:t,children:n,x:r=0,y:i=0,key:a}=e;return{children:(s,l,c)=>{const{x:u,y:f}=l,{paddingLeft:d,paddingTop:h,marginLeft:p,marginTop:v}=c,{domain:g}=u.getOptions(),{domain:y}=f.getOptions(),m=fs(s),b=s.map(({points:_})=>Hy(_)),x=s.map(({x:_,y:S})=>[u.invert(_),f.invert(S)]),w=x.map(([_,S])=>({columnField:_,columnIndex:g.indexOf(_),columnValue:_,columnValuesLength:g.length,rowField:S,rowIndex:y.indexOf(S),rowValue:S,rowValuesLength:y.length})),O=w.map(_=>Array.isArray(n)?n:[n(_)].flat(1));return m.flatMap(_=>{const[S,k,E,M]=b[_],[P,A]=x[_],L=w[_];return O[_].map(T=>{var I,C;const{scale:j,key:D,encode:F,axis:R,interaction:z}=T,H=Gb(T,["scale","key","encode","axis","interaction"]),W=(I=j==null?void 0:j.y)===null||I===void 0?void 0:I.guide,X=(C=j==null?void 0:j.x)===null||C===void 0?void 0:C.guide,V={x:{facet:!1},y:{facet:!1}},q={x:Gre(X)(L,t),y:Hre(W)(L,t)},ie={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:t,parentKey:a,key:`${D}-${_}`,x:S+d+r+p,y:k+h+i+v,width:E,height:M,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Z(V,j),axis:Z(ie,R,q),legend:!1,encode:Z({},F,{x:P,y:A}),interaction:Z({},z,{legendFilter:!1})},H)})})}}}),Wre=Ys(e=>{const{encode:t}=e,n=Gb(e,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=t,o=Gb(t,["position","x","y"]),s=[];for(const l of[i].flat(1))for(const c of[a].flat(1))s.push({$x:l,$y:c});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},[i].flat(1).length===1&&{x:{paddingInner:0}}),[a].flat(1).length===1&&{y:{paddingInner:0}})})});function Gre(e){return typeof e=="function"?e:e===null?()=>null:(t,n)=>{const{rowIndex:r,rowValuesLength:i}=t;if(r!==i-1)return Pv(e,n)}}function Hre(e){return typeof e=="function"?e:e===null?()=>null:(t,n)=>{const{columnIndex:r}=t;if(r!==0)return Pv(e,n)}}const Vre=()=>e=>[Lf.of(e).call(Wb).call(zb).call(Yre).call(Wre).call(Bb).call(Yb).call(Bre).value()];var Ure=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Xre=Tf(e=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),qre=Tf(e=>({coordinate:{type:"polar"}})),Kre=e=>{const{encode:t}=e,n=Ure(e,["encode"]),{position:r}=t;return Object.assign(Object.assign({},n),{encode:{x:r}})};function hN(e){return t=>null}function Zre(e){const{points:t}=e,[n,r,i,a]=t,o=jt(n,a),s=Yt(n,a),l=Yt(r,i),c=Tk(s,l),u=1/Math.sin(c/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=Pl(s)+c/2,y=f*u,m=h+y*Math.sin(g),b=p-y*Math.cos(g);return[m-d/2,b-d/2,d,d]}const Qre=()=>e=>[Lf.of(e).call(Wb).call(Kre).call(zb).call(qre).call(cN).call(uN,Zre,hN,hN,{frame:!1}).call(Bb).call(Yb).call(Xre).value()];function Jre(e,t,n){const i=n,a=[0,i],o=[-i+1,1];if(e==="normal")return a;if(e==="reverse")return o;if(e==="alternate")return t%2===0?a:o;if(e==="reverse-alternate")return t%2===0?o:a}function eie(e,t,n){const r=[e];for(;r.length;){const i=r.pop();i.animate=Z({enter:{duration:t},update:{duration:t,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:t}},i.animate||{});const{children:a}=i;Array.isArray(a)&&r.push(...a)}return e}const pN=()=>e=>{const{children:t=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=e,o=t.length;if(!Array.isArray(t)||o===0)return[];const{key:s}=t[0],l=t.map(c=>Object.assign(Object.assign({},c),{key:s})).map(c=>eie(c,n,a));return function*(){let c=0,u;for(;r==="infinite"||c<r;){const[f,d]=Jre(i,c,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield l[p]),u=p}c++}}};pN.props={};var tie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const vN=()=>e=>{const{type:t,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:l}=e,c=tie(e,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},c),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:l}]})]};vN.props={};var Se=1e-6,gN=1e-12,Ge=Math.PI,Zt=Ge/2,yN=Ge/4,Lr=Ge*2,qn=180/Ge,Ht=Ge/180,Je=Math.abs,dc=Math.atan,Ia=Math.atan2,Be=Math.cos,Cv=Math.ceil,mN=Math.exp,Tv=Math.log,Hb=Math.pow,Ie=Math.sin,ai=Math.sign||function(e){return e>0?1:e<0?-1:0},yr=Math.sqrt,Vb=Math.tan;function bN(e){return e>1?0:e<-1?Ge:Math.acos(e)}function oi(e){return e>1?Zt:e<-1?-Zt:Math.asin(e)}function si(){}function Lv(e,t){e&&wN.hasOwnProperty(e.type)&&wN[e.type](e,t)}var xN={Feature:function(e,t){Lv(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Lv(n[r].geometry,t)}},wN={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Ub(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Ub(n[r],t,0)},Polygon:function(e,t){ON(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)ON(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Lv(n[r],t)}};function Ub(e,t,n){var r=-1,i=e.length-n,a;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function ON(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Ub(e[n],t,1);t.polygonEnd()}function hc(e,t){e&&xN.hasOwnProperty(e.type)?xN[e.type](e,t):Lv(e,t)}function Xb(e){return[Ia(e[1],e[0]),oi(e[2])]}function pc(e){var t=e[0],n=e[1],r=Be(n);return[r*Be(t),r*Ie(t),Ie(n)]}function Nv(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Iv(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function qb(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function jv(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Kb(e){var t=yr(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Zb(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Qb(e,t){return Je(e)>Ge&&(e-=Math.round(e/Lr)*Lr),[e,t]}Qb.invert=Qb;function _N(e,t,n){return(e%=Lr)?t||n?Zb(kN(e),EN(t,n)):kN(e):t||n?EN(t,n):Qb}function SN(e){return function(t,n){return t+=e,Je(t)>Ge&&(t-=Math.round(t/Lr)*Lr),[t,n]}}function kN(e){var t=SN(e);return t.invert=SN(-e),t}function EN(e,t){var n=Be(e),r=Ie(e),i=Be(t),a=Ie(t);function o(s,l){var c=Be(l),u=Be(s)*c,f=Ie(s)*c,d=Ie(l),h=d*n+u*r;return[Ia(f*i-h*a,u*n-d*r),oi(h*i+f*a)]}return o.invert=function(s,l){var c=Be(l),u=Be(s)*c,f=Ie(s)*c,d=Ie(l),h=d*i-f*a;return[Ia(f*i+d*a,u*n+h*r),oi(h*n-u*r)]},o}function nie(e){e=_N(e[0]*Ht,e[1]*Ht,e.length>2?e[2]*Ht:0);function t(n){return n=e(n[0]*Ht,n[1]*Ht),n[0]*=qn,n[1]*=qn,n}return t.invert=function(n){return n=e.invert(n[0]*Ht,n[1]*Ht),n[0]*=qn,n[1]*=qn,n},t}function rie(e,t,n,r,i,a){if(n){var o=Be(t),s=Ie(t),l=r*n;i==null?(i=t+r*Lr,a=t-l/2):(i=MN(o,i),a=MN(o,a),(r>0?i<a:i>a)&&(i+=r*Lr));for(var c,u=i;r>0?u>a:u<a;u-=l)c=Xb([o,-s*Be(u),-s*Ie(u)]),e.point(c[0],c[1])}}function MN(e,t){t=pc(t),t[0]-=e,Kb(t);var n=bN(-t[1]);return((-t[2]<0?-n:n)+Lr-Se)%Lr}function AN(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:si,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Dv(e,t){return Je(e[0]-t[0])<Se&&Je(e[1]-t[1])<Se}function Fv(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function PN(e,t,n,r,i){var a=[],o=[],s,l;if(e.forEach(function(p){if(!((v=p.length-1)<=0)){var v,g=p[0],y=p[v],m;if(Dv(g,y)){if(!g[2]&&!y[2]){for(i.lineStart(),s=0;s<v;++s)i.point((g=p[s])[0],g[1]);i.lineEnd();return}y[0]+=2*Se}a.push(m=new Fv(g,p,null,!0)),o.push(m.o=new Fv(g,null,m,!1)),a.push(m=new Fv(y,p,null,!1)),o.push(m.o=new Fv(y,null,m,!0))}}),!!a.length){for(o.sort(t),CN(a),CN(o),s=0,l=o.length;s<l;++s)o[s].e=n=!n;for(var c=a[0],u,f;;){for(var d=c,h=!0;d.v;)if((d=d.n)===c)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,l=u.length;s<l;++s)i.point((f=u[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);i.lineEnd()}}}function CN(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function Jb(e){return Je(e[0])<=Ge?e[0]:ai(e[0])*((Je(e[0])+Ge)%Lr-Ge)}function iie(e,t){var n=Jb(t),r=t[1],i=Ie(r),a=[Ie(n),-Be(n),0],o=0,s=0,l=new cs;i===1?r=Zt+Se:i===-1&&(r=-Zt-Se);for(var c=0,u=e.length;c<u;++c)if(d=(f=e[c]).length)for(var f,d,h=f[d-1],p=Jb(h),v=h[1]/2+yN,g=Ie(v),y=Be(v),m=0;m<d;++m,p=x,g=O,y=_,h=b){var b=f[m],x=Jb(b),w=b[1]/2+yN,O=Ie(w),_=Be(w),S=x-p,k=S>=0?1:-1,E=k*S,M=E>Ge,P=g*O;if(l.add(Ia(P*k*Ie(E),y*_+P*Be(E))),o+=M?S+k*Lr:S,M^p>=n^x>=n){var A=Iv(pc(h),pc(b));Kb(A);var L=Iv(a,A);Kb(L);var N=(M^S>=0?-1:1)*oi(L[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=M^S>=0?1:-1)}}return(o<-Se||o<Se&&l<-gN)^s&1}function TN(e,t,n,r){return function(i){var a=t(i),o=AN(),s=t(o),l=!1,c,u,f,d={point:h,lineStart:v,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=m,d.lineEnd=b,u=[],c=[]},polygonEnd:function(){d.point=h,d.lineStart=v,d.lineEnd=g,u=fS(u);var x=iie(c,r);u.length?(l||(i.polygonStart(),l=!0),PN(u,oie,x,n,i)):x&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(x,w){e(x,w)&&i.point(x,w)}function p(x,w){a.point(x,w)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function y(x,w){f.push([x,w]),s.point(x,w)}function m(){s.lineStart(),f=[]}function b(){y(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),w=o.result(),O,_=w.length,S,k,E;if(f.pop(),c.push(f),f=null,!!_){if(x&1){if(k=w[0],(S=k.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),O=0;O<S;++O)i.point((E=k[O])[0],E[1]);i.lineEnd()}return}_>1&&x&2&&w.push(w.pop().concat(w.shift())),u.push(w.filter(aie))}}return d}}function aie(e){return e.length>1}function oie(e,t){return((e=e.x)[0]<0?e[1]-Zt-Se:Zt-e[1])-((t=t.x)[0]<0?t[1]-Zt-Se:Zt-t[1])}const LN=TN(function(){return!0},sie,cie,[-Ge,-Zt]);function sie(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,o){var s=a>0?Ge:-Ge,l=Je(a-t);Je(l-Ge)<Se?(e.point(t,n=(n+o)/2>0?Zt:-Zt),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),e.point(a,n),i=0):r!==s&&l>=Ge&&(Je(t-r)<Se&&(t-=r*Se),Je(a-s)<Se&&(a-=s*Se),n=lie(t,n,a,o),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(s,n),i=0),e.point(t=a,n=o),r=s},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function lie(e,t,n,r){var i,a,o=Ie(e-n);return Je(o)>Se?dc((Ie(t)*(a=Be(r))*Ie(n)-Ie(r)*(i=Be(t))*Ie(e))/(i*a*o)):(t+r)/2}function cie(e,t,n,r){var i;if(e==null)i=n*Zt,r.point(-Ge,i),r.point(0,i),r.point(Ge,i),r.point(Ge,0),r.point(Ge,-i),r.point(0,-i),r.point(-Ge,-i),r.point(-Ge,0),r.point(-Ge,i);else if(Je(e[0]-t[0])>Se){var a=e[0]<t[0]?Ge:-Ge;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(t[0],t[1])}function uie(e){var t=Be(e),n=2*Ht,r=t>0,i=Je(t)>Se;function a(u,f,d,h){rie(h,e,n,d,u,f)}function o(u,f){return Be(u)*Be(f)>t}function s(u){var f,d,h,p,v;return{lineStart:function(){p=h=!1,v=1},point:function(g,y){var m=[g,y],b,x=o(g,y),w=r?x?0:c(g,y):x?c(g+(g<0?Ge:-Ge),y):0;if(!f&&(p=h=x)&&u.lineStart(),x!==h&&(b=l(f,m),(!b||Dv(f,b)||Dv(m,b))&&(m[2]=1)),x!==h)v=0,x?(u.lineStart(),b=l(m,f),u.point(b[0],b[1])):(b=l(f,m),u.point(b[0],b[1],2),u.lineEnd()),f=b;else if(i&&f&&r^x){var O;!(w&d)&&(O=l(m,f,!0))&&(v=0,r?(u.lineStart(),u.point(O[0][0],O[0][1]),u.point(O[1][0],O[1][1]),u.lineEnd()):(u.point(O[1][0],O[1][1]),u.lineEnd(),u.lineStart(),u.point(O[0][0],O[0][1],3)))}x&&(!f||!Dv(f,m))&&u.point(m[0],m[1]),f=m,h=x,d=w},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function l(u,f,d){var h=pc(u),p=pc(f),v=[1,0,0],g=Iv(h,p),y=Nv(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var x=t*y/b,w=-t*m/b,O=Iv(v,g),_=jv(v,x),S=jv(g,w);qb(_,S);var k=O,E=Nv(_,k),M=Nv(k,k),P=E*E-M*(Nv(_,_)-1);if(!(P<0)){var A=yr(P),L=jv(k,(-E-A)/M);if(qb(L,_),L=Xb(L),!d)return L;var N=u[0],T=f[0],I=u[1],C=f[1],j;T<N&&(j=N,N=T,T=j);var D=T-N,F=Je(D-Ge)<Se,R=F||D<Se;if(!F&&C<I&&(j=I,I=C,C=j),R?F?I+C>0^L[1]<(Je(L[0]-N)<Se?I:C):I<=L[1]&&L[1]<=C:D>Ge^(N<=L[0]&&L[0]<=T)){var z=jv(k,(-E+A)/M);return qb(z,_),[L,Xb(z)]}}}function c(u,f){var d=r?e:Ge-e,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return TN(o,s,a,r?[0,-e]:[-Ge,e-Ge])}function fie(e,t,n,r,i,a){var o=e[0],s=e[1],l=t[0],c=t[1],u=0,f=1,d=l-o,h=c-s,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(e[0]=o+u*d,e[1]=s+u*h),f<1&&(t[0]=o+f*d,t[1]=s+f*h),!0}}}}}var Nf=1e9,Rv=-Nf;function NN(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function a(c,u,f,d){var h=0,p=0;if(c==null||(h=o(c,f))!==(p=o(u,f))||l(c,u)<0^f>0)do d.point(h===0||h===3?e:n,h>1?r:t);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function o(c,u){return Je(c[0]-e)<Se?u>0?0:3:Je(c[0]-n)<Se?u>0?2:1:Je(c[1]-t)<Se?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var f=o(c,1),d=o(u,1);return f!==d?f-d:f===0?u[1]-c[1]:f===1?c[0]-u[0]:f===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,f=AN(),d,h,p,v,g,y,m,b,x,w,O,_={point:S,lineStart:P,lineEnd:A,polygonStart:E,polygonEnd:M};function S(N,T){i(N,T)&&u.point(N,T)}function k(){for(var N=0,T=0,I=h.length;T<I;++T)for(var C=h[T],j=1,D=C.length,F=C[0],R,z,H=F[0],W=F[1];j<D;++j)R=H,z=W,F=C[j],H=F[0],W=F[1],z<=r?W>r&&(H-R)*(r-z)>(W-z)*(e-R)&&++N:W<=r&&(H-R)*(r-z)<(W-z)*(e-R)&&--N;return N}function E(){u=f,d=[],h=[],O=!0}function M(){var N=k(),T=O&&N,I=(d=fS(d)).length;(T||I)&&(c.polygonStart(),T&&(c.lineStart(),a(null,null,1,c),c.lineEnd()),I&&PN(d,s,N,a,c),c.polygonEnd()),u=c,d=h=p=null}function P(){_.point=L,h&&h.push(p=[]),w=!0,x=!1,m=b=NaN}function A(){d&&(L(v,g),y&&x&&f.rejoin(),d.push(f.result())),_.point=S,x&&u.lineEnd()}function L(N,T){var I=i(N,T);if(h&&p.push([N,T]),w)v=N,g=T,y=I,w=!1,I&&(u.lineStart(),u.point(N,T));else if(I&&x)u.point(N,T);else{var C=[m=Math.max(Rv,Math.min(Nf,m)),b=Math.max(Rv,Math.min(Nf,b))],j=[N=Math.max(Rv,Math.min(Nf,N)),T=Math.max(Rv,Math.min(Nf,T))];fie(C,j,e,t,n,r)?(x||(u.lineStart(),u.point(C[0],C[1])),u.point(j[0],j[1]),I||u.lineEnd(),O=!1):I&&(u.lineStart(),u.point(N,T),O=!1)}m=N,b=T,x=I}return _}}function IN(e,t,n){var r=_l(e,t-Se,n).concat(t);return function(i){return r.map(function(a){return[i,a]})}}function jN(e,t,n){var r=_l(e,t-Se,n).concat(t);return function(i){return r.map(function(a){return[a,i]})}}function die(){var e,t,n,r,i,a,o,s,l=10,c=l,u=90,f=360,d,h,p,v,g=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return _l(Cv(r/u)*u,n,u).map(p).concat(_l(Cv(s/f)*f,o,f).map(v)).concat(_l(Cv(t/l)*l,e,l).filter(function(b){return Je(b%u)>Se}).map(d)).concat(_l(Cv(a/c)*c,i,c).filter(function(b){return Je(b%f)>Se}).map(h))}return y.lines=function(){return m().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(v(o).slice(1),p(n).reverse().slice(1),v(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(r=+b[0][0],n=+b[1][0],s=+b[0][1],o=+b[1][1],r>n&&(b=r,r=n,n=b),s>o&&(b=s,s=o,o=b),y.precision(g)):[[r,s],[n,o]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],a=+b[0][1],i=+b[1][1],t>e&&(b=t,t=e,e=b),a>i&&(b=a,a=i,i=b),y.precision(g)):[[t,a],[e,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],f=+b[1],y):[u,f]},y.stepMinor=function(b){return arguments.length?(l=+b[0],c=+b[1],y):[l,c]},y.precision=function(b){return arguments.length?(g=+b,d=IN(a,i,90),h=jN(t,e,g),p=IN(s,o,90),v=jN(r,n,g),y):g},y.extentMajor([[-180,-90+Se],[180,90-Se]]).extentMinor([[-180,-80-Se],[180,80+Se]])}function hie(){return die()()}const If=e=>e;var ex=new cs,tx=new cs,DN,FN,nx,rx,ja={point:si,lineStart:si,lineEnd:si,polygonStart:function(){ja.lineStart=pie,ja.lineEnd=gie},polygonEnd:function(){ja.lineStart=ja.lineEnd=ja.point=si,ex.add(Je(tx)),tx=new cs},result:function(){var e=ex/2;return ex=new cs,e}};function pie(){ja.point=vie}function vie(e,t){ja.point=RN,DN=nx=e,FN=rx=t}function RN(e,t){tx.add(rx*e-nx*t),nx=e,rx=t}function gie(){RN(DN,FN)}var vc=1/0,$v=vc,jf=-vc,zv=jf,Bv={point:yie,lineStart:si,lineEnd:si,polygonStart:si,polygonEnd:si,result:function(){var e=[[vc,$v],[jf,zv]];return jf=zv=-($v=vc=1/0),e}};function yie(e,t){e<vc&&(vc=e),e>jf&&(jf=e),t<$v&&($v=t),t>zv&&(zv=t)}var ix=0,ax=0,Df=0,Yv=0,Wv=0,gc=0,ox=0,sx=0,Ff=0,$N,zN,ua,fa,li={point:Ws,lineStart:BN,lineEnd:YN,polygonStart:function(){li.lineStart=xie,li.lineEnd=wie},polygonEnd:function(){li.point=Ws,li.lineStart=BN,li.lineEnd=YN},result:function(){var e=Ff?[ox/Ff,sx/Ff]:gc?[Yv/gc,Wv/gc]:Df?[ix/Df,ax/Df]:[NaN,NaN];return ix=ax=Df=Yv=Wv=gc=ox=sx=Ff=0,e}};function Ws(e,t){ix+=e,ax+=t,++Df}function BN(){li.point=mie}function mie(e,t){li.point=bie,Ws(ua=e,fa=t)}function bie(e,t){var n=e-ua,r=t-fa,i=yr(n*n+r*r);Yv+=i*(ua+e)/2,Wv+=i*(fa+t)/2,gc+=i,Ws(ua=e,fa=t)}function YN(){li.point=Ws}function xie(){li.point=Oie}function wie(){WN($N,zN)}function Oie(e,t){li.point=WN,Ws($N=ua=e,zN=fa=t)}function WN(e,t){var n=e-ua,r=t-fa,i=yr(n*n+r*r);Yv+=i*(ua+e)/2,Wv+=i*(fa+t)/2,gc+=i,i=fa*e-ua*t,ox+=i*(ua+e),sx+=i*(fa+t),Ff+=i*3,Ws(ua=e,fa=t)}function GN(e){this._context=e}GN.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Lr);break}}},result:si};var lx=new cs,cx,HN,VN,Rf,$f,zf={point:si,lineStart:function(){zf.point=_ie},lineEnd:function(){cx&&UN(HN,VN),zf.point=si},polygonStart:function(){cx=!0},polygonEnd:function(){cx=null},result:function(){var e=+lx;return lx=new cs,e}};function _ie(e,t){zf.point=UN,HN=Rf=e,VN=$f=t}function UN(e,t){Rf-=e,$f-=t,lx.add(yr(Rf*Rf+$f*$f)),Rf=e,$f=t}let XN,Gv,qN,KN;class ZN{constructor(t){this._append=t==null?QN:Sie(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==qN||this._append!==Gv){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,qN=r,Gv=this._append,KN=this._,this._=i}this._+=KN;break}}}result(){const t=this._;return this._="",t.length?t:null}}function QN(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Sie(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return QN;if(t!==XN){const n=Pn(10,t);XN=t,Gv=function(i){let a=1;this._+=i[0];for(const o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}return Gv}function JN(e,t){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),hc(s,i(a))),a.result()}return o.area=function(s){return hc(s,i(ja)),ja.result()},o.measure=function(s){return hc(s,i(zf)),zf.result()},o.bounds=function(s){return hc(s,i(Bv)),Bv.result()},o.centroid=function(s){return hc(s,i(li)),li.result()},o.projection=function(s){return arguments.length?(i=s==null?(e=null,If):(e=s).stream,o):e},o.context=function(s){return arguments.length?(a=s==null?(t=null,new ZN(n)):new GN(t=s),typeof r!="function"&&a.pointRadius(r),o):t},o.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(a.pointRadius(+s),+s),o):r},o.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const l=Math.floor(s);if(!(l>=0))throw new RangeError(`invalid digits: ${s}`);n=l}return t===null&&(a=new ZN(n)),o},o.projection(e).digits(n).context(t)}function Hv(e){return function(t){var n=new ux;for(var r in e)n[r]=e[r];return n.stream=t,n}}function ux(){}ux.prototype={constructor:ux,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fx(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),hc(n,e.stream(Bv)),t(Bv.result()),r!=null&&e.clipExtent(r),e}function Vv(e,t,n){return fx(e,function(r){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],o=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),s=+t[0][0]+(i-o*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(a-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([s,l])},n)}function dx(e,t,n){return Vv(e,[[0,0],t],n)}function hx(e,t,n){return fx(e,function(r){var i=+t,a=i/(r[1][0]-r[0][0]),o=(i-a*(r[1][0]+r[0][0]))/2,s=-a*r[0][1];e.scale(150*a).translate([o,s])},n)}function px(e,t,n){return fx(e,function(r){var i=+t,a=i/(r[1][1]-r[0][1]),o=-a*r[0][0],s=(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},n)}var eI=16,kie=Be(30*Ht);function tI(e,t){return+t?Mie(e,t):Eie(e)}function Eie(e){return Hv({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Mie(e,t){function n(r,i,a,o,s,l,c,u,f,d,h,p,v,g){var y=c-r,m=u-i,b=y*y+m*m;if(b>4*t&&v--){var x=o+d,w=s+h,O=l+p,_=yr(x*x+w*w+O*O),S=oi(O/=_),k=Je(Je(O)-1)<Se||Je(a-f)<Se?(a+f)/2:Ia(w,x),E=e(k,S),M=E[0],P=E[1],A=M-r,L=P-i,N=m*A-y*L;(N*N/b>t||Je((y*A+m*L)/b-.5)>.3||o*d+s*h+l*p<kie)&&(n(r,i,a,o,s,l,M,P,k,x/=_,w/=_,O,v,g),g.point(M,P),n(M,P,k,x,w,O,c,u,f,d,h,p,v,g))}}return function(r){var i,a,o,s,l,c,u,f,d,h,p,v,g={point:y,lineStart:m,lineEnd:x,polygonStart:function(){r.polygonStart(),g.lineStart=w},polygonEnd:function(){r.polygonEnd(),g.lineStart=m}};function y(S,k){S=e(S,k),r.point(S[0],S[1])}function m(){f=NaN,g.point=b,r.lineStart()}function b(S,k){var E=pc([S,k]),M=e(S,k);n(f,d,u,h,p,v,f=M[0],d=M[1],u=S,h=E[0],p=E[1],v=E[2],eI,r),r.point(f,d)}function x(){g.point=y,r.lineEnd()}function w(){m(),g.point=O,g.lineEnd=_}function O(S,k){b(i=S,k),a=f,o=d,s=h,l=p,c=v,g.point=b}function _(){n(f,d,u,h,p,v,a,o,i,s,l,c,eI,r),g.lineEnd=x,x()}return g}}var Aie=Hv({point:function(e,t){this.stream.point(e*Ht,t*Ht)}});function Pie(e){return Hv({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function Cie(e,t,n,r,i){function a(o,s){return o*=r,s*=i,[t+e*o,n-e*s]}return a.invert=function(o,s){return[(o-t)/e*r,(n-s)/e*i]},a}function nI(e,t,n,r,i,a){if(!a)return Cie(e,t,n,r,i);var o=Be(a),s=Ie(a),l=o*e,c=s*e,u=o/e,f=s/e,d=(s*n-o*t)/e,h=(s*t+o*n)/e;function p(v,g){return v*=r,g*=i,[l*v-c*g+t,n-c*v-l*g]}return p.invert=function(v,g){return[r*(u*v-f*g+d),i*(h-f*v-u*g)]},p}function da(e){return vx(function(){return e})()}function vx(e){var t,n=150,r=480,i=250,a=0,o=0,s=0,l=0,c=0,u,f=0,d=1,h=1,p=null,v=LN,g=null,y,m,b,x=If,w=.5,O,_,S,k,E;function M(N){return S(N[0]*Ht,N[1]*Ht)}function P(N){return N=S.invert(N[0],N[1]),N&&[N[0]*qn,N[1]*qn]}M.stream=function(N){return k&&E===N?k:k=Aie(Pie(u)(v(O(x(E=N)))))},M.preclip=function(N){return arguments.length?(v=N,p=void 0,L()):v},M.postclip=function(N){return arguments.length?(x=N,g=y=m=b=null,L()):x},M.clipAngle=function(N){return arguments.length?(v=+N?uie(p=N*Ht):(p=null,LN),L()):p*qn},M.clipExtent=function(N){return arguments.length?(x=N==null?(g=y=m=b=null,If):NN(g=+N[0][0],y=+N[0][1],m=+N[1][0],b=+N[1][1]),L()):g==null?null:[[g,y],[m,b]]},M.scale=function(N){return arguments.length?(n=+N,A()):n},M.translate=function(N){return arguments.length?(r=+N[0],i=+N[1],A()):[r,i]},M.center=function(N){return arguments.length?(a=N[0]%360*Ht,o=N[1]%360*Ht,A()):[a*qn,o*qn]},M.rotate=function(N){return arguments.length?(s=N[0]%360*Ht,l=N[1]%360*Ht,c=N.length>2?N[2]%360*Ht:0,A()):[s*qn,l*qn,c*qn]},M.angle=function(N){return arguments.length?(f=N%360*Ht,A()):f*qn},M.reflectX=function(N){return arguments.length?(d=N?-1:1,A()):d<0},M.reflectY=function(N){return arguments.length?(h=N?-1:1,A()):h<0},M.precision=function(N){return arguments.length?(O=tI(_,w=N*N),L()):yr(w)},M.fitExtent=function(N,T){return Vv(M,N,T)},M.fitSize=function(N,T){return dx(M,N,T)},M.fitWidth=function(N,T){return hx(M,N,T)},M.fitHeight=function(N,T){return px(M,N,T)};function A(){var N=nI(n,0,0,d,h,f).apply(null,t(a,o)),T=nI(n,r-N[0],i-N[1],d,h,f);return u=_N(s,l,c),_=Zb(t,T),S=Zb(u,_),O=tI(_,w),L()}function L(){return k=E=null,M}return function(){return t=e.apply(this,arguments),M.invert=t.invert&&P,A()}}function gx(e){var t=0,n=Ge/3,r=vx(e),i=r(t,n);return i.parallels=function(a){return arguments.length?r(t=a[0]*Ht,n=a[1]*Ht):[t*qn,n*qn]},i}function Tie(e){var t=Be(e);function n(r,i){return[r*t,Ie(i)/t]}return n.invert=function(r,i){return[r/t,oi(i*t)]},n}function rI(e,t){var n=Ie(e),r=(n+Ie(t))/2;if(Je(r)<Se)return Tie(e);var i=1+n*(2*r-n),a=yr(i)/r;function o(s,l){var c=yr(i-2*r*Ie(l))/r;return[c*Ie(s*=r),a-c*Be(s)]}return o.invert=function(s,l){var c=a-l,u=Ia(s,Je(c))*ai(c);return c*r<0&&(u-=Ge*ai(s)*ai(c)),[u/r,oi((i-(s*s+c*c)*r*r)/(2*r))]},o}function Uv(){return gx(rI).scale(155.424).center([0,33.6442])}function iI(){return Uv().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Lie(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}function Nie(){var e,t,n=iI(),r,i=Uv().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=Uv().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(d,h){l=[d,h]}};function u(d){var h=d[0],p=d[1];return l=null,r.point(h,p),l||(a.point(h,p),l)||(s.point(h,p),l)}u.invert=function(d){var h=n.scale(),p=n.translate(),v=(d[0]-p[0])/h,g=(d[1]-p[1])/h;return(g>=.12&&g<.234&&v>=-.425&&v<-.214?i:g>=.166&&g<.234&&v>=-.214&&v<-.115?o:n).invert(d)},u.stream=function(d){return e&&t===d?e:e=Lie([n.stream(t=d),i.stream(d),o.stream(d)])},u.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),o.precision(d),f()):n.precision()},u.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),o.scale(d),u.translate(n.translate())):n.scale()},u.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],v=+d[1];return r=n.translate(d).clipExtent([[p-.455*h,v-.238*h],[p+.455*h,v+.238*h]]).stream(c),a=i.translate([p-.307*h,v+.201*h]).clipExtent([[p-.425*h+Se,v+.12*h+Se],[p-.214*h-Se,v+.234*h-Se]]).stream(c),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+Se,v+.166*h+Se],[p-.115*h-Se,v+.234*h-Se]]).stream(c),f()},u.fitExtent=function(d,h){return Vv(u,d,h)},u.fitSize=function(d,h){return dx(u,d,h)},u.fitWidth=function(d,h){return hx(u,d,h)},u.fitHeight=function(d,h){return px(u,d,h)};function f(){return e=t=null,u}return u.scale(1070)}function aI(e){return function(t,n){var r=Be(t),i=Be(n),a=e(r*i);return a===1/0?[2,0]:[a*i*Ie(t),a*Ie(n)]}}function Bf(e){return function(t,n){var r=yr(t*t+n*n),i=e(r),a=Ie(i),o=Be(i);return[Ia(t*a,r*o),oi(r&&n*a/r)]}}var yx=aI(function(e){return yr(2/(1+e))});yx.invert=Bf(function(e){return 2*oi(e/2)});function Iie(){return da(yx).scale(124.75).clipAngle(180-.001)}var mx=aI(function(e){return(e=bN(e))&&e/Ie(e)});mx.invert=Bf(function(e){return e});function jie(){return da(mx).scale(79.4188).clipAngle(180-.001)}function Yf(e,t){return[e,Tv(Vb((Zt+t)/2))]}Yf.invert=function(e,t){return[e,2*dc(mN(t))-Zt]};function Die(){return oI(Yf).scale(961/Lr)}function oI(e){var t=da(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,o=null,s,l,c;t.scale=function(f){return arguments.length?(r(f),u()):r()},t.translate=function(f){return arguments.length?(i(f),u()):i()},t.center=function(f){return arguments.length?(n(f),u()):n()},t.clipExtent=function(f){return arguments.length?(f==null?o=s=l=c=null:(o=+f[0][0],s=+f[0][1],l=+f[1][0],c=+f[1][1]),u()):o==null?null:[[o,s],[l,c]]};function u(){var f=Ge*r(),d=t(nie(t.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===Yf?[[Math.max(d[0]-f,o),s],[Math.min(d[0]+f,l),c]]:[[o,Math.max(d[1]-f,s)],[l,Math.min(d[1]+f,c)]])}return u()}function Xv(e){return Vb((Zt+e)/2)}function sI(e,t){var n=Be(e),r=e===t?Ie(e):Tv(n/Be(t))/Tv(Xv(t)/Xv(e)),i=n*Hb(Xv(e),r)/r;if(!r)return Yf;function a(o,s){i>0?s<-Zt+Se&&(s=-Zt+Se):s>Zt-Se&&(s=Zt-Se);var l=i/Hb(Xv(s),r);return[l*Ie(r*o),i-l*Be(r*o)]}return a.invert=function(o,s){var l=i-s,c=ai(r)*yr(o*o+l*l),u=Ia(o,Je(l))*ai(l);return l*r<0&&(u-=Ge*ai(o)*ai(l)),[u/r,2*dc(Hb(i/c,1/r))-Zt]},a}function Fie(){return gx(sI).scale(109.5).parallels([30,30])}function Wf(e,t){return[e,t]}Wf.invert=Wf;function Rie(){return da(Wf).scale(152.63)}function lI(e,t){var n=Be(e),r=e===t?Ie(e):(n-Be(t))/(t-e),i=n/r+e;if(Je(r)<Se)return Wf;function a(o,s){var l=i-s,c=r*o;return[l*Ie(c),i-l*Be(c)]}return a.invert=function(o,s){var l=i-s,c=Ia(o,Je(l))*ai(l);return l*r<0&&(c-=Ge*ai(o)*ai(l)),[c/r,i-ai(r)*yr(o*o+l*l)]},a}function $ie(){return gx(lI).scale(131.154).center([0,13.9389])}var Gf=1.340264,Hf=-.081106,Vf=893e-6,Uf=.003796,qv=yr(3)/2,zie=12;function bx(e,t){var n=oi(qv*Ie(t)),r=n*n,i=r*r*r;return[e*Be(n)/(qv*(Gf+3*Hf*r+i*(7*Vf+9*Uf*r))),n*(Gf+Hf*r+i*(Vf+Uf*r))]}bx.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,a=0,o,s,l;a<zie&&(s=n*(Gf+Hf*r+i*(Vf+Uf*r))-t,l=Gf+3*Hf*r+i*(7*Vf+9*Uf*r),n-=o=s/l,r=n*n,i=r*r*r,!(Je(o)<gN));++a);return[qv*e*(Gf+3*Hf*r+i*(7*Vf+9*Uf*r))/Be(n),oi(Ie(n)/qv)]};function Bie(){return da(bx).scale(177.158)}function xx(e,t){var n=Be(t),r=Be(e)*n;return[n*Ie(e)/r,Ie(t)/r]}xx.invert=Bf(dc);function Yie(){return da(xx).scale(144.049).clipAngle(60)}function Wie(){var e=1,t=0,n=0,r=1,i=1,a=0,o,s,l=null,c,u,f,d=1,h=1,p=Hv({point:function(x,w){var O=b([x,w]);this.stream.point(O[0],O[1])}}),v=If,g,y;function m(){return d=e*r,h=e*i,g=y=null,b}function b(x){var w=x[0]*d,O=x[1]*h;if(a){var _=O*o-w*s;w=w*o+O*s,O=_}return[w+t,O+n]}return b.invert=function(x){var w=x[0]-t,O=x[1]-n;if(a){var _=O*o+w*s;w=w*o-O*s,O=_}return[w/d,O/h]},b.stream=function(x){return g&&y===x?g:g=p(v(y=x))},b.postclip=function(x){return arguments.length?(v=x,l=c=u=f=null,m()):v},b.clipExtent=function(x){return arguments.length?(v=x==null?(l=c=u=f=null,If):NN(l=+x[0][0],c=+x[0][1],u=+x[1][0],f=+x[1][1]),m()):l==null?null:[[l,c],[u,f]]},b.scale=function(x){return arguments.length?(e=+x,m()):e},b.translate=function(x){return arguments.length?(t=+x[0],n=+x[1],m()):[t,n]},b.angle=function(x){return arguments.length?(a=x%360*Ht,s=Ie(a),o=Be(a),m()):a*qn},b.reflectX=function(x){return arguments.length?(r=x?-1:1,m()):r<0},b.reflectY=function(x){return arguments.length?(i=x?-1:1,m()):i<0},b.fitExtent=function(x,w){return Vv(b,x,w)},b.fitSize=function(x,w){return dx(b,x,w)},b.fitWidth=function(x,w){return hx(b,x,w)},b.fitHeight=function(x,w){return px(b,x,w)},b}function wx(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}wx.invert=function(e,t){var n=t,r=25,i;do{var a=n*n,o=a*a;n-=i=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(Je(i)>Se&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Gie(){return da(wx).scale(175.295)}function Ox(e,t){return[Be(t)*Ie(e),Ie(t)]}Ox.invert=Bf(oi);function Hie(){return da(Ox).scale(249.5).clipAngle(90+Se)}function _x(e,t){var n=Be(t),r=1+Be(e)*n;return[n*Ie(e)/r,Ie(t)/r]}_x.invert=Bf(function(e){return 2*dc(e)});function Vie(){return da(_x).scale(250).clipAngle(142)}function Sx(e,t){return[Tv(Vb((Zt+t)/2)),-e]}Sx.invert=function(e,t){return[-t,2*dc(mN(e))-Zt]};function Uie(){var e=oI(Sx),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}const Xie=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:iI,geoAlbersUsa:Nie,geoAzimuthalEqualArea:Iie,geoAzimuthalEqualAreaRaw:yx,geoAzimuthalEquidistant:jie,geoAzimuthalEquidistantRaw:mx,geoConicConformal:Fie,geoConicConformalRaw:sI,geoConicEqualArea:Uv,geoConicEqualAreaRaw:rI,geoConicEquidistant:$ie,geoConicEquidistantRaw:lI,geoEqualEarth:Bie,geoEqualEarthRaw:bx,geoEquirectangular:Rie,geoEquirectangularRaw:Wf,geoGnomonic:Yie,geoGnomonicRaw:xx,geoIdentity:Wie,geoMercator:Die,geoMercatorRaw:Yf,geoNaturalEarth1:Gie,geoNaturalEarth1Raw:wx,geoOrthographic:Hie,geoOrthographicRaw:Ox,geoProjection:da,geoProjectionMutator:vx,geoStereographic:Vie,geoStereographicRaw:_x,geoTransverseMercator:Uie,geoTransverseMercatorRaw:Sx},Symbol.toStringTag,{value:"Module"}));var qie=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Kie(e){if(typeof e=="function")return e;const t=`geo${eo(e)}`,n=Xie[t];if(!n)throw new Error(`Unknown coordinate: ${e}`);return n}function Zie(e){return{type:"FeatureCollection",features:e.flatMap(t=>Qie(t).features)}}function Qie(e){const t={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!e||!e.type)return null;const n=t[e.type];if(!n)return null;if(n==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:e}]};if(n==="feature")return{type:"FeatureCollection",features:[e]};if(n==="featureCollection")return e}function Jie(e,t){var n;for(const[r,i]of Object.entries(t))(n=e[r])===null||n===void 0||n.call(e,i)}function eae(e,t,n,r){const i=()=>{const s=t.filter(cI);return s.find(c=>c.sphere)?{type:"Sphere"}:Zie(s.filter(c=>!c.sphere).flatMap(c=>c.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return tae(e,a,n);if(o==="fitWidth")return nae(e,a,n)}function tae(e,t,n){const{x:r,y:i,width:a,height:o}=n;e.fitExtent([[r,i],[a,o]],t)}function nae(e,t,n){const{width:r,height:i}=n,[[a,o],[s,l]]=JN(e.fitWidth(r,t)).bounds(t),c=Math.ceil(l-o),u=Math.min(Math.ceil(s-a),c),f=e.scale()*(u-1)/u,[d,h]=e.translate(),p=h+(i-c)/2;e.scale(f).translate([d,p]).precision(.2)}function rae(e){const{data:t}=e;if(Array.isArray(t))return Object.assign(Object.assign({},e),{data:{value:t}});const{type:n}=t;return n==="graticule10"?Object.assign(Object.assign({},e),{data:{value:[hie()]}}):n==="sphere"?Object.assign(Object.assign({},e),{sphere:!0,data:{value:[{type:"Sphere"}]}}):e}function cI(e){return e.type==="geoPath"}const uI=()=>e=>{const{children:t,coordinate:n={}}=e;if(!Array.isArray(t))return[];const{type:r="equalEarth"}=n,i=qie(n,["type"]),a=Kie(r),o=t.map(rae);let s;function l(){return[["custom",(f,d,h,p)=>{const v=a();eae(v,o,{x:f,y:d,width:h,height:p},i),Jie(v,i),s=JN(v);const y=new bt({domain:[f,f+h]}),m=new bt({domain:[d,d+p]}),b=w=>{const O=v(w);if(!O)return[null,null];const[_,S]=O;return[y.map(_),m.map(S)]},x=w=>{if(!w)return null;const[O,_]=w,S=[y.invert(O),m.invert(_)];return v.invert(S)};return{transform:w=>b(w),untransform:w=>x(w)}}]]}function c(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:nv(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>cI(f)?c(f):f;return[Object.assign(Object.assign({},e),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:l},children:o.flatMap(u)})]};uI.props={};function fI(e,t){const{__data__:n}=e,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=t,s=Array.from(o.keys()).find(l=>l.key===r);if(s)return a?a.map(l=>s.data[l]):s.data[i]}function iae(e){return sg(e,t=>t.className==="component")}function aae(e){return sg(e,t=>t.className==="element")}function oae(e){return sg(e,t=>t.className==="label")}function En(e,t,n,r=i=>!0){return i=>{if(!r(i))return;n.emit(`plot:${e}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if(o==="plot")return;const s=aae(a),l=iae(a),c=oae(a),u=s||l||c;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:fI(u,t)},n.emit(`element:${e}`,h),n.emit(`${d}:${e}`,h)):f==="label"?(h.data={data:u.attributes.datum},n.emit(`label:${e}`,h),n.emit(`${o}:${e}`,h)):(n.emit(`component:${e}`,h),n.emit(`${o}:${e}`,h))}}function dI(){return(e,t,n)=>{const{container:r,view:i}=e,a=En(nt.CLICK,i,n,_=>_.detail===1),o=En(nt.DBLCLICK,i,n,_=>_.detail===2),s=En(nt.POINTER_TAP,i,n),l=En(nt.POINTER_DOWN,i,n),c=En(nt.POINTER_UP,i,n),u=En(nt.POINTER_OVER,i,n),f=En(nt.POINTER_OUT,i,n),d=En(nt.POINTER_MOVE,i,n),h=En(nt.POINTER_ENTER,i,n),p=En(nt.POINTER_LEAVE,i,n),v=En(nt.POINTER_UPOUTSIDE,i,n),g=En(nt.DRAG_START,i,n),y=En(nt.DRAG,i,n),m=En(nt.DRAG_END,i,n),b=En(nt.DRAG_ENTER,i,n),x=En(nt.DRAG_LEAVE,i,n),w=En(nt.DRAG_OVER,i,n),O=En(nt.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",l),r.addEventListener("pointerup",c),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",v),r.addEventListener("dragstart",g),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",w),r.addEventListener("drop",O),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",l),r.removeEventListener("pointerup",c),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",v),r.removeEventListener("dragstart",g),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",w),r.removeEventListener("drop",O)}}}dI.props={reapplyWhenUpdate:!0};function sae(){return{"component.axisRadar":a5,"component.axisLinear":Mo,"component.axisArc":n5,"component.legendContinuousBlock":o5,"component.legendContinuousBlockSize":s5,"component.legendContinuousSize":mb,"interaction.event":dI,"composition.mark":lN,"composition.view":sN,"shape.label.label":yT}}var lae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Et(e,t){const n=Object.assign(Object.assign({},sae()),t),r=a=>{if(typeof a!="string")return a;const o=`${e}.${a}`;return n[o]||Sl(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,l=lae(a,["type"]);s||Sl("Plot type is required!");const c=r(s);return c==null?void 0:c(l,o)},r]}function hI(e){const{canvas:t,group:n}=e;return(t==null?void 0:t.document)||(n==null?void 0:n.ownerDocument)||Sl("Cannot find library document")}var pI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function cae(e,t,n){const[r]=Et("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:l,insetBottom:c}=e,{coordinates:u=[]}=t,f=vae(u),d=f[0].type==="cartesian3D",h=Object.assign(Object.assign({},e),{x:o,y:s,width:a-o-l,height:i-c-s,transformations:f.flatMap(r)});return d?new Cre(h):new Are(h)}function vI(e,t){const{coordinate:n={},coordinates:r}=e,i=pI(e,["coordinate","coordinates"]);if(r)return e;const{type:a,transform:o=[]}=n,s=pI(n,["type","transform"]);if(!a)return Object.assign(Object.assign({},i),{coordinates:o});const[,l]=Et("coordinate",t),{transform:c=!1}=l(a).props||{};if(c)throw new Error(`Unknown coordinate: ${a}.`);return Object.assign(Object.assign({},i),{coordinates:[Object.assign({type:a},s),...o]})}function Ti(e,t){return e.filter(n=>n.type===t)}function Gs(e){return Ti(e,"polar").length>0}function uae(e){return Ti(e,"helix").length>0}function yc(e){return Ti(e,"transpose").length%2===1}function fae(e){return Ti(e,"parallel").length>0}function gI(e){return Ti(e,"theta").length>0}function dae(e){return Ti(e,"reflect").length>0}function Xf(e){return Ti(e,"radial").length>0}function hae(e){return Ti(e,"radar").length>0}function pae(e){return Ti(e,"reflectY").length>0}function vae(e){return e.find(t=>t.type==="cartesian"||t.type==="cartesian3D")?e:[...e,{type:"cartesian"}]}function De(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const gae=De("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),yae=De("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),mae=De("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),bae=De("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),xae=De("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wae=De("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Oae=De("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),_ae=De("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Sae=De("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),kae=De("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Eae=De("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Mae(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function Aae(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return Mae((n-r/t)*t,o,i,a,s)}}const kx=e=>()=>e;function yI(e,t){return function(n){return e+n*t}}function Pae(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Cae(e,t){var n=t-e;return n?yI(e,n>180||n<-180?n-360*Math.round(n/360):n):kx(isNaN(e)?t:e)}function Tae(e){return(e=+e)==1?mc:function(t,n){return n-t?Pae(t,n,e):kx(isNaN(t)?n:t)}}function mc(e,t){var n=t-e;return n?yI(e,n):kx(isNaN(e)?t:e)}(function e(t){var n=Tae(t);function r(i,a){var o=n((i=Gu(i)).r,(a=Gu(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=mc(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function Lae(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Gu(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(l){return s.r=r(l),s.g=i(l),s.b=a(l),s+""}}}var Nae=Lae(Aae);function mI(e){return function t(n){n=+n;function r(i,a){var o=e((i=Zi(i)).h,(a=Zi(a)).h),s=mc(i.s,a.s),l=mc(i.l,a.l),c=mc(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=l(Math.pow(u,n)),i.opacity=c(u),i+""}}return r.gamma=t,r}(1)}mI(Cae);var Ex=mI(mc);const wt=e=>Nae(e[e.length-1]);var bI=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(De);const Iae=wt(bI);var xI=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(De);const jae=wt(xI);var wI=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(De);const Dae=wt(wI);var OI=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(De);const Fae=wt(OI);var _I=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(De);const Rae=wt(_I);var SI=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(De);const $ae=wt(SI);var kI=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(De);const zae=wt(kI);var EI=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(De);const Bae=wt(EI);var MI=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(De);const Yae=wt(MI);var AI=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(De);const Wae=wt(AI);var PI=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(De);const Gae=wt(PI);var CI=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(De);const Hae=wt(CI);var TI=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(De);const Vae=wt(TI);var LI=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(De);const Uae=wt(LI);var NI=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(De);const Xae=wt(NI);var II=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(De);const qae=wt(II);var jI=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(De);const Kae=wt(jI);var DI=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(De);const Zae=wt(DI);var FI=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(De);const Qae=wt(FI);var RI=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(De);const Jae=wt(RI);var $I=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(De);const eoe=wt($I);var zI=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(De);const toe=wt(zI);var BI=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(De);const noe=wt(BI);var YI=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(De);const roe=wt(YI);var WI=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(De);const ioe=wt(WI);var GI=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(De);const aoe=wt(GI);var HI=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(De);const ooe=wt(HI);function soe(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const loe=Ex(Zi(300,.5,0),Zi(-240,.5,1));var coe=Ex(Zi(-100,.75,.35),Zi(80,1.5,.8)),uoe=Ex(Zi(260,.75,.35),Zi(80,1.5,.8)),Kv=Zi();function foe(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Kv.h=360*e-100,Kv.s=1.5-1.5*t,Kv.l=.8-.9*t,Kv+""}var Zv=Gu(),doe=Math.PI/3,hoe=Math.PI*2/3;function poe(e){var t;return e=(.5-e)*Math.PI,Zv.r=255*(t=Math.sin(e))*t,Zv.g=255*(t=Math.sin(e+doe))*t,Zv.b=255*(t=Math.sin(e+hoe))*t,Zv+""}function voe(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Qv(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const goe=Qv(De("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var yoe=Qv(De("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),moe=Qv(De("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),boe=Qv(De("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const Mx=Object.freeze(Object.defineProperty({__proto__:null,interpolateBlues:toe,interpolateBrBG:Iae,interpolateBuGn:Wae,interpolateBuPu:Gae,interpolateCividis:soe,interpolateCool:uoe,interpolateCubehelixDefault:loe,interpolateGnBu:Hae,interpolateGreens:noe,interpolateGreys:roe,interpolateInferno:moe,interpolateMagma:yoe,interpolateOrRd:Vae,interpolateOranges:ooe,interpolatePRGn:jae,interpolatePiYG:Dae,interpolatePlasma:boe,interpolatePuBu:Xae,interpolatePuBuGn:Uae,interpolatePuOr:Fae,interpolatePuRd:qae,interpolatePurples:ioe,interpolateRainbow:foe,interpolateRdBu:Rae,interpolateRdGy:$ae,interpolateRdPu:Kae,interpolateRdYlBu:zae,interpolateRdYlGn:Bae,interpolateReds:aoe,interpolateSinebow:poe,interpolateSpectral:Yae,interpolateTurbo:voe,interpolateViridis:goe,interpolateWarm:coe,interpolateYlGn:Qae,interpolateYlGnBu:Zae,interpolateYlOrBr:Jae,interpolateYlOrRd:eoe,schemeAccent:yae,schemeBlues:zI,schemeBrBG:bI,schemeBuGn:AI,schemeBuPu:PI,schemeCategory10:gae,schemeDark2:mae,schemeGnBu:CI,schemeGreens:BI,schemeGreys:YI,schemeObservable10:bae,schemeOrRd:TI,schemeOranges:HI,schemePRGn:xI,schemePaired:xae,schemePastel1:wae,schemePastel2:Oae,schemePiYG:wI,schemePuBu:NI,schemePuBuGn:LI,schemePuOr:OI,schemePuRd:II,schemePurples:WI,schemeRdBu:_I,schemeRdGy:SI,schemeRdPu:jI,schemeRdYlBu:kI,schemeRdYlGn:EI,schemeReds:GI,schemeSet1:_ae,schemeSet2:Sae,schemeSet3:kae,schemeSpectral:MI,schemeTableau10:Eae,schemeYlGn:FI,schemeYlGnBu:DI,schemeYlOrBr:RI,schemeYlOrRd:$I},Symbol.toStringTag,{value:"Module"}));function xoe(e,t,n,r,i,a){const{guide:o={}}=n,s=Coe(e,t,n);if(typeof s!="string")return n;const l=Toe(s,e,t,n),c=Moe(s,l,n);return Object.assign(Object.assign(Object.assign({},n),Noe(s,e,t,n,r)),{domain:c,range:Loe(s,e,t,n,c,i,a),expectedDomain:l,guide:o,name:e,type:s})}function woe(e,t){const n={};for(const r of e){const{values:i,name:a}=r,o=t[a];for(const s of i){const{name:l,value:c}=s;n[l]=c.map(u=>o.map(u))}}return n}function Ooe(e,t){const n=Array.from(e.values()).flatMap(i=>i.channels);xy(n,i=>i.map(a=>t.get(a.scale.uid)),i=>i.name).filter(([,i])=>i.some(a=>typeof a.getOptions().groupTransform=="function")&&i.every(a=>a.getTicks)).map(i=>i[1]).forEach(i=>{const a=i.map(o=>o.getOptions().groupTransform)[0];a(i)})}function _oe(e,t){var n;const{components:r=[]}=t,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(e.flatMap(s=>s.channels.map(l=>l.scale)))),o=new Map(a.map(s=>[s.name,s]));for(const s of r){const l=Eoe(s);for(const c of l){const u=o.get(c),f=((n=s.scale)===null||n===void 0?void 0:n[c])||{},{independent:d=!1}=f;if(u&&!d){const{guide:h}=u,p=typeof h=="boolean"?{}:h;u.guide=Z({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:c,guide:iy(s,i)});a.push(h)}}}return a}function Soe(e){if(!e||!Array.isArray(e))return[us,us];let t,n;return[a=>{var o;t=a.map.bind(a),n=(o=a.invert)===null||o===void 0?void 0:o.bind(a);const s=e.filter(([d])=>typeof d=="function"),l=e.filter(([d])=>typeof d!="function"),c=new Map(l);if(a.map=d=>{for(const[h,p]of s)if(h(d))return p;return c.has(d)?c.get(d):t(d)},!n)return a;const u=new Map(l.map(([d,h])=>[h,d])),f=new Map(s.map(([d,h])=>[h,d]));return a.invert=d=>f.has(d)?d:u.has(d)?u.get(d):n(d),a},a=>(t!==null&&(a.map=t),n!==null&&(a.invert=n),a)]}function VI(e,t){const n=Object.keys(e);for(const r of Object.values(t)){const{name:i}=r.getOptions();if(!(i in e))e[i]=r;else{const a=n.filter(l=>l.startsWith(i)).map(l=>+(l.replace(i,"")||0)),o=tt(a)+1,s=`${i}${o}`;e[s]=r,r.getOptions().key=s}}return e}function UI(e,t){const[n]=Et("scale",t),{relations:r}=e,[i]=Soe(r),a=n(e);return i(a)}function koe(e){const t=e.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));XI(t,"x"),XI(t,"y")}function Eoe(e){const{channels:t=[],type:n,scale:r={}}=e,i=["shape","color","opacity","size"];return t.length!==0?t:n==="axisX"?["x"]:n==="axisY"?["y"]:n==="legends"?Object.keys(r).filter(a=>i.includes(a)):[]}function XI(e,t){const n=e.filter(({name:a,facet:o=!0})=>o&&a===t),r=n.flatMap(a=>a.domain),i=n.every(qI)?Sa(r):n.every(KI)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function Moe(e,t,n){const{ratio:r}=n;return r==null?t:qI({type:e})?Aoe(t,r,e):KI({type:e})?Poe(t,r):t}function Aoe(e,t,n){const r=e.map(Number),i=new bt({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*t]});return n==="time"?e.map(a=>new Date(i.map(a))):e.map(a=>i.map(a))}function Poe(e,t){const n=Math.round(e.length*t);return e.slice(0,n)}function qI(e){const{type:t}=e;return typeof t!="string"?!1:["linear","log","pow","time"].includes(t)}function KI(e){const{type:t}=e;return typeof t!="string"?!1:["band","point","ordinal"].includes(t)}function Coe(e,t,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:Hoe(t)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?Ax(e,s):i!==void 0?ej([i])?Ax(e,s):tj(t)?"time":QI(e,a,o):ej(t)?Ax(e,s):tj(t)?"time":QI(e,a,o)}function Toe(e,t,n,r){const{domain:i}=r;if(i!==void 0)return i;switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return JI(zoe(n,r),r);case"band":case"ordinal":case"point":return Boe(n);case"quantile":return Yoe(n);case"sequential":return JI(Woe(n),r);default:return[]}}function Loe(e,t,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return Ioe(s);if(s!==void 0)return s;const{rangeMin:l,rangeMax:c}=r;switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":{const u=ZI(n,r,i,a,o),[f,d]=Goe(t,u);return[l!=null?l:f,c!=null?c:d]}case"band":case"point":{const u=t==="size"?5:0,f=t==="size"?10:1;return[l!=null?l:u,c!=null?c:f]}case"ordinal":return ZI(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function Noe(e,t,n,r,i){switch(e){case"linear":case"time":case"log":case"pow":case"sqrt":return Foe(i,r);case"band":case"point":return Roe(e,t,i,r);case"sequential":return Doe(r);default:return r}}function ZI(e,t,n,r,i){const[a]=Et("palette",i),{category10:o,category20:s}=r,l=wB(n).length<=o.length?o:s,{palette:c=l,offset:u}=t;if(Array.isArray(c))return c;try{return a({type:c})}catch(f){const d=joe(c,n,u);if(d)return d;throw new Error(`Unknown Component: ${c} `)}}function Ioe(e){return e.split("-")}function joe(e,t,n=r=>r){if(!e)return null;const r=eo(e),i=Mx[`scheme${r}`],a=Mx[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const o=i[t.length];if(o)return o}return t.map((o,s)=>a(n(s/t.length)))}function Doe(e){const{palette:t="ylGnBu",offset:n}=e,r=eo(t),i=Mx[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function Foe(e,t){const{interpolate:n=Nu,nice:r=!1,tickCount:i=5}=t;return Object.assign(Object.assign({},t),{interpolate:n,nice:r,tickCount:i})}function Roe(e,t,n,r){if(r.padding!==void 0||r.paddingInner!==void 0||r.paddingOuter!==void 0)return Object.assign(Object.assign({},r),{unknown:NaN});const i=$oe(e,t,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}function $oe(e,t,n){return t==="enterDelay"||t==="enterDuration"||t==="size"?0:e==="band"?gI(n)?0:.1:e==="point"?.5:0}function Ax(e,t){return t||(Voe(e)?"point":"ordinal")}function QI(e,t,n){return n||(e!=="color"||t?"linear":"sequential")}function JI(e,t){if(e.length===0)return e;const{domainMin:n,domainMax:r}=t,[i,a]=e;return[n!=null?n:i,r!=null?r:a]}function zoe(e,t){const{zero:n=!1}=t;let r=1/0,i=-1/0;for(const a of e)for(const o of a)pt(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function Boe(e){return Array.from(new Set(e.flat()))}function Yoe(e){return e.flat().sort()}function Woe(e){let t=1/0,n=-1/0;for(const r of e)for(const i of r)pt(i)&&(t=Math.min(t,+i),n=Math.max(n,+i));return t===1/0?[]:[t<0?-n:t,n]}function Goe(e,t){return e==="enterDelay"?[0,1e3]:e=="enterDuration"?[300,1e3]:e.startsWith("y")||e.startsWith("position")?[1,0]:e==="color"?[xB(t),vS(t)]:e==="opacity"?[0,1]:e==="size"?[1,10]:[0,1]}function ej(e){return Px(e,t=>{const n=typeof t;return n==="string"||n==="boolean"})}function tj(e){return Px(e,t=>t instanceof Date)}function Hoe(e){return Px(e,kl)}function Px(e,t){for(const n of e)if(n.some(t))return!0;return!1}function Voe(e){return e.startsWith("x")||e.startsWith("y")||e.startsWith("position")||e.startsWith("size")}function Uoe(e){return e.startsWith("x")||e.startsWith("y")||e.startsWith("position")||e==="enterDelay"||e==="enterDuration"||e==="updateDelay"||e==="updateDuration"||e==="exitDelay"||e==="exitDuration"}function Xoe(e){if(!e||!e.type)return!1;if(typeof e.type=="function")return!0;const{type:t,domain:n,range:r,interpolator:i}=e,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(t)&&a&&o||["sequential"].includes(t)&&a&&(o||i)||["constant","identity"].includes(t)&&o)}const qoe={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},Koe={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Zoe={ordinal:"ordinal",band:"band",point:"point"},Qoe={constant:"constant"};var To=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Joe(e,t,n){const{coordinates:r=[],title:i}=t,[,a]=Et("component",n),o=e.filter(({guide:u})=>u!==null),s=[],l=cse(t,e,n);if(s.push(...l),i){const{props:u}=a("title"),{defaultPosition:f,defaultOrientation:d,defaultOrder:h,defaultSize:p,defaultCrossPadding:v}=u,g=typeof i=="string"?{title:i}:i;s.push(Object.assign({type:"title",position:f,orientation:d,order:h,crossPadding:v[0],defaultSize:p},g))}return ise(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:v,defaultSize:g,defaultOrder:y,defaultLength:m,defaultPadding:b=[0,0],defaultCrossPadding:x=[0,0]}=d,w=Z({},...f),{guide:O,field:_}=w,S=Array.isArray(O)?O:[O];for(const k of S){const[E,M]=sse(u,h,v,k,f,o,r);if(!E&&!M)continue;const P=E==="left"||E==="right",A=P?b[1]:b[0],L=P?x[1]:x[0],{size:N,order:T=y,length:I=m,padding:C=A,crossPadding:j=L}=k;s.push(Object.assign(Object.assign({title:_},k),{defaultSize:g,length:I,position:E,plane:p,orientation:M,padding:C,order:T,crossPadding:j,size:N,type:u,scales:f}))}}),s}function nj(e,t,n,r,i){const[a]=Et("component",r),{scaleInstances:o,scale:s,bbox:l}=e,c=To(e,["scaleInstances","scale","bbox"]),u={bbox:l,library:r};return a(c)({coordinate:t,library:r,markState:i,scales:o,theme:n,value:u,scale:s})}function ese(e){return e.map(t=>{const n=Z(t,t.style);return delete n.style,n})}function rj(e,t){const n=["left","right","bottom","top"];return my(e,({type:a,position:o,group:s})=>n.includes(o)?s===void 0?a.startsWith("legend")?`legend-${o}`:Symbol("independent"):s==="independent"?Symbol("independent"):s:Symbol("independent")).flatMap(([,a])=>{if(a.length===1)return a[0];if(t!==void 0){const u=a.filter(v=>v.length!==void 0).map(v=>v.length),f=Yr(u);if(f>t)return a.forEach(v=>v.group=Symbol("independent")),a;const d=t-f,h=a.length-u.length,p=d/h;a.forEach(v=>{v.length===void 0&&(v.length=p)})}const o=tt(a,u=>u.size),s=tt(a,u=>u.order),l=tt(a,u=>u.crossPadding),c=a[0].position;return{type:"group",size:o,order:s,position:c,children:a,crossPadding:l}})}function tse(e,t){const n=["shape","size","color","opacity"],r=(d,h)=>d==="constant"&&h==="size",i=e.filter(({type:d,name:h})=>typeof d=="string"&&n.includes(h)&&!r(d,h)),a=i.filter(({type:d})=>d==="constant"),o=i.filter(({type:d})=>d!=="constant"),l=my(o,d=>d.field?d.field:Symbol("independent")).map(([d,h])=>[d,[...h,...a]]).filter(([,d])=>d.some(h=>h.type!=="constant")),c=new Map(l);if(c.size===0)return[];const u=d=>d.sort(([h],[p])=>h.localeCompare(p));return Array.from(c).map(([,d])=>{const p=OB(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,nse(g)])}));for(const{option:v,combination:g}of p)if(!v.every(y=>y[1]==="constant")&&v.every(y=>y[1]==="discrete"||y[1]==="constant"))return["legendCategory",g];for(const[v,g]of zne)for(const{option:y,combination:m}of p)if(g.some(b=>rh(u(b),u(y))))return[v,m];return null}).filter(pt)}function nse(e){const{type:t}=e;return typeof t!="string"?null:t in qoe?"continuous":t in Zoe?"discrete":t in Koe?"distribution":t in Qoe?"constant":null}function rse(e,t){return e.map(n=>{const{name:r}=n;if(uae(t)||gI(t)||yc(t)&&(Gs(t)||Xf(t)))return null;if(r.startsWith("x"))return Gs(t)?["axisArc",[n]]:Xf(t)?["axisLinear",[n]]:[yc(t)?"axisY":"axisX",[n]];if(r.startsWith("y"))return Gs(t)?["axisLinear",[n]]:Xf(t)?["axisArc",[n]]:[yc(t)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(hae(t))return["axisRadar",[n]];if(!Gs(t))return["axisY",[n]]}return null}).filter(pt)}function ise(e,t){const n=e.filter(r=>Xoe(r));return[...tse(n),...rse(n,t)]}function Cx(e){const t=Ti(e,"polar");if(t.length){const r=t[t.length-1],{startAngle:i,endAngle:a}=x_(r);return[i,a]}const n=Ti(e,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=O_(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function ase(e){const t=/position(\d*)/g.exec(e);return t?+t[1]:null}function ose(e,t,n,r,i){const{name:a}=n[0];if(e==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=ase(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[l,c]=Cx(i);return["center",(c-l)/(o.length-1)*s+l]}if(e==="axisY"&&fae(i))return yc(i)?["center","horizontal"]:["center","vertical"];if(e==="axisLinear"){const[o]=Cx(i);return["center",o]}return e==="axisArc"?t[0]==="inner"?["inner",null]:["outer",null]:Gs(i)?["center",null]:Xf(i)?["center",null]:e==="axisX"&&dae(i)||e==="axisX"&&pae(i)?["top",null]:t}function sse(e,t,n,r,i,a,o){const[s]=Cx(o),l=[r.position||t,s!=null?s:n];return typeof e=="string"&&e.startsWith("axis")?ose(e,l,i,a,o):typeof e=="string"&&e.startsWith("legend")&&Gs(o)&&r.position==="center"?["center","vertical"]:l}function lse(e,t,n=[]){return e==="x"?yc(n)?`${t}Y`:`${t}X`:e==="y"?yc(n)?`${t}X`:`${t}Y`:null}function cse(e,t,n){const[,r]=Et("component",n),{coordinates:i}=e;function a(o,s,l,c){const u=lse(s,o,i);if(!c||!u)return;const{props:f}=r(u),{defaultPosition:d,defaultSize:h,defaultOrder:p,defaultCrossPadding:[v]}=f;return Object.assign(Object.assign({position:d,defaultSize:h,order:p,type:u,crossPadding:v},c),{scales:[l]})}return t.filter(o=>o.slider||o.scrollbar).flatMap(o=>{const{slider:s,scrollbar:l,name:c}=o;return[a("slider",c,o,s),a("scrollbar",c,o,l)]}).filter(o=>!!o)}function ij(e,t,n,r,i,a){const{type:o}=e;if(!["left","right","bottom","top"].includes(r)||typeof o!="string")return;const l=o;return(l.startsWith("axis")?pse:l.startsWith("group")?use:l.startsWith("legendContinuous")?vse:l==="legendCategory"?gse:l.startsWith("slider")?hse:l==="title"?dse:l.startsWith("scrollbar")?fse:()=>{})(e,t,n,r,i,a)}function use(e,t,n,r,i,a){const{children:o}=e,s=tt(o,c=>c.crossPadding);o.forEach(c=>c.crossPadding=s),o.forEach(c=>ij(c,t,n,r,i,a));const l=tt(o,c=>c.size);e.size=l,o.forEach(c=>c.size=l)}function fse(e,t,n,r,i,a){const{trackSize:o=6}=Z({},i.scrollbar,e);e.size=o}function dse(e,t,n,r,i,a){const o=Z({},i.title,e),{title:s,subtitle:l,spacing:c=0}=o,u=To(o,["title","subtitle","spacing"]);if(s){const f=le(u,"title"),d=ng(s,f);e.size=d.height}if(l){const f=le(u,"subtitle"),d=ng(l,f);e.size+=c+d.height}}function hse(e,t,n,r,i,a){const o=()=>{const{slider:u}=i;return Z({},u,e)},{trackSize:s,handleIconSize:l}=o(),c=Math.max(s,l*2.4);e.size=c}function pse(e,t,n,r,i,a){var o;e.transform=e.transform||[{type:"hide"}];const s=r==="left"||r==="right",l=aj(e,r,i),{tickLength:c=0,labelSpacing:u=0,titleSpacing:f=0,labelAutoRotate:d}=l,h=To(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),p=Jv(e,a),v=eg(h,p),g=c+u;if(v&&v.length){const m=tt(v,x=>x.width),b=tt(v,x=>x.height);if(s)e.size=m+g;else{const{tickFilter:x,labelTransform:w}=e;bse(p,v,t,n,x)&&!w&&d!==!1&&d!==null?(e.labelTransform="rotate(90)",e.size=m+g):(e.labelTransform=(o=e.labelTransform)!==null&&o!==void 0?o:"rotate(0)",e.size=b+g)}}else e.size=c;const y=tg(h);y&&(s?e.size+=f+y.width:e.size+=f+y.height)}function vse(e,t,n,r,i,a){const s=(()=>{const{legendContinuous:x}=i;return Z({},x,e)})(),{labelSpacing:l=0,titleSpacing:c=0}=s,u=To(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=le(u,"ribbon"),{size:h}=d,p=le(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);e.size=g;const y=Jv(e,a),m=eg(u,y);if(m){const x=f?"width":"height",w=tt(m,O=>O[x]);e.size+=w+l}const b=tg(u);b&&(f?e.size=Math.max(e.size,b.width):e.size+=c+b.height)}function gse(e,t,n,r,i,a){const s=(()=>{const{legendCategory:L}=i,{title:N}=e,[T,I]=Array.isArray(N)?[N,void 0]:[void 0,N];return Z({title:T},L,Object.assign(Object.assign({},e),{title:I}))})(),{itemSpacing:l,itemMarkerSize:c,titleSpacing:u,rowPadding:f,colPadding:d,maxCols:h=1/0,maxRows:p=1/0}=s,v=To(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:y}=e,m=L=>Math.min(L,p),b=L=>Math.min(L,h),x=r==="left"||r==="right",w=y===void 0?t+(x?0:n[0]+n[1]):y,O=tg(v),_=Jv(e,a),S=eg(v,_,"itemLabel"),k=Math.max(S[0].height,c)+f,E=(L,N=0)=>c+L+l[0]+N;x?(()=>{let L=-1/0,N=0,T=1,I=0,C=-1/0,j=-1/0;const D=O?O.height:0,F=w-D;for(const{width:R}of S){const z=E(R,d);L=Math.max(L,z),N+k>F?(T++,C=Math.max(C,I),j=Math.max(j,N),I=1,N=k):(N+=k,I++)}T<=1&&(C=I,j=N),e.size=L*b(T),e.length=j+D,Z(e,{cols:b(T),gridRow:C})})():typeof g=="number"?(()=>{const L=Math.ceil(S.length/g),N=tt(S,T=>E(T.width))*g;e.size=k*m(L)-f,e.length=Math.min(N,w)})():(()=>{let L=1,N=0,T=-1/0;for(const{width:I}of S){const C=E(I,d);N+C>w?(T=Math.max(T,N),N=C,L++):N+=C}L===1&&(T=N),e.size=k*m(L)-f,e.length=T})(),O&&(x?e.size=Math.max(e.size,O.width):e.size+=u+O.height)}function Jv(e,t){const[n]=Et("scale",t),{scales:r,tickCount:i,tickMethod:a}=e,o=r.find(s=>s.type!=="constant"&&s.type!=="identity");return i!==void 0&&(o.tickCount=i),a!==void 0&&(o.tickMethod=a),n(o)}function eg(e,t,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=e,o=To(e,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=yse(t,r,i),l=le(o,n),c=s.map((d,h)=>Object.fromEntries(Object.entries(l).map(([p,v])=>[p,typeof v=="function"?v(d,h):v]))),u=s.map((d,h)=>{const p=c[h];return ng(d,p)});if(!c.some(d=>d.transform)){const d=s.map((h,p)=>p);e.indexBBox=new Map(d.map(h=>[h,[s[h],u[h]]]))}return u}function tg(e){const t=c=>c===!1||c===null,{title:n}=e,r=To(e,["title"]);if(t(n)||n===void 0)return null;const i=le(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:ng(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function aj(e,t,n){const{title:r}=e,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${Ey(t)}`]:s}=n;return Z({title:i},o,s,Object.assign(Object.assign({},e),{title:a}))}function oj(e,t){const n=e.getTicks?e.getTicks():e.getOptions().domain;return t?n.filter(t):n}function yse(e,t,n){const i=oj(e,n).map(o=>typeof o=="number"?jp(o):o),a=t?typeof t=="string"?Eo(t):t:e.getFormatter?e.getFormatter():o=>`${o}`;return i.map(a)}function mse(e,t){return e.getBandWidth?e.getBandWidth(t)/2:0}function bse(e,t,n,r,i){if(Yr(t,h=>h.width)>n)return!0;const o=e.clone();o.update({range:[0,n]});const s=oj(e,i),l=s.map(h=>o.map(h)+mse(o,h)),c=s.map((h,p)=>p),u=-r[0],f=n+r[1],d=(h,p)=>{const{width:v}=p;return[h-v/2,h+v/2]};for(let h=0;h<c.length;h++){const p=l[h],[v,g]=d(p,t[h]);if(v<u||g>f)return!0;const y=l[h+1];if(y){const[m]=d(y,t[h+1]);if(g>m)return!0}}return!1}function ng(e,t){const n=xse(e),r=To(t,["filter"]);return n.attr(Object.assign(Object.assign({},r),{visibility:"none"})),n.getBBox()}function xse(e){return e instanceof xt?e:new qr({style:{text:`${e}`}})}function wse(e){const t=e.find(({type:i})=>i==="axisX"),n=e.find(({type:i})=>i==="axisY"),r=e.find(({type:i})=>i==="axisZ");t&&n&&r&&(t.plane="xy",n.plane="xy",r.plane="yz",r.origin=[t.bbox.x,t.bbox.y,0],r.eulerAngles=[0,-90,0],r.bbox.x=t.bbox.x,r.bbox.y=t.bbox.y,e.push(Object.assign(Object.assign({},t),{plane:"xz",showLabel:!1,showTitle:!1,origin:[t.bbox.x,t.bbox.y,0],eulerAngles:[-90,0,0]})),e.push(Object.assign(Object.assign({},n),{plane:"yz",showLabel:!1,showTitle:!1,origin:[n.bbox.x+n.bbox.width,n.bbox.y,0],eulerAngles:[0,-90,0]})),e.push(Object.assign(Object.assign({},r),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]})))}function Ose(e,t,n,r){var i,a;const{width:o,height:s,depth:l,x:c=0,y:u=0,z:f=0,inset:d=(i=n.inset)!==null&&i!==void 0?i:0,insetLeft:h=d,insetTop:p=d,insetBottom:v=d,insetRight:g=d,margin:y=(a=n.margin)!==null&&a!==void 0?a:0,marginLeft:m=y,marginBottom:b=y,marginTop:x=y,marginRight:w=y,padding:O=n.padding,paddingBottom:_=O,paddingLeft:S=O,paddingRight:k=O,paddingTop:E=O}=Sse(e,t,n,r),M=1/4,P=(Q,ne,ae,fe,ge)=>{const{marks:be}=t;if(be.length===0)return[fe,ge];if(Q-fe-ge-Q*M>0)return[fe,ge];const Ee=Q*(1-M);return[ne==="auto"?Ee*fe/(fe+ge):fe,ae==="auto"?Ee*ge/(fe+ge):ge]},A=Q=>Q==="auto"?20:Q!=null?Q:20,L=A(E),N=A(_),T=sj(e,s-L-N,[L+x,N+b],["left","right"],t,n,r),{paddingLeft:I,paddingRight:C}=T,j=o-m-w,[D,F]=P(j,S,k,I,C),R=j-D-F,z=sj(e,R,[D+m,F+w],["bottom","top"],t,n,r),{paddingTop:H,paddingBottom:W}=z,X=s-b-x,[V,q]=P(X,_,E,W,H),ie=X-V-q;return{width:o,height:s,depth:l,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:R,innerHeight:ie,paddingLeft:D,paddingRight:F,paddingTop:q,paddingBottom:V,marginLeft:m,marginBottom:b,marginTop:x,marginRight:w,x:c,y:u,z:f}}function _se(e){const{height:t,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:l=16,marginLeft:c=l,marginRight:u=l,marginTop:f=l,marginBottom:d=l,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=e,m=w=>w==="auto"?20:w,b=n-m(i)-m(a)-c-u-p-v,x=t-m(o)-m(s)-f-d-g-y;return{width:b,height:x}}function Sse(e,t,n,r){const{coordinates:i}=t;if(!Gs(i)&&!Xf(i))return t;const a=e.filter(y=>typeof y.type=="string"&&y.type.startsWith("axis"));if(a.length===0)return t;const o=a.map(y=>{const m=y.type==="axisArc"?"arc":"linear";return aj(y,m,n)}),s=tt(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),l=a.flatMap((y,m)=>{const b=o[m],x=Jv(y,r);return eg(b,x)}).filter(pt),c=tt(l,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return tg(b)}).filter(y=>y!==null),f=u.length===0?0:tt(u,y=>y.height),{inset:d=c,insetLeft:h=d,insetBottom:p=d,insetTop:v=d+f,insetRight:g=d}=t;return Object.assign(Object.assign({},t),{insetLeft:h,insetBottom:p,insetTop:v,insetRight:g})}function sj(e,t,n,r,i,a,o){const s=_t(e,p=>p.position),{padding:l=a.padding,paddingLeft:c=l,paddingRight:u=l,paddingBottom:f=l,paddingTop:d=l}=i,h={paddingBottom:f,paddingLeft:c,paddingTop:d,paddingRight:u};for(const p of r){const v=`padding${Ey(sT(p))}`,g=s.get(p)||[],y=h[v],m=k=>{k.size===void 0&&(k.size=k.defaultSize)},b=k=>{k.type==="group"?(k.children.forEach(m),k.size=tt(k.children,E=>E.size)):k.size=k.defaultSize},x=k=>{k.size||(y!=="auto"?b(k):(ij(k,t,n,p,a,o),m(k)))},w=k=>{k.type.startsWith("axis")&&k.labelAutoHide===void 0&&(k.labelAutoHide=!0)},O=p==="bottom"||p==="top",_=kr(g,k=>k.order),S=g.filter(k=>k.type.startsWith("axis")&&k.order==_);if(S.length&&(S[0].crossPadding=0),typeof y=="number")g.forEach(m),g.forEach(w);else if(g.length===0)h[v]=0;else{const k=O?t+n[0]+n[1]:t,E=rj(g,k);E.forEach(x);const M=E.reduce((P,{size:A,crossPadding:L=12})=>P+A+L,0);h[v]=M}}return h}function kse(e,t,n){const r=_t(e,O=>`${O.plane||"xy"}-${O.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y,height:m,width:b,depth:x}=n,w={xy:Tx({width:b,height:m,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:l,marginTop:c,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y}),yz:Tx({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:Tx({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[O,_]of r.entries()){const[S,k]=O.split("-"),E=w[S][k],[M,P]=gS(_,A=>typeof A.type!="string"?!1:!!(k==="center"||A.type.startsWith("axis")&&["inner","outer"].includes(k)));M.length&&Ese(M,t,E,k),P.length&&jse(_,t,E)}}function Tx({width:e,height:t,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:l,marginRight:c,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:v}){const g=n+o,y=i+s,m=r+c,b=a+l,x=e-o-c,w=[g+h,y+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,y,"vertical",!0,Bt,o,x],right:[e-m,y,m,u,"horizontal",!1,Bt],bottom:[g,t-b,f,b,"vertical",!1,Bt,o,x],left:[0,y,g,u,"horizontal",!0,Bt],"top-left":[g,0,f,y,"vertical",!0,Bt],"top-right":[g,0,f,y,"vertical",!0,Bt],"bottom-left":[g,t-b,f,b,"vertical",!1,Bt],"bottom-right":[g,t-b,f,b,"vertical",!1,Bt],center:w,inner:w,outer:w}}function Ese(e,t,n,r){const[i,a]=gS(e,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));Mse(i,t,n,r),Dse(a,t,n)}function Mse(e,t,n,r){r==="center"?V7(t)?Ise(e,t,n):st(t)?Cse(e,t,n):zh(t)&&Tse(e,t,n,e[0].orientation):r==="inner"?Ase(e,t,n):r==="outer"&&Pse(e,t,n)}function Ase(e,t,n){const[r,i,,a]=n,[o,s]=t.getCenter(),[l]=Bh(t),c=a/2,u=l*c,f=o-u,d=s-u;for(let h=0;h<e.length;h++){const p=e[h];p.bbox={x:r+f,y:i+d,width:u*2,height:u*2}}}function Pse(e,t,n){const[r,i,a,o]=n;for(const s of e)s.bbox={x:r,y:i,width:a,height:o}}function Cse(e,t,n){const[r,i,a,o]=n;for(const s of e)s.bbox={x:r,y:i,width:a,height:o}}function Tse(e,t,n,r){r==="horizontal"?Nse(e,t,n):r==="vertical"&&Lse(e,t,n)}function Lse(e,t,n){const[r,i,,a]=n,o=new Array(e.length).fill(0),l=t.map(o).filter((c,u)=>u%2===0).map(c=>c+r);for(let c=0;c<e.length;c++){const u=e[c],f=l[c],d=l[c+1]-f;u.bbox={x:f,y:i,width:d,height:a}}}function Nse(e,t,n){const[r,i,a]=n,o=new Array(e.length).fill(0),l=t.map(o).filter((c,u)=>u%2===1).map(c=>c+i);for(let c=0;c<e.length;c++){const u=e[c],f=l[c],d=l[c+1]-f;u.bbox={x:r,y:f,width:a,height:d}}}function Ise(e,t,n,r){const[i,a,o,s]=n;for(const l of e)l.bbox={x:i,y:a,width:o,height:s},l.radar={index:e.indexOf(l),count:e.length}}function jse(e,t,n){const[r,i,a,o,s,l,c,u,f]=n,[d,h,p,v,g,y,m,b]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];e.sort((k,E)=>c==null?void 0:c(k.order,E.order));const x=k=>k==="title"||k==="group"||k.startsWith("legend"),w=(k,E,M)=>M===void 0?E:x(k)?M:E,O=(k,E,M)=>M===void 0?E:x(k)?M:E,_=l?h+y:h;for(let k=0,E=_;k<e.length;k++){const M=e[k],{crossPadding:P=0,type:A}=M,{size:L}=M;M.bbox={[d]:l?E-L-P:E+P,[p]:O(A,v,u),[g]:L,[m]:w(A,b,f)},E+=(L+P)*(l?-1:1)}const S=e.filter(k=>k.type==="group");for(const k of S){const{bbox:E,children:M}=k,P=E[m],A=P/M.length,L=M.reduce((j,D)=>{var F;const R=(F=D.layout)===null||F===void 0?void 0:F.justifyContent;return R||j},"flex-start"),N=M.map((j,D)=>{const{length:F=A,padding:R=0}=j;return F+(D===M.length-1?0:R)}),T=Yr(N),I=P-T,C=L==="flex-start"?0:L==="center"?I/2:I;for(let j=0,D=E[p]+C;j<M.length;j++){const F=M[j],{padding:R=0}=F,z=j===M.length-1?0:R;F.bbox={[g]:E[g],[d]:E[d],[p]:D,[m]:N[j]-z},Z(F,{layout:{justifyContent:L}}),D+=N[j]}}}function Dse(e,t,n){if(e.length===0)return;const[r,i,a,o]=n,[s]=Bh(t),l=o/2*s/Math.sqrt(2),c=r+a/2,u=i+o/2;for(let f=0;f<e.length;f++){const d=e[f];d.bbox={x:c-l,y:u-l,width:l*2,height:l*2}}}var Fse=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},bc=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Rse(e,t,n){const{encode:r={},scale:i={},transform:a=[]}=t,o=bc(t,["encode","scale","transform"]);return[e,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function lj(e,t,n){return Fse(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=t,[a]=Et("data",r),o=Zse(i),{transform:s=[]}=o,u=[bc(o,["transform"]),...s].map(h=>a(h,n)),f=yield gB(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?fs(f):[],Object.assign(Object.assign({},t),{data:d})]})}function $se(e,t,n){const{encode:r}=t;if(!r)return[e,t];const i={};for(const[a,o]of Object.entries(r))if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=`${a}${s===0?"":s}`;i[l]=o[s]}else i[a]=o;return[e,Object.assign(Object.assign({},t),{encode:i})]}function zse(e,t,n){const{encode:r,data:i}=t;if(!r)return[e,t];const a=Ui(r,o=>Xse(o)?o:{type:qse(i,o),value:o});return[e,Object.assign(Object.assign({},t),{encode:a})]}function Bse(e,t,n){const{encode:r}=t;if(!r)return[e,t];const i=Ui(r,(a,o)=>{const{type:s}=a;return s!=="constant"||Uoe(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[e,Object.assign(Object.assign({},t),{encode:i})]}function Yse(e,t,n){const{encode:r,data:i}=t;if(!r)return[e,t];const{library:a}=n,o=ele(a),s=Ui(r,l=>o(i,l));return[e,Object.assign(Object.assign({},t),{encode:s})]}function Wse(e,t,n){const{tooltip:r={}}=t;return ka(r)?[e,t]:Array.isArray(r)?[e,Object.assign(Object.assign({},t),{tooltip:{items:r}})]:kl(r)&&b3(r)?[e,Object.assign(Object.assign({},t),{tooltip:r})]:[e,Object.assign(Object.assign({},t),{tooltip:{items:[r]}})]}function Gse(e,t,n){const{data:r,encode:i,tooltip:a={}}=t;if(ka(a))return[e,t];const o=f=>{if(!f)return f;if(typeof f=="string")return e.map(d=>({name:f,value:r[d][f]}));if(kl(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=O=>O}=f,y=typeof g=="string"?Eo(g):g,m=h&&i[h],b=m&&i[h].field,x=v||b||h,w=[];for(const O of e){const _=d?r[O][d]:m?i[h].value[O]:null;w[O]={name:x,color:p,value:y(_)}}return w}if(typeof f=="function"){const d=[];for(const h of e){const p=f(r[h],h,r,i);kl(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:l=[]}=a,c=bc(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(l)?l.map(o):[]},c);return[e,Object.assign(Object.assign({},t),{tooltip:u})]}function Hse(e,t,n){const{encode:r}=t,i=bc(t,["encode"]);if(!r)return[e,t];const a=Object.entries(r),o=a.filter(([,l])=>{const{value:c}=l;return Array.isArray(c[0])}).flatMap(([l,c])=>{const u=[[l,new Array(e.length).fill(void 0)]],{value:f}=c,d=bc(c,["value"]);for(let h=0;h<f.length;h++){const p=f[h];if(Array.isArray(p))for(let v=0;v<p.length;v++){const g=u[v]||[`${l}${v}`,new Array(e).fill(void 0)];g[1][h]=p[v],u[v]=g}}return u.map(([h,p])=>[h,Object.assign({type:"column",value:p},d)])}),s=Object.fromEntries([...a,...o]);return[e,Object.assign(Object.assign({},i),{encode:s})]}function Vse(e,t,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=t,s=(c,u)=>{if(typeof c=="boolean")return c?{}:null;const f=c[u];return f===void 0||f?f:null},l=typeof r=="object"?Array.from(new Set(["x","y","z",...Object.keys(r)])):["x","y","z"];return Z(t,{scale:Object.assign(Object.assign({},Object.fromEntries(l.map(c=>{const u=s(o,c);return[c,Object.assign({guide:s(r,c),slider:s(a,c),scrollbar:u},u&&{ratio:u.ratio===void 0?.5:u.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[e,t]}function Use(e,t,n){const{animate:r}=t;return r||r===void 0?[e,t]:(Z(t,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[e,t])}function Xse(e){if(typeof e!="object"||e instanceof Date||e===null)return!1;const{type:t}=e;return pt(t)}function qse(e,t){return typeof t=="function"?"transform":typeof t=="string"&&Kse(e,t)?"field":"constant"}function Kse(e,t){return Array.isArray(e)?e.some(n=>n[t]!==void 0):!1}function Zse(e){if(_n(e))return{type:"inline",value:e};if(!e)return{type:"inline",value:null};if(Array.isArray(e))return{type:"inline",value:e};const{type:t="inline"}=e,n=bc(e,["type"]);return Object.assign(Object.assign({},n),{type:t})}var cj=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Qse=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Jse(e,t,n){return cj(this,void 0,void 0,function*(){const[r,i]=yield tle(e,t,n),{encode:a,scale:o,data:s,tooltip:l}=i;if(Array.isArray(s)===!1)return null;const{channels:c}=t,u=xy(Object.entries(a).filter(([,d])=>pt(d)),d=>d.map(([h,p])=>Object.assign({name:h},p)),([d])=>{var h;const p=(h=/([^\d]+)\d*$/.exec(d))===null||h===void 0?void 0:h[1],v=c.find(g=>g.name===p);return v!=null&&v.independent?d:p}),f=c.filter(d=>{const{name:h,required:p}=d;if(u.find(([v])=>v===h))return!0;if(p)throw new Error(`Missing encoding for channel: ${h}.`);return!1}).flatMap(d=>{const{name:h,scale:p,scaleKey:v,range:g,quantitative:y,ordinal:m}=d;return u.filter(([x])=>x.startsWith(h)).map(([x,w],O)=>{const _=w.some(T=>T.visual),S=w.some(T=>T.constant),k=o[x]||{},{independent:E=!1,key:M=v||x,type:P=S?"constant":_?"identity":p}=k,A=Qse(k,["independent","key","type"]),L=P==="constant",N=L?void 0:g;return{name:x,values:w,scaleKey:E||L?Symbol("independent"):M,scale:Object.assign(Object.assign({type:P,range:N},A),{quantitative:y,ordinal:m})}})});return[i,Object.assign(Object.assign({},t),{index:r,channels:f,tooltip:l})]})}function ele(e){const[t]=Et("encode",e);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:t(r)(n),field:nle(r)})}function tle(e,t,n){return cj(this,void 0,void 0,function*(){const{library:r}=n,[i]=Et("transform",r),{preInference:a=[],postInference:o=[]}=t,{transform:s=[]}=e,l=[Rse,lj,$se,zse,Bse,Yse,Hse,Use,Vse,Wse,...a.map(i),...s.map(i),...o.map(i),Gse];let c=[],u=e;for(const f of l)[c,u]=yield f(c,u,n);return[c,u]})}function nle(e){const{type:t,value:n}=e;return t==="field"&&typeof n=="string"?n:null}var Da=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Lo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lx(e,t,n){var r;return Da(this,void 0,void 0,function*(){const{library:i}=n,[a]=Et("composition",i),[o]=Et("interaction",i),s=new Set(Object.keys(i).map(A=>{var L;return(L=/mark\.(.*)/.exec(A))===null||L===void 0?void 0:L[1]}).filter(pt)),l=new Set(Object.keys(i).map(A=>{var L;return(L=/component\.(.*)/.exec(A))===null||L===void 0?void 0:L[1]}).filter(pt)),c=A=>{const{type:L}=A;if(typeof L=="function"){const{props:N={}}=L,{composite:T=!0}=N;if(T)return"mark"}return typeof L!="string"?L:s.has(L)||l.has(L)?"mark":L},u=A=>c(A)==="mark",f=A=>c(A)==="standardView",d=A=>{const{type:L}=A;return typeof L!="string"?!1:!!l.has(L)},h=A=>{if(f(A))return[A];const L=c(A);return a({type:L,static:d(A)})(A)},p=[],v=new Map,g=new Map,y=[e],m=[];for(;y.length;){const A=y.shift();if(f(A)){const L=g.get(A),[N,T]=L?hj(L,A,i):yield fj(A,n);v.set(N,A),p.push(N);const I=T.flatMap(h).map(C=>vI(C,i));if(y.push(...I),I.every(f)){const C=yield Promise.all(I.map(j=>dj(j,n)));koe(C);for(let j=0;j<I.length;j++){const D=I[j],F=C[j];g.set(D,F)}}}else{const L=u(A)?A:yield yj(A,n),N=h(L);Array.isArray(N)?y.push(...N):typeof N=="function"&&m.push(N())}}n.emitter.emit(nt.BEFORE_PAINT);const b=new Map,x=new Map,w=[];t.selectAll(ha(_b)).data(p,A=>A.key).join(A=>A.append("g").attr("className",_b).attr("id",L=>L.key).call(uj).each(function(L,N,T){Ix(L,we(T),w,n),b.set(L,T)}),A=>A.call(uj).each(function(L,N,T){Ix(L,we(T),w,n),x.set(L,T)}),A=>A.each(function(L,N,T){const I=T.nameInteraction.values();for(const C of I)C.destroy()}).remove());const O=(A,L,N)=>Array.from(A.entries()).map(([T,I])=>{const C=N||new Map,j=(R,z=H=>H)=>C.set(R,z),D=v.get(T),F=ile(we(I),D,n);return{view:T,container:I,options:D,setState:j,update:(R,z)=>Da(this,void 0,void 0,function*(){const W=ky(Array.from(C.values()))(D);return yield F(W,R,()=>{er(z)&&L(A,z,C)})})}}),_=(A=x,L,N)=>{var T;const I=O(A,_,N);for(const C of I){const{options:j,container:D}=C,F=D.nameInteraction;let R=rg(j);L&&(R=R.filter(z=>L.includes(z[0])));for(const z of R){const[H,W]=z,X=F.get(H);if(X&&((T=X.destroy)===null||T===void 0||T.call(X)),W){const q=Nx(C.view,H,W,o)(C,I,n.emitter);F.set(H,{destroy:q})}}}},S=O(b,_);for(const A of S){const{options:L}=A,N=new Map;A.container.nameInteraction=N;for(const T of rg(L)){const[I,C]=T;if(C){const D=Nx(A.view,I,C,o)(A,S,n.emitter);N.set(I,{destroy:D})}}}_();const{width:k,height:E}=e,M=[];for(const A of m){const L=new Promise(N=>Da(this,void 0,void 0,function*(){for(const T of A){const I=Object.assign({width:k,height:E},T);yield Lx(I,t,n)}N()}));M.push(L)}n.views=p,(r=n.animations)===null||r===void 0||r.forEach(A=>A==null?void 0:A.cancel()),n.animations=w,n.emitter.emit(nt.AFTER_PAINT);const P=w.filter(pt).map(ble).map(A=>A.finished);return Promise.all([...P,...M])})}function uj(e){e.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function rle(e){const[,t]=Et("interaction",e);return n=>{const[r,i]=n;try{return[r,t(r)]}catch(a){return[r,i.type]}}}function ile(e,t,n){const{library:r}=n,i=rle(r),a=l=>l[1]&&l[1].props&&l[1].props.reapplyWhenUpdate,s=rg(t).map(i).filter(a).map(l=>l[0]);return(l,c,u)=>Da(this,void 0,void 0,function*(){const f=[],[d,h]=yield fj(l,n);Ix(d,e,f,n);for(const p of s.filter(v=>v!==c))ale(p,e,l,d,n);for(const p of h)Lx(p,e,n);return u(),{options:l,view:d}})}function ale(e,t,n,r,i){var a;const{library:o}=i,[s]=Et("interaction",o),c=t.node().nameInteraction,u=rg(n).find(([v])=>v===e),f=c.get(e);if(!f||((a=f.destroy)===null||a===void 0||a.call(f),!u[1]))return;const d=Nx(r,e,u[1],s),h={options:n,view:r,container:t.node(),update:v=>Promise.resolve(v)},p=d(h,[],i.emitter);c.set(e,{destroy:p})}function fj(e,t){return Da(this,void 0,void 0,function*(){const{library:n}=t,r=yield sle(e,t),i=ole(r);e.interaction=i.interaction,e.coordinate=i.coordinate,e.marks=[...i.marks,...i.components];const a=vI(i,n),o=yield dj(a,t);return hj(o,a,n)})}function ole(e){const{coordinate:t={},interaction:n={},style:r={},marks:i}=e,a=Lo(e,["coordinate","interaction","style","marks"]),o=i.map(d=>d.coordinate||{}),s=i.map(d=>d.interaction||{}),l=i.map(d=>d.viewStyle||{}),c=[...o,t].reduceRight((d,h)=>Z(d,h),{}),u=[n,...s].reduce((d,h)=>Z(d,h),{}),f=[...l,r].reduce((d,h)=>Z(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:c,interaction:u,style:f})}function sle(e,t){return Da(this,void 0,void 0,function*(){const{library:n}=t,[r,i]=Et("mark",n),a=new Set(Object.keys(n).map(h=>{var p;return(p=/component\.(.*)/.exec(h))===null||p===void 0?void 0:p[1]}).filter(pt)),{marks:o}=e,s=[],l=[],c=[...o],{width:u,height:f}=_se(e),d={options:e,width:u,height:f};for(;c.length;){const[h]=c.splice(0,1),p=yield yj(h,t),{type:v=Sl("G2Mark type is required."),key:g}=p;if(a.has(v))l.push(p);else{const{props:y={}}=i(v),{composite:m=!0}=y;if(!m)s.push(p);else{const{data:b}=p,x=Object.assign(Object.assign({},p),{data:b&&(Array.isArray(b)?b:b.value)}),w=yield r(x,d),O=Array.isArray(w)?w:[w];c.unshift(...O.map((_,S)=>Object.assign(Object.assign({},_),{key:`${g}-${S}`})))}}}return Object.assign(Object.assign({},e),{marks:s,components:l})})}function dj(e,t){return Da(this,void 0,void 0,function*(){const{library:n}=t,[r]=Et("theme",n),[,i]=Et("mark",n),{theme:a,marks:o,coordinates:s=[]}=e,l=r(gj(a)),c=new Map;for(const f of o){const{type:d}=f,{props:h={}}=i(d),p=yield Jse(f,h,t);if(p){const[v,g]=p;c.set(v,g)}}const u=_t(Array.from(c.values()).flatMap(f=>f.channels),({scaleKey:f})=>f);for(const f of u.values()){const d=f.reduce((x,{scale:w})=>Z(x,w),{}),{scaleKey:h}=f[0],{values:p}=f[0],v=Array.from(new Set(p.map(x=>x.field).filter(pt))),g=Z({guide:{title:v.length===0?void 0:v},field:v[0]},d),{name:y}=f[0],m=f.flatMap(({values:x})=>x.map(w=>w.value)),b=Object.assign(Object.assign({},xoe(y,m,g,s,l,n)),{uid:Symbol("scale"),key:h});f.forEach(x=>x.scale=b)}return c})}function Nx(e,t,n,r){const i=e.theme,a=typeof t=="string"?i[t]||{}:{};return r(Z(a,Object.assign({type:t},n)))}function hj(e,t,n){var r;const[i]=Et("mark",n),[a]=Et("theme",n),[o]=Et("labelTransform",n),{key:s,frame:l=!1,theme:c,clip:u,style:f={},labelTransform:d=[]}=t,h=a(gj(c)),p=Array.from(e.values()),v=_oe(p,t),g=ese(Joe(_le(Array.from(v),p,e),t,n)),y=Ose(g,t,h,n),m=cae(y,t,n),b=l?Z({mainLineWidth:1,mainStroke:"#000"},f):f;kse(rj(g),m,y),wse(g);const x=new Map(Array.from(e.values()).flatMap(S=>{const{channels:k}=S;return k.map(({scale:E})=>[E.uid,UI(E,n)])}));Ooe(e,x);const w={};for(const S of g){const{scales:k=[]}=S,E=[];for(const M of k){const{name:P,uid:A}=M,L=(r=x.get(A))!==null&&r!==void 0?r:UI(M,n);E.push(L),P==="y"&&L.update(Object.assign(Object.assign({},L.getOptions()),{xScale:w.x})),VI(w,{[P]:L})}S.scaleInstances=E}const O=[];for(const[S,k]of e.entries()){const{children:E,dataDomain:M,modifier:P,key:A}=S,{index:L,channels:N,tooltip:T}=k,I=Object.fromEntries(N.map(({name:Q,scale:ne})=>[Q,ne])),C=Ui(I,({uid:Q})=>x.get(Q));VI(w,C);const j=woe(N,C),D=i(S),[F,R,z]=ule(D(L,C,j,m)),H=M||F.length,W=P?P(R,H,y):[],X=Q=>{var ne,ae;return(ae=(ne=T.title)===null||ne===void 0?void 0:ne[Q])===null||ae===void 0?void 0:ae.value},V=Q=>T.items.map(ne=>ne[Q]),q=F.map((Q,ne)=>{const ae=Object.assign({points:R[ne],transform:W[ne],index:Q,markKey:A,viewKey:s},T&&{title:X(Q),items:V(Q)});for(const[fe,ge]of Object.entries(j))ae[fe]=ge[Q],z&&(ae[`series${eo(fe)}`]=z[ne].map(be=>ge[be]));return z&&(ae.seriesIndex=z[ne]),z&&T&&(ae.seriesItems=z[ne].map(fe=>V(fe)),ae.seriesTitle=z[ne].map(fe=>X(fe))),ae});k.data=q,k.index=F;const ie=E==null?void 0:E(q,C,y);O.push(...ie||[])}return[{layout:y,theme:h,coordinate:m,markState:e,key:s,clip:u,scale:w,style:b,components:g,labelTransform:ky(d.map(o))},O]}function Ix(e,t,n,r){return Da(this,void 0,void 0,function*(){const{library:i}=r,{components:a,theme:o,layout:s,markState:l,coordinate:c,key:u,style:f,clip:d,scale:h}=e,{x:p,y:v,width:g,height:y}=s,m=Lo(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map((C,j)=>j),w=["a","margin","padding","inset"],O=b.map(C=>dS(Object.assign({},o.view,f),C)),_=w.map(C=>le(m,C)),S=C=>C.style("x",j=>A[j].x).style("y",j=>A[j].y).style("width",j=>A[j].width).style("height",j=>A[j].height).each(function(j,D,F){Sle(we(F),O[j])});let k=0,E=0,M=g,P=y;const A=x.map(C=>{const j=_[C],{left:D=0,top:F=0,bottom:R=0,right:z=0}=j;return k+=D,E+=F,M-=D+z,P-=F+R,{x:k,y:E,width:M,height:P}});t.selectAll(ha(P5)).data(x.filter(C=>pt(O[C])),C=>b[C]).join(C=>C.append("rect").attr("className",P5).style("zIndex",-2).call(S),C=>C.call(S),C=>C.remove());const L=ple(l),N=L?{duration:L[1]}:!1;for(const[,C]of my(a,j=>`${j.type}-${j.position}`))C.forEach((j,D)=>j.index=D);const T=t.selectAll(ha(A5)).data(a,C=>`${C.type}-${C.position}-${C.index}`).join(C=>C.append("g").style("zIndex",({zIndex:j})=>j||-1).attr("className",A5).append(j=>nj(Z({animate:N,scale:h},j),c,o,i,l)),C=>C.transition(function(j,D,F){const{preserve:R=!1}=j;if(R)return;const z=nj(Z({animate:N,scale:h},j),c,o,i,l),{attributes:H}=z,[W]=F.childNodes;return W.update(H,!1)})).transitions();n.push(...T.flat().filter(pt));const I=t.selectAll(ha(Af)).data([s],()=>u).join(C=>C.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Af).call(mj).call(xj,Array.from(l.keys())).call(wj,d),C=>C.call(xj,Array.from(l.keys())).call(j=>L?Ole(j,L):mj(j)).call(wj,d)).transitions();n.push(...I.flat());for(const[C,j]of l.entries()){const{data:D}=j,{key:F,class:R,type:z}=C,H=t.select(`#${F}`),W=yle(C,j,e,r),X=mle(C,j,e,i),V=xle(C,j,e,i),q=wle(C,j,e,i),ie=vle(t,H,R,"element"),Q=H.selectAll(ha(Na)).selectFacetAll(ie).data(D,ne=>ne.key,ne=>ne.groupKey).join(ne=>ne.append(W).attr("className",Na).attr("markType",z).transition(function(ae,fe,ge){return X(ae,[ge])}),ne=>ne.call(ae=>{const fe=ae.parent(),ge=yB(be=>{const[Fe,xe]=be.getBounds().min;return[Fe,xe]});ae.transition(function(be,Fe,xe){gle(xe,fe,ge);const Ee=W(be,Fe),et=V(be,[xe],[Ee]);return et!==null||(xe.nodeName===Ee.nodeName&&Ee.nodeName!=="g"?My(xe,Ee):(xe.parentNode.replaceChild(Ee,xe),Ee.className=Na,Ee.markType=z,Ee.__data__=xe.__data__)),et}).attr("markType",z).attr("className",Na)}),ne=>ne.each(function(ae,fe,ge){ge.__removed__=!0}).transition(function(ae,fe,ge){return q(ae,[ge])}).remove(),ne=>ne.append(W).attr("className",Na).attr("markType",z).transition(function(ae,fe,ge){const{__fromElements__:be}=ge,Fe=V(ae,be,[ge]);return new Np(be,null,ge.parentNode).transition(Fe).remove(),Fe}),ne=>ne.transition(function(ae,fe,ge){const Fe=new Np([],ge.__toData__,ge.parentNode).append(W).attr("className",Na).attr("markType",z).nodes();return V(ae,[ge],Fe)}).remove()).transitions();n.push(...Q.flat())}lle(e,t,n,i,r)})}function lle(e,t,n,r,i){const[a]=Et("labelTransform",r),{markState:o,labelTransform:s}=e,l=t.select(ha(Ob)).node(),c=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([y,m])=>{const{labels:b=[],key:x}=y,w=hle(y,m,e,r,i),O=t.select(`#${x}`).selectAll(ha(Na)).nodes().filter(_=>!_.__removed__);return b.flatMap((_,S)=>{const k=Lo(_,["transform"]);return O.flatMap(E=>{const M=cle(k,S,E);return M.forEach(P=>{c.set(P,A=>w(Object.assign(Object.assign({},A),{element:E}))),u.set(P,_)}),M})})}),d=we(l).selectAll(ha(Sb)).data(f,y=>y.key).join(y=>y.append(m=>c.get(m)(m)).attr("className",Sb),y=>y.each(function(m,b,x){const O=c.get(m)(m);My(x,O)}),y=>y.remove()).nodes(),h=_t(d,y=>u.get(y.__data__)),{coordinate:p,layout:v}=e,g={canvas:i.canvas,coordinate:p,layout:v};for(const[y,m]of h){const{transform:b=[]}=y;ky(b.map(a))(m,g)}s&&s(d,g)}function cle(e,t,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,l=dle(n);if(!r)return[Object.assign(Object.assign({},e),{key:`${o}-${t}`,bounds:l,index:s,points:a,dependentElement:n})];const c=fle(e),u=r.map((f,d)=>Object.assign(Object.assign({},e),{key:`${i[d]}-${t}`,bounds:[a[d]],index:f,points:a,dependentElement:n}));return c?c(u):u}function ule([e,t,n]){if(n)return[e,t,n];const r=[],i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a];s.every(([l,c])=>pt(l)&&pt(c))&&(r.push(o),i.push(s))}return[r,i]}function fle(e){const{selector:t}=e;if(!t)return null;if(typeof t=="function")return t;if(t==="first")return n=>[n[0]];if(t==="last")return n=>[n[n.length-1]];throw new Error(`Unknown selector: ${t}`)}function dle(e){const t=e.cloneNode(),n=e.getAnimations();t.style.visibility="hidden",n.forEach(o=>{const s=o.effect.getKeyframes();t.attr(s[s.length-1])}),e.parentNode.appendChild(t);const r=t.getLocalBounds();t.destroy();const{min:i,max:a}=r;return[i,a]}function hle(e,t,n,r,i){const[a]=Et("shape",r),{data:o,encode:s}=e,{data:l,defaultLabelShape:c}=t,u=l.map(v=>v.points),f=Ui(s,v=>v.value),{theme:d,coordinate:h}=n,p=Object.assign(Object.assign({},i),{document:hI(i),theme:d,coordinate:h});return v=>{const{index:g,points:y}=v,m=o[g],{formatter:b=j=>`${j}`,transform:x,style:w,render:O,selector:_,element:S}=v,k=Lo(v,["formatter","transform","style","render","selector","element"]),E=Ui(Object.assign(Object.assign({},k),w),j=>pj(j,m,g,o,{channel:f,element:S})),{shape:M=c,text:P}=E,A=Lo(E,["shape","text"]),L=typeof b=="string"?Eo(b):b,N=Object.assign(Object.assign({},A),{text:L(P,m,g,o),datum:m}),T=Object.assign({type:`label.${M}`,render:O},A),I=a(T,p),C=vj(d,"label",M,"label");return I(y,N,C,u)}}function pj(e,t,n,r,i){return typeof e=="function"?e(t,n,r,i):typeof e!="string"?e:kl(t)&&t[e]!==void 0?t[e]:e}function ple(e){let t=-1/0,n=1/0;for(const[r,i]of e){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:l={},exit:c={}}=a,{type:u,duration:f=300,delay:d=0}=l,{type:h,duration:p=300,delay:v=0}=s,{type:g,duration:y=300,delay:m=0}=c;for(const b of o){const{updateType:x=u,updateDuration:w=f,updateDelay:O=d,enterType:_=h,enterDuration:S=p,enterDelay:k=v,exitDuration:E=y,exitDelay:M=m,exitType:P=g}=b;(x===void 0||x)&&(t=Math.max(t,w+O),n=Math.min(n,O)),(P===void 0||P)&&(t=Math.max(t,E+M),n=Math.min(n,M)),(_===void 0||_)&&(t=Math.max(t,S+k),n=Math.min(n,k))}}return t===-1/0?null:[n,t-n]}function vle(e,t,n,r){return e.node().parentElement.findAll(a=>a.style.facet!==void 0&&a.style.facet===n&&a!==t.node()).flatMap(a=>a.getElementsByClassName(r))}function gle(e,t,n){if(!e.__facet__)return;const r=e.parentNode.parentNode,i=t.parentNode,[a,o]=n(r),[s,l]=n(i),c=`translate(${a-s}, ${o-l})`;mB(e,c),t.append(e)}function yle(e,t,n,r){const{library:i}=r,[a]=Et("shape",i),{data:o,encode:s}=e,{defaultShape:l,data:c,shape:u}=t,f=Ui(s,m=>m.value),d=c.map(m=>m.points),{theme:h,coordinate:p}=n,{type:v,style:g={}}=e,y=Object.assign(Object.assign({},r),{document:hI(r),coordinate:p,theme:h});return m=>{const{shape:b=l}=g,{shape:x=b,points:w,seriesIndex:O,index:_}=m,S=Lo(m,["shape","points","seriesIndex","index"]),k=Object.assign(Object.assign({},S),{index:_}),E=O?O.map(N=>o[N]):o[_],M=O||_,P=Ui(g,N=>pj(N,E,M,o,{channel:f})),A=u[x]?u[x](P,y):a(Object.assign(Object.assign({},P),{type:bj(e,x)}),y),L=vj(h,v,x,l);return A(w,k,L,d)}}function vj(e,t,n,r){if(typeof t!="string")return;const{color:i}=e,a=e[t]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function jx(e,t,n,r,i){var a,o;const[,s]=Et("shape",i),[l]=Et("animation",i),{defaultShape:c,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${eo(e)}Animation`,{[p]:v}=((a=u[c])===null||a===void 0?void 0:a.props)||s(bj(t,c)).props,{[e]:g={}}=f,y=((o=t.animate)===null||o===void 0?void 0:o[e])||{},m={coordinate:d};return(b,x,w)=>{const{[`${e}Type`]:O,[`${e}Delay`]:_,[`${e}Duration`]:S,[`${e}Easing`]:k}=b,E=Object.assign({type:O||v},y);if(!E.type)return null;const A=l(E,m)(x,w,Z(g,{delay:_,duration:S,easing:k}));return Array.isArray(A)?A:[A]}}function mle(e,t,n,r){return jx("enter",e,t,n,r)}function ble(e){return e.finished.then(()=>{e.cancel()}),e}function xle(e,t,n,r){return jx("update",e,t,n,r)}function wle(e,t,n,r){return jx("exit",e,t,n,r)}function gj(e={}){if(typeof e=="string")return{type:e};const{type:t="light"}=e,n=Lo(e,["type"]);return Object.assign(Object.assign({},n),{type:t})}function rg(e){const t={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=e;return Object.entries(Z(t,n)).reverse()}function yj(e,t){return Da(this,void 0,void 0,function*(){const{data:n}=e,r=Lo(e,["data"]);if(n==null)return e;const[,{data:i}]=yield lj([],{data:n},t);return Object.assign({data:i},r)})}function mj(e){e.style("transform",t=>`translate(${t.paddingLeft+t.marginLeft}, ${t.paddingTop+t.marginTop})`).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function Ole(e,t){const[n,r]=t;e.transition(function(i,a,o){const{transform:s,width:l,height:c}=o.style,{paddingLeft:u,paddingTop:f,innerWidth:d,innerHeight:h,marginLeft:p,marginTop:v}=i,g=[{transform:s,width:l,height:c},{transform:`translate(${u+p}, ${f+v})`,width:d,height:h}];return o.animate(g,{delay:n,duration:r,fill:"both"})})}function bj(e,t){const{type:n}=e;return typeof t=="string"?`${n}.${t}`:t}function xj(e,t){const n=a=>a.class!==void 0?`${a.class}`:"";e.nodes().length===0||(e.selectAll(ha(M5)).data(t,a=>a.key).join(a=>a.append("g").attr("className",M5).attr("id",o=>o.key).style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.remove()),e.select(ha(Ob)).node())||e.append("g").attr("className",Ob).style("zIndex",0)}function ha(...e){return e.map(t=>`.${t}`).join("")}function wj(e,t){e.node()&&e.style("clipPath",n=>{if(!t)return null;const{paddingTop:r,paddingLeft:i,marginLeft:a,marginTop:o,innerWidth:s,innerHeight:l}=n;return new Oo({style:{x:i+a,y:r+o,width:s,height:l}})})}function _le(e,t,n){var r;for(const[c]of n.entries())if(c.type==="cell")return e.filter(u=>u.name!=="shape");if(t.length!==1||e.some(c=>c.name==="shape"))return e;const{defaultShape:i}=t[0];if(!["point","line","rect","hollow"].includes(i))return e;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},l={field:((r=e.find(c=>c.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...e,l]}function Sle(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}function kle(...e){return t=>e.reduce((n,r)=>r(n),t)}function Ele(e){const{style:t,scale:n,type:r}=e,i={},a=Ot(t,"columnWidthRatio");return a&&r==="interval"&&(i.x=Object.assign(Object.assign({},n==null?void 0:n.x),{padding:1-a})),Object.assign(Object.assign({},e),{scale:Object.assign(Object.assign({},n),i)})}function Oj(e){const t=Mle(e);return t.children&&Array.isArray(t.children)&&(t.children=t.children.map(n=>Oj(n))),t}function Mle(e){return kle(Ele)(e)}function Ale(e){const t=Z({},e),n=new Map([[t,null]]),r=new Map([[null,-1]]),i=[t];for(;i.length;){const a=i.shift();if(a.key===void 0){const s=n.get(a),l=r.get(a),c=s===null?"0":`${s.key}-${l}`;a.key=c}const{children:o=[]}=a;if(Array.isArray(o))for(let s=0;s<o.length;s++){const l=Z({},o[s]);o[s]=l,n.set(l,a),r.set(l,s),i.push(l)}}return t}function Ple(e,t){const n=new B5;return n.registerPlugin(new W5),new hA({width:e,height:t,container:document.createElement("div"),renderer:n})}function Cle(e,t={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=e,s=Oj(e),l=Ale(s),{canvas:c=Ple(i,a),emitter:u=new Lb,library:f}=t;t.canvas=c,t.emitter=u;const{width:d,height:h}=c.getConfig();(d!==i||h!==a)&&c.resize(i,a),u.emit(nt.BEFORE_RENDER);const p=we(c.document.documentElement);return c.ready.then(()=>Lx(Object.assign(Object.assign({},l),{width:i,height:a,depth:o}),p,t)).then(()=>{if(o){const[v,g]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(v,g,-o/2)}c.requestAnimationFrame(()=>{c.requestAnimationFrame(()=>{u.emit(nt.AFTER_RENDER),n==null||n()})})}).catch(v=>{r==null||r(v)}),Lle(c.getConfig().container)}function _j(e,t={},n=!1){const{canvas:r,emitter:i}=t;r&&(Tle(r),n?r.destroy():r.destroyChildren()),i.off()}function Tle(e){const t=e.getRoot().querySelectorAll(`.${_b}`);t==null||t.forEach(n=>{const{nameInteraction:r=new Map}=n;(r==null?void 0:r.size)>0&&Array.from(r==null?void 0:r.values()).forEach(i=>{i==null||i.destroy()})})}function Lle(e){return typeof e=="string"?document.getElementById(e):e}const Nle={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function Ile(e,t){var n;return(n=e.style[t])!==null&&n!==void 0?n:Nle[t]}function Dx(e,t,n,r){e.style[t]=n,e.children.forEach(i=>Dx(i,t,n))}function Fx(e){Dx(e,"visibility","hidden")}function ig(e){Dx(e,"visibility","visible")}var qf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function No(e){return we(e).selectAll(`.${Na}`).nodes().filter(t=>!t.__removed__)}function Sj(e,t){return Rx(e,t).flatMap(({container:n})=>No(n))}function Rx(e,t){return t.filter(n=>n!==e&&n.options.parentKey===e.options.key)}function pa(e){return we(e).select(`.${Af}`).node()}function kj(e){if(e.tagName==="g")return e.getRenderBounds();const t=e.getGeometryBounds(),n=new rn;return n.setFromTransformedAABB(t,e.getWorldTransform()),n}function Kf(e,t){const{offsetX:n,offsetY:r}=t,i=kj(e),{min:[a,o],max:[s,l]}=i,c=n<a||n>s,u=r<o||r>l;return c||u?null:[n-a,r-o]}function $x(e,t){const{offsetX:n,offsetY:r}=t,[i,a,o,s]=jle(e);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function jle(e){const t=e.getRenderBounds(),{min:[n,r],max:[i,a]}=t;return[n,r,i,a]}function Ej(e){return t=>t.__data__.color}function zx(e){return t=>t.__data__.x}function Hs(e){const t=Array.isArray(e)?e:[e],n=new Map(t.flatMap(r=>Array.from(r.markState.keys()).map(a=>[ag(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(ag(o,a))[i]}}function Fa(e,t=(r,i)=>r,n=(r,i,a)=>r.setAttribute(i,a)){const r="__states__",i="__ordinal__",a=u=>{const{[r]:f=[],[i]:d={}}=u,h=f.reduce((p,v)=>Object.assign(Object.assign({},p),e[v]),d);if(Object.keys(h).length!==0){for(const[p,v]of Object.entries(h)){const g=Ile(u,p),y=t(v,u);n(u,p,y),p in d||(d[p]=g)}u[i]=d}},o=u=>{u[r]||(u[r]=[])};return{setState:(u,...f)=>{o(u),u[r]=[...f],a(u)},removeState:(u,...f)=>{o(u);for(const d of f){const h=u[r].indexOf(d);h!==-1&&u[r].splice(h,1)}a(u)},hasState:(u,f)=>(o(u),u[r].indexOf(f)!==-1)}}function Dle(e){return e===void 0?!0:typeof e!="object"?!1:Object.keys(e).length===0}function ag(e,t){return`${e},${t}`}function xc(e,t){const r=(Array.isArray(e)?e:[e]).flatMap(a=>a.marks.map(o=>[ag(a.key,o.key),o.state])),i={};for(const a of t){const[o,s]=Array.isArray(a)?a:[a,{}];i[o]=r.reduce((l,c)=>{const[u,f={}]=c,d=Dle(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=l[h],g=(y,m,b,x)=>{const w=ag(x.__data__.viewKey,x.__data__.markKey);return u!==w?v==null?void 0:v(y,m,b,x):typeof p!="function"?p:p(y,m,b,x)};l[h]=g}return l},{})}return i}function Zf(e,t){const n=new Map(e.map((i,a)=>[i,a])),r=t?e.map(t):e;return(i,a)=>{if(typeof i!="function")return i;const o=n.get(a),s=t?t(a):a;return i(s,o,r,a)}}function Mj(e){var{link:t=!1,valueof:n=(u,f)=>u,coordinate:r}=e,i=qf(e,["link","valueof","coordinate"]);const a="element-link";if(!t)return[()=>{},()=>{}];const o=u=>u.__data__.points,s=(u,f)=>{const[,d,h]=u,[p,,,v]=f;return[d,p,v,h]};return[u=>{var f;if(u.length<=1)return;const d=_i(u,(h,p)=>{const{x:v}=h.__data__,{x:g}=p.__data__;return v-g});for(let h=1;h<d.length;h++){const p=Gr(),v=d[h-1],g=d[h],[y,m,b,x]=s(o(v),o(g));p.moveTo(...y),p.lineTo(...m),p.lineTo(...b),p.lineTo(...x),p.closePath();const w=Ui(i,k=>n(k,v)),{fill:O=v.getAttribute("fill")}=w,_=qf(w,["fill"]),S=new Xn({className:a,style:Object.assign({d:p.toString(),fill:O,zIndex:-2},_)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(S),v.link=S}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function Aj(e,t,n){const r=i=>{const{transform:a}=e.style;return a?`${a} ${i}`:i};if(st(n)){const{points:i}=e.__data__,[a,o]=kt(n)?Dp(i):i,s=n.getCenter(),l=Yt(a,s),c=Yt(o,s),u=Wr(l),f=Tk(l,c),d=u+f/2,h=t*Math.cos(d),p=t*Math.sin(d);return r(`translate(${h}, ${p})`)}return kt(n)?r(`translate(${t}, 0)`):r(`translate(0, ${-t})`)}function Pj(e){var{document:t,background:n,scale:r,coordinate:i,valueof:a}=e,o=qf(e,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const l=(y,m,b)=>{const x=y.invert(m),w=m+y.getBandWidth(x)/2,O=y.getStep(x)/2,_=O*b;return[w-O+_,w+O-_]},c=(y,m)=>{const{x:b}=r;if(!Sf(b))return[0,1];const{__data__:x}=y,{x:w}=x,[O,_]=l(b,w,m);return[O,_]},u=(y,m)=>{const{y:b}=r;if(!Sf(b))return[0,1];const{__data__:x}=y,{y:w}=x,[O,_]=l(b,w,m);return[O,_]},f=(y,m)=>{const{padding:b}=m,[x,w]=c(y,b),[O,_]=u(y,b),S=[[x,O],[w,O],[w,_],[x,_]].map(P=>i.map(P)),{__data__:k}=y,{y:E,y1:M}=k;return TA(t,S,{y:E,y1:M},i,m)},d=(y,m)=>{const{transform:b="scale(1.2, 1.2)",transformOrigin:x="center center",stroke:w=""}=m,O=qf(m,["transform","transformOrigin","stroke"]),_=Object.assign({transform:b,transformOrigin:x,stroke:w},O),S=y.cloneNode(!0);for(const[k,E]of Object.entries(_))S.style[k]=E;return S},h=()=>{const{x:y,y:m}=r;return[y,m].some(Sf)};return[y=>{y.background&&y.background.remove();const m=Ui(o,P=>a(P,y)),{fill:b="#CCD6EC",fillOpacity:x=.3,zIndex:w=-2,padding:O=.001,lineWidth:_=0}=m,S=qf(m,["fill","fillOpacity","zIndex","padding","lineWidth"]),k=Object.assign(Object.assign({},S),{fill:b,fillOpacity:x,zIndex:w,padding:O,lineWidth:_}),M=(h()?f:d)(y,k);M.className=s,y.parentNode.parentNode.appendChild(M),y.background=M},y=>{var m;(m=y.background)===null||m===void 0||m.remove(),y.background=null},y=>y.className===s]}function Io(e,t){const r=e.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(e.cursor=r.style.cursor,r.style.cursor=t)}function Fle(e){Io(e,e.cursor)}function Bx(e,t,n){return e.find(r=>Object.entries(t).every(([i,a])=>n(r)[i]===a))}function og(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function Qf(e,t=!1){const n=I$(e,r=>!!r).map((r,i)=>[i===0?"M":"L",...r]);return t&&n.push(["Z"]),n}function Cj(e){return e.querySelectorAll(".element")}function Rle(e,t,n=0){const r=[["M",...t[1]]],i=og(e,t[1]),a=og(e,t[0]);return i===0?r.push(["L",...t[3]],["A",a,a,0,n,1,...t[0]],["Z"]):r.push(["A",i,i,0,n,0,...t[2]],["L",...t[3]],["A",a,a,0,n,1,...t[0]],["Z"]),r}function sg(e,t){if(t(e))return e;let n=e.parent;for(;n&&!t(n);)n=n.parent;return n}var $le=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function zle(e,{elements:t,datum:n,groupKey:r=f=>f,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:l,emitter:c,state:u={}}){var f;const d=t(e),h=new Set(d),p=_t(d,r),v=Zf(d,n),[g,y]=Mj(Object.assign({elements:d,valueof:v,link:i,coordinate:l},le(u.active,"link"))),[m,b,x]=Pj(Object.assign({document:e.ownerDocument,scale:s,coordinate:l,background:a,valueof:v},le(u.active,"background"))),w=Z(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...I)=>{const C=u.active.offset(...I),[,j]=I;return Aj(d[j],C,l)}})}),{setState:O,removeState:_,hasState:S}=Fa(w,v);let k;const E=I=>{const{target:C,nativeEvent:j=!0}=I;if(!h.has(C))return;k&&clearTimeout(k);const D=r(C),F=p.get(D),R=new Set(F);for(const z of d)R.has(z)?S(z,"active")||O(z,"active"):(O(z,"inactive"),y(z)),z!==C&&b(z);m(C),g(F),j&&c.emit("element:highlight",{nativeEvent:j,data:{data:n(C),group:F.map(n)}})},M=()=>{k&&clearTimeout(k),k=setTimeout(()=>{P(),k=null},o)},P=(I=!0)=>{for(const C of d)_(C,"active","inactive"),b(C),y(C);I&&c.emit("element:unhighlight",{nativeEvent:I})},A=I=>{const{target:C}=I;a&&!x(C)||!a&&!h.has(C)||(o>0?M():P())},L=()=>{P()};e.addEventListener("pointerover",E),e.addEventListener("pointerout",A),e.addEventListener("pointerleave",L);const N=I=>{const{nativeEvent:C}=I;C||P(!1)},T=I=>{const{nativeEvent:C}=I;if(C)return;const{data:j}=I.data,D=Bx(d,j,n);D&&E({target:D,nativeEvent:!1})};return c.on("element:highlight",T),c.on("element:unhighlight",N),()=>{e.removeEventListener("pointerover",E),e.removeEventListener("pointerout",A),e.removeEventListener("pointerleave",L),c.off("element:highlight",T),c.off("element:unhighlight",N);for(const I of d)b(I),y(I)}}function lg(e){var{delay:t,createGroup:n,background:r=!1,link:i=!1}=e,a=$le(e,["delay","createGroup","background","link"]);return(o,s,l)=>{const{container:c,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=pa(c);return zle(p,Object.assign({elements:No,datum:Hs(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:xc(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:t,emitter:l},a))}}lg.props={reapplyWhenUpdate:!0};function Tj(e){return lg(Object.assign(Object.assign({},e),{createGroup:zx}))}Tj.props={reapplyWhenUpdate:!0};function Lj(e){return lg(Object.assign(Object.assign({},e),{createGroup:Ej}))}Lj.props={reapplyWhenUpdate:!0};var Ble=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Yle(e,{elements:t,datum:n,groupKey:r=f=>f,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:l,emitter:c,state:u={}}){var f;const d=t(e),h=new Set(d),p=_t(d,r),v=Zf(d,n),[g,y]=Mj(Object.assign({link:i,elements:d,valueof:v,coordinate:o},le(u.selected,"link"))),[m,b]=Pj(Object.assign({document:e.ownerDocument,background:s,coordinate:o,scale:l,valueof:v},le(u.selected,"background"))),x=Z(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...L)=>{const N=u.selected.offset(...L),[,T]=L;return Aj(d[T],N,o)}})}),{setState:w,removeState:O,hasState:_}=Fa(x,v),S=(L=!0)=>{for(const N of d)O(N,"selected","unselected"),y(N),b(N);L&&c.emit("element:unselect",{nativeEvent:!0})},k=(L,N,T=!0)=>{if(_(N,"selected"))S();else{const I=r(N),C=p.get(I),j=new Set(C);for(const D of d)j.has(D)?w(D,"selected"):(w(D,"unselected"),y(D)),D!==N&&b(D);if(g(C),m(N),!T)return;c.emit("element:select",Object.assign(Object.assign({},L),{nativeEvent:T,data:{data:[n(N),...C.map(n)]}}))}},E=(L,N,T=!0)=>{const I=r(N),C=p.get(I),j=new Set(C);if(_(N,"selected")){if(!d.some(F=>!j.has(F)&&_(F,"selected")))return S();for(const F of C)w(F,"unselected"),y(F),b(F)}else{const D=C.some(F=>_(F,"selected"));for(const F of d)j.has(F)?w(F,"selected"):_(F,"selected")||w(F,"unselected");!D&&i&&g(C),m(N)}T&&c.emit("element:select",Object.assign(Object.assign({},L),{nativeEvent:T,data:{data:d.filter(D=>_(D,"selected")).map(n)}}))},M=L=>{const{target:N,nativeEvent:T=!0}=L;return h.has(N)?a?k(L,N,T):E(L,N,T):S()};e.addEventListener("click",M);const P=L=>{const{nativeEvent:N,data:T}=L;if(N)return;const I=a?T.data.slice(0,1):T.data;for(const C of I){const j=Bx(d,C,n);M({target:j,nativeEvent:!1})}},A=()=>{S(!1)};return c.on("element:select",P),c.on("element:unselect",A),()=>{for(const L of d)y(L);e.removeEventListener("click",M),c.off("element:select",P),c.off("element:unselect",A)}}function cg(e){var{createGroup:t,background:n=!1,link:r=!1}=e,i=Ble(e,["createGroup","background","link"]);return(a,o,s)=>{const{container:l,view:c,options:u}=a,{coordinate:f,scale:d}=c,h=pa(l);return Yle(h,Object.assign({elements:No,datum:Hs(c),groupKey:t?t(c):void 0,coordinate:f,scale:d,state:xc(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}cg.props={reapplyWhenUpdate:!0};function Nj(e){return cg(Object.assign(Object.assign({},e),{createGroup:zx}))}Nj.props={reapplyWhenUpdate:!0};function Ij(e){return cg(Object.assign(Object.assign({},e),{createGroup:Ej}))}Ij.props={reapplyWhenUpdate:!0};var Wle=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Gle=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Hle(e){const{transform:t=[]}=e,n=t.find(i=>i.type==="normalizeY");if(n)return n;const r={type:"normalizeY"};return t.push(r),e.transform=t,r}function Vle(e,t,n){const[r]=Array.from(e.entries()).filter(([i])=>i.type===t).map(([i])=>{const{encode:a}=i,o=s=>{const l=a[s];return[s,l?l.value:void 0]};return Object.fromEntries(n.map(o))});return r}function jj(e){var{wait:t=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=e,a=Gle(e,["wait","leading","trailing","labelFormatter"]);return o=>{const{view:s,container:l,update:c,setState:u}=o,{markState:f,scale:d,coordinate:h}=s,p=Vle(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((I,C)=>C),b=_i(m.map(I=>g[I])),x=pa(l),w=l.getElementsByClassName(Na),O=l.getElementsByClassName(Sb),S=_t(O,I=>I.__data__.key.split("-")[0]),k=new Cs({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},le(a,"rule"))}),E=new qr({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},le(a,"label"))});k.append(E),x.appendChild(k);const M=(I,C,j)=>{const[D]=I.invert(j),F=C.invert(D);return b[Uz(b,F)]},P=(I,C)=>{k.setAttribute("x1",I[0]),k.setAttribute("x2",I[0]),E.setAttribute("text",i(C))};let A;const L=I=>Wle(this,void 0,void 0,function*(){const{x:C}=d,j=M(h,C,I);P(I,j),u("chartIndex",F=>{const R=Z({},F),z=R.marks.find(q=>q.type==="line"),W=tt(by(m,q=>tt(q,ie=>+v[ie])/kr(q,ie=>+v[ie]),q=>y[q]).values()),X=[1/W,W];Z(z,{scale:{y:{domain:X}}});const V=Hle(z);V.groupBy="color",V.basis=(q,ie)=>{const Q=q[lo(ne=>g[+ne]).center(q,j)];return ie[Q]};for(const q of R.marks)q.animate=!1;return R}),A=(yield c("chartIndex")).view}),N=I=>{const{scale:C,coordinate:j}=A,{x:D,y:F}=C,R=M(j,D,I);P(I,R);for(const z of w){const{seriesIndex:H,key:W}=z.__data__,X=H[lo(fe=>g[+fe]).center(H,R)],V=[0,F.map(1)],q=[0,F.map(v[X]/v[H[0]])],[,ie]=j.map(V),[,Q]=j.map(q),ne=ie-Q;z.setAttribute("transform",`translate(0, ${ne})`);const ae=S.get(W)||[];for(const fe of ae)fe.setAttribute("dy",ne)}},T=os(I=>{const C=Kf(x,I);C&&N(C)},t,{leading:n,trailing:r});return L([0,0]),x.addEventListener("pointerenter",T),x.addEventListener("pointermove",T),x.addEventListener("pointerleave",T),()=>{k.remove(),x.removeEventListener("pointerenter",T),x.removeEventListener("pointermove",T),x.removeEventListener("pointerleave",T)}}}jj.props={reapplyWhenUpdate:!0};function Ule(e){const{coordinate:t={}}=e,{transform:n=[]}=t,r=n.find(a=>a.type==="fisheye");if(r)return r;const i={type:"fisheye"};return n.push(i),t.transform=n,e.coordinate=t,i}function Xle({wait:e=30,leading:t,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,l=pa(s),c=os(u=>{const f=Kf(l,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=Z({},d,{interaction:{tooltip:{preserve:!0}}});for(const y of h.marks)y.animate=!1;const[p,v]=f,g=Ule(h);return g.focusX=p,g.focusY=v,g.visual=!0,h}),a()},e,{leading:t,trailing:n});return l.addEventListener("pointerenter",c),l.addEventListener("pointermove",c),l.addEventListener("pointerleave",c),()=>{l.removeEventListener("pointerenter",c),l.removeEventListener("pointermove",c),l.removeEventListener("pointerleave",c)}}}var Vs=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function ug(e,t){return t?typeof t=="string"?document.querySelector(t):t:e.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function qle(e){const t=e.getRenderBounds(),{min:[n,r],max:[i,a]}=t;return{x:n,y:r,width:i-n,height:a-r}}function Kle(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function Zle(e,t,n,r,i,a,o,s={},l=[10,10]){const c={".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},u=new EK({className:"tooltip",style:{x:t,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:l,template:{prefixCls:"g2-"},style:Z(c,s)}});return e.appendChild(u.HTMLTooltipElement),u}function Dj({root:e,data:t,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:l=!1,css:c,mount:u,bounding:f,offset:d}){const h=ug(e,u),p=ug(e),v=o?p:e,g=f||qle(e),y=Kle(p,h),{tooltipElement:m=Zle(h,n,r,s,l,g,y,c,d)}=v,{items:b,title:x=""}=t;m.update(Object.assign({x:n,y:r,data:b,title:x,position:s,enterable:l,container:y},i!==void 0&&{content:i(a,{items:b,title:x})})),v.tooltipElement=m}function jo({root:e,single:t,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=ug(e),o=t?a:e,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY),Bj(e),Yj(e),Wj(e)}function Yx({root:e,single:t}){const n=ug(e),r=t?n:e;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0),Bj(e),Yj(e),Wj(e)}function Fj(e){const{value:t}=e;return Object.assign(Object.assign({},e),{value:t===void 0?"undefined":t})}function Qle(e){const{__data__:t}=e,{title:n,items:r=[]}=t,i=r.filter(pt).map(a=>{var{color:o=Rj(e)}=a,s=Vs(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(Fj);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function Jle(e,t){const{color:n,series:r,facet:i=!1}=e,{color:a,series:o}=t,s=l=>l&&l.invert&&!(l instanceof Al)&&!(l instanceof $y);if(s(r))return r.clone().invert(o);if(o&&r instanceof Al&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const l=n.invert(a);return Array.isArray(l)?null:l}return null}function Rj(e){const t=e.getAttribute("fill"),n=e.getAttribute("stroke"),{__data__:r}=e,{color:i=t&&t!=="transparent"?t:n}=r;return i}function $j(e,t=n=>n){const n=new Map(e.map(r=>[t(r),r]));return Array.from(n.values())}function zj(e,t,n,r=e.map(a=>a.__data__),i={}){const a=l=>l instanceof Date?+l:l,o=$j(r.map(l=>l.title),a).filter(pt),s=r.flatMap((l,c)=>{const u=e[c],{items:f=[],title:d}=l,h=f.filter(pt),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=Rj(u)||i.color,name:y}=v,m=Vs(v,["color","name"]);const b=Jle(t,l),x=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:x||d})})}).map(Fj);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:$j(s,l=>`(${a(l.name)}, ${a(l.value)}, ${a(l.color)})`)})}function ece(e,t,n,r){var{plotWidth:i,plotHeight:a,mainWidth:o,mainHeight:s,startX:l,startY:c,transposed:u,polar:f,insetLeft:d,insetTop:h}=r,p=Vs(r,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const v=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},p),g=(O,_,S)=>{const k=new Aa({style:Object.assign({cx:O,cy:_,r:S},v)});return e.appendChild(k),k},y=(O,_,S,k)=>{const E=new Cs({style:Object.assign({x1:O,x2:_,y1:S,y2:k},v)});return e.appendChild(E),E},b=((O,_)=>{if(_.length===1)return _[0];const S=_.map(E=>jt(E,O)),k=Ou(S,E=>E);return _[k]})(n,t),x=()=>u?[l+b[0],l+b[0],c,c+a]:[l,l+i,b[1]+c,b[1]+c],w=()=>{const O=l+d+o/2,_=c+h+s/2,S=jt([O,_],b);return[O,_,S]};if(f){const[O,_,S]=w(),k=e.ruleX||g(O,_,S);k.style.cx=O,k.style.cy=_,k.style.r=S,e.ruleX=k}else{const[O,_,S,k]=x(),E=e.ruleX||y(O,_,S,k);E.style.x1=O,E.style.x2=_,E.style.y1=S,E.style.y2=k,e.ruleX=E}}function tce(e,t,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:l,transposed:c,polar:u,insetLeft:f,insetTop:d}=n,h=Vs(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),v=t.map(k=>k[1]),g=t.map(k=>k[0]),y=Su(v),m=Su(g),b=()=>{if(u){const k=Math.min(a,o)/2,E=s+f+a/2,M=l+d+o/2,P=Wr(Yt([m,y],[E,M])),A=E+k*Math.cos(P),L=M+k*Math.sin(P);return[E,A,M,L]}return c?[s,s+r,y+l,y+l]:[m+s,m+s,l,l+i]},[x,w,O,_]=b(),S=()=>{const k=new Cs({style:Object.assign({x1:x,x2:w,y1:O,y2:_},p)});return e.appendChild(k),k};if(g.length>0){const k=e.ruleY||S();k.style.x1=x,k.style.x2=w,k.style.y1=O,k.style.y2=_,e.ruleY=k}}function Bj(e){e.ruleY&&(e.ruleY.remove(),e.ruleY=void 0)}function Yj(e){e.ruleX&&(e.ruleX.remove(),e.ruleX=void 0)}function nce(e,{data:t,style:n,theme:r}){e.markers&&e.markers.forEach(o=>o.remove());const{type:i=""}=n,a=t.filter(o=>{const[{x:s,y:l}]=o;return pt(s)&&pt(l)}).map(o=>{const[{color:s,element:l},c]=o,u=s||l.style.fill||l.style.stroke||r.color,f=i==="hollow"?"transparent":u,d=i==="hollow"?u:"#fff";return new Aa({className:"g2-tooltip-marker",style:Object.assign({cx:c[0],cy:c[1],fill:f,r:4,stroke:d,lineWidth:2},n)})});for(const o of a)e.appendChild(o);e.markers=a}function Wj(e){e.markers&&(e.markers.forEach(t=>t.remove()),e.markers=[])}function Gj(e,t){return Array.from(e.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[t]})}function Ra(e,t){return e===void 0?t:e}function Hj(e){const{title:t,items:n}=e;return n.length===0&&t===void 0}function rce(e){return Array.from(e.values()).some(t=>{var n;return((n=t.interaction)===null||n===void 0?void 0:n.seriesTooltip)&&t.tooltip})}function Vj(e,t){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,crosshairsX:l,crosshairsY:c,render:u,groupName:f,emitter:d,wait:h=50,leading:p=!0,trailing:v=!1,startX:g=0,startY:y=0,body:m=!0,single:b=!0,position:x,enterable:w,mount:O,bounding:_,theme:S,offset:k,disableNative:E=!1,marker:M=!0,preserve:P=!1,style:A={},css:L={}}=t,N=Vs(t,["elements","sort","filter","scale","coordinate","crosshairs","crosshairsX","crosshairsY","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","offset","disableNative","marker","preserve","style","css"]);const T=n(e),I=kt(o),C=st(o),j=Z(A,N),{innerWidth:D,innerHeight:F,width:R,height:z,insetLeft:H,insetTop:W}=o.getOptions(),X=[],V=[];for(const pe of T){const{__data__:Ae}=pe,{seriesX:Re,title:ze,items:yt}=Ae;Re?X.push(pe):(ze||yt)&&V.push(pe)}const q=pe=>pe.markType==="interval",ie=V.length&&V.every(q)&&!st(o),Q=pe=>pe.__data__.x,ae=!!a.x.getBandWidth&&V.length>0;X.sort((pe,Ae)=>{const Re=I?0:1,ze=yt=>yt.getBounds().min[Re];return I?ze(Ae)-ze(pe):ze(pe)-ze(Ae)});const fe=pe=>{const Ae=I?1:0,{min:Re,max:ze}=pe.getLocalBounds();return _i([Re[Ae],ze[Ae]])};ie?T.sort((pe,Ae)=>Q(pe)-Q(Ae)):V.sort((pe,Ae)=>{const[Re,ze]=fe(pe),[yt,Jt]=fe(Ae),en=(Re+ze)/2,zn=(yt+Jt)/2;return I?zn-en:en-zn});const ge=new Map(X.map(pe=>{const{__data__:Ae}=pe,{seriesX:Re}=Ae,ze=Re.map((Jt,en)=>en),yt=_i(ze,Jt=>Re[+Jt]);return[pe,[yt,Re]]})),{x:be}=a,Fe=be!=null&&be.getBandWidth?be.getBandWidth()/2:0,xe=pe=>{const[Ae]=o.invert(pe);return Ae-Fe},Ee=(pe,Ae,Re,ze)=>{const{_x:yt}=pe,Jt=yt!==void 0?be.map(yt):xe(Ae),en=ze.filter(pt),[zn,yi]=_i([en[0],en[en.length-1]]),zi=zn===yi;if(!ae&&(Jt<zn||Jt>yi)&&!zi)return null;const tu=lo(Ja=>ze[+Ja]).center,Kd=tu(Re,Jt);return Re[Kd]},et=ie?(pe,Ae)=>{const Re=lo(Q).center,ze=Re(Ae,xe(pe)),yt=Ae[ze];return _t(Ae,Q).get(Q(yt))}:(pe,Ae)=>{const ze=pe[I?1:0],yt=Ae.filter(zn=>{const[yi,zi]=fe(zn);return ze>=yi&&ze<=zi});if(!ae||yt.length>0)return yt;const Jt=lo(zn=>{const[yi,zi]=fe(zn);return(yi+zi)/2}).center,en=Jt(Ae,ze);return[Ae[en]].filter(pt)},cn=(pe,Ae)=>{const{__data__:Re}=pe;return Object.fromEntries(Object.entries(Re).filter(([ze])=>ze.startsWith("series")&&ze!=="series").map(([ze,yt])=>{const Jt=yt[Ae];return[N_(ze.replace("series","")),Jt]}))},On=os(pe=>{var Ae;const Re=Kf(e,pe);if(!Re)return;const ze=kj(e),yt=ze.min[0],Jt=ze.min[1],en=[Re[0]-g,Re[1]-y];if(!en)return;const zn=et(en,V),yi=[],zi=[];for(const dn of X){const[Zd,JO]=ge.get(dn),Qd=Ee(pe,en,Zd,JO);if(Qd!==null){yi.push(dn);const z0=cn(dn,Qd),{x:o0e,y:s0e}=z0,l0e=o.map([(o0e||0)+Fe,s0e||0]);zi.push([Object.assign(Object.assign({},z0),{element:dn}),l0e])}}const tu=Array.from(new Set(zi.map(dn=>dn[0].x))),Kd=tu[Ou(tu,dn=>Math.abs(dn-xe(en)))],Ja=zi.filter(dn=>dn[0].x===Kd),ZO=[...Ja.map(dn=>dn[0]),...zn.map(dn=>dn.__data__)],$0=[...yi,...zn],nu=zj($0,a,f,ZO,S);if(r&&nu.items.sort((dn,Zd)=>r(dn)-r(Zd)),i&&(nu.items=nu.items.filter(i)),$0.length===0||Hj(nu)){At(pe);return}if(m&&Dj({root:e,data:nu,x:Re[0]+yt,y:Re[1]+Jt,render:u,event:pe,single:b,position:x,enterable:w,mount:O,bounding:_,css:L,offset:k}),s||l||c){const dn=le(j,"crosshairs"),Zd=Object.assign(Object.assign({},dn),le(j,"crosshairsX")),JO=Object.assign(Object.assign({},dn),le(j,"crosshairsY")),Qd=Ja.map(z0=>z0[1]);l&&ece(e,Qd,Re,Object.assign(Object.assign({},Zd),{plotWidth:D,plotHeight:F,mainWidth:R,mainHeight:z,insetLeft:H,insetTop:W,startX:g,startY:y,transposed:I,polar:C})),c&&tce(e,Qd,Object.assign(Object.assign({},JO),{plotWidth:D,plotHeight:F,mainWidth:R,mainHeight:z,insetLeft:H,insetTop:W,startX:g,startY:y,transposed:I,polar:C}))}if(M){const dn=le(j,"marker");nce(e,{data:Ja,style:dn,theme:S})}const QO=(Ae=Ja[0])===null||Ae===void 0?void 0:Ae[0].x,a0e=QO!=null?QO:xe(en);d.emit("tooltip:show",Object.assign(Object.assign({},pe),{nativeEvent:!0,data:Object.assign(Object.assign({},nu),{data:{x:ac(a.x,a0e,!0)}})}))},h,{leading:p,trailing:v}),At=pe=>{jo({root:e,single:b,emitter:d,event:pe})},vn=()=>{Yx({root:e,single:b})},un=pe=>{var Ae,{nativeEvent:Re,data:ze,offsetX:yt,offsetY:Jt}=pe,en=Vs(pe,["nativeEvent","data","offsetX","offsetY"]);if(Re)return;const zn=(Ae=ze==null?void 0:ze.data)===null||Ae===void 0?void 0:Ae.x,zi=a.x.map(zn),[tu,Kd]=o.map([zi,.5]),Ja=e.getRenderBounds(),ZO=Ja.min[0],$0=Ja.min[1];On(Object.assign(Object.assign({},en),{offsetX:yt!==void 0?yt:ZO+tu,offsetY:Jt!==void 0?Jt:$0+Kd,_x:zn}))},gn=()=>{jo({root:e,single:b,emitter:d,nativeEvent:!1})},gt=()=>{yn(),vn()},fn=()=>{$n()},$n=()=>{E||(e.addEventListener("pointerenter",On),e.addEventListener("pointermove",On),e.addEventListener("pointerleave",pe=>{Kf(e,pe)||At(pe)}))},yn=()=>{E||(e.removeEventListener("pointerenter",On),e.removeEventListener("pointermove",On),e.removeEventListener("pointerleave",At))};return $n(),d.on("tooltip:show",un),d.on("tooltip:hide",gn),d.on("tooltip:disable",gt),d.on("tooltip:enable",fn),()=>{yn(),d.off("tooltip:show",un),d.off("tooltip:hide",gn),d.off("tooltip:disable",gt),d.off("tooltip:enable",fn),P?jo({root:e,single:b,emitter:d,nativeEvent:!1}):vn()}}function ice(e,{elements:t,coordinate:n,scale:r,render:i,groupName:a,sort:o,filter:s,emitter:l,wait:c=50,leading:u=!0,trailing:f=!1,groupKey:d=M=>M,single:h=!0,position:p,enterable:v,datum:g,view:y,mount:m,bounding:b,theme:x,offset:w,shared:O=!1,body:_=!0,disableNative:S=!1,preserve:k=!1,css:E={}}){var M,P;const A=t(e),L=_t(A,d),N=ne=>ne.markType==="interval",T=A.every(N)&&!st(n),I=r.x,C=r.series,j=(P=(M=I==null?void 0:I.getBandWidth)===null||M===void 0?void 0:M.call(I))!==null&&P!==void 0?P:0,D=C?ne=>{const ae=Math.round(1/C.valueBandWidth);return ne.__data__.x+ne.__data__.series*j+j/(ae*2)}:ne=>ne.__data__.x+j/2;T&&A.sort((ne,ae)=>D(ne)-D(ae));const F=ne=>{const{target:ae}=ne;return sg(ae,fe=>fe.classList?fe.classList.includes("element"):!1)},R=T?ne=>{const ae=Kf(e,ne);if(!ae)return;const[fe]=n.invert(ae),ge=lo(D).center,be=ge(A,fe),Fe=A[be];return!O&&A.find(Ee=>Ee!==Fe&&D(Ee)===D(Fe))?F(ne):Fe}:F,z=os(ne=>{const ae=R(ne);if(!ae){jo({root:e,single:h,emitter:l,event:ne});return}const fe=d(ae),ge=L.get(fe);if(!ge)return;const be=ge.length===1&&!O?Qle(ge[0]):zj(ge,r,a,void 0,x);if(o&&be.items.sort((Ee,et)=>o(Ee)-o(et)),s&&(be.items=be.items.filter(s)),Hj(be)){jo({root:e,single:h,emitter:l,event:ne});return}const{offsetX:Fe,offsetY:xe}=ne;_&&Dj({root:e,data:be,x:Fe,y:xe,render:i,event:ne,single:h,position:p,enterable:v,mount:m,bounding:b,css:E,offset:w}),l.emit("tooltip:show",Object.assign(Object.assign({},ne),{nativeEvent:!0,data:Object.assign(Object.assign({},be),{data:fI(ae,y)})}))},c,{leading:u,trailing:f}),H=ne=>{jo({root:e,single:h,emitter:l,event:ne})},W=()=>{S||(e.addEventListener("pointermove",z),e.addEventListener("pointerleave",H))},X=()=>{S||(e.removeEventListener("pointermove",z),e.removeEventListener("pointerleave",H))},V=({nativeEvent:ne,offsetX:ae,offsetY:fe,data:ge})=>{if(ne)return;const{data:be}=ge,Fe=Bx(A,be,g);if(!Fe)return;const xe=Fe.getBBox(),{x:Ee,y:et,width:cn,height:On}=xe,At=e.getBBox();z({target:Fe,offsetX:ae!==void 0?ae+At.x:Ee+cn/2,offsetY:fe!==void 0?fe+At.y:et+On/2})},q=({nativeEvent:ne}={})=>{ne||jo({root:e,single:h,emitter:l,nativeEvent:!1})},ie=()=>{X(),Yx({root:e,single:h})},Q=()=>{W()};return l.on("tooltip:show",V),l.on("tooltip:hide",q),l.on("tooltip:enable",Q),l.on("tooltip:disable",ie),W(),()=>{X(),l.off("tooltip:show",V),l.off("tooltip:hide",q),k?jo({root:e,single:h,emitter:l,nativeEvent:!1}):Yx({root:e,single:h})}}function Uj(e){const{shared:t,crosshairs:n,crosshairsX:r,crosshairsY:i,series:a,name:o,item:s=()=>({}),facet:l=!1}=e,c=Vs(e,["shared","crosshairs","crosshairsX","crosshairsY","series","name","item","facet"]);return(u,f,d)=>{const{container:h,view:p}=u,{scale:v,markState:g,coordinate:y,theme:m}=p,b=Gj(g,"seriesTooltip"),x=Gj(g,"crosshairs"),w=pa(h),O=Ra(a,b),_=Ra(n,x);if(O&&rce(g)&&!l)return Vj(w,Object.assign(Object.assign({},c),{theme:m,elements:No,scale:v,coordinate:y,crosshairs:_,crosshairsX:Ra(Ra(r,n),!1),crosshairsY:Ra(i,_),item:s,emitter:d}));if(O&&l){const S=f.filter(L=>L!==u&&L.options.parentKey===u.options.key),k=Sj(u,f),E=S[0].view.scale,M=w.getBounds(),P=M.min[0],A=M.min[1];return Object.assign(E,{facet:!0}),Vj(w.parentNode.parentNode,Object.assign(Object.assign({},c),{theme:m,elements:()=>k,scale:E,coordinate:y,crosshairs:Ra(n,x),crosshairsX:Ra(Ra(r,n),!1),crosshairsY:Ra(i,_),item:s,startX:P,startY:A,emitter:d}))}return ice(w,Object.assign(Object.assign({},c),{datum:Hs(p),elements:No,scale:v,coordinate:y,groupKey:t?zx():void 0,item:s,emitter:d,view:p,theme:m,shared:t}))}}Uj.props={reapplyWhenUpdate:!0};var fg=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const Xj="legend-category",ace="legend-continuous",oce="items-item",sce="legend-category-item-marker",lce="legend-category-item-label";function qj(e){return e.getElementsByClassName(sce)[0]}function Kj(e){return e.getElementsByClassName(lce)[0]}function Zj(e){return e.getElementsByClassName(oce)}function Wx(e){return e.getElementsByClassName(Xj)}function Qj(e){return e.getElementsByClassName(ace)}function cce(e,t){[...Wx(e),...Qj(e)].forEach(r=>{t(r,i=>i)})}function Gx(e){let t=e.parentNode;for(;t&&!t.__data__;)t=t.parentNode;return t.__data__}function uce(e,{legends:t,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:l={}}){const c=new Map,u=new Map,f=new Map,{unselected:d={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=l,h={unselected:le(d,"marker")},p={unselected:le(d,"label")},{setState:v,removeState:g}=Fa(h,void 0),{setState:y,removeState:m}=Fa(p,void 0),b=Array.from(t(e));let x=b.map(i);const w=()=>{for(const S of b){const k=i(S),E=n(S),M=r(S);x.includes(k)?(g(E,"unselected"),m(M,"unselected")):(v(E,"unselected"),y(M,"unselected"))}};for(const S of b){const k=()=>{Io(e,"pointer")},E=()=>{Fle(e)},M=P=>fg(this,void 0,void 0,function*(){const A=i(S),L=x.indexOf(A);L===-1?x.push(A):x.splice(L,1),yield a(x),w();const{nativeEvent:N=!0}=P;N&&(x.length===b.length?o.emit("legend:reset",{nativeEvent:N}):o.emit("legend:filter",Object.assign(Object.assign({},P),{nativeEvent:N,data:{channel:s,values:x}})))});S.addEventListener("click",M),S.addEventListener("pointerenter",k),S.addEventListener("pointerout",E),c.set(S,M),u.set(S,k),f.set(S,E)}const O=S=>fg(this,void 0,void 0,function*(){const{nativeEvent:k}=S;if(k)return;const{data:E}=S,{channel:M,values:P}=E;M===s&&(x=P,yield a(x),w())}),_=S=>fg(this,void 0,void 0,function*(){const{nativeEvent:k}=S;k||(x=b.map(i),yield a(x),w())});return o.on("legend:filter",O),o.on("legend:reset",_),()=>{for(const S of b)S.removeEventListener("click",c.get(S)),S.removeEventListener("pointerenter",u.get(S)),S.removeEventListener("pointerout",f.get(S)),o.off("legend:filter",O),o.off("legend:reset",_)}}function fce(e,{legend:t,filter:n,emitter:r,channel:i}){const a=({detail:{value:o}})=>{n(o),r.emit({nativeEvent:!0,data:{channel:i,values:o}})};return t.addEventListener("valuechange",a),()=>{t.removeEventListener("valuechange",a)}}function Jj(e,{legend:t,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return fg(this,void 0,void 0,function*(){const{view:l,update:c,setState:u}=e;u(t,f=>{const{marks:d}=f,h=d.map(p=>{if(p.type==="legends")return p;const{transform:v=[],data:g=[]}=p,y=v.findIndex(({type:x})=>x.startsWith("group")||x.startsWith("bin")),m=[...v];g.length&&m.splice(y+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const b=Object.fromEntries(a.map(x=>[x,{domain:l.scale[x].getOptions().domain}]));return Z({},p,Object.assign(Object.assign({transform:m,scale:b},!i&&{animate:!1}),{legend:s?!1:Object.fromEntries(o.map(x=>[x,{preserve:!0}]))}))});return Object.assign(Object.assign({},f),{marks:h})}),yield c()})}function dce(e,t){for(const n of e)Jj(n,Object.assign(Object.assign({},t),{facet:!0}))}function hce(){return(e,t,n)=>{const{container:r}=e,i=t.filter(f=>f!==e),a=i.length>0,o=f=>Gx(f).scales.map(d=>d.name),s=[...Wx(r),...Qj(r)],l=s.flatMap(o),c=a?os(dce,50,{trailing:!0}):os(Jj,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=Gx(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:l};return f.className===Xj?uce(r,{legends:Zj,marker:qj,label:Kj,datum:g=>{const{__data__:y}=g,{index:m}=y;return h[m]},filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!0});c(a?i:e,y)},state:f.attributes.state,channel:d,emitter:n}):fce(r,{legend:f,filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!1});c(a?i:e,y)},emitter:n,channel:d})});return()=>{u.forEach(f=>f())}}}function pce(){return(e,t,n)=>{const{container:r,view:i,options:a}=e,o=Wx(r),s=No(r),l=h=>Gx(h).scales[0].name,c=h=>{const{scale:{[h]:p}}=i;return p},u=xc(a,["active","inactive"]),f=Zf(s,Hs(i)),d=[];for(const h of o){const p=D=>{const{data:F}=h.attributes,{__data__:R}=D,{index:z}=R;return F[z].label},v=l(h),g=Zj(h),y=c(v),m=_t(s,D=>y.invert(D.__data__[v])),{state:b={}}=h.attributes,{inactive:x={}}=b,{setState:w,removeState:O}=Fa(u,f),_={inactive:le(x,"marker")},S={inactive:le(x,"label")},{setState:k,removeState:E}=Fa(_),{setState:M,removeState:P}=Fa(S),A=D=>{for(const F of g){const R=qj(F),z=Kj(F);F===D||D===null?(E(R,"inactive"),P(z,"inactive")):(k(R,"inactive"),M(z,"inactive"))}},L=(D,F)=>{const R=p(F),z=new Set(m.get(R));for(const W of s)z.has(W)?w(W,"active"):w(W,"inactive");A(F);const{nativeEvent:H=!0}=D;H&&n.emit("legend:highlight",Object.assign(Object.assign({},D),{nativeEvent:H,data:{channel:v,value:R}}))},N=new Map;for(const D of g){const F=R=>{L(R,D)};D.addEventListener("pointerover",F),N.set(D,F)}const T=D=>{for(const R of s)O(R,"inactive","active");A(null);const{nativeEvent:F=!0}=D;F&&n.emit("legend:unhighlight",{nativeEvent:F})},I=D=>{const{nativeEvent:F,data:R}=D;if(F)return;const{channel:z,value:H}=R;if(z!==v)return;const W=g.find(X=>p(X)===H);W&&L({nativeEvent:!1},W)},C=D=>{const{nativeEvent:F}=D;F||T({nativeEvent:!1})};h.addEventListener("pointerleave",T),n.on("legend:highlight",I),n.on("legend:unhighlight",C);const j=()=>{h.removeEventListener(T),n.off("legend:highlight",I),n.off("legend:unhighlight",C);for(const[D,F]of N)D.removeEventListener(F)};d.push(j)}return()=>d.forEach(h=>h())}}var ci=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function vce(e,t){const[n,r,i,a]=e,[o,s,l,c]=t;return!(o>i||l<n||s>a||c<r)}function gce(e,t,n,r,i){const[a,o,s,l]=i;return[Math.max(a,Math.min(e,n)),Math.max(o,Math.min(t,r)),Math.min(s,Math.max(e,n)),Math.min(l,Math.max(t,r))]}function yce(e){const{width:t,height:n}=e.getBBox();return[0,0,t,n]}function $a(e,t){for(const[n,r]of Object.entries(t))e.style(n,r)}const e4=Xl(e=>{const t=e.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:l=10,document:c}=t,u=ci(t,["x","y","width","height","class","renders","handleSize","document"]);if(!c||i===void 0||a===void 0||n===void 0||r===void 0)return;const f=l/2,d=(H,W,X)=>{H.handle||(H.handle=X.createElement("rect"),H.append(H.handle));const{handle:V}=H;return V.attr(W),V},h=le(Ay(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=ci(h,["render"]),g=le(u,"handleE"),{render:y=d}=g,m=ci(g,["render"]),b=le(Ay(u,"handleSE","handleSW"),"handleS"),{render:x=d}=b,w=ci(b,["render"]),O=le(u,"handleW"),{render:_=d}=O,S=ci(O,["render"]),k=le(u,"handleNW"),{render:E=d}=k,M=ci(k,["render"]),P=le(u,"handleNE"),{render:A=d}=P,L=ci(P,["render"]),N=le(u,"handleSE"),{render:T=d}=N,I=ci(N,["render"]),C=le(u,"handleSW"),{render:j=d}=C,D=ci(C,["render"]),F=(H,W)=>{const{id:X}=H,V=W(H,H.attributes,c);V.id=X,V.style.draggable=!0},R=H=>()=>{const W=Xl(X=>F(X,H));return new W({})},z=we(e).attr("className",o).style("transform",`translate(${n}, ${r})`).style("draggable",!0);z.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call($a,Object.assign(Object.assign({width:i,height:a},Ay(u,"handle")),{transform:void 0})),z.maybeAppend("handle-n",R(p)).style("x",f).style("y",-f).style("width",i-l).style("height",l).style("fill","transparent").call($a,v),z.maybeAppend("handle-e",R(y)).style("x",i-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call($a,m),z.maybeAppend("handle-s",R(x)).style("x",f).style("y",a-f).style("width",i-l).style("height",l).style("fill","transparent").call($a,w),z.maybeAppend("handle-w",R(_)).style("x",-f).style("y",f).style("width",l).style("height",a-l).style("fill","transparent").call($a,S),z.maybeAppend("handle-nw",R(E)).style("x",-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call($a,M),z.maybeAppend("handle-ne",R(A)).style("x",i-f).style("y",-f).style("width",l).style("height",l).style("fill","transparent").call($a,L),z.maybeAppend("handle-se",R(T)).style("x",i-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call($a,I),z.maybeAppend("handle-sw",R(j)).style("x",-f).style("y",a-f).style("width",l).style("height",l).style("fill","transparent").call($a,D)});function Hx(e,t){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=yce(e),brushRegion:l=(V,q,ie,Q,ne)=>[V,q,ie,Q],reverse:c=!1,fill:u="#777",fillOpacity:f="0.3",stroke:d="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=t,p=ci(t,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,y=null,m=null,b=null,x=!1;const[w,O,_,S]=s;Io(e,"crosshair"),e.style.draggable=!0;const k=(V,q,ie)=>{if(a(ie),m&&m.remove(),b&&b.remove(),v=[V,q],c)return E();M()},E=()=>{b=new Xn({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new e4({style:{x:0,y:0,width:0,height:0,draggable:!0,document:e.ownerDocument},className:"mask"}),e.appendChild(b),e.appendChild(m)},M=()=>{m=new e4({style:Object.assign(Object.assign({document:e.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:d,draggable:!0}),className:"mask"}),e.appendChild(m)},P=(V=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,x=!1,m=null,b=null,r(V)},A=(V,q,ie=!0)=>{const[Q,ne,ae,fe]=gce(V[0],V[1],q[0],q[1],s),[ge,be,Fe,xe]=l(Q,ne,ae,fe,s);return c?N(ge,be,Fe,xe):L(ge,be,Fe,xe),n(ge,be,Fe,xe,ie),[ge,be,Fe,xe]},L=(V,q,ie,Q)=>{m.style.x=V,m.style.y=q,m.style.width=ie-V,m.style.height=Q-q},N=(V,q,ie,Q)=>{b.style.d=`
148
+ M${w},${O}L${_},${O}L${_},${S}L${w},${S}Z
149
+ M${V},${q}L${V},${Q}L${ie},${Q}L${ie},${q}Z
150
+ `,m.style.x=V,m.style.y=q,m.style.width=ie-V,m.style.height=Q-q},T=V=>{const q=(be,Fe,xe,Ee,et)=>be+Fe<Ee?Ee-Fe:be+xe>et?et-xe:be,ie=V[0]-y[0],Q=V[1]-y[1],ne=q(ie,v[0],g[0],w,_),ae=q(Q,v[1],g[1],O,S),fe=[v[0]+ne,v[1]+ae],ge=[g[0]+ne,g[1]+ae];A(fe,ge)},I={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},C=V=>D(V)||j(V),j=V=>{const{id:q}=V;return h.indexOf(q)===-1?!1:new Set(Object.keys(I)).has(q)},D=V=>V===m.getElementById("selection"),F=V=>{const{target:q}=V,[ie,Q]=$x(e,V);if(!m||!C(q)){k(ie,Q,V),x=!0;return}C(q)&&(y=[ie,Q])},R=V=>{const{target:q}=V,ie=$x(e,V);if(!v)return;if(!y)return A(v,ie);if(D(q))return T(ie);const[Q,ne]=[ie[0]-y[0],ie[1]-y[1]],{id:ae}=q;if(I[ae]){const[fe,ge,be,Fe]=I[ae].vector;return A([v[0]+Q*fe,v[1]+ne*ge],[g[0]+Q*be,g[1]+ne*Fe])}},z=V=>{if(y){y=null;const{x:ae,y:fe,width:ge,height:be}=m.style;v=[ae,fe],g=[ae+ge,fe+be],o(ae,fe,ae+ge,fe+be,V);return}g=$x(e,V);const[q,ie,Q,ne]=A(v,g);x=!1,i(q,ie,Q,ne,V)},H=V=>{const{target:q}=V;m&&!C(q)&&P()},W=V=>{const{target:q}=V;!m||!C(q)||x?Io(e,"crosshair"):D(q)?Io(e,"move"):j(q)&&Io(e,I[q.id].cursor)},X=()=>{Io(e,"default")};return e.addEventListener("dragstart",F),e.addEventListener("drag",R),e.addEventListener("dragend",z),e.addEventListener("click",H),e.addEventListener("pointermove",W),e.addEventListener("pointerleave",X),{mask:m,move(V,q,ie,Q,ne=!0){m||k(V,q,{}),v=[V,q],g=[ie,Q],A([V,q],[ie,Q],ne)},remove(V=!0){m&&P(V)},destroy(){m&&P(!1),Io(e,"default"),e.removeEventListener("dragstart",F),e.removeEventListener("drag",R),e.removeEventListener("dragend",z),e.removeEventListener("click",H),e.removeEventListener("pointermove",W),e.removeEventListener("pointerleave",X)}}}function Vx(e,t,n){return t.filter(r=>{if(r===e)return!1;const{interaction:i={}}=r.options;return Object.values(i).find(a=>a.brushKey===n)})}function mce(e,t,n){return Vx(e,t,n).map(r=>pa(r.container))}function bce(e,t,n){return Vx(e,t,n).map(r=>r.options)}function t4(e,t){var{elements:n,selectedHandles:r,siblings:i=R=>[],datum:a,brushRegion:o,extent:s,reverse:l,scale:c,coordinate:u,series:f=!1,key:d=R=>R,bboxOf:h=R=>{const{x:z,y:H,width:W,height:X}=R.style;return{x:z,y:H,width:W,height:X}},state:p={},emitter:v}=t,g=ci(t,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(e),m=i(e),b=m.flatMap(n),x=Zf(y,a),w=le(g,"mask"),{setState:O,removeState:_}=Fa(p,x),S=new Map,{width:k,height:E,x:M=0,y:P=0}=h(e),A=s||[0,0,k,E],L=()=>{for(const R of[...y,...b])_(R,"active","inactive")},N=(R,z,H,W)=>{var X;for(const q of m)(X=q.brush)===null||X===void 0||X.remove();const V=new Set;for(const q of y){const{min:ie,max:Q}=q.getLocalBounds(),[ne,ae]=ie,[fe,ge]=Q;vce([ne,ae,fe,ge],[R,z,H,W])?(O(q,"active"),V.add(d(q))):O(q,"inactive")}for(const q of b)V.has(d(q))?O(q,"active"):O(q,"inactive")},T=()=>{for(const R of y)_(R,"inactive");for(const R of S.values())R.remove();S.clear()},I=(R,z,H,W)=>{const X=q=>{const ie=q.cloneNode();return ie.__data__=q.__data__,q.parentNode.appendChild(ie),S.set(q,ie),ie},V=new Oo({style:{x:R+M,y:z+P,width:H-R,height:W-z}});e.appendChild(V);for(const q of y){const ie=S.get(q)||X(q);ie.style.clipPath=V,O(q,"inactive"),O(ie,"active")}},C=Hx(e,Object.assign(Object.assign({},w),{extent:A,brushRegion:o,reverse:l,selectedHandles:r,brushended:R=>{const z=f?T:L;R&&v.emit("brush:remove",{nativeEvent:!0}),z()},brushed:(R,z,H,W,X)=>{const V=gv(R,z,H,W,c,u);X&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:V}}),(f?I:N)(R,z,H,W)},brushcreated:(R,z,H,W,X)=>{const V=gv(R,z,H,W,c,u);v.emit("brush:end",Object.assign(Object.assign({},X),{nativeEvent:!0,data:{selection:V}}))},brushupdated:(R,z,H,W,X)=>{const V=gv(R,z,H,W,c,u);v.emit("brush:end",Object.assign(Object.assign({},X),{nativeEvent:!0,data:{selection:V}}))},brushstarted:R=>{v.emit("brush:start",R)}})),j=({nativeEvent:R,data:z})=>{if(R)return;const{selection:H}=z,[W,X,V,q]=Tte(H,c,u);C.move(W,X,V,q,!1)};v.on("brush:highlight",j);const D=({nativeEvent:R}={})=>{R||C.remove(!1)};v.on("brush:remove",D);const F=C.destroy.bind(C);return C.destroy=()=>{v.off("brush:highlight",j),v.off("brush:remove",D),F()},C}function Ux(e){var{facet:t,brushKey:n}=e,r=ci(e,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:l,options:c}=i,u=pa(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=l;if(t){const g=u.getBounds(),y=g.min[0],m=g.min[1],b=g.max[0],x=g.max[1];return t4(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>Sj(i,a),datum:Hs(Rx(i,a).map(w=>w.view)),brushRegion:(w,O,_,S)=>[w,O,_,S],extent:[y,m,b,x],state:xc(Rx(i,a).map(w=>w.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=t4(u,Object.assign(Object.assign({elements:No,key:g=>g.__data__.key,siblings:()=>mce(i,a,n),datum:Hs([l,...Vx(i,a,n).map(g=>g.view)]),brushRegion:(g,y,m,b)=>[g,y,m,b],extent:void 0,state:xc([c,...bce(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function Xx(e,t,n,r,i){const[,a,,o]=i;return[e,a,n,o]}function xce(e){return Ux(Object.assign(Object.assign({},e),{brushRegion:Xx,selectedHandles:["handle-e","handle-w"]}))}function qx(e,t,n,r,i){const[a,,o]=i;return[a,t,o,r]}function wce(e){return Ux(Object.assign(Object.assign({},e),{brushRegion:qx,selectedHandles:["handle-n","handle-s"]}))}var Kx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Oce="axis",_ce="axis-line",Sce="axis-main-group",n4="axis-hot-area";function kce(e){return e.getElementsByClassName(Oce)}function r4(e){return e.getElementsByClassName(_ce)[0]}function Ece(e){return e.getElementsByClassName(Sce)[0]}function i4(e){return Ece(e).getLocalBounds()}function Mce(e,t){var{cross:n,offsetX:r,offsetY:i}=t,a=Kx(t,["cross","offsetX","offsetY"]);const o=i4(e),s=r4(e),[l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=(f-c)*2;return{brushRegion:qx,hotZone:new Oo({className:n4,style:Object.assign({width:n?h/2:h,transform:`translate(${(n?c:l-h/2).toFixed(2)}, ${u})`,height:d-u},a)}),extent:n?(p,v,g,y)=>[-1/0,v,1/0,y]:(p,v,g,y)=>[Math.floor(c-r),v,Math.ceil(f-r),y]}}function Ace(e,t){var{offsetY:n,offsetX:r,cross:i=!1}=t,a=Kx(t,["offsetY","offsetX","cross"]);const o=i4(e),s=r4(e),[,l]=s.getLocalBounds().min,[c,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:Xx,hotZone:new Oo({className:n4,style:Object.assign({width:f-c,height:i?h:h*2,transform:`translate(${c}, ${i?u:l-h})`},a)}),extent:i?(p,v,g,y)=>[p,-1/0,g,1/0]:(p,v,g,y)=>[p,Math.floor(u-n),g,Math.ceil(d-n)]}}function Pce(e,t){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:l,reverse:c=!1,state:u={},emitter:f,coordinate:d}=t,h=Kx(t,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(e),v=n(e),g=Zf(p,o),{setState:y,removeState:m}=Fa(u,g),b=new Map,x=le(h,"mask"),w=j=>Array.from(b.values()).every(([D,F,R,z])=>j.some(([H,W])=>H>=D&&H<=R&&W>=F&&W<=z)),O=v.map(j=>j.attributes.scale),_=j=>j.length>2?[j[0],j[j.length-1]]:j,S=new Map,k=()=>{S.clear();for(let j=0;j<v.length;j++){const D=O[j],{domain:F}=D.getOptions();S.set(j,_(F))}};k();const E=(j,D)=>{const F=[];for(const z of p){const H=i(z);w(H)?(y(z,"active"),F.push(z)):y(z,"inactive")}if(S.set(j,P(F,j)),!D)return;const R=()=>{if(!A)return Array.from(S.values());const z=[];for(const[H,W]of S){const X=O[H],{name:V}=X.getOptions();V==="x"?z[0]=W:z[1]=W}return z};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:R()}})},M=j=>{for(const D of p)m(D,"active","inactive");k(),j&&f.emit("brushAxis:remove",{nativeEvent:!0})},P=(j,D)=>{const F=O[D],{name:R}=F.getOptions(),z=j.map(H=>{const W=H.__data__;return F.invert(W[R])});return _(Po(F,z))},A=v.some(a)&&v.some(j=>!a(j)),L=[];for(let j=0;j<v.length;j++){const D=v[j],F=a(D)?Ace:Mce,{hotZone:R,brushRegion:z,extent:H}=F(D,{offsetY:s,offsetX:l,cross:A,zIndex:999,fill:"transparent"});D.parentNode.appendChild(R);const W=Hx(R,Object.assign(Object.assign({},x),{reverse:c,brushRegion:z,brushended(X){b.delete(D),Array.from(b.entries()).length===0?M(X):E(j,X)},brushed(X,V,q,ie,Q){b.set(D,H(X,V,q,ie)),E(j,Q)}}));L.push(W)}const N=(j={})=>{const{nativeEvent:D}=j;D||L.forEach(F=>F.remove(!1))},T=(j,D,F)=>{const[R,z]=j,H=V=>V.getStep?V.getStep():0,W=I(R,D,F),X=I(z,D,F)+H(D);return a(F)?[W,-1/0,X,1/0]:[-1/0,W,1/0,X]},I=(j,D,F)=>{const{height:R,width:z}=d.getOptions(),H=D.clone();return a(F)?H.update({range:[0,z]}):H.update({range:[R,0]}),H.map(j)},C=j=>{const{nativeEvent:D}=j;if(D)return;const{selection:F}=j.data;for(let R=0;R<L.length;R++){const z=F[R],H=L[R],W=v[R];if(z){const X=O[R];H.move(...T(z,X,W),!1)}else H.remove(!1)}};return f.on("brushAxis:remove",N),f.on("brushAxis:highlight",C),()=>{L.forEach(j=>j.destroy()),f.off("brushAxis:remove",N),f.off("brushAxis:highlight",C)}}function Cce(e){return(t,n,r)=>{const{container:i,view:a,options:o}=t,s=pa(i),{x:l,y:c}=s.getBBox(),{coordinate:u}=a;return Pce(i,Object.assign({elements:No,axes:kce,offsetY:c,offsetX:l,points:f=>f.__data__.points,horizontal:f=>{const{startPos:[d,h],endPos:[p,v]}=f.attributes;return d!==p&&h===v},datum:Hs(a),state:xc(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},e))}}var Tce=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},a4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lce(e=300){let t=null;return n=>{const{timeStamp:r}=n;return t!==null&&r-t<e?(t=r,!0):(t=r,!1)}}function Nce(e,t){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:l,coordinate:c,selection:u,series:f=!1}=t,d=a4(t,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=le(d,"mask"),{width:p,height:v}=e.getBBox(),g=a||[0,0,p,v],y=Lce(),m=Hx(e,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:b}));e.addEventListener("click",x);function b(O,_,S,k,E){E.nativeEvent=!0,n(u(O,_,S,k),E),m.remove()}function x(O){y(O)&&(O.nativeEvent=!0,r(O))}const w=({nativeEvent:O,data:_})=>{if(O)return;const{selection:S}=_;n(S,{nativeEvent:!1})};return s.on("brush:filter",w),()=>{m.destroy(),s.off("brush:filter",w),e.removeEventListener("click",x)}}function Zx(e){var{hideX:t=!0,hideY:n=!0}=e,r=a4(e,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:l,options:c,update:u,setState:f}=i,d=pa(s),h={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};let p=!1,v=!1,g=l;const{scale:y,coordinate:m}=l;return Nce(d,Object.assign(Object.assign({brushRegion:(b,x,w,O)=>[b,x,w,O],selection:(b,x,w,O)=>{const{scale:_,coordinate:S}=g;return gv(b,x,w,O,_,S)},filter:(b,x)=>Tce(this,void 0,void 0,function*(){if(v)return;v=!0;const[w,O]=b;f("brushFilter",S=>{const{marks:k}=S,E=k.map(M=>Z({axis:Object.assign(Object.assign({},t&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},M,{scale:{x:{domain:w,nice:!1},y:{domain:O,nice:!1}}}));return Object.assign(Object.assign({},c),{marks:E,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},x),{data:{selection:[w,O]}})),g=(yield u()).view,v=!1,p=!0}),reset:b=>{if(v||!p)return;const{scale:x}=l,{x:w,y:O}=x,_=w.getOptions().domain,S=O.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},b),{data:{selection:[_,S]}})),p=!1,g=l,f("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:m},h),r))}}function Ice(e){return Zx(Object.assign(Object.assign({hideX:!0},e),{brushRegion:Xx}))}function jce(e){return Zx(Object.assign(Object.assign({hideY:!0},e),{brushRegion:qx}))}var Dce=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const Fce="slider";function Rce(e,t,n,r=!1,i="x",a="y"){const{marks:o}=e,s=o.map(l=>{var c,u;return Z({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},l,{scale:t,[n]:Object.assign(Object.assign({},((c=l[n])===null||c===void 0?void 0:c[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),((u=l[n])===null||u===void 0?void 0:u[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},e),{marks:s,clip:!0,animate:!1})}function $ce(e,t,n){const[r,i]=e,a=n?l=>1-l:l=>l,o=ac(t,a(r),!0),s=ac(t,a(i),!1);return Po(t,[o,s])}function dg(e){return[e[0],e[e.length-1]]}function o4({initDomain:e={},className:t=Fce,prefix:n="slider",setValue:r=(c,u)=>c.setValues(u),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:l=c=>{var u;const f=(u=c==null?void 0:c.attributes)===null||u===void 0?void 0:u.values;if(f[0]!==0||f[1]!==1)return f}}){return(c,u,f)=>{const{container:d,view:h,update:p,setState:v}=c,g=d.getElementsByClassName(t);if(!g.length)return()=>{};let y=!1;const{scale:m,coordinate:b,layout:x}=h,{paddingLeft:w,paddingTop:O,paddingBottom:_,paddingRight:S}=x,{x:k,y:E}=m,M=kt(b),P=T=>{const I=T==="vertical"?"y":"x",C=T==="vertical"?"x":"y";return M?[C,I]:[I,C]},A=new Map,L=new Set,N={x:e.x||k.getOptions().domain,y:e.y||E.getOptions().domain};for(const T of g){const{orientation:I}=T.attributes,[C,j]=P(I),D=`${n}${eo(C)}:filter`,F=C==="x",{ratio:R}=k.getOptions(),{ratio:z}=E.getOptions(),H=q=>{if(q.data){const{selection:fe}=q.data,[ge=dg(N.x),be=dg(N.y)]=fe;return F?[Po(k,ge,R),Po(E,be,z)]:[Po(E,be,z),Po(k,ge,R)]}const{value:ie}=q.detail,Q=m[C],ne=$ce(ie,Q,M&&I==="horizontal"),ae=N[j];return[ne,ae]},W=os(q=>Dce(this,void 0,void 0,function*(){const{initValue:ie=!1}=q;if(y&&!ie)return;y=!0;const{nativeEvent:Q=!0}=q,[ne,ae]=H(q);if(N[C]=ne,N[j]=ae,Q){const fe=F?ne:ae,ge=F?ae:ne;f.emit(D,Object.assign(Object.assign({},q),{nativeEvent:Q,data:{selection:[dg(fe),dg(ge)]}}))}v(T,fe=>Object.assign(Object.assign({},Rce(fe,{[C]:{domain:ne,nice:!1}},n,i,C,j)),{paddingLeft:w,paddingTop:O,paddingBottom:_,paddingRight:S})),yield p(),y=!1}),a,{leading:o,trailing:s}),X=q=>{const{nativeEvent:ie}=q;if(ie)return;const{data:Q}=q,{selection:ne}=Q,[ae,fe]=ne;T.dispatchEvent(new dt("valuechange",{data:Q,nativeEvent:!1}));const ge=F?yv(ae,k):yv(fe,E);r(T,ge)};f.on(D,X),T.addEventListener("valuechange",W),A.set(T,W),L.add([D,X]);const V=l(T);V&&T.dispatchEvent(new dt("valuechange",{detail:{value:V},nativeEvent:!1,initValue:!0}))}return()=>{for(const[T,I]of A)T.removeEventListener("valuechange",I);for(const[T,I]of L)f.off(T,I)}}}const s4="g2-scrollbar";function zce(e={}){return(t,n,r)=>{const{view:i,container:a}=t;if(!a.getElementsByClassName(s4).length)return()=>{};const{scale:s}=i,{x:l,y:c}=s,u={x:[...l.getOptions().domain],y:[...c.getOptions().domain]};return l.update({domain:l.getOptions().expectedDomain}),c.update({domain:c.getOptions().expectedDomain}),o4(Object.assign(Object.assign({},e),{initDomain:u,className:s4,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0]),getInitValues:d=>{const h=d.slider.attributes.values;if(h[0]!==0)return h}}))(t,n,r)}}var Bce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Yce(e,t,n){return`<${e} style="${Object.entries(n).map(([r,i])=>`${JK(r)}:${i}`).join(";")}">${t}</${e}>`}const Wce={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function l4(e){return e.nodeName!=="text"?!1:!!e.isOverflowing()}function c4(e){var{offsetX:t=8,offsetY:n=8}=e,r=Bce(e,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,l=le(r,"tip"),c=new Set,u=d=>{const{target:h}=d;if(!l4(h)){d.stopPropagation();return}const{offsetX:p,offsetY:v}=d,g=p+t-o,y=v+n-s;if(h.tip){h.tip.style.x=g,h.tip.style.y=y;return}const{text:m}=h.style,b=new Ju({className:"poptip",style:{innerHTML:Yce("div",m,Object.assign(Object.assign({},Wce),l)),x:g,y}});a.appendChild(b),h.tip=b,c.add(b)},f=d=>{const{target:h}=d;if(!l4(h)){d.stopPropagation();return}h.tip&&(h.tip.remove(),h.tip=null,c.delete(h.tip))};return a.addEventListener("pointerover",u),a.addEventListener("pointerout",f),()=>{a.removeEventListener("pointerover",u),a.removeEventListener("pointerout",f),c.forEach(d=>d.remove())}}}c4.props={reapplyWhenUpdate:!0};var Gce=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Hce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Vce(e){return we(e).select(`.${Af}`).node()}const Uce={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function Xce(e={}){const{originData:t=[],layout:n}=e,r=Hce(e,["originData","layout"]),i=Z({},Uce,r),a=le(i,"breadCrumb"),o=le(i,"active");return s=>{const{update:l,setState:c,container:u,options:f}=s,d=Vce(u),h=f.marks[0],{state:p}=h,v=new bn;d.appendChild(v);const g=(x,w)=>Gce(this,void 0,void 0,function*(){if(v.removeChildren(),w){let O="",_=a.y,S=0;const k=[],E=d.getBBox().width,M=x.map((P,A)=>{O=`${O}${P}/`,k.push(P);const L=new qr({name:O.replace(/\/$/,""),style:Object.assign(Object.assign({text:P,x:S,path:[...k],depth:A},a),{y:_})});v.appendChild(L),S+=L.getBBox().width;const N=new qr({style:Object.assign(Object.assign({x:S,text:" / "},a),{y:_})});return v.appendChild(N),S+=N.getBBox().width,S>E&&(_=v.getBBox().height+a.y,S=0,L.attr({x:S,y:_}),S+=L.getBBox().width,N.attr({x:S,y:_}),S+=N.getBBox().width),A===ih(x)-1&&N.remove(),L});M.forEach((P,A)=>{if(A===ih(M)-1)return;const L=Object.assign({},P.attributes);P.attr("cursor","pointer"),P.addEventListener("mouseenter",()=>{P.attr(o)}),P.addEventListener("mouseleave",()=>{P.attr(L)}),P.addEventListener("click",()=>{g(Ot(P,["style","path"]),Ot(P,["style","depth"]))})})}cce(u,c),c("treemapDrillDown",O=>{const{marks:_}=O,S=x.join("/"),k=_.map(E=>{if(E.type!=="rect")return E;let M=t;if(w){const A=t.filter(C=>{const j=Ot(C,["id"]);return j&&(j.match(`${S}/`)||S.match(j))}).map(C=>({value:C.height===0?Ot(C,["value"]):void 0,name:Ot(C,["id"])})),{paddingLeft:L,paddingBottom:N,paddingRight:T}=n,I=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||v.getBBox().height+10)/(w+1),paddingLeft:L/(w+1),paddingBottom:N/(w+1),paddingRight:T/(w+1),path:C=>C.name,layer:C=>C.depth===w+1});M=W3(A,I,{value:"value"})[0]}else M=t.filter(A=>A.depth===1);const P=[];return M.forEach(({path:A})=>{P.push(fu(A))}),Z({},E,{data:M,scale:{color:{domain:P}}})});return Object.assign(Object.assign({},O),{marks:k})}),yield l(void 0,["legendFilter"])}),y=x=>{const w=x.target;if(Ot(w,["markType"])!=="rect")return;const O=Ot(w,["__data__","key"]),_=yl(t,S=>S.id===O);Ot(_,"height")&&g(Ot(_,"path"),Ot(_,"depth"))};d.addEventListener("click",y);const m=P_(Object.assign(Object.assign({},p.active),p.inactive)),b=()=>{Cj(d).forEach(w=>{const O=Ot(w,["style","cursor"]),_=yl(t,S=>S.id===Ot(w,["__data__","key"]));if(O!=="pointer"&&(_!=null&&_.height)){w.style.cursor="pointer";const S=q$(w.attributes,m);w.addEventListener("mouseenter",()=>{w.attr(p.active)}),w.addEventListener("mouseleave",()=>{w.attr(Z(S,p.inactive))})}})};return b(),d.addEventListener("mousemove",b),()=>{v.remove(),d.removeEventListener("click",y),d.removeEventListener("mousemove",b)}}}var Qx=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},qce=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Kce={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},Jx="movePoint",u4=e=>{const t=e.target,{markType:n}=t;n==="line"&&(t.attr("_lineWidth",t.attr("lineWidth")||1),t.attr("lineWidth",t.attr("_lineWidth")+3)),n==="interval"&&(t.attr("_opacity",t.attr("opacity")||1),t.attr("opacity",.7*t.attr("_opacity")))},f4=e=>{const t=e.target,{markType:n}=t;n==="line"&&t.attr("lineWidth",t.attr("_lineWidth")),n==="interval"&&t.attr("opacity",t.attr("_opacity"))},Zce=(e,t,n)=>t.map(r=>["x","color"].reduce((a,o)=>{const s=n[o];return s&&r[s]!==e[s]?!1:a},!0)?Object.assign(Object.assign({},r),e):r),Qce=e=>{const t=Ot(e,["__data__","y"]),r=Ot(e,["__data__","y1"])-t,{__data__:{data:i,encode:a,transform:o},childNodes:s}=e.parentNode,l=yl(o,({type:f})=>f==="normalizeY"),c=Ot(a,["y","field"]),u=i[s.indexOf(e)][c];return(f,d=!1)=>l||d?f/(1-f)/(r/(1-r))*u:f},Jce=(e,t)=>{const n=Ot(e,["__data__","seriesItems",t,"0","value"]),r=Ot(e,["__data__","seriesIndex",t]),{__data__:{data:i,encode:a,transform:o}}=e.parentNode,s=yl(o,({type:u})=>u==="normalizeY"),l=Ot(a,["y","field"]),c=i[r][l];return u=>s?n===1?u:u/(1-u)/(n/(1-n))*c:u},d4=(e,t,n)=>{e.forEach((r,i)=>{r.attr("stroke",t[1]===i?n.activeStroke:n.stroke)})},h4=(e,t,n,r)=>{const i=new Xn({style:n}),a=new qr({style:r});return t.appendChild(a),e.appendChild(i),[i,a]},p4=(e,t)=>{if(!Ot(e,["options","range","indexOf"]))return;const r=e.options.range.indexOf(t);return e.sortedDomain[r]},e2=(e,t,n)=>{const r=og(e,t),a=og(e,n)/r,o=e[0]+(t[0]-e[0])*a,s=e[1]+(t[1]-e[1])*a;return[o,s]};function eue(e={}){const{selection:t=[],precision:n=2}=e,r=qce(e,["selection","precision"]),i=Object.assign(Object.assign({},Kce),r||{}),a=le(i,"path"),o=le(i,"label"),s=le(i,"point");return(l,c,u)=>{const{update:f,setState:d,container:h,view:p,options:{marks:v,coordinate:g}}=l,y=pa(h);let m=Cj(y),b,x=t;const{transform:w=[],type:O}=g,_=!!yl(w,({type:C})=>C==="transpose"),S=O==="polar",k=O==="theta",E=!!yl(m,({markType:C})=>C==="area");E&&(m=m.filter(({markType:C})=>C==="area"));const M=new bn({style:{zIndex:2}});y.appendChild(M);const P=()=>{u.emit("element-point:select",{nativeEvent:!0,data:{selection:x}})},A=(C,j)=>{u.emit("element-point:moved",{nativeEvent:!0,data:{changeData:C,data:j}})},L=C=>{const j=C.target;x=[j.parentNode.childNodes.indexOf(j)],P(),T(j)},N=C=>{const{data:{selection:j},nativeEvent:D}=C;if(D)return;x=j;const F=Ot(m,[x==null?void 0:x[0]]);F&&T(F)},T=C=>{const{attributes:j,markType:D,__data__:F}=C,{stroke:R}=j,{points:z,seriesTitle:H,color:W,title:X,seriesX:V,y1:q}=F;if(_&&D!=="interval")return;const{scale:ie,coordinate:Q}=(b==null?void 0:b.view)||p,{color:ne,y:ae,x:fe}=ie,ge=Q.getCenter();M.removeChildren();let be;const Fe=(xe,Ee,et,cn)=>Qx(this,void 0,void 0,function*(){return d("elementPointMove",On=>{var At;const vn=(((At=b==null?void 0:b.options)===null||At===void 0?void 0:At.marks)||v).map(un=>{if(!cn.includes(un.type))return un;const{data:gn,encode:gt}=un,$n=Object.keys(gt).reduce((pe,Ae)=>{const Re=gt[Ae];return Ae==="x"&&(pe[Re]=xe),Ae==="y"&&(pe[Re]=Ee),Ae==="color"&&(pe[Re]=et),pe},{}),yn=Zce($n,gn,gt);return A($n,yn),Z({},un,{data:yn,animate:!1})});return Object.assign(Object.assign({},On),{marks:vn})}),yield f("elementPointMove")});if(["line","area"].includes(D))z.forEach((xe,Ee)=>{const et=fe.invert(V[Ee]);if(!et)return;const cn=new Aa({name:Jx,style:Object.assign({cx:xe[0],cy:xe[1],fill:R},s)}),On=Jce(C,Ee);cn.addEventListener("mousedown",At=>{const vn=Q.output([V[Ee],0]),un=H==null?void 0:H.length;h.attr("cursor","move"),x[1]!==Ee&&(x[1]=Ee,P()),d4(M.childNodes,x,s);const[gn,gt]=h4(M,cn,a,o),fn=yn=>{const pe=xe[1]+yn.clientY-be[1];if(E)if(S){const Ae=xe[0]+yn.clientX-be[0],[Re,ze]=e2(ge,vn,[Ae,pe]),[,yt]=Q.output([1,ae.output(0)]),[,Jt]=Q.invert([Re,yt-(z[Ee+un][1]-ze)]),en=(Ee+1)%un,zn=(Ee-1+un)%un,yi=Qf([z[zn],[Re,ze],H[en]&&z[en]]);gt.attr("text",On(ae.invert(Jt)).toFixed(n)),gn.attr("d",yi),cn.attr("cx",Re),cn.attr("cy",ze)}else{const[,Ae]=Q.output([1,ae.output(0)]),[,Re]=Q.invert([xe[0],Ae-(z[Ee+un][1]-pe)]),ze=Qf([z[Ee-1],[xe[0],pe],H[Ee+1]&&z[Ee+1]]);gt.attr("text",On(ae.invert(Re)).toFixed(n)),gn.attr("d",ze),cn.attr("cy",pe)}else{const[,Ae]=Q.invert([xe[0],pe]),Re=Qf([z[Ee-1],[xe[0],pe],z[Ee+1]]);gt.attr("text",ae.invert(Ae).toFixed(n)),gn.attr("d",Re),cn.attr("cy",pe)}};be=[At.clientX,At.clientY],window.addEventListener("mousemove",fn);const $n=()=>Qx(this,void 0,void 0,function*(){if(h.attr("cursor","default"),window.removeEventListener("mousemove",fn),h.removeEventListener("mouseup",$n),nh(gt.attr("text")))return;const yn=Number(gt.attr("text")),pe=p4(ne,W);b=yield Fe(et,yn,pe,["line","area"]),gt.remove(),gn.remove(),T(C)});h.addEventListener("mouseup",$n)}),M.appendChild(cn)}),d4(M.childNodes,x,s);else if(D==="interval"){let xe=[(z[0][0]+z[1][0])/2,z[0][1]];_?xe=[z[0][0],(z[0][1]+z[1][1])/2]:k&&(xe=z[0]);const Ee=Qce(C),et=new Aa({name:Jx,style:Object.assign(Object.assign({cx:xe[0],cy:xe[1],fill:R},s),{stroke:s.activeStroke})});et.addEventListener("mousedown",cn=>{h.attr("cursor","move");const On=p4(ne,W),[At,vn]=h4(M,et,a,o),un=gt=>{if(_){const fn=xe[0]+gt.clientX-be[0],[$n]=Q.output([ae.output(0),ae.output(0)]),[,yn]=Q.invert([$n+(fn-z[2][0]),xe[1]]),pe=Qf([[fn,z[0][1]],[fn,z[1][1]],z[2],z[3]],!0);vn.attr("text",Ee(ae.invert(yn)).toFixed(n)),At.attr("d",pe),et.attr("cx",fn)}else if(k){const fn=xe[1]+gt.clientY-be[1],$n=xe[0]+gt.clientX-be[0],[yn,pe]=e2(ge,[$n,fn],xe),[Ae,Re]=e2(ge,[$n,fn],z[1]),ze=Q.invert([yn,pe])[1],yt=q-ze;if(yt<0)return;const Jt=Rle(ge,[[yn,pe],[Ae,Re],z[2],z[3]],yt>.5?1:0);vn.attr("text",Ee(yt,!0).toFixed(n)),At.attr("d",Jt),et.attr("cx",yn),et.attr("cy",pe)}else{const fn=xe[1]+gt.clientY-be[1],[,$n]=Q.output([1,ae.output(0)]),[,yn]=Q.invert([xe[0],$n-(z[2][1]-fn)]),pe=Qf([[z[0][0],fn],[z[1][0],fn],z[2],z[3]],!0);vn.attr("text",Ee(ae.invert(yn)).toFixed(n)),At.attr("d",pe),et.attr("cy",fn)}};be=[cn.clientX,cn.clientY],window.addEventListener("mousemove",un);const gn=()=>Qx(this,void 0,void 0,function*(){if(h.attr("cursor","default"),h.removeEventListener("mouseup",gn),window.removeEventListener("mousemove",un),nh(vn.attr("text")))return;const gt=Number(vn.attr("text"));b=yield Fe(X,gt,On,[D]),vn.remove(),At.remove(),T(C)});h.addEventListener("mouseup",gn)}),M.appendChild(et)}};m.forEach((C,j)=>{x[0]===j&&T(C),C.addEventListener("click",L),C.addEventListener("mouseenter",u4),C.addEventListener("mouseleave",f4)});const I=C=>{const j=C==null?void 0:C.target;(!j||j.name!==Jx&&!m.includes(j))&&(x=[],P(),M.removeChildren())};return u.on("element-point:select",N),u.on("element-point:unselect",I),h.addEventListener("mousedown",I),()=>{M.remove(),u.off("element-point:select",N),u.off("element-point:unselect",I),h.removeEventListener("mousedown",I),m.forEach(C=>{C.removeEventListener("click",L),C.removeEventListener("mouseenter",u4),C.removeEventListener("mouseleave",f4)})}}}var v4={},t2={},n2=34,Jf=10,r2=13;function g4(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function tue(e,t){var n=g4(e);return function(r,i){return t(n(r),i,e)}}function y4(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function mr(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function nue(e){return e<0?"-"+mr(-e,6):e>9999?"+"+mr(e,6):mr(e,4)}function rue(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":nue(e.getUTCFullYear())+"-"+mr(e.getUTCMonth()+1,2)+"-"+mr(e.getUTCDate(),2)+(i?"T"+mr(t,2)+":"+mr(n,2)+":"+mr(r,2)+"."+mr(i,3)+"Z":r?"T"+mr(t,2)+":"+mr(n,2)+":"+mr(r,2)+"Z":n||t?"T"+mr(t,2)+":"+mr(n,2)+"Z":"")}function iue(e){var t=new RegExp('["'+e+`
151
+ \r]`),n=e.charCodeAt(0);function r(f,d){var h,p,v=i(f,function(g,y){if(h)return h(g,y-1);p=g,h=d?tue(g,d):g4(g)});return v.columns=p||[],v}function i(f,d){var h=[],p=f.length,v=0,g=0,y,m=p<=0,b=!1;f.charCodeAt(p-1)===Jf&&--p,f.charCodeAt(p-1)===r2&&--p;function x(){if(m)return t2;if(b)return b=!1,v4;var O,_=v,S;if(f.charCodeAt(_)===n2){for(;v++<p&&f.charCodeAt(v)!==n2||f.charCodeAt(++v)===n2;);return(O=v)>=p?m=!0:(S=f.charCodeAt(v++))===Jf?b=!0:S===r2&&(b=!0,f.charCodeAt(v)===Jf&&++v),f.slice(_+1,O-1).replace(/""/g,'"')}for(;v<p;){if((S=f.charCodeAt(O=v++))===Jf)b=!0;else if(S===r2)b=!0,f.charCodeAt(v)===Jf&&++v;else if(S!==n)continue;return f.slice(_,O)}return m=!0,f.slice(_,p)}for(;(y=x())!==t2;){for(var w=[];y!==v4&&y!==t2;)w.push(y),y=x();d&&(w=d(w,g++))==null||h.push(w)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(e)})}function o(f,d){return d==null&&(d=y4(f)),[d.map(u).join(e)].concat(a(f,d)).join(`
152
+ `)}function s(f,d){return d==null&&(d=y4(f)),a(f,d).join(`
153
+ `)}function l(f){return f.map(c).join(`
154
+ `)}function c(f){return f.map(u).join(e)}function u(f){return f==null?"":f instanceof Date?rue(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}function aue(e){for(var t in e){var n=e[t].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))oue&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;e[t]=n}return e}const oue=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var sue=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const m4=e=>{const{value:t,format:n=t.split(".").pop(),delimiter:r=",",autoType:i=!0}=e;return()=>sue(void 0,void 0,void 0,function*(){const a=yield fetch(t);if(n==="csv"){const o=yield a.text();return iue(r).parse(o,i?aue:us)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};m4.props={};function lue(e){return!e||Object.keys(e).length===0}const b4=e=>{const{fields:t,key:n="key",value:r="value"}=e;return i=>lue(t)?i:i.flatMap(a=>t.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};b4.props={};function cue(e){return e!=null&&!Number.isNaN(e)}const x4=e=>{const{callback:t=cue}=e;return n=>n.filter(t)};x4.props={};const w4=e=>{const{callback:t}=e;return n=>Array.isArray(n)?[...n].sort(t):n};w4.props={};function uue(e,t=[]){return t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{})}const O4=e=>{const{fields:t}=e;return n=>n.map(r=>uue(r,t))};O4.props={};function fue(e){return Object.keys(e).length===0}const _4=e=>t=>{if(!e||fue(e))return t;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[e[a]||a]=o,i),{});return t.map(n)};_4.props={};function due(e,t){return e.map(n=>{if(Array.isArray(n)){const[r,i=t]=n;return[r,i]}return[n,t]})}const S4=e=>{const{fields:t=[]}=e,n=due(t,!0);return r=>{const i=(a,o)=>n.reduce((s,[l,c=!0])=>s!==0?s:c?a[l]<o[l]?-1:+(a[l]!==o[l]):a[l]>o[l]?-1:+(a[l]!==o[l]),0);return[...r].sort(i)}};S4.props={};const k4=e=>{const{value:t}=e;return()=>t};k4.props={};const E4=e=>{const{callback:t=us}=e;return n=>t(n)};E4.props={};const M4=e=>{const{callback:t=us}=e;return n=>Array.isArray(n)?n.map(t):n};M4.props={};var hue=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};function pue(e,t){return{set(n,r,i){if(t[n]===void 0)return this;const a=r?r.call(null,t[n]):t[n];return i?i.call(null,a):typeof e[n]=="function"?e[n](a):e[n]=a,this},setAsync(n,r,i){return hue(this,void 0,void 0,function*(){if(t[n]===void 0)return this;const a=r?yield r.call(null,t[n]):t[n];return i?i.call(null,a):typeof e[n]=="function"?e[n](a):e[n]=a,this})}}}const i2=Math.PI/180,ed=64,hg=2048;function vue(e){return e.text}function gue(){return"serif"}function A4(){return"normal"}function yue(e){return e.value}function mue(){return~~(Math.random()*2)*90}function bue(){return 1}function xue(){}function wue(e,t,n,r){if(t.sprite)return;const i=e.context,a=e.ratio;i.clearRect(0,0,(ed<<5)/a,hg/a);let o=0,s=0,l=0;const c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;let d=i.measureText(t.text+"m").width*a,h=t.size<<1;if(t.rotate){const p=Math.sin(t.rotate*i2),v=Math.cos(t.rotate*i2),g=d*v,y=d*p,m=h*v,b=h*p;d=Math.max(Math.abs(g+b),Math.abs(g-b))+31>>5<<5,h=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else d=d+31>>5<<5;if(h>l&&(l=h),o+d>=ed<<5&&(o=0,s+=l,l=0),s+h>=hg)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),t.rotate&&i.rotate(t.rotate*i2),i.fillText(t.text,0,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,0,0)),i.restore(),t.width=d,t.height=h,t.xoff=o,t.yoff=s,t.x1=d>>1,t.y1=h>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=d}const u=i.getImageData(0,0,(ed<<5)/a,hg/a).data,f=[];for(;--r>=0;){if(t=n[r],!t.hasText)continue;const d=t.width,h=d>>5;let p=t.y1-t.y0;for(let y=0;y<p*h;y++)f[y]=0;if(o=t.xoff,o==null)return;s=t.yoff;let v=0,g=-1;for(let y=0;y<p;y++){for(let m=0;m<d;m++){const b=h*y+(m>>5),x=u[(s+y)*(ed<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=x,v|=x}v?g=y:(t.y0++,p--,y--,s++)}t.y1=t.y0+g,t.sprite=f.slice(0,(t.y1-t.y0)*h)}}function Oue(e,t,n){n>>=5;const r=e.sprite,i=e.width>>5,a=e.x-(i<<4),o=a&127,s=32-o,l=e.y1-e.y0;let c=(e.y+e.y0)*n+(a>>5),u;for(let f=0;f<l;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&t[c+d])return!0;c+=n}return!1}function _ue(e,t){const n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function Sue(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function P4(e){const t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function kue(e){const n=4*e[0]/e[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4;break}return[r,i]}}function C4(e){const t=[];let n=-1;for(;++n<e;)t[n]=0;return t}function Eue(){return document.createElement("canvas")}function za(e){return typeof e=="function"?e:function(){return e}}const Mue={archimedean:P4,rectangular:kue};function Aue(){let e=[256,256],t=vue,n=gue,r=yue,i=A4,a=mue,o=bue,s=P4,l=Math.random,c=xue,u=[],f=null,d=1/0,h=Eue;const p=A4,v={};v.start=function(){const[m,b]=e,x=g(h()),w=v.board?v.board:C4((e[0]>>5)*e[1]),O=u.length,_=[],S=u.map(function(P,A,L){return P.text=t.call(this,P,A,L),P.font=n.call(this,P,A,L),P.style=p.call(this,P,A,L),P.weight=i.call(this,P,A,L),P.rotate=a.call(this,P,A,L),P.size=~~r.call(this,P,A,L),P.padding=o.call(this,P,A,L),P}).sort(function(P,A){return A.size-P.size});let k=-1,E=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(M,0),M();function M(){const P=Date.now();for(;Date.now()-P<d&&++k<O;){const A=S[k];A.x=m*(l()+.5)>>1,A.y=b*(l()+.5)>>1,wue(x,A,S,k),A.hasText&&y(w,A,E)&&(c.call(null,"word",{cloud:v,word:A}),_.push(A),E?v.hasImage||_ue(E,A):E=[{x:A.x+A.x0,y:A.y+A.y0},{x:A.x+A.x1,y:A.y+A.y1}],A.x-=e[0]>>1,A.y-=e[1]>>1)}v._tags=_,v._bounds=E,k>=O&&(v.stop(),c.call(null,"end",{cloud:v,words:_,bounds:E}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(m){m.width=m.height=1;const b=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(ed<<5)/b,m.height=hg/b;const x=m.getContext("2d");return x.fillStyle=x.strokeStyle="red",x.textAlign="center",x.textBaseline="middle",{context:x,ratio:b}}function y(m,b,x){const w=b.x,O=b.y,_=Math.sqrt(e[0]*e[0]+e[1]*e[1]),S=s(e),k=l()<.5?1:-1;let E,M=-k,P,A;for(;(E=S(M+=k))&&(P=~~E[0],A=~~E[1],!(Math.min(Math.abs(P),Math.abs(A))>=_));)if(b.x=w+P,b.y=O+A,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>e[0]||b.y+b.y1>e[1])&&(!x||!Oue(b,m,e[0]))&&(!x||Sue(b,x))){const L=b.sprite,N=b.width>>5,T=e[0]>>5,I=b.x-(N<<4),C=I&127,j=32-C,D=b.y1-b.y0;let F,R=(b.y+b.y0)*T+(I>>5);for(let z=0;z<D;z++){F=0;for(let H=0;H<=N;H++)m[R+H]|=F<<j|(H<N?(F=L[z*N+H])>>>C:0);R+=T}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[x,w]=e;if(!x||!w)return;const O=x>>5,_=C4((x>>5)*w);b.width=x,b.height=w;const S=b.getContext("2d");S.drawImage(m,0,0,m.width,m.height,0,0,x,w);const k=S.getImageData(0,0,x,w).data;for(let E=0;E<w;E++)for(let M=0;M<x;M++){const P=O*E+(M>>5),A=E*x+M<<2,N=k[A]>=250&&k[A+1]>=250&&k[A+2]>=250?1<<31-M%32:0;_[P]|=N}v.board=_,v.hasImage=!0},v.timeInterval=function(m){d=m==null?1/0:m},v.words=function(m){u=m},v.size=function(m=[]){e=[+m[0],+m[1]]},v.text=function(m){t=za(m)},v.font=function(m){n=za(m)},v.fontWeight=function(m){i=za(m)},v.rotate=function(m){a=za(m)},v.canvas=function(m){h=za(m)},v.spiral=function(m){s=Mue[m]||m},v.fontSize=function(m){r=za(m)},v.padding=function(m){o=za(m)},v.random=function(m){l=za(m)},v.on=function(m){c=za(m)},v}var Pue=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Cue=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Tue={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return(~~(Math.random()*6)-3)*30}};function Lue(e){return new Promise((t,n)=>{if(e instanceof HTMLImageElement){t(e);return}if(typeof e=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=e,r.onload=()=>t(r),r.onerror=()=>{console.error(`'image ${e} load failed !!!'`),n()};return}n()})}function Nue(e,t){if(typeof e=="function")return e;if(Array.isArray(e)){const[n,r]=e;if(!t)return()=>(r+n)/2;const[i,a]=t;return a===i?()=>(r+n)/2:({value:o})=>(r-n)/(a-i)*(o-i)+n}return()=>e}const T4=(e,t)=>n=>Pue(void 0,void 0,void 0,function*(){const r=Object.assign({},Tue,e,{canvas:t.createCanvas}),i=Aue();yield pue(i,r).set("fontSize",m=>{const b=n.map(x=>x.value);return Nue(m,[kr(b),tt(b)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").set("canvas").setAsync("imageMask",Lue,i.createMask),i.words([...n]);const a=i.start(),[o,s]=r.size,l=[{x:0,y:0},{x:o,y:s}],{_bounds:c=l,_tags:u,hasImage:f}=a,d=u.map(m=>{var{x:b,y:x,font:w}=m,O=Cue(m,["x","y","font"]);return Object.assign(Object.assign({},O),{x:b+o/2,y:x+s/2,fontFamily:w})}),[{x:h,y:p},{x:v,y:g}]=c,y={text:"",value:0,opacity:0,fontSize:0};return d.push(Object.assign(Object.assign({},y),{x:f?0:h,y:f?0:p}),Object.assign(Object.assign({},y),{x:f?o:v,y:f?s:g})),d});T4.props={};function L4(e){return typeof e=="string"?t=>t[e]:e}const N4=e=>{const{join:t,on:n,select:r=[],as:i=r,unknown:a=NaN}=e,[o,s]=n,l=L4(s),c=L4(o),u=by(t,([f])=>f,f=>l(f));return f=>f.map(d=>{const h=u.get(c(d));return Object.assign(Object.assign({},d),r.reduce((p,v,g)=>(p[i[g]]=h?h[v]:a,p),{}))})};N4.props={};const I4=e=>{const{start:t,end:n}=e;return r=>r.slice(t,n)};I4.props={};var j4={exports:{}},D4={exports:{}};(function(e){var t=e.exports;e.exports.isNumber=function(n){return typeof n=="number"},e.exports.findMin=function(n){if(n.length===0)return 1/0;for(var r=n[0],i=1;i<n.length;i++)r=Math.min(r,n[i]);return r},e.exports.findMax=function(n){if(n.length===0)return-1/0;for(var r=n[0],i=1;i<n.length;i++)r=Math.max(r,n[i]);return r},e.exports.findMinMulti=function(n){for(var r=t.findMin(n[0]),i=1;i<n.length;i++)r=Math.min(r,t.findMin(n[i]));return r},e.exports.findMaxMulti=function(n){for(var r=t.findMax(n[0]),i=1;i<n.length;i++)r=Math.max(r,t.findMax(n[i]));return r},e.exports.inside=function(n,r,i){return n<=i&&i<=r}})(D4);var Iue=D4.exports;(function(e){var t=50,n=2,r=Math.log(2),i=e.exports,a=Iue;function o(l){return 1-Math.abs(l)}e.exports.getUnifiedMinMax=function(l,c){return i.getUnifiedMinMaxMulti([l],c)},e.exports.getUnifiedMinMaxMulti=function(l,c){c=c||{};var u=!1,f=!1,d=a.isNumber(c.width)?c.width:n,h=a.isNumber(c.size)?c.size:t,p=a.isNumber(c.min)?c.min:(u=!0,a.findMinMulti(l)),v=a.isNumber(c.max)?c.max:(f=!0,a.findMaxMulti(l)),g=v-p,y=g/(h-1);return u&&(p=p-2*d*y),f&&(v=v+2*d*y),{min:p,max:v}},e.exports.create=function(l,c){if(c=c||{},!l||l.length===0)return[];var u=a.isNumber(c.size)?c.size:t,f=a.isNumber(c.width)?c.width:n,d=i.getUnifiedMinMax(l,{size:u,width:f,min:c.min,max:c.max}),h=d.min,p=d.max,v=p-h,g=v/(u-1);if(v===0)return[{x:h,y:1}];for(var y=[],m=0;m<u;m++)y.push({x:h+m*g,y:0});var b=function(M){return Math.floor((M-h)/g)},x=s(o,f),w=x[f],O=x[f-1]-x[f-2],_=0;l.forEach(function(M){var P=b(M);if(!(P+f<0||P-f>=y.length)){var A=Math.max(P-f,0),L=P,N=Math.min(P+f,y.length-1),T=A-(P-f),I=P+f-N,C=x[-f-1+T]||0,j=x[-f-1+I]||0,D=w/(w-C-j);T>0&&(_+=D*(T-1)*O);var F=Math.max(0,P-f+1);a.inside(0,y.length-1,F)&&(y[F].y+=D*1*O),a.inside(0,y.length-1,L+1)&&(y[L+1].y-=D*2*O),a.inside(0,y.length-1,N+1)&&(y[N+1].y+=D*1*O)}});var S=_,k=0,E=0;return y.forEach(function(M){k+=M.y,S+=k,M.y=S,E+=S}),E>0&&y.forEach(function(M){M.y/=E}),y};function s(l,c){for(var u={},f=0,d=-c;d<=c;d++)f+=l(d/c),u[d]=f;return u}e.exports.getExpectedValueFromPdf=function(l){if(!(!l||l.length===0)){var c=0;return l.forEach(function(u){c+=u.x*u.y}),c}},e.exports.getXWithLeftTailArea=function(l,c){if(!(!l||l.length===0)){for(var u=0,f=0,d=0;d<l.length&&(f=d,u+=l[d].y,!(u>=c));d++);return l[f].x}},e.exports.getPerplexity=function(l){if(!(!l||l.length===0)){var c=0;return l.forEach(function(u){var f=Math.log(u.y);isFinite(f)&&(c+=u.y*f)}),c=-c/r,Math.pow(2,c)}}})(j4);var jue=j4.exports;const Due=ou(jue),F4=e=>{const{field:t,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=e,[l,c]=r;return u=>Array.from(_t(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=Due.create(d.map(g=>g[t]),{min:i,max:a,size:o,width:s}),p=h.map(g=>g.x),v=h.map(g=>g.y);return Object.assign(Object.assign({},d[0]),{[l]:p,[c]:v})})};F4.props={};function Fue(e,t,n,r){r=r||{};var i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),l=n-t;if(o*s>0)throw"Initial bisect points must have opposite signs";if(o===0)return t;if(s===0)return n;for(var c=0;c<i;++c){l/=2;var u=t+l,f=e(u);if(f*o>=0&&(t=u),Math.abs(l)<a||f===0)return u}return t+l}function a2(e){for(var t=new Array(e),n=0;n<e;++n)t[n]=0;return t}function R4(e,t){return a2(e).map(function(){return a2(t)})}function wc(e,t){for(var n=0,r=0;r<e.length;++r)n+=e[r]*t[r];return n}function o2(e){return Math.sqrt(wc(e,e))}function s2(e,t,n){for(var r=0;r<t.length;++r)e[r]=t[r]*n}function Ba(e,t,n,r,i){for(var a=0;a<e.length;++a)e[a]=t*n[a]+r*i[a]}function Rue(e,t,n){n=n||{};var r=n.maxIterations||t.length*200,i=n.nonZeroDelta||1.05,a=n.zeroDelta||.001,o=n.minErrorDelta||1e-6,s=n.minErrorDelta||1e-5,l=n.rho!==void 0?n.rho:1,c=n.chi!==void 0?n.chi:2,u=n.psi!==void 0?n.psi:-.5,f=n.sigma!==void 0?n.sigma:.5,d,h=t.length,p=new Array(h+1);p[0]=t,p[0].fx=e(t),p[0].id=0;for(var v=0;v<h;++v){var g=t.slice();g[v]=g[v]?g[v]*i:a,p[v+1]=g,p[v+1].fx=e(g),p[v+1].id=v+1}function y(P){for(var A=0;A<P.length;A++)p[h][A]=P[A];p[h].fx=P.fx}for(var m=function(P,A){return P.fx-A.fx},b=t.slice(),x=t.slice(),w=t.slice(),O=t.slice(),_=0;_<r;++_){if(p.sort(m),n.history){var S=p.map(function(P){var A=P.slice();return A.fx=P.fx,A.id=P.id,A});S.sort(function(P,A){return P.id-A.id}),n.history.push({x:p[0].slice(),fx:p[0].fx,simplex:S})}for(d=0,v=0;v<h;++v)d=Math.max(d,Math.abs(p[0][v]-p[1][v]));if(Math.abs(p[0].fx-p[h].fx)<o&&d<s)break;for(v=0;v<h;++v){b[v]=0;for(var k=0;k<h;++k)b[v]+=p[k][v];b[v]/=h}var E=p[h];if(Ba(x,1+l,b,-l,E),x.fx=e(x),x.fx<p[0].fx)Ba(O,1+c,b,-c,E),O.fx=e(O),O.fx<x.fx?y(O):y(x);else if(x.fx>=p[h-1].fx){var M=!1;if(x.fx>E.fx?(Ba(w,1+u,b,-u,E),w.fx=e(w),w.fx<E.fx?y(w):M=!0):(Ba(w,1-u*l,b,u*l,E),w.fx=e(w),w.fx<x.fx?y(w):M=!0),M){if(f>=1)break;for(v=1;v<p.length;++v)Ba(p[v],1-f,p[0],f,p[v]),p[v].fx=e(p[v])}}else y(x)}return p.sort(m),{fx:p[0].fx,x:p[0]}}function $ue(e,t,n,r,i,a,o){var s=n.fx,l=wc(n.fxprime,t),c=s,u=s,f=l,d=0;i=i||1,a=a||1e-6,o=o||.1;function h(v,g,y){for(var m=0;m<16;++m)if(i=(v+g)/2,Ba(r.x,1,n.x,i,t),c=r.fx=e(r.x,r.fxprime),f=wc(r.fxprime,t),c>s+a*i*l||c>=y)g=i;else{if(Math.abs(f)<=-o*l)return i;f*(g-v)>=0&&(g=v),v=i,y=c}return 0}for(var p=0;p<10;++p){if(Ba(r.x,1,n.x,i,t),c=r.fx=e(r.x,r.fxprime),f=wc(r.fxprime,t),c>s+a*i*l||p&&c>=u)return h(d,i,u);if(Math.abs(f)<=-o*l)return i;if(f>=0)return h(i,d,c);u=c,d=i,i*=2}return i}function zue(e,t,n){var r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,l=1,c;n=n||{},c=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),s2(o,r.fxprime,-1);for(var u=0;u<c;++u){if(l=$ue(e,o,r,i,l),n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:l}),!l)s2(o,r.fxprime,-1);else{Ba(a,1,i.fxprime,-1,r.fxprime);var f=wc(r.fxprime,r.fxprime),d=Math.max(0,wc(a,i.fxprime)/f);Ba(o,d,o,-1,i.fxprime),s=r,r=i,i=s}if(o2(r.fxprime)<=1e-5)break}return n.history&&n.history.push({x:r.x.slice(),fx:r.fx,fxprime:r.fxprime.slice(),alpha:l}),r}const $4=1e-10;function z4(e,t){const n=Yue(e),r=n.filter(function(l){return Bue(l,e)});let i=0,a=0,o;const s=[];if(r.length>1){const l=Wue(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-l.x,u.y-l.y)}r.sort(function(u,f){return f.angle-u.angle});let c=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(c.x+u.x)*(u.y-c.y);const f={x:(u.x+c.x)/2,y:(u.y+c.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(c.parentIndex.indexOf(u.parentIndex[h])>-1){const p=e[u.parentIndex[h]],v=Math.atan2(u.x-p.x,u.y-p.y),g=Math.atan2(c.x-p.x,c.y-p.y);let y=g-v;y<0&&(y+=2*Math.PI);const m=g-y/2;let b=td(f,{x:p.x+p.radius*Math.sin(m),y:p.y+p.radius*Math.cos(m)});b>p.radius*2&&(b=p.radius*2),(d===null||d.width>b)&&(d={circle:p,width:b,p1:u,p2:c})}d!==null&&(s.push(d),i+=l2(d.circle.radius,d.width),c=u)}}else{let l=e[0];for(o=1;o<e.length;++o)e[o].radius<l.radius&&(l=e[o]);let c=!1;for(o=0;o<e.length;++o)if(td(e[o],l)>Math.abs(l.radius-e[o].radius)){c=!0;break}c?i=a=0:(i=l.radius*l.radius*Math.PI,s.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-$4,y:l.y+l.radius},width:l.radius*2}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=s,t.innerPoints=r,t.intersectionPoints=n),i+a}function Bue(e,t){for(let n=0;n<t.length;++n)if(td(e,t[n])>t[n].radius+$4)return!1;return!0}function Yue(e){const t=[];for(let n=0;n<e.length;++n)for(let r=n+1;r<e.length;++r){const i=Y4(e[n],e[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[n,r],t.push(o)}}return t}function l2(e,t){return e*e*Math.acos(1-t/e)-(e-t)*Math.sqrt(t*(2*e-t))}function td(e,t){return Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))}function B4(e,t,n){if(n>=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);const r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return l2(e,r)+l2(t,i)}function Y4(e,t){const n=td(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,l=e.y+a*(t.y-e.y)/n,c=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+c,y:l-u},{x:s-c,y:l+u}]}function Wue(e){const t={x:0,y:0};for(let n=0;n<e.length;++n)t.x+=e[n].x,t.y+=e[n].y;return t.x/=e.length,t.y/=e.length,t}function Gue(e,t){t=t||{},t.maxIterations=t.maxIterations||500;const n=t.initialLayout||Xue,r=t.lossFunction||u2;e=Hue(e);const i=n(e,t),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const c=Rue(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,e)},a,t).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=c[2*u],i[s].y=c[2*u+1];return i}const W4=1e-10;function c2(e,t,n){return Math.min(e,t)*Math.min(e,t)*Math.PI<=n+W4?Math.abs(e-t):Fue(function(r){return B4(e,t,r)-n},0,e+t)}function Hue(e){e=e.slice();const t=[],n={};let r,i,a,o;for(r=0;r<e.length;++r){const s=e[r];s.sets.length==1?t.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],n[[a,o]]=!0,n[[o,a]]=!0)}for(t.sort((s,l)=>s>l?1:-1),r=0;r<t.length;++r)for(a=t[r],i=r+1;i<t.length;++i)o=t[i],[a,o]in n||e.push({sets:[a,o],size:0});return e}function Vue(e,t,n){const r=R4(t.length,t.length),i=R4(t.length,t.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){const o=n[a.sets[0]],s=n[a.sets[1]],l=Math.sqrt(t[o].size/Math.PI),c=Math.sqrt(t[s].size/Math.PI),u=c2(l,c,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(t[o].size,t[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function Uue(e,t,n,r){let i=0,a;for(a=0;a<t.length;++a)t[a]=0;for(a=0;a<n.length;++a){const o=e[2*a],s=e[2*a+1];for(let l=a+1;l<n.length;++l){const c=e[2*l],u=e[2*l+1],f=n[a][l],d=r[a][l],h=(c-o)*(c-o)+(u-s)*(u-s),p=Math.sqrt(h),v=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*v*v,t[2*a]+=4*v*(o-c),t[2*a+1]+=4*v*(s-u),t[2*l]+=4*v*(c-o),t[2*l+1]+=4*v*(u-s))}}return i}function Xue(e,t){let n=Kue(e,t);const r=t.lossFunction||u2;if(e.length>=8){const i=que(e,t),a=r(i,e),o=r(n,e);a+1e-8<o&&(n=i)}return n}function que(e,t){t=t||{};const n=t.restarts||10,r=[],i={};let a;for(a=0;a<e.length;++a){const v=e[a];v.sets.length==1&&(i[v.sets[0]]=r.length,r.push(v))}const o=Vue(e,r,i);let s=o.distances;const l=o.constraints,c=o2(s.map(o2))/s.length;s=s.map(function(v){return v.map(function(g){return g/c})});const u=function(v,g){return Uue(v,g,s,l)};let f,d;for(a=0;a<n;++a){const v=a2(s.length*2).map(Math.random);d=zue(u,v,t),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const v=r[a];p[v.sets[0]]={x:h[2*a]*c,y:h[2*a+1]*c,radius:Math.sqrt(v.size/Math.PI)}}if(t.history)for(a=0;a<t.history.length;++a)s2(t.history[a].x,c);return p}function Kue(e,t){const n=t&&t.lossFunction?t.lossFunction:u2,r={},i={};let a;for(let f=0;f<e.length;++f){const d=e[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}e=e.filter(function(f){return f.sets.length==2});for(let f=0;f<e.length;++f){const d=e[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],v=d.sets[1];d.size+W4>=Math.min(r[p].size,r[v].size)&&(h=0),i[p].push({set:v,size:d.size,weight:h}),i[v].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const l={};function c(f){return f.set in l}function u(f,d){r[d].x=f.x,r[d].y=f.y,l[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(c);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let y=0;y<h.length;++y){const m=r[h[y].set],b=c2(a.radius,m.radius,h[y].size);p.push({x:m.x+b,y:m.y}),p.push({x:m.x-b,y:m.y}),p.push({y:m.y+b,x:m.x}),p.push({y:m.y-b,x:m.x});for(let x=y+1;x<h.length;++x){const w=r[h[x].set],O=c2(a.radius,w.radius,h[x].size),_=Y4({x:m.x,y:m.y,radius:b},{x:w.x,y:w.y,radius:O});for(let S=0;S<_.length;++S)p.push(_[S])}}let v=1e50,g=p[0];for(let y=0;y<p.length;++y){r[d].x=p[y].x,r[d].y=p[y].y;const m=n(r,e);m<v&&(v=m,g=p[y])}u(g,d)}return r}function u2(e,t){let n=0;function r(i){return i.map(function(a){return e[a]})}for(let i=0;i<t.length;++i){const a=t[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const l=e[a.sets[0]],c=e[a.sets[1]];o=B4(l.radius,c.radius,td(l,c))}else o=z4(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function Zue(e){const t=function(n){const r=Math.max.apply(null,e.map(function(a){return a[n]+a.radius})),i=Math.min.apply(null,e.map(function(a){return a[n]-a.radius}));return{max:r,min:i}};return{xRange:t("x"),yRange:t("y")}}function Que(e,t,n,r){const i=[],a=[];for(const v in e)e.hasOwnProperty(v)&&(a.push(v),i.push(e[v]));t-=2*r,n-=2*r;const o=Zue(i),s=o.xRange,l=o.yRange;if(s.max==s.min||l.max==l.min)return console.log("not scaling solution: zero size detected"),e;const c=t/(s.max-s.min),u=n/(l.max-l.min),f=Math.min(u,c),d=(t-(s.max-s.min)*f)/2,h=(n-(l.max-l.min)*f)/2,p={};for(let v=0;v<i.length;++v){const g=i[v];p[a[v]]={radius:f*g.radius,x:r+d+(g.x-s.min)*f,y:r+h+(g.y-l.min)*f}}return p}function Jue(e,t,n){const r=[],i=e-n,a=t;return r.push("M",i,a),r.push("A",n,n,0,1,0,i+2*n,a),r.push("A",n,n,0,1,0,i,a),r.join(" ")}function efe(e){const t={};z4(e,t);const n=t.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return Jue(r.x,r.y,r.radius)}else{const r=[`
155
+ M`,n[0].p2.x,n[0].p2.y];for(let i=0;i<n.length;++i){const a=n[i],o=a.circle.radius,s=a.width>o;r.push(`
156
+ A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const G4=e=>{const{sets:t="sets",size:n="size",as:r=["key","path"],padding:i=0}=e,[a,o]=r;return s=>{const l=s.map(f=>Object.assign(Object.assign({},f),{sets:f[t],size:f[n],[a]:f.sets.join("&")}));l.sort((f,d)=>f.sets.length-d.sets.length);const c=Gue(l);let u;return l.map(f=>{const d=f[t],h=({width:p,height:v})=>{u=u||Que(c,p,v,i);const g=d.map(m=>u[m]);let y=efe(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};G4.props={};const H4=()=>e=>(console.log("G2 data section:",e),e);H4.props={};function tfe(e,t){if(t<0||t>1)throw new Error("alpha must be between 0 and 1.");if(e.length===0)return[];let n=e[0];const r=[];for(const i of e){if(i==null){r.push(i),console.warn("EMA:The value is null or undefined",e);continue}n==null&&(n=i);const a=n*t+(1-t)*i;r.push(a),n=a}return r}const V4=e=>{const{field:t="y",alpha:n=.6,as:r=t}=e;return i=>{const a=i.map(s=>s[t]),o=tfe(a,n);return i.map((s,l)=>Object.assign(Object.assign({},s),{[r]:o[l]}))}};V4.props={};function f2(e){const{min:t,max:n}=e;return[[t[0],t[1]],[n[0],n[1]]]}function U4(e,t){const[n,r]=e,[i,a]=t;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function nfe(e,t){const[n,r]=e;return!(U4(n,t)&&U4(r,t))}function rfe(e,t){const[n,r]=e,[i,a]=t;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}const ife=e=>{const{priority:t}=e;return n=>{const r=[];return t&&n.sort(t),n.forEach(i=>{ig(i);const a=i.getLocalBounds();r.some(s=>rfe(f2(a),f2(s.getLocalBounds())))?Fx(i):r.push(i)}),n}};function afe([e,t],[n,r]){return r>e&&t>n}function pg(){const e=new Map;return[r=>e.get(r),(r,i)=>e.set(r,i)]}function ofe(e){const t=e.cloneNode(!0),n=t.getElementById("connector");n&&t.removeChild(n);const{min:r,max:i}=t.getRenderBounds();return t.destroy(),{min:r,max:i}}const sfe=e=>{const{maxIterations:t=10,maxError:n=.1,padding:r=1}=e;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=pg(),[l,c]=pg(),[u,f]=pg(),[d,h]=pg();for(const p of i){const{min:v,max:g}=ofe(p),[y,m]=v,[b,x]=g;s(p,m),c(p,m),f(p,x-m),h(p,[y,b])}for(let p=0;p<t;p++){i.sort((g,y)=>Bt(l(g),l(y)));let v=0;for(let g=0;g<a-1;g++){const y=i[g];let m=g+1,b;for(;(b=i[m])&&!afe(d(y),d(b));)m+=1;if(b){const x=l(y),w=u(y),O=l(b),_=O-(x+w);if(_<r){const S=(r-_)/2;v=Math.max(v,S),c(y,x-S),c(b,O+S)}}}if(v<n)break}for(const p of i)p.style.y+=l(p)-o(p);return i}};function lfe(e){return typeof e=="object"?e:bo(e)}function d2(e){let t=e/255;return t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4),t}function X4(e,t,n){return .2126*d2(e)+.7152*d2(t)+.0722*d2(n)}function q4(e,t){if(!e||!t||e===t)return 1;const{r:n,g:r,b:i}=e,{r:a,g:o,b:s}=t,l=X4(n,r,i),c=X4(a,o,s);return(Math.max(l,c)+.05)/(Math.min(l,c)+.05)}function cfe(e,t){const n=Ol(t,r=>q4(e,lfe(r)));return t[n]}const ufe=e=>{const{threshold:t=4.5,palette:n=["#000","#fff"]}=e;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;q4(o,a)<t&&i.attr("fill",cfe(a,n))}),r)},ffe=()=>e=>(e.forEach(t=>{ig(t);const n=t.attr("bounds"),r=t.getLocalBounds();nfe(f2(r),n)&&Fx(t)}),e),dfe=(e,t)=>{const[[n,r],[i,a]]=t,[[o,s],[l,c]]=e;let u=0,f=0;return o<n?u=n-o:l>i&&(u=i-l),s<r?f=r-s:c>a&&(f=a-c),[u,f]},hfe=()=>(e,{canvas:t,layout:n})=>(e.forEach(r=>{ig(r);const{max:i,min:a}=r.getRenderBounds(),[o,s]=i,[l,c]=a,u=dfe([[l,c],[o,s]],[[n.x,n.y],[n.x+n.width,n.y+n.height]]);r.style.connector&&r.style.connectorPoints&&(r.style.connectorPoints[0][0]-=u[0],r.style.connectorPoints[0][1]-=u[1]),r.style.x+=u[0],r.style.y+=u[1]}),e);function pfe(){return{"data.fetch":m4,"data.inline":k4,"data.sortBy":S4,"data.sort":w4,"data.filter":x4,"data.pick":O4,"data.rename":_4,"data.fold":b4,"data.slice":I4,"data.custom":E4,"data.map":M4,"data.join":N4,"data.kde":F4,"data.log":H4,"data.wordCloud":T4,"data.ema":V4,"transform.stackY":wS,"transform.binX":jk,"transform.bin":Vy,"transform.dodgeX":NS,"transform.jitter":vk,"transform.jitterX":gk,"transform.jitterY":yk,"transform.symmetryY":mk,"transform.diffY":bk,"transform.stackEnter":IS,"transform.normalizeY":jS,"transform.select":Th,"transform.selectX":wk,"transform.selectY":Ok,"transform.groupX":_k,"transform.groupY":Sk,"transform.groupColor":kk,"transform.group":Du,"transform.sortX":Mk,"transform.sortY":Pk,"transform.sortColor":Ak,"transform.flexX":Ck,"transform.pack":Nk,"transform.sample":Dk,"transform.filter":Fk,"coordinate.cartesian":b_,"coordinate.polar":uu,"coordinate.transpose":Z0,"coordinate.theta":w_,"coordinate.parallel":J0,"coordinate.fisheye":__,"coordinate.radial":Q0,"coordinate.radar":S_,"encode.constant":k_,"encode.field":M_,"encode.transform":E_,"encode.column":A_,"mark.interval":NT,"mark.rect":jT,"mark.line":FT,"mark.point":$T,"mark.text":BT,"mark.cell":WT,"mark.area":HT,"mark.link":X1,"mark.image":XT,"mark.polygon":KT,"mark.box":QT,"mark.vector":e3,"mark.lineX":i3,"mark.lineY":n3,"mark.connector":o3,"mark.range":c3,"mark.rangeX":f3,"mark.rangeY":h3,"mark.path":S3,"mark.shape":K3,"mark.density":yL,"mark.heatmap":bL,"mark.wordCloud":fb,"palette.category10":wL,"palette.category20":OL,"scale.linear":SL,"scale.ordinal":kL,"scale.band":_L,"scale.identity":EL,"scale.point":ML,"scale.time":AL,"scale.log":PL,"scale.pow":CL,"scale.sqrt":IL,"scale.threshold":TL,"scale.quantile":LL,"scale.quantize":NL,"scale.sequential":jL,"scale.constant":DL,"theme.classic":FL,"theme.classicDark":$L,"theme.academy":zL,"theme.light":hb,"theme.dark":RL,"component.axisX":r5,"component.axisY":i5,"component.legendCategory":gb,"component.legendContinuous":Ao,"component.legends":p5,"component.title":c5,"component.sliderX":u5,"component.sliderY":f5,"component.scrollbarX":d5,"component.scrollbarY":h5,"animation.scaleInX":bb,"animation.scaleOutX":Fte,"animation.scaleInY":v5,"animation.scaleOutY":Rte,"animation.waveIn":_5,"animation.fadeIn":g5,"animation.fadeOut":y5,"animation.zoomIn":qte,"animation.zoomOut":Kte,"animation.pathIn":S5,"animation.morphing":O5,"animation.growInX":k5,"animation.growInY":E5,"interaction.elementHighlight":lg,"interaction.elementHighlightByX":Tj,"interaction.elementHighlightByColor":Lj,"interaction.elementSelect":cg,"interaction.elementSelectByX":Nj,"interaction.elementSelectByColor":Ij,"interaction.fisheye":Xle,"interaction.chartIndex":jj,"interaction.tooltip":Uj,"interaction.legendFilter":hce,"interaction.legendHighlight":pce,"interaction.brushHighlight":Ux,"interaction.brushXHighlight":xce,"interaction.brushYHighlight":wce,"interaction.brushAxisHighlight":Cce,"interaction.brushFilter":Zx,"interaction.brushXFilter":Ice,"interaction.brushYFilter":jce,"interaction.sliderFilter":o4,"interaction.scrollbarFilter":zce,"interaction.poptip":c4,"interaction.treemapDrillDown":Xce,"interaction.elementPointMove":eue,"composition.spaceLayer":aN,"composition.spaceFlex":oN,"composition.facetRect":dN,"composition.repeatMatrix":Vre,"composition.facetCircle":Qre,"composition.timingKeyframe":pN,"labelTransform.overlapHide":ife,"labelTransform.overlapDodgeY":sfe,"labelTransform.overflowHide":ffe,"labelTransform.contrastReverse":ufe,"labelTransform.exceedAdjust":hfe}}function vfe(){return{"composition.geoView":uI,"composition.geoPath":vN}}function gfe(){return{"data.arc":Z1,"data.cluster":fL,"mark.forceGraph":cL,"mark.tree":hL,"mark.pack":H3,"mark.sankey":x3,"mark.chord":O3,"mark.treemap":G3}}function yfe(){return{"data.venn":G4,"mark.boxplot":q3,"mark.gauge":vL,"mark.wordCloud":fb,"mark.liquid":xL}}function K4(){return Object.assign(Object.assign(Object.assign(Object.assign({},vfe()),gfe()),yfe()),pfe())}function mfe(e,t){class n extends e{constructor(i){super(Object.assign(Object.assign({},i),{lib:t}))}}return n}const Z4={};function Q4(e,t){e.startsWith("symbol.")?zU(e.split(".").pop(),t):Object.assign(Z4,{[e]:t})}const Oc=e=>e?parseInt(e):0;function bfe(e){const t=getComputedStyle(e),n=e.clientWidth||Oc(t.width),r=e.clientHeight||Oc(t.height),i=Oc(t.paddingLeft)+Oc(t.paddingRight),a=Oc(t.paddingTop)+Oc(t.paddingBottom);return{width:n-i,height:r-a}}function h2(e,t){const n=[e];for(;n.length;){const r=n.shift();t&&t(r);const i=r.children||[];for(const a of i)n.push(a)}}class p2{constructor(t={},n){this.parentNode=null,this.children=[],this.index=0,this.type=n,this.value=t}map(t=n=>n){const n=t(this.value);return this.value=n,this}attr(t,n){return arguments.length===1?this.value[t]:this.map(r=>(r[t]=n,r))}append(t){const n=new t({});return n.children=[],this.push(n),n}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){const t=this.parentNode;if(t){const{children:n}=t,r=n.findIndex(i=>i===this);n.splice(r,1)}return this}getNodeByKey(t){let n=null;return h2(this,i=>{t===i.attr("key")&&(n=i)}),n}getNodesByType(t){const n=[];return h2(this,i=>{t===i.type&&n.push(i)}),n}getNodeByType(t){let n=null;return h2(this,r=>{n||t===r.type&&(n=r)}),n}call(t,...n){return t(this.map(),...n),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var J4=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const v2=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title","interaction"],eD="__remove__",tD="__callback__",nD=1,rD=1;function xfe(e){if(e===void 0){const t=document.createElement("div");return t[eD]=!0,t}return typeof e=="string"?document.getElementById(e):e}function wfe(e){const t=e.parentNode;t&&t.removeChild(e)}function Ofe(e){if(e.type!==null)return e;const t=e.children[e.children.length-1];for(const n of v2)t.attr(n,e.attr(n));return t}function iD(e){return Object.assign(Object.assign({},e.value),{type:e.type})}function g2(e,t){const{width:n,height:r,autoFit:i,depth:a=0}=e;let o=640,s=480;if(i){const{width:l,height:c}=bfe(t);o=l||o,s=c||s}return o=n||o,s=r||s,{width:Math.max(_n(o)?o:nD,nD),height:Math.max(_n(s)?s:rD,rD),depth:a}}function _fe(e){const t=Ofe(e),n=[t],r=new Map;for(r.set(t,iD(t));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===tD)a.children=s.value;else{const l=iD(s),{children:c=[]}=a;c.push(l),n.push(s),r.set(s,l),a.children=c}}return r.get(t)}function Sfe(e,t){return typeof e=="function"?!0:new Set(Object.keys(t)).has(e)}function kfe(e,t){return typeof e!="function"&&new Set(Object.keys(t)).has(e)}function Efe(e,t,n,r,i){const{type:a}=e,{type:o=n||a}=t;if(kfe(o,i)){for(const s of v2)e.attr(s)!==void 0&&t[s]===void 0&&(t[s]=e.attr(s));return t}if(Sfe(o,r)){const s={type:"view"},l=Object.assign({},t);for(const c of v2)l[c]!==void 0&&(s[c]=l[c],delete l[c]);return Object.assign(Object.assign({},s),{children:[l]})}return t}function Mfe(e,t,n){if(typeof e=="function")return t.mark;const i=Object.assign(Object.assign({},t),n)[e];if(!i)throw new Error(`Unknown mark: ${e}.`);return i}function Afe(e,t,n){if(typeof e=="function"){const l=new p2;return l.value=e,l.type=tD,l}const{type:r,children:i}=e,a=J4(e,["type","children"]),o=Mfe(r,t,n),s=new o;return s.value=a,s.type=r,s}function Pfe(e,t){const{type:n,children:r}=t,i=J4(t,["type","children"]);e.type===n||n===void 0?pS(e.value,i):typeof n=="string"&&(e.type=n,e.value=i)}function Cfe(e,t,n,r){if(!e)return;const i=[[e,t]];for(;i.length;){const[a,o]=i.shift(),s=Afe(o,n,r);Array.isArray(a.children)&&a.push(s);const{children:l}=o;if(Array.isArray(l))for(const c of l)i.push([s,c]);else typeof l=="function"&&i.push([s,l])}}function Tfe(e,t,n,r,i){const a=Efe(e,t,n,r,i),o=[[null,e,a]];for(;o.length;){const[s,l,c]=o.shift();if(!l)Cfe(s,c,r,i);else if(!c)l.remove();else{Pfe(l,c);const{children:u}=c,{children:f}=l;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([l,v,p])}}else typeof u=="function"&&o.push([l,null,u])}}}function Lfe(){let e,t;return[new Promise((r,i)=>{t=r,e=i}),t,e]}function Nfe(e,t,{key:n=t}){e.prototype[t]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function Ife(e,t,{key:n=t}){e.prototype[t]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,r);const i=[...this.attr(n)||[],r];return this.attr(n,i)}}function jfe(e,t,{key:n=t}){e.prototype[t]=function(r,i){if(arguments.length===0)return this.attr(n);if(arguments.length===1&&typeof r!="string")return this.attr(n,r);const a=this.attr(n)||{};return a[r]=arguments.length===1?!0:i,this.attr(n,a)}}function Dfe(e,t,n){e.prototype[t]=function(r){if(arguments.length===0)return this.attr(t);if(Array.isArray(r))return this.attr(t,{items:r});if(kl(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(t,r);if(r===null||r===!1)return this.attr(t,r);const i=this.attr(t)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(t,i)}}function Ffe(e,t,{ctor:n}){e.prototype[t]=function(r){const i=this.append(n);return t==="mark"&&(i.type=r),i}}function Rfe(e,t,{ctor:n}){e.prototype[t]=function(){return this.type=null,this.append(n)}}function vg(e){return t=>{for(const[n,r]of Object.entries(e)){const{type:i}=r;i==="value"?Nfe(t,n,r):i==="array"?Ife(t,n,r):i==="object"?jfe(t,n,r):i==="node"?Ffe(t,n,r):i==="container"?Rfe(t,n,r):i==="mix"&&Dfe(t,n)}return t}}function aD(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[t,{type:"node",ctor:n}]))}const oD={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},$fe=Object.assign(Object.assign({},oD),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),zfe=Object.assign(Object.assign({},oD),{labelTransform:{type:"array"}});var Bfe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};let gg=class extends p2{changeData(t){var n;const r=this.getRoot();if(r)return this.attr("data",t),!((n=this.children)===null||n===void 0)&&n.length&&this.children.forEach(i=>{i.attr("data",t)}),r==null?void 0:r.render()}getView(){const t=this.getRoot(),{views:n}=t.getContext();if(n!=null&&n.length)return n.find(r=>r.key===this._key)}getScale(){var t;return(t=this.getView())===null||t===void 0?void 0:t.scale}getScaleByChannel(t){const n=this.getScale();if(n)return n[t]}getCoordinate(){var t;return(t=this.getView())===null||t===void 0?void 0:t.coordinate}getTheme(){var t;return(t=this.getView())===null||t===void 0?void 0:t.theme}getGroup(){const t=this._key;return t?this.getRoot().getContext().canvas.getRoot().getElementById(t):void 0}show(){const t=this.getGroup();t&&!t.isVisible()&&ig(t)}hide(){const t=this.getGroup();t&&t.isVisible()&&Fx(t)}};gg=Bfe([vg(zfe)],gg);var Yfe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};let y2=class extends p2{changeData(t){const n=this.getRoot();if(n)return this.attr("data",t),n==null?void 0:n.render()}getMark(){var t;const n=(t=this.getRoot())===null||t===void 0?void 0:t.getView();if(!n)return;const{markState:r}=n,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var t;const n=(t=this.getRoot())===null||t===void 0?void 0:t.getView();if(n)return n==null?void 0:n.scale}getScaleByChannel(t){var n,r;const i=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[t]}getGroup(){const t=this.attr("key");return t?this.getRoot().getContext().canvas.getRoot().getElementById(t):void 0}};y2=Yfe([vg($fe)],y2);var Wfe=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Gfe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Hfe="G2_CHART_KEY";class Vfe extends gg{constructor(t){const{container:n,canvas:r,renderer:i,plugins:a,lib:o,createCanvas:s}=t,l=Gfe(t,["container","canvas","renderer","plugins","lib","createCanvas"]);super(l,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=I_(()=>{this.forceFit()},300),this._renderer=i||new B5,this._plugins=a||[],this._container=xfe(n),this._emitter=new Lb,this._context={library:Object.assign(Object.assign({},o),Z4),emitter:this._emitter,canvas:r,createCanvas:s},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._context.canvas.getConfig().supportsCSSTransform=!0,this._bindAutoFit(),this._rendering=!0;const t=new Promise((a,o)=>Cle(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=Lfe();return t.then(r).catch(i).then(()=>this._renderTrailing()),n}options(t){if(arguments.length===0)return _fe(this);const{type:n}=t;return n&&(this._previousDefinedType=n),Tfe(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,n,r){return this._emitter.on(t,n,r),this}once(t,n){return this._emitter.once(t,n),this}emit(t,...n){return this._emitter.emit(t,...n),this}off(t,n){return this._emitter.off(t,n),this}clear(){const t=this.options();this.emit(nt.BEFORE_CLEAR),this._reset(),_j(t,this._context,!1),this.emit(nt.AFTER_CLEAR)}destroy(){const t=this.options();this.emit(nt.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),_j(t,this._context,!0),this._container[eD]&&wfe(this._container),this.emit(nt.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:t,height:n}=g2(this.options(),this._container);if(t===this._width&&n===this._height)return Promise.resolve(this);this.emit(nt.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(nt.AFTER_CHANGE_SIZE)}),r}changeSize(t,n){if(t===this._width&&n===this._height)return Promise.resolve(this);this.emit(nt.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(nt.AFTER_CHANGE_SIZE)}),r}_create(){const{library:t}=this._context,n=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(t).filter(n)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends y2{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(l){const c=this.append(s);return o==="mark"&&(c.type=l),c}}const i=["composition.view",...Object.keys(t).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends gg{constructor(){super({},o)}};return s=Wfe([vg(aD(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))vg(aD(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([n])=>n.startsWith("margin")||n.startsWith("padding")||n.startsWith("inset")||t.includes(n))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{const n=this._trailingReject.bind(this);this._trailingReject=null,n(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return n=>{this._rendering=!1,t(n)}}_computedOptions(){const t=this.options(),{key:n=Hfe}=t,{width:r,height:i,depth:a}=g2(t,this._container);return this._width=r,this._height=i,this._key=n,Object.assign(Object.assign({key:this._key},t),{width:r,height:i,depth:a})}_createCanvas(){const{width:t,height:n}=g2(this.options(),this._container);this._plugins.push(new W5),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new hA({container:this._container,width:t,height:n,renderer:this._renderer})}_addToTrailing(){var t;return(t=this._trailingResolve)===null||t===void 0||t.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const t=this.options(),{autoFit:n}=t;if(this._hasBindAutoFit){n||this._unbindAutoFit();return}n&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}Object.assign({},K4());var sD={exports:{}},Nr={},lD={exports:{}},cD={};/**
157
+ * @license React
158
+ * scheduler.production.min.js
159
+ *
160
+ * Copyright (c) Facebook, Inc. and its affiliates.
161
+ *
162
+ * This source code is licensed under the MIT license found in the
163
+ * LICENSE file in the root directory of this source tree.
164
+ */(function(e){function t(C,j){var D=C.length;C.push(j);e:for(;0<D;){var F=D-1>>>1,R=C[F];if(0<i(R,j))C[F]=j,C[D]=R,D=F;else break e}}function n(C){return C.length===0?null:C[0]}function r(C){if(C.length===0)return null;var j=C[0],D=C.pop();if(D!==j){C[0]=D;e:for(var F=0,R=C.length,z=R>>>1;F<z;){var H=2*(F+1)-1,W=C[H],X=H+1,V=C[X];if(0>i(W,D))X<R&&0>i(V,W)?(C[F]=V,C[X]=D,F=X):(C[F]=W,C[H]=D,F=H);else if(X<R&&0>i(V,D))C[F]=V,C[X]=D,F=X;else break e}}return j}function i(C,j){var D=C.sortIndex-j.sortIndex;return D!==0?D:C.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],u=1,f=null,d=3,h=!1,p=!1,v=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(C){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=C)r(c),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(c)}}function x(C){if(v=!1,b(C),!p)if(n(l)!==null)p=!0,T(w);else{var j=n(c);j!==null&&I(x,j.startTime-C)}}function w(C,j){p=!1,v&&(v=!1,y(S),S=-1),h=!0;var D=d;try{for(b(j),f=n(l);f!==null&&(!(f.expirationTime>j)||C&&!M());){var F=f.callback;if(typeof F=="function"){f.callback=null,d=f.priorityLevel;var R=F(f.expirationTime<=j);j=e.unstable_now(),typeof R=="function"?f.callback=R:f===n(l)&&r(l),b(j)}else r(l);f=n(l)}if(f!==null)var z=!0;else{var H=n(c);H!==null&&I(x,H.startTime-j),z=!1}return z}finally{f=null,d=D,h=!1}}var O=!1,_=null,S=-1,k=5,E=-1;function M(){return!(e.unstable_now()-E<k)}function P(){if(_!==null){var C=e.unstable_now();E=C;var j=!0;try{j=_(!0,C)}finally{j?A():(O=!1,_=null)}}else O=!1}var A;if(typeof m=="function")A=function(){m(P)};else if(typeof MessageChannel!="undefined"){var L=new MessageChannel,N=L.port2;L.port1.onmessage=P,A=function(){N.postMessage(null)}}else A=function(){g(P,0)};function T(C){_=C,O||(O=!0,A())}function I(C,j){S=g(function(){C(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(C){C.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,T(w))},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(C){switch(d){case 1:case 2:case 3:var j=3;break;default:j=d}var D=d;d=j;try{return C()}finally{d=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(C,j){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var D=d;d=C;try{return j()}finally{d=D}},e.unstable_scheduleCallback=function(C,j,D){var F=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?F+D:F):D=F,C){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=D+R,C={id:u++,callback:j,priorityLevel:C,startTime:D,expirationTime:R,sortIndex:-1},D>F?(C.sortIndex=D,t(c,C),n(l)===null&&C===n(c)&&(v?(y(S),S=-1):v=!0,I(x,D-F))):(C.sortIndex=R,t(l,C),p||h||(p=!0,T(w))),C},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(C){var j=d;return function(){var D=d;d=j;try{return C.apply(this,arguments)}finally{d=D}}}})(cD),lD.exports=cD;var Ufe=lD.exports;/**
165
+ * @license React
166
+ * react-dom.production.min.js
167
+ *
168
+ * Copyright (c) Facebook, Inc. and its affiliates.
169
+ *
170
+ * This source code is licensed under the MIT license found in the
171
+ * LICENSE file in the root directory of this source tree.
172
+ */var Xfe=K,Ir=Ufe;function oe(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var uD=new Set,nd={};function Us(e,t){_c(e,t),_c(e+"Capture",t)}function _c(e,t){for(nd[e]=t,e=0;e<t.length;e++)uD.add(t[e])}var Ya=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),m2=Object.prototype.hasOwnProperty,qfe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fD={},dD={};function Kfe(e){return m2.call(dD,e)?!0:m2.call(fD,e)?!1:qfe.test(e)?dD[e]=!0:(fD[e]=!0,!1)}function Zfe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Qfe(e,t,n,r){if(t===null||typeof t=="undefined"||Zfe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function lr(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Dn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Dn[e]=new lr(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Dn[t]=new lr(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Dn[e]=new lr(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Dn[e]=new lr(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Dn[e]=new lr(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Dn[e]=new lr(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Dn[e]=new lr(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Dn[e]=new lr(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Dn[e]=new lr(e,5,!1,e.toLowerCase(),null,!1,!1)});var b2=/[\-:]([a-z])/g;function x2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(b2,x2);Dn[t]=new lr(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(b2,x2);Dn[t]=new lr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(b2,x2);Dn[t]=new lr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Dn[e]=new lr(e,1,!1,e.toLowerCase(),null,!1,!1)}),Dn.xlinkHref=new lr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Dn[e]=new lr(e,1,!1,e.toLowerCase(),null,!0,!0)});function w2(e,t,n,r){var i=Dn.hasOwnProperty(t)?Dn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Qfe(t,n,i,r)&&(n=null),r||i===null?Kfe(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Wa=Xfe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,yg=Symbol.for("react.element"),Sc=Symbol.for("react.portal"),kc=Symbol.for("react.fragment"),O2=Symbol.for("react.strict_mode"),_2=Symbol.for("react.profiler"),hD=Symbol.for("react.provider"),pD=Symbol.for("react.context"),S2=Symbol.for("react.forward_ref"),k2=Symbol.for("react.suspense"),E2=Symbol.for("react.suspense_list"),M2=Symbol.for("react.memo"),Do=Symbol.for("react.lazy"),vD=Symbol.for("react.offscreen"),gD=Symbol.iterator;function rd(e){return e===null||typeof e!="object"?null:(e=gD&&e[gD]||e["@@iterator"],typeof e=="function"?e:null)}var Vt=Object.assign,A2;function id(e){if(A2===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);A2=t&&t[1]||""}return`
173
+ `+A2+e}var P2=!1;function C2(e,t){if(!e||P2)return"";P2=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
174
+ `),a=r.stack.split(`
175
+ `),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var l=`
176
+ `+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{P2=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?id(e):""}function Jfe(e){switch(e.tag){case 5:return id(e.type);case 16:return id("Lazy");case 13:return id("Suspense");case 19:return id("SuspenseList");case 0:case 2:case 15:return e=C2(e.type,!1),e;case 11:return e=C2(e.type.render,!1),e;case 1:return e=C2(e.type,!0),e;default:return""}}function T2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case kc:return"Fragment";case Sc:return"Portal";case _2:return"Profiler";case O2:return"StrictMode";case k2:return"Suspense";case E2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pD:return(e.displayName||"Context")+".Consumer";case hD:return(e._context.displayName||"Context")+".Provider";case S2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M2:return t=e.displayName||null,t!==null?t:T2(e.type)||"Memo";case Do:t=e._payload,e=e._init;try{return T2(e(t))}catch(n){}}return null}function ede(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T2(t);case 8:return t===O2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Fo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yD(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tde(e){var t=yD(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function mg(e){e._valueTracker||(e._valueTracker=tde(e))}function mD(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yD(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bg(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function L2(e,t){var n=t.checked;return Vt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function bD(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Fo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function xD(e,t){t=t.checked,t!=null&&w2(e,"checked",t,!1)}function N2(e,t){xD(e,t);var n=Fo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?I2(e,t.type,n):t.hasOwnProperty("defaultValue")&&I2(e,t.type,Fo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function wD(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function I2(e,t,n){(t!=="number"||bg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ad=Array.isArray;function Ec(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Fo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function j2(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(oe(91));return Vt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function OD(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(oe(92));if(ad(n)){if(1<n.length)throw Error(oe(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Fo(n)}}function _D(e,t){var n=Fo(t.value),r=Fo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function SD(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kD(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function D2(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kD(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xg,ED=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(xg=xg||document.createElement("div"),xg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function od(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},nde=["Webkit","ms","Moz","O"];Object.keys(sd).forEach(function(e){nde.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sd[t]=sd[e]})});function MD(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sd.hasOwnProperty(e)&&sd[e]?(""+t).trim():t+"px"}function AD(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=MD(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var rde=Vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function F2(e,t){if(t){if(rde[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(oe(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(oe(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(oe(61))}if(t.style!=null&&typeof t.style!="object")throw Error(oe(62))}}function R2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $2=null;function z2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var B2=null,Mc=null,Ac=null;function PD(e){if(e=Pd(e)){if(typeof B2!="function")throw Error(oe(280));var t=e.stateNode;t&&(t=Wg(t),B2(e.stateNode,e.type,t))}}function CD(e){Mc?Ac?Ac.push(e):Ac=[e]:Mc=e}function TD(){if(Mc){var e=Mc,t=Ac;if(Ac=Mc=null,PD(e),t)for(e=0;e<t.length;e++)PD(t[e])}}function LD(e,t){return e(t)}function ND(){}var Y2=!1;function ID(e,t,n){if(Y2)return e(t,n);Y2=!0;try{return LD(e,t,n)}finally{Y2=!1,(Mc!==null||Ac!==null)&&(ND(),TD())}}function ld(e,t){var n=e.stateNode;if(n===null)return null;var r=Wg(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(oe(231,t,typeof n));return n}var W2=!1;if(Ya)try{var cd={};Object.defineProperty(cd,"passive",{get:function(){W2=!0}}),window.addEventListener("test",cd,cd),window.removeEventListener("test",cd,cd)}catch(e){W2=!1}function ide(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var ud=!1,wg=null,Og=!1,G2=null,ade={onError:function(e){ud=!0,wg=e}};function ode(e,t,n,r,i,a,o,s,l){ud=!1,wg=null,ide.apply(ade,arguments)}function sde(e,t,n,r,i,a,o,s,l){if(ode.apply(this,arguments),ud){if(ud){var c=wg;ud=!1,wg=null}else throw Error(oe(198));Og||(Og=!0,G2=c)}}function Xs(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function jD(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function DD(e){if(Xs(e)!==e)throw Error(oe(188))}function lde(e){var t=e.alternate;if(!t){if(t=Xs(e),t===null)throw Error(oe(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return DD(i),e;if(a===r)return DD(i),t;a=a.sibling}throw Error(oe(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(oe(189))}}if(n.alternate!==r)throw Error(oe(190))}if(n.tag!==3)throw Error(oe(188));return n.stateNode.current===n?e:t}function FD(e){return e=lde(e),e!==null?RD(e):null}function RD(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RD(e);if(t!==null)return t;e=e.sibling}return null}var $D=Ir.unstable_scheduleCallback,zD=Ir.unstable_cancelCallback,cde=Ir.unstable_shouldYield,ude=Ir.unstable_requestPaint,ln=Ir.unstable_now,fde=Ir.unstable_getCurrentPriorityLevel,H2=Ir.unstable_ImmediatePriority,BD=Ir.unstable_UserBlockingPriority,_g=Ir.unstable_NormalPriority,dde=Ir.unstable_LowPriority,YD=Ir.unstable_IdlePriority,Sg=null,va=null;function hde(e){if(va&&typeof va.onCommitFiberRoot=="function")try{va.onCommitFiberRoot(Sg,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Li=Math.clz32?Math.clz32:gde,pde=Math.log,vde=Math.LN2;function gde(e){return e>>>=0,e===0?32:31-(pde(e)/vde|0)|0}var kg=64,Eg=4194304;function fd(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mg(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=fd(s):(a&=o,a!==0&&(r=fd(a)))}else o=n&~i,o!==0?r=fd(o):a!==0&&(r=fd(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Li(t),i=1<<n,r|=e[n],t&=~i;return r}function yde(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mde(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Li(a),s=1<<o,l=i[o];l===-1?(!(s&n)||s&r)&&(i[o]=yde(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function V2(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function WD(){var e=kg;return kg<<=1,!(kg&4194240)&&(kg=64),e}function U2(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Li(t),e[t]=n}function bde(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Li(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function X2(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Li(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ht=0;function GD(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var HD,q2,VD,UD,XD,K2=!1,Ag=[],Ro=null,$o=null,zo=null,hd=new Map,pd=new Map,Bo=[],xde="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function qD(e,t){switch(e){case"focusin":case"focusout":Ro=null;break;case"dragenter":case"dragleave":$o=null;break;case"mouseover":case"mouseout":zo=null;break;case"pointerover":case"pointerout":hd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pd.delete(t.pointerId)}}function vd(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Pd(t),t!==null&&q2(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function wde(e,t,n,r,i){switch(t){case"focusin":return Ro=vd(Ro,e,t,n,r,i),!0;case"dragenter":return $o=vd($o,e,t,n,r,i),!0;case"mouseover":return zo=vd(zo,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return hd.set(a,vd(hd.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,pd.set(a,vd(pd.get(a)||null,e,t,n,r,i)),!0}return!1}function KD(e){var t=qs(e.target);if(t!==null){var n=Xs(t);if(n!==null){if(t=n.tag,t===13){if(t=jD(n),t!==null){e.blockedOn=t,XD(e.priority,function(){VD(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Q2(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$2=r,n.target.dispatchEvent(r),$2=null}else return t=Pd(n),t!==null&&q2(t),e.blockedOn=n,!1;t.shift()}return!0}function ZD(e,t,n){Pg(e)&&n.delete(t)}function Ode(){K2=!1,Ro!==null&&Pg(Ro)&&(Ro=null),$o!==null&&Pg($o)&&($o=null),zo!==null&&Pg(zo)&&(zo=null),hd.forEach(ZD),pd.forEach(ZD)}function gd(e,t){e.blockedOn===t&&(e.blockedOn=null,K2||(K2=!0,Ir.unstable_scheduleCallback(Ir.unstable_NormalPriority,Ode)))}function yd(e){function t(i){return gd(i,e)}if(0<Ag.length){gd(Ag[0],e);for(var n=1;n<Ag.length;n++){var r=Ag[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ro!==null&&gd(Ro,e),$o!==null&&gd($o,e),zo!==null&&gd(zo,e),hd.forEach(t),pd.forEach(t),n=0;n<Bo.length;n++)r=Bo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Bo.length&&(n=Bo[0],n.blockedOn===null);)KD(n),n.blockedOn===null&&Bo.shift()}var Pc=Wa.ReactCurrentBatchConfig,Cg=!0;function _de(e,t,n,r){var i=ht,a=Pc.transition;Pc.transition=null;try{ht=1,Z2(e,t,n,r)}finally{ht=i,Pc.transition=a}}function Sde(e,t,n,r){var i=ht,a=Pc.transition;Pc.transition=null;try{ht=4,Z2(e,t,n,r)}finally{ht=i,Pc.transition=a}}function Z2(e,t,n,r){if(Cg){var i=Q2(e,t,n,r);if(i===null)vw(e,t,r,Tg,n),qD(e,r);else if(wde(i,e,t,n,r))r.stopPropagation();else if(qD(e,r),t&4&&-1<xde.indexOf(e)){for(;i!==null;){var a=Pd(i);if(a!==null&&HD(a),a=Q2(e,t,n,r),a===null&&vw(e,t,r,Tg,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vw(e,t,r,null,n)}}var Tg=null;function Q2(e,t,n,r){if(Tg=null,e=z2(r),e=qs(e),e!==null)if(t=Xs(e),t===null)e=null;else if(n=t.tag,n===13){if(e=jD(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tg=e,null}function QD(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fde()){case H2:return 1;case BD:return 4;case _g:case dde:return 16;case YD:return 536870912;default:return 16}default:return 16}}var Yo=null,J2=null,Lg=null;function JD(){if(Lg)return Lg;var e,t=J2,n=t.length,r,i="value"in Yo?Yo.value:Yo.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Lg=i.slice(e,1<r?1-r:void 0)}function Ng(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ig(){return!0}function eF(){return!1}function jr(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ig:eF,this.isPropagationStopped=eF,this}return Vt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ig)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ig)},persist:function(){},isPersistent:Ig}),t}var Cc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ew=jr(Cc),md=Vt({},Cc,{view:0,detail:0}),kde=jr(md),tw,nw,bd,jg=Vt({},md,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iw,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bd&&(bd&&e.type==="mousemove"?(tw=e.screenX-bd.screenX,nw=e.screenY-bd.screenY):nw=tw=0,bd=e),tw)},movementY:function(e){return"movementY"in e?e.movementY:nw}}),tF=jr(jg),Ede=Vt({},jg,{dataTransfer:0}),Mde=jr(Ede),Ade=Vt({},md,{relatedTarget:0}),rw=jr(Ade),Pde=Vt({},Cc,{animationName:0,elapsedTime:0,pseudoElement:0}),Cde=jr(Pde),Tde=Vt({},Cc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lde=jr(Tde),Nde=Vt({},Cc,{data:0}),nF=jr(Nde),Ide={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jde={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Dde={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fde(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Dde[e])?!!t[e]:!1}function iw(){return Fde}var Rde=Vt({},md,{key:function(e){if(e.key){var t=Ide[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ng(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jde[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iw,charCode:function(e){return e.type==="keypress"?Ng(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ng(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$de=jr(Rde),zde=Vt({},jg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rF=jr(zde),Bde=Vt({},md,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iw}),Yde=jr(Bde),Wde=Vt({},Cc,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gde=jr(Wde),Hde=Vt({},jg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Vde=jr(Hde),Ude=[9,13,27,32],aw=Ya&&"CompositionEvent"in window,xd=null;Ya&&"documentMode"in document&&(xd=document.documentMode);var Xde=Ya&&"TextEvent"in window&&!xd,iF=Ya&&(!aw||xd&&8<xd&&11>=xd),aF=" ",oF=!1;function sF(e,t){switch(e){case"keyup":return Ude.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lF(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Tc=!1;function qde(e,t){switch(e){case"compositionend":return lF(t);case"keypress":return t.which!==32?null:(oF=!0,aF);case"textInput":return e=t.data,e===aF&&oF?null:e;default:return null}}function Kde(e,t){if(Tc)return e==="compositionend"||!aw&&sF(e,t)?(e=JD(),Lg=J2=Yo=null,Tc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return iF&&t.locale!=="ko"?null:t.data;default:return null}}var Zde={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cF(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zde[e.type]:t==="textarea"}function uF(e,t,n,r){CD(r),t=zg(t,"onChange"),0<t.length&&(n=new ew("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var wd=null,Od=null;function Qde(e){AF(e,0)}function Dg(e){var t=Dc(e);if(mD(t))return e}function Jde(e,t){if(e==="change")return t}var fF=!1;if(Ya){var ow;if(Ya){var sw="oninput"in document;if(!sw){var dF=document.createElement("div");dF.setAttribute("oninput","return;"),sw=typeof dF.oninput=="function"}ow=sw}else ow=!1;fF=ow&&(!document.documentMode||9<document.documentMode)}function hF(){wd&&(wd.detachEvent("onpropertychange",pF),Od=wd=null)}function pF(e){if(e.propertyName==="value"&&Dg(Od)){var t=[];uF(t,Od,e,z2(e)),ID(Qde,t)}}function ehe(e,t,n){e==="focusin"?(hF(),wd=t,Od=n,wd.attachEvent("onpropertychange",pF)):e==="focusout"&&hF()}function the(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dg(Od)}function nhe(e,t){if(e==="click")return Dg(t)}function rhe(e,t){if(e==="input"||e==="change")return Dg(t)}function ihe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ni=typeof Object.is=="function"?Object.is:ihe;function _d(e,t){if(Ni(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!m2.call(t,i)||!Ni(e[i],t[i]))return!1}return!0}function vF(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gF(e,t){var n=vF(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=vF(n)}}function yF(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yF(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mF(){for(var e=window,t=bg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=bg(e.document)}return t}function lw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ahe(e){var t=mF(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yF(n.ownerDocument.documentElement,n)){if(r!==null&&lw(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=gF(n,a);var o=gF(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ohe=Ya&&"documentMode"in document&&11>=document.documentMode,Lc=null,cw=null,Sd=null,uw=!1;function bF(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uw||Lc==null||Lc!==bg(r)||(r=Lc,"selectionStart"in r&&lw(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Sd&&_d(Sd,r)||(Sd=r,r=zg(cw,"onSelect"),0<r.length&&(t=new ew("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Lc)))}function Fg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nc={animationend:Fg("Animation","AnimationEnd"),animationiteration:Fg("Animation","AnimationIteration"),animationstart:Fg("Animation","AnimationStart"),transitionend:Fg("Transition","TransitionEnd")},fw={},xF={};Ya&&(xF=document.createElement("div").style,"AnimationEvent"in window||(delete Nc.animationend.animation,delete Nc.animationiteration.animation,delete Nc.animationstart.animation),"TransitionEvent"in window||delete Nc.transitionend.transition);function Rg(e){if(fw[e])return fw[e];if(!Nc[e])return e;var t=Nc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in xF)return fw[e]=t[n];return e}var wF=Rg("animationend"),OF=Rg("animationiteration"),_F=Rg("animationstart"),SF=Rg("transitionend"),kF=new Map,EF="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Wo(e,t){kF.set(e,t),Us(t,[e])}for(var dw=0;dw<EF.length;dw++){var hw=EF[dw],she=hw.toLowerCase(),lhe=hw[0].toUpperCase()+hw.slice(1);Wo(she,"on"+lhe)}Wo(wF,"onAnimationEnd"),Wo(OF,"onAnimationIteration"),Wo(_F,"onAnimationStart"),Wo("dblclick","onDoubleClick"),Wo("focusin","onFocus"),Wo("focusout","onBlur"),Wo(SF,"onTransitionEnd"),_c("onMouseEnter",["mouseout","mouseover"]),_c("onMouseLeave",["mouseout","mouseover"]),_c("onPointerEnter",["pointerout","pointerover"]),_c("onPointerLeave",["pointerout","pointerover"]),Us("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Us("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Us("onBeforeInput",["compositionend","keypress","textInput","paste"]),Us("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Us("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Us("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),che=new Set("cancel close invalid load scroll toggle".split(" ").concat(kd));function MF(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,sde(r,t,void 0,e),e.currentTarget=null}function AF(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;MF(i,s,c),a=l}else for(o=0;o<r.length;o++){if(s=r[o],l=s.instance,c=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;MF(i,s,c),a=l}}}if(Og)throw e=G2,Og=!1,G2=null,e}function Lt(e,t){var n=t[ww];n===void 0&&(n=t[ww]=new Set);var r=e+"__bubble";n.has(r)||(PF(t,e,2,!1),n.add(r))}function pw(e,t,n){var r=0;t&&(r|=4),PF(n,e,r,t)}var $g="_reactListening"+Math.random().toString(36).slice(2);function Ed(e){if(!e[$g]){e[$g]=!0,uD.forEach(function(n){n!=="selectionchange"&&(che.has(n)||pw(n,!1,e),pw(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$g]||(t[$g]=!0,pw("selectionchange",!1,t))}}function PF(e,t,n,r){switch(QD(t)){case 1:var i=_de;break;case 4:i=Sde;break;default:i=Z2}n=i.bind(null,t,n,e),i=void 0,!W2||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function vw(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;s!==null;){if(o=qs(s),o===null)return;if(l=o.tag,l===5||l===6){r=a=o;continue e}s=s.parentNode}}r=r.return}ID(function(){var c=a,u=z2(n),f=[];e:{var d=kF.get(e);if(d!==void 0){var h=ew,p=e;switch(e){case"keypress":if(Ng(n)===0)break e;case"keydown":case"keyup":h=$de;break;case"focusin":p="focus",h=rw;break;case"focusout":p="blur",h=rw;break;case"beforeblur":case"afterblur":h=rw;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=tF;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Mde;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Yde;break;case wF:case OF:case _F:h=Cde;break;case SF:h=Gde;break;case"scroll":h=kde;break;case"wheel":h=Vde;break;case"copy":case"cut":case"paste":h=Lde;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=rF}var v=(t&4)!==0,g=!v&&e==="scroll",y=v?d!==null?d+"Capture":null:d;v=[];for(var m=c,b;m!==null;){b=m;var x=b.stateNode;if(b.tag===5&&x!==null&&(b=x,y!==null&&(x=ld(m,y),x!=null&&v.push(Md(m,x,b)))),g)break;m=m.return}0<v.length&&(d=new h(d,p,null,n,u),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==$2&&(p=n.relatedTarget||n.fromElement)&&(qs(p)||p[Ga]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?qs(p):null,p!==null&&(g=Xs(p),p!==g||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=c),h!==p)){if(v=tF,x="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=rF,x="onPointerLeave",y="onPointerEnter",m="pointer"),g=h==null?d:Dc(h),b=p==null?d:Dc(p),d=new v(x,m+"leave",h,n,u),d.target=g,d.relatedTarget=b,x=null,qs(u)===c&&(v=new v(y,m+"enter",p,n,u),v.target=b,v.relatedTarget=g,x=v),g=x,h&&p)t:{for(v=h,y=p,m=0,b=v;b;b=Ic(b))m++;for(b=0,x=y;x;x=Ic(x))b++;for(;0<m-b;)v=Ic(v),m--;for(;0<b-m;)y=Ic(y),b--;for(;m--;){if(v===y||y!==null&&v===y.alternate)break t;v=Ic(v),y=Ic(y)}v=null}else v=null;h!==null&&CF(f,d,h,v,!1),p!==null&&g!==null&&CF(f,g,p,v,!0)}}e:{if(d=c?Dc(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var w=Jde;else if(cF(d))if(fF)w=rhe;else{w=the;var O=ehe}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(w=nhe);if(w&&(w=w(e,c))){uF(f,w,n,u);break e}O&&O(e,d,c),e==="focusout"&&(O=d._wrapperState)&&O.controlled&&d.type==="number"&&I2(d,"number",d.value)}switch(O=c?Dc(c):window,e){case"focusin":(cF(O)||O.contentEditable==="true")&&(Lc=O,cw=c,Sd=null);break;case"focusout":Sd=cw=Lc=null;break;case"mousedown":uw=!0;break;case"contextmenu":case"mouseup":case"dragend":uw=!1,bF(f,n,u);break;case"selectionchange":if(ohe)break;case"keydown":case"keyup":bF(f,n,u)}var _;if(aw)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else Tc?sF(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(iF&&n.locale!=="ko"&&(Tc||S!=="onCompositionStart"?S==="onCompositionEnd"&&Tc&&(_=JD()):(Yo=u,J2="value"in Yo?Yo.value:Yo.textContent,Tc=!0)),O=zg(c,S),0<O.length&&(S=new nF(S,e,null,n,u),f.push({event:S,listeners:O}),_?S.data=_:(_=lF(n),_!==null&&(S.data=_)))),(_=Xde?qde(e,n):Kde(e,n))&&(c=zg(c,"onBeforeInput"),0<c.length&&(u=new nF("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=_))}AF(f,t)})}function Md(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zg(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=ld(e,n),a!=null&&r.unshift(Md(e,a,i)),a=ld(e,t),a!=null&&r.push(Md(e,a,i))),e=e.return}return r}function Ic(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function CF(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&c!==null&&(s=c,i?(l=ld(n,a),l!=null&&o.unshift(Md(n,l,s))):i||(l=ld(n,a),l!=null&&o.push(Md(n,l,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var uhe=/\r\n?/g,fhe=/\u0000|\uFFFD/g;function TF(e){return(typeof e=="string"?e:""+e).replace(uhe,`
177
+ `).replace(fhe,"")}function Bg(e,t,n){if(t=TF(t),TF(e)!==t&&n)throw Error(oe(425))}function Yg(){}var gw=null,yw=null;function mw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bw=typeof setTimeout=="function"?setTimeout:void 0,dhe=typeof clearTimeout=="function"?clearTimeout:void 0,LF=typeof Promise=="function"?Promise:void 0,hhe=typeof queueMicrotask=="function"?queueMicrotask:typeof LF!="undefined"?function(e){return LF.resolve(null).then(e).catch(phe)}:bw;function phe(e){setTimeout(function(){throw e})}function xw(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),yd(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);yd(t)}function Go(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function NF(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var jc=Math.random().toString(36).slice(2),ga="__reactFiber$"+jc,Ad="__reactProps$"+jc,Ga="__reactContainer$"+jc,ww="__reactEvents$"+jc,vhe="__reactListeners$"+jc,ghe="__reactHandles$"+jc;function qs(e){var t=e[ga];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ga]||n[ga]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=NF(e);e!==null;){if(n=e[ga])return n;e=NF(e)}return t}e=n,n=e.parentNode}return null}function Pd(e){return e=e[ga]||e[Ga],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Dc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(oe(33))}function Wg(e){return e[Ad]||null}var Ow=[],Fc=-1;function Ho(e){return{current:e}}function Nt(e){0>Fc||(e.current=Ow[Fc],Ow[Fc]=null,Fc--)}function Mt(e,t){Fc++,Ow[Fc]=e.current,e.current=t}var Vo={},Kn=Ho(Vo),br=Ho(!1),Ks=Vo;function Rc(e,t){var n=e.type.contextTypes;if(!n)return Vo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function xr(e){return e=e.childContextTypes,e!=null}function Gg(){Nt(br),Nt(Kn)}function IF(e,t,n){if(Kn.current!==Vo)throw Error(oe(168));Mt(Kn,t),Mt(br,n)}function jF(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(oe(108,ede(e)||"Unknown",i));return Vt({},n,r)}function Hg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vo,Ks=Kn.current,Mt(Kn,e),Mt(br,br.current),!0}function DF(e,t,n){var r=e.stateNode;if(!r)throw Error(oe(169));n?(e=jF(e,t,Ks),r.__reactInternalMemoizedMergedChildContext=e,Nt(br),Nt(Kn),Mt(Kn,e)):Nt(br),Mt(br,n)}var Ha=null,Vg=!1,_w=!1;function FF(e){Ha===null?Ha=[e]:Ha.push(e)}function yhe(e){Vg=!0,FF(e)}function Uo(){if(!_w&&Ha!==null){_w=!0;var e=0,t=ht;try{var n=Ha;for(ht=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ha=null,Vg=!1}catch(i){throw Ha!==null&&(Ha=Ha.slice(e+1)),$D(H2,Uo),i}finally{ht=t,_w=!1}}return null}var $c=[],zc=0,Ug=null,Xg=0,ui=[],fi=0,Zs=null,Va=1,Ua="";function Qs(e,t){$c[zc++]=Xg,$c[zc++]=Ug,Ug=e,Xg=t}function RF(e,t,n){ui[fi++]=Va,ui[fi++]=Ua,ui[fi++]=Zs,Zs=e;var r=Va;e=Ua;var i=32-Li(r)-1;r&=~(1<<i),n+=1;var a=32-Li(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Va=1<<32-Li(t)+i|n<<i|r,Ua=a+e}else Va=1<<a|n<<i|r,Ua=e}function Sw(e){e.return!==null&&(Qs(e,1),RF(e,1,0))}function kw(e){for(;e===Ug;)Ug=$c[--zc],$c[zc]=null,Xg=$c[--zc],$c[zc]=null;for(;e===Zs;)Zs=ui[--fi],ui[fi]=null,Ua=ui[--fi],ui[fi]=null,Va=ui[--fi],ui[fi]=null}var Dr=null,Fr=null,$t=!1,Ii=null;function $F(e,t){var n=vi(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function zF(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Dr=e,Fr=Go(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dr=e,Fr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zs!==null?{id:Va,overflow:Ua}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vi(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Dr=e,Fr=null,!0):!1;default:return!1}}function Ew(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Mw(e){if($t){var t=Fr;if(t){var n=t;if(!zF(e,t)){if(Ew(e))throw Error(oe(418));t=Go(n.nextSibling);var r=Dr;t&&zF(e,t)?$F(r,n):(e.flags=e.flags&-4097|2,$t=!1,Dr=e)}}else{if(Ew(e))throw Error(oe(418));e.flags=e.flags&-4097|2,$t=!1,Dr=e}}}function BF(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dr=e}function qg(e){if(e!==Dr)return!1;if(!$t)return BF(e),$t=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!mw(e.type,e.memoizedProps)),t&&(t=Fr)){if(Ew(e))throw YF(),Error(oe(418));for(;t;)$F(e,t),t=Go(t.nextSibling)}if(BF(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(oe(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Fr=Go(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Fr=null}}else Fr=Dr?Go(e.stateNode.nextSibling):null;return!0}function YF(){for(var e=Fr;e;)e=Go(e.nextSibling)}function Bc(){Fr=Dr=null,$t=!1}function Aw(e){Ii===null?Ii=[e]:Ii.push(e)}var mhe=Wa.ReactCurrentBatchConfig;function Cd(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(oe(309));var r=n.stateNode}if(!r)throw Error(oe(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var s=i.refs;o===null?delete s[a]:s[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(oe(284));if(!n._owner)throw Error(oe(290,e))}return e}function Kg(e,t){throw e=Object.prototype.toString.call(t),Error(oe(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function WF(e){var t=e._init;return t(e._payload)}function GF(e){function t(y,m){if(e){var b=y.deletions;b===null?(y.deletions=[m],y.flags|=16):b.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(y,m){return y=ts(y,m),y.index=0,y.sibling=null,y}function a(y,m,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<m?(y.flags|=2,m):b):(y.flags|=2,m)):(y.flags|=1048576,m)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function s(y,m,b,x){return m===null||m.tag!==6?(m=bO(b,y.mode,x),m.return=y,m):(m=i(m,b),m.return=y,m)}function l(y,m,b,x){var w=b.type;return w===kc?u(y,m,b.props.children,x,b.key):m!==null&&(m.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Do&&WF(w)===m.type)?(x=i(m,b.props),x.ref=Cd(y,m,b),x.return=y,x):(x=x0(b.type,b.key,b.props,null,y.mode,x),x.ref=Cd(y,m,b),x.return=y,x)}function c(y,m,b,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==b.containerInfo||m.stateNode.implementation!==b.implementation?(m=xO(b,y.mode,x),m.return=y,m):(m=i(m,b.children||[]),m.return=y,m)}function u(y,m,b,x,w){return m===null||m.tag!==7?(m=ol(b,y.mode,x,w),m.return=y,m):(m=i(m,b),m.return=y,m)}function f(y,m,b){if(typeof m=="string"&&m!==""||typeof m=="number")return m=bO(""+m,y.mode,b),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case yg:return b=x0(m.type,m.key,m.props,null,y.mode,b),b.ref=Cd(y,null,m),b.return=y,b;case Sc:return m=xO(m,y.mode,b),m.return=y,m;case Do:var x=m._init;return f(y,x(m._payload),b)}if(ad(m)||rd(m))return m=ol(m,y.mode,b,null),m.return=y,m;Kg(y,m)}return null}function d(y,m,b,x){var w=m!==null?m.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return w!==null?null:s(y,m,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case yg:return b.key===w?l(y,m,b,x):null;case Sc:return b.key===w?c(y,m,b,x):null;case Do:return w=b._init,d(y,m,w(b._payload),x)}if(ad(b)||rd(b))return w!==null?null:u(y,m,b,x,null);Kg(y,b)}return null}function h(y,m,b,x,w){if(typeof x=="string"&&x!==""||typeof x=="number")return y=y.get(b)||null,s(m,y,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case yg:return y=y.get(x.key===null?b:x.key)||null,l(m,y,x,w);case Sc:return y=y.get(x.key===null?b:x.key)||null,c(m,y,x,w);case Do:var O=x._init;return h(y,m,b,O(x._payload),w)}if(ad(x)||rd(x))return y=y.get(b)||null,u(m,y,x,w,null);Kg(m,x)}return null}function p(y,m,b,x){for(var w=null,O=null,_=m,S=m=0,k=null;_!==null&&S<b.length;S++){_.index>S?(k=_,_=null):k=_.sibling;var E=d(y,_,b[S],x);if(E===null){_===null&&(_=k);break}e&&_&&E.alternate===null&&t(y,_),m=a(E,m,S),O===null?w=E:O.sibling=E,O=E,_=k}if(S===b.length)return n(y,_),$t&&Qs(y,S),w;if(_===null){for(;S<b.length;S++)_=f(y,b[S],x),_!==null&&(m=a(_,m,S),O===null?w=_:O.sibling=_,O=_);return $t&&Qs(y,S),w}for(_=r(y,_);S<b.length;S++)k=h(_,y,S,b[S],x),k!==null&&(e&&k.alternate!==null&&_.delete(k.key===null?S:k.key),m=a(k,m,S),O===null?w=k:O.sibling=k,O=k);return e&&_.forEach(function(M){return t(y,M)}),$t&&Qs(y,S),w}function v(y,m,b,x){var w=rd(b);if(typeof w!="function")throw Error(oe(150));if(b=w.call(b),b==null)throw Error(oe(151));for(var O=w=null,_=m,S=m=0,k=null,E=b.next();_!==null&&!E.done;S++,E=b.next()){_.index>S?(k=_,_=null):k=_.sibling;var M=d(y,_,E.value,x);if(M===null){_===null&&(_=k);break}e&&_&&M.alternate===null&&t(y,_),m=a(M,m,S),O===null?w=M:O.sibling=M,O=M,_=k}if(E.done)return n(y,_),$t&&Qs(y,S),w;if(_===null){for(;!E.done;S++,E=b.next())E=f(y,E.value,x),E!==null&&(m=a(E,m,S),O===null?w=E:O.sibling=E,O=E);return $t&&Qs(y,S),w}for(_=r(y,_);!E.done;S++,E=b.next())E=h(_,y,S,E.value,x),E!==null&&(e&&E.alternate!==null&&_.delete(E.key===null?S:E.key),m=a(E,m,S),O===null?w=E:O.sibling=E,O=E);return e&&_.forEach(function(P){return t(y,P)}),$t&&Qs(y,S),w}function g(y,m,b,x){if(typeof b=="object"&&b!==null&&b.type===kc&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case yg:e:{for(var w=b.key,O=m;O!==null;){if(O.key===w){if(w=b.type,w===kc){if(O.tag===7){n(y,O.sibling),m=i(O,b.props.children),m.return=y,y=m;break e}}else if(O.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Do&&WF(w)===O.type){n(y,O.sibling),m=i(O,b.props),m.ref=Cd(y,O,b),m.return=y,y=m;break e}n(y,O);break}else t(y,O);O=O.sibling}b.type===kc?(m=ol(b.props.children,y.mode,x,b.key),m.return=y,y=m):(x=x0(b.type,b.key,b.props,null,y.mode,x),x.ref=Cd(y,m,b),x.return=y,y=x)}return o(y);case Sc:e:{for(O=b.key;m!==null;){if(m.key===O)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){n(y,m.sibling),m=i(m,b.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=xO(b,y.mode,x),m.return=y,y=m}return o(y);case Do:return O=b._init,g(y,m,O(b._payload),x)}if(ad(b))return p(y,m,b,x);if(rd(b))return v(y,m,b,x);Kg(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,m!==null&&m.tag===6?(n(y,m.sibling),m=i(m,b),m.return=y,y=m):(n(y,m),m=bO(b,y.mode,x),m.return=y,y=m),o(y)):n(y,m)}return g}var Yc=GF(!0),HF=GF(!1),Zg=Ho(null),Qg=null,Wc=null,Pw=null;function Cw(){Pw=Wc=Qg=null}function Tw(e){var t=Zg.current;Nt(Zg),e._currentValue=t}function Lw(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Gc(e,t){Qg=e,Pw=Wc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(wr=!0),e.firstContext=null)}function di(e){var t=e._currentValue;if(Pw!==e)if(e={context:e,memoizedValue:t,next:null},Wc===null){if(Qg===null)throw Error(oe(308));Wc=e,Qg.dependencies={lanes:0,firstContext:e}}else Wc=Wc.next=e;return t}var Js=null;function Nw(e){Js===null?Js=[e]:Js.push(e)}function VF(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Nw(t)):(n.next=i.next,i.next=n),t.interleaved=n,Xa(e,r)}function Xa(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xo=!1;function Iw(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function UF(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function qo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,qe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Xa(e,n)}return i=r.interleaved,i===null?(t.next=t,Nw(r)):(t.next=i.next,i.next=t),r.interleaved=t,Xa(e,n)}function Jg(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,X2(e,n)}}function XF(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function e0(e,t,n,r){var i=e.updateQueue;Xo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?a=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,u=c=l=null,s=a;do{var d=s.lane,h=s.eventTime;if((r&d)===d){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,v=s;switch(d=t,h=n,v.tag){case 1:if(p=v.payload,typeof p=="function"){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=v.payload,d=typeof p=="function"?p.call(h,f,d):p,d==null)break e;f=Vt({},f,d);break e;case 2:Xo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,o|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;d=s,s=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);nl|=o,e.lanes=o,e.memoizedState=f}}function qF(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(oe(191,i));i.call(r)}}}var Td={},ya=Ho(Td),Ld=Ho(Td),Nd=Ho(Td);function el(e){if(e===Td)throw Error(oe(174));return e}function jw(e,t){switch(Mt(Nd,t),Mt(Ld,e),Mt(ya,Td),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:D2(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=D2(t,e)}Nt(ya),Mt(ya,t)}function Hc(){Nt(ya),Nt(Ld),Nt(Nd)}function KF(e){el(Nd.current);var t=el(ya.current),n=D2(t,e.type);t!==n&&(Mt(Ld,e),Mt(ya,n))}function Dw(e){Ld.current===e&&(Nt(ya),Nt(Ld))}var Ut=Ho(0);function t0(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fw=[];function Rw(){for(var e=0;e<Fw.length;e++)Fw[e]._workInProgressVersionPrimary=null;Fw.length=0}var n0=Wa.ReactCurrentDispatcher,$w=Wa.ReactCurrentBatchConfig,tl=0,Xt=null,xn=null,Mn=null,r0=!1,Id=!1,jd=0,bhe=0;function Zn(){throw Error(oe(321))}function zw(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ni(e[n],t[n]))return!1;return!0}function Bw(e,t,n,r,i,a){if(tl=a,Xt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,n0.current=e===null||e.memoizedState===null?_he:She,e=n(r,i),Id){a=0;do{if(Id=!1,jd=0,25<=a)throw Error(oe(301));a+=1,Mn=xn=null,t.updateQueue=null,n0.current=khe,e=n(r,i)}while(Id)}if(n0.current=o0,t=xn!==null&&xn.next!==null,tl=0,Mn=xn=Xt=null,r0=!1,t)throw Error(oe(300));return e}function Yw(){var e=jd!==0;return jd=0,e}function ma(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mn===null?Xt.memoizedState=Mn=e:Mn=Mn.next=e,Mn}function hi(){if(xn===null){var e=Xt.alternate;e=e!==null?e.memoizedState:null}else e=xn.next;var t=Mn===null?Xt.memoizedState:Mn.next;if(t!==null)Mn=t,xn=e;else{if(e===null)throw Error(oe(310));xn=e,e={memoizedState:xn.memoizedState,baseState:xn.baseState,baseQueue:xn.baseQueue,queue:xn.queue,next:null},Mn===null?Xt.memoizedState=Mn=e:Mn=Mn.next=e}return Mn}function Dd(e,t){return typeof t=="function"?t(e):t}function Ww(e){var t=hi(),n=t.queue;if(n===null)throw Error(oe(311));n.lastRenderedReducer=e;var r=xn,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var s=o=null,l=null,c=a;do{var u=c.lane;if((tl&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=f,o=r):l=l.next=f,Xt.lanes|=u,nl|=u}c=c.next}while(c!==null&&c!==a);l===null?o=r:l.next=s,Ni(r,t.memoizedState)||(wr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,Xt.lanes|=a,nl|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Gw(e){var t=hi(),n=t.queue;if(n===null)throw Error(oe(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Ni(a,t.memoizedState)||(wr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function ZF(){}function QF(e,t){var n=Xt,r=hi(),i=t(),a=!Ni(r.memoizedState,i);if(a&&(r.memoizedState=i,wr=!0),r=r.queue,Hw(tR.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Mn!==null&&Mn.memoizedState.tag&1){if(n.flags|=2048,Fd(9,eR.bind(null,n,r,i,t),void 0,null),An===null)throw Error(oe(349));tl&30||JF(n,t,i)}return i}function JF(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xt.updateQueue,t===null?(t={lastEffect:null,stores:null},Xt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function eR(e,t,n,r){t.value=n,t.getSnapshot=r,nR(t)&&rR(e)}function tR(e,t,n){return n(function(){nR(t)&&rR(e)})}function nR(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ni(e,n)}catch(r){return!0}}function rR(e){var t=Xa(e,1);t!==null&&Ri(t,e,1,-1)}function iR(e){var t=ma();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dd,lastRenderedState:e},t.queue=e,e=e.dispatch=Ohe.bind(null,Xt,e),[t.memoizedState,e]}function Fd(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Xt.updateQueue,t===null?(t={lastEffect:null,stores:null},Xt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function aR(){return hi().memoizedState}function i0(e,t,n,r){var i=ma();Xt.flags|=e,i.memoizedState=Fd(1|t,n,void 0,r===void 0?null:r)}function a0(e,t,n,r){var i=hi();r=r===void 0?null:r;var a=void 0;if(xn!==null){var o=xn.memoizedState;if(a=o.destroy,r!==null&&zw(r,o.deps)){i.memoizedState=Fd(t,n,a,r);return}}Xt.flags|=e,i.memoizedState=Fd(1|t,n,a,r)}function oR(e,t){return i0(8390656,8,e,t)}function Hw(e,t){return a0(2048,8,e,t)}function sR(e,t){return a0(4,2,e,t)}function lR(e,t){return a0(4,4,e,t)}function cR(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uR(e,t,n){return n=n!=null?n.concat([e]):null,a0(4,4,cR.bind(null,t,e),n)}function Vw(){}function fR(e,t){var n=hi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zw(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dR(e,t){var n=hi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&zw(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hR(e,t,n){return tl&21?(Ni(n,t)||(n=WD(),Xt.lanes|=n,nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,wr=!0),e.memoizedState=n)}function xhe(e,t){var n=ht;ht=n!==0&&4>n?n:4,e(!0);var r=$w.transition;$w.transition={};try{e(!1),t()}finally{ht=n,$w.transition=r}}function pR(){return hi().memoizedState}function whe(e,t,n){var r=Jo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vR(e))gR(t,n);else if(n=VF(e,t,n,r),n!==null){var i=ur();Ri(n,e,r,i),yR(n,t,r)}}function Ohe(e,t,n){var r=Jo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vR(e))gR(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ni(s,o)){var l=t.interleaved;l===null?(i.next=i,Nw(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch(c){}finally{}n=VF(e,t,i,r),n!==null&&(i=ur(),Ri(n,e,r,i),yR(n,t,r))}}function vR(e){var t=e.alternate;return e===Xt||t!==null&&t===Xt}function gR(e,t){Id=r0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yR(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,X2(e,n)}}var o0={readContext:di,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},_he={readContext:di,useCallback:function(e,t){return ma().memoizedState=[e,t===void 0?null:t],e},useContext:di,useEffect:oR,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,i0(4194308,4,cR.bind(null,t,e),n)},useLayoutEffect:function(e,t){return i0(4194308,4,e,t)},useInsertionEffect:function(e,t){return i0(4,2,e,t)},useMemo:function(e,t){var n=ma();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ma();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=whe.bind(null,Xt,e),[r.memoizedState,e]},useRef:function(e){var t=ma();return e={current:e},t.memoizedState=e},useState:iR,useDebugValue:Vw,useDeferredValue:function(e){return ma().memoizedState=e},useTransition:function(){var e=iR(!1),t=e[0];return e=xhe.bind(null,e[1]),ma().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xt,i=ma();if($t){if(n===void 0)throw Error(oe(407));n=n()}else{if(n=t(),An===null)throw Error(oe(349));tl&30||JF(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,oR(tR.bind(null,r,a,e),[e]),r.flags|=2048,Fd(9,eR.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ma(),t=An.identifierPrefix;if($t){var n=Ua,r=Va;n=(r&~(1<<32-Li(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=jd++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=bhe++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},She={readContext:di,useCallback:fR,useContext:di,useEffect:Hw,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:lR,useMemo:dR,useReducer:Ww,useRef:aR,useState:function(){return Ww(Dd)},useDebugValue:Vw,useDeferredValue:function(e){var t=hi();return hR(t,xn.memoizedState,e)},useTransition:function(){var e=Ww(Dd)[0],t=hi().memoizedState;return[e,t]},useMutableSource:ZF,useSyncExternalStore:QF,useId:pR,unstable_isNewReconciler:!1},khe={readContext:di,useCallback:fR,useContext:di,useEffect:Hw,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:lR,useMemo:dR,useReducer:Gw,useRef:aR,useState:function(){return Gw(Dd)},useDebugValue:Vw,useDeferredValue:function(e){var t=hi();return xn===null?t.memoizedState=e:hR(t,xn.memoizedState,e)},useTransition:function(){var e=Gw(Dd)[0],t=hi().memoizedState;return[e,t]},useMutableSource:ZF,useSyncExternalStore:QF,useId:pR,unstable_isNewReconciler:!1};function ji(e,t){if(e&&e.defaultProps){t=Vt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Uw(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Vt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var s0={isMounted:function(e){return(e=e._reactInternals)?Xs(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ur(),i=Jo(e),a=qa(r,i);a.payload=t,n!=null&&(a.callback=n),t=qo(e,a,i),t!==null&&(Ri(t,e,i,r),Jg(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ur(),i=Jo(e),a=qa(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=qo(e,a,i),t!==null&&(Ri(t,e,i,r),Jg(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ur(),r=Jo(e),i=qa(n,r);i.tag=2,t!=null&&(i.callback=t),t=qo(e,i,r),t!==null&&(Ri(t,e,r,n),Jg(t,e,r))}};function mR(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!_d(n,r)||!_d(i,a):!0}function bR(e,t,n){var r=!1,i=Vo,a=t.contextType;return typeof a=="object"&&a!==null?a=di(a):(i=xr(t)?Ks:Kn.current,r=t.contextTypes,a=(r=r!=null)?Rc(e,i):Vo),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=s0,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function xR(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&s0.enqueueReplaceState(t,t.state,null)}function Xw(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Iw(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=di(a):(a=xr(t)?Ks:Kn.current,i.context=Rc(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Uw(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&s0.enqueueReplaceState(i,i.state,null),e0(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Vc(e,t){try{var n="",r=t;do n+=Jfe(r),r=r.return;while(r);var i=n}catch(a){i=`
178
+ Error generating stack: `+a.message+`
179
+ `+a.stack}return{value:e,source:t,stack:i,digest:null}}function qw(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Kw(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ehe=typeof WeakMap=="function"?WeakMap:Map;function wR(e,t,n){n=qa(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){p0||(p0=!0,fO=r),Kw(e,t)},n}function OR(e,t,n){n=qa(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Kw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){Kw(e,t),typeof r!="function"&&(Zo===null?Zo=new Set([this]):Zo.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function _R(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ehe;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zhe.bind(null,e,t,n),t.then(e,e))}function SR(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kR(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=qa(-1,1),t.tag=2,qo(n,t,1))),n.lanes|=1),e)}var Mhe=Wa.ReactCurrentOwner,wr=!1;function cr(e,t,n,r){t.child=e===null?HF(t,null,n,r):Yc(t,e.child,n,r)}function ER(e,t,n,r,i){n=n.render;var a=t.ref;return Gc(t,i),r=Bw(e,t,n,r,a,i),n=Yw(),e!==null&&!wr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ka(e,t,i)):($t&&n&&Sw(t),t.flags|=1,cr(e,t,r,i),t.child)}function MR(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!mO(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,AR(e,t,a,r,i)):(e=x0(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:_d,n(o,r)&&e.ref===t.ref)return Ka(e,t,i)}return t.flags|=1,e=ts(a,r),e.ref=t.ref,e.return=t,t.child=e}function AR(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(_d(a,r)&&e.ref===t.ref)if(wr=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(wr=!0);else return t.lanes=e.lanes,Ka(e,t,i)}return Zw(e,t,n,r,i)}function PR(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(Xc,Rr),Rr|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mt(Xc,Rr),Rr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,Mt(Xc,Rr),Rr|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,Mt(Xc,Rr),Rr|=r;return cr(e,t,i,n),t.child}function CR(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Zw(e,t,n,r,i){var a=xr(n)?Ks:Kn.current;return a=Rc(t,a),Gc(t,i),n=Bw(e,t,n,r,a,i),r=Yw(),e!==null&&!wr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Ka(e,t,i)):($t&&r&&Sw(t),t.flags|=1,cr(e,t,n,i),t.child)}function TR(e,t,n,r,i){if(xr(n)){var a=!0;Hg(t)}else a=!1;if(Gc(t,i),t.stateNode===null)c0(e,t),bR(t,n,r),Xw(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=di(c):(c=xr(n)?Ks:Kn.current,c=Rc(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==r||l!==c)&&xR(t,o,r,c),Xo=!1;var d=t.memoizedState;o.state=d,e0(t,r,o,i),l=t.memoizedState,s!==r||d!==l||br.current||Xo?(typeof u=="function"&&(Uw(t,n,u,r),l=t.memoizedState),(s=Xo||mR(t,n,s,r,d,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,UF(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ji(t.type,s),o.props=c,f=t.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=di(l):(l=xr(n)?Ks:Kn.current,l=Rc(t,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(s!==f||d!==l)&&xR(t,o,r,l),Xo=!1,d=t.memoizedState,o.state=d,e0(t,r,o,i);var p=t.memoizedState;s!==f||d!==p||br.current||Xo?(typeof h=="function"&&(Uw(t,n,h,r),p=t.memoizedState),(c=Xo||mR(t,n,c,r,d,p,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Qw(e,t,n,r,a,i)}function Qw(e,t,n,r,i,a){CR(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&DF(t,n,!1),Ka(e,t,a);r=t.stateNode,Mhe.current=t;var s=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Yc(t,e.child,null,a),t.child=Yc(t,null,s,a)):cr(e,t,s,a),t.memoizedState=r.state,i&&DF(t,n,!0),t.child}function LR(e){var t=e.stateNode;t.pendingContext?IF(e,t.pendingContext,t.pendingContext!==t.context):t.context&&IF(e,t.context,!1),jw(e,t.containerInfo)}function NR(e,t,n,r,i){return Bc(),Aw(i),t.flags|=256,cr(e,t,n,r),t.child}var Jw={dehydrated:null,treeContext:null,retryLane:0};function eO(e){return{baseLanes:e,cachePool:null,transitions:null}}function IR(e,t,n){var r=t.pendingProps,i=Ut.current,a=!1,o=(t.flags&128)!==0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Mt(Ut,i&1),e===null)return Mw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=w0(o,r,0,null),e=ol(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=eO(n),t.memoizedState=Jw,e):tO(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Ahe(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=ts(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?a=ts(s,a):(a=ol(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?eO(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Jw,r}return a=e.child,e=a.sibling,r=ts(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function tO(e,t){return t=w0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function l0(e,t,n,r){return r!==null&&Aw(r),Yc(t,e.child,null,n),e=tO(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ahe(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=qw(Error(oe(422))),l0(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=w0({mode:"visible",children:r.children},i,0,null),a=ol(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Yc(t,e.child,null,o),t.child.memoizedState=eO(o),t.memoizedState=Jw,a);if(!(t.mode&1))return l0(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,a=Error(oe(419)),r=qw(a,r,void 0),l0(e,t,o,r)}if(s=(o&e.childLanes)!==0,wr||s){if(r=An,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Xa(e,i),Ri(r,e,i,-1))}return yO(),r=qw(Error(oe(421))),l0(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Bhe.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Fr=Go(i.nextSibling),Dr=t,$t=!0,Ii=null,e!==null&&(ui[fi++]=Va,ui[fi++]=Ua,ui[fi++]=Zs,Va=e.id,Ua=e.overflow,Zs=t),t=tO(t,r.children),t.flags|=4096,t)}function jR(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Lw(e.return,t,n)}function nO(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function DR(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(cr(e,t,r.children,n),r=Ut.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jR(e,n,t);else if(e.tag===19)jR(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mt(Ut,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&t0(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nO(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&t0(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nO(t,!0,n,null,a);break;case"together":nO(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function c0(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ka(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nl|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(oe(153));if(t.child!==null){for(e=t.child,n=ts(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ts(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Phe(e,t,n){switch(t.tag){case 3:LR(t),Bc();break;case 5:KF(t);break;case 1:xr(t.type)&&Hg(t);break;case 4:jw(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Mt(Zg,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Mt(Ut,Ut.current&1),t.flags|=128,null):n&t.child.childLanes?IR(e,t,n):(Mt(Ut,Ut.current&1),e=Ka(e,t,n),e!==null?e.sibling:null);Mt(Ut,Ut.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return DR(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mt(Ut,Ut.current),r)break;return null;case 22:case 23:return t.lanes=0,PR(e,t,n)}return Ka(e,t,n)}var FR,rO,RR,$R;FR=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},rO=function(){},RR=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,el(ya.current);var a=null;switch(n){case"input":i=L2(e,i),r=L2(e,r),a=[];break;case"select":i=Vt({},i,{value:void 0}),r=Vt({},r,{value:void 0}),a=[];break;case"textarea":i=j2(e,i),r=j2(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Yg)}F2(n,r);var o;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(nd.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(nd.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Lt("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},$R=function(e,t,n,r){n!==r&&(t.flags|=4)};function Rd(e,t){if(!$t)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qn(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Che(e,t,n){var r=t.pendingProps;switch(kw(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qn(t),null;case 1:return xr(t.type)&&Gg(),Qn(t),null;case 3:return r=t.stateNode,Hc(),Nt(br),Nt(Kn),Rw(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(qg(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ii!==null&&(pO(Ii),Ii=null))),rO(e,t),Qn(t),null;case 5:Dw(t);var i=el(Nd.current);if(n=t.type,e!==null&&t.stateNode!=null)RR(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(oe(166));return Qn(t),null}if(e=el(ya.current),qg(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ga]=t,r[Ad]=a,e=(t.mode&1)!==0,n){case"dialog":Lt("cancel",r),Lt("close",r);break;case"iframe":case"object":case"embed":Lt("load",r);break;case"video":case"audio":for(i=0;i<kd.length;i++)Lt(kd[i],r);break;case"source":Lt("error",r);break;case"img":case"image":case"link":Lt("error",r),Lt("load",r);break;case"details":Lt("toggle",r);break;case"input":bD(r,a),Lt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Lt("invalid",r);break;case"textarea":OD(r,a),Lt("invalid",r)}F2(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var s=a[o];o==="children"?typeof s=="string"?r.textContent!==s&&(a.suppressHydrationWarning!==!0&&Bg(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Bg(r.textContent,s,e),i=["children",""+s]):nd.hasOwnProperty(o)&&s!=null&&o==="onScroll"&&Lt("scroll",r)}switch(n){case"input":mg(r),wD(r,a,!0);break;case"textarea":mg(r),SD(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Yg)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kD(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ga]=t,e[Ad]=r,FR(e,t,!1,!1),t.stateNode=e;e:{switch(o=R2(n,r),n){case"dialog":Lt("cancel",e),Lt("close",e),i=r;break;case"iframe":case"object":case"embed":Lt("load",e),i=r;break;case"video":case"audio":for(i=0;i<kd.length;i++)Lt(kd[i],e);i=r;break;case"source":Lt("error",e),i=r;break;case"img":case"image":case"link":Lt("error",e),Lt("load",e),i=r;break;case"details":Lt("toggle",e),i=r;break;case"input":bD(e,r),i=L2(e,r),Lt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Vt({},r,{value:void 0}),Lt("invalid",e);break;case"textarea":OD(e,r),i=j2(e,r),Lt("invalid",e);break;default:i=r}F2(n,i),s=i;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?AD(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&ED(e,l)):a==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&od(e,l):typeof l=="number"&&od(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(nd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Lt("scroll",e):l!=null&&w2(e,a,l,o))}switch(n){case"input":mg(e),wD(e,r,!1);break;case"textarea":mg(e),SD(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Fo(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?Ec(e,!!r.multiple,a,!1):r.defaultValue!=null&&Ec(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Yg)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Qn(t),null;case 6:if(e&&t.stateNode!=null)$R(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(oe(166));if(n=el(Nd.current),el(ya.current),qg(t)){if(r=t.stateNode,n=t.memoizedProps,r[ga]=t,(a=r.nodeValue!==n)&&(e=Dr,e!==null))switch(e.tag){case 3:Bg(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Bg(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ga]=t,t.stateNode=r}return Qn(t),null;case 13:if(Nt(Ut),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if($t&&Fr!==null&&t.mode&1&&!(t.flags&128))YF(),Bc(),t.flags|=98560,a=!1;else if(a=qg(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(oe(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(oe(317));a[ga]=t}else Bc(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qn(t),a=!1}else Ii!==null&&(pO(Ii),Ii=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ut.current&1?wn===0&&(wn=3):yO())),t.updateQueue!==null&&(t.flags|=4),Qn(t),null);case 4:return Hc(),rO(e,t),e===null&&Ed(t.stateNode.containerInfo),Qn(t),null;case 10:return Tw(t.type._context),Qn(t),null;case 17:return xr(t.type)&&Gg(),Qn(t),null;case 19:if(Nt(Ut),a=t.memoizedState,a===null)return Qn(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)Rd(a,!1);else{if(wn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=t0(e),o!==null){for(t.flags|=128,Rd(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Mt(Ut,Ut.current&1|2),t.child}e=e.sibling}a.tail!==null&&ln()>qc&&(t.flags|=128,r=!0,Rd(a,!1),t.lanes=4194304)}else{if(!r)if(e=t0(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Rd(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!$t)return Qn(t),null}else 2*ln()-a.renderingStartTime>qc&&n!==1073741824&&(t.flags|=128,r=!0,Rd(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ln(),t.sibling=null,n=Ut.current,Mt(Ut,r?n&1|2:n&1),t):(Qn(t),null);case 22:case 23:return gO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Rr&1073741824&&(Qn(t),t.subtreeFlags&6&&(t.flags|=8192)):Qn(t),null;case 24:return null;case 25:return null}throw Error(oe(156,t.tag))}function The(e,t){switch(kw(t),t.tag){case 1:return xr(t.type)&&Gg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hc(),Nt(br),Nt(Kn),Rw(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dw(t),null;case 13:if(Nt(Ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(oe(340));Bc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(Ut),null;case 4:return Hc(),null;case 10:return Tw(t.type._context),null;case 22:case 23:return gO(),null;case 24:return null;default:return null}}var u0=!1,Jn=!1,Lhe=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Uc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qt(e,t,r)}else n.current=null}function iO(e,t,n){try{n()}catch(r){Qt(e,t,r)}}var zR=!1;function Nhe(e,t){if(gw=Cg,e=mF(),lw(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(x){n=null;break e}var o=0,s=-1,l=-1,c=0,u=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++c===i&&(s=o),d===a&&++u===r&&(l=o),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(yw={focusedElem:e,selectionRange:n},Cg=!1,ye=t;ye!==null;)if(t=ye,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ye=e;else for(;ye!==null;){t=ye;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var v=p.memoizedProps,g=p.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:ji(t.type,v),g);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(x){Qt(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,ye=e;break}ye=t.return}return p=zR,zR=!1,p}function $d(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&iO(t,n,a)}i=i.next}while(i!==r)}}function f0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function aO(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function BR(e){var t=e.alternate;t!==null&&(e.alternate=null,BR(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ga],delete t[Ad],delete t[ww],delete t[vhe],delete t[ghe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YR(e){return e.tag===5||e.tag===3||e.tag===4}function WR(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function oO(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yg));else if(r!==4&&(e=e.child,e!==null))for(oO(e,t,n),e=e.sibling;e!==null;)oO(e,t,n),e=e.sibling}function sO(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sO(e,t,n),e=e.sibling;e!==null;)sO(e,t,n),e=e.sibling}var Fn=null,Di=!1;function Ko(e,t,n){for(n=n.child;n!==null;)GR(e,t,n),n=n.sibling}function GR(e,t,n){if(va&&typeof va.onCommitFiberUnmount=="function")try{va.onCommitFiberUnmount(Sg,n)}catch(s){}switch(n.tag){case 5:Jn||Uc(n,t);case 6:var r=Fn,i=Di;Fn=null,Ko(e,t,n),Fn=r,Di=i,Fn!==null&&(Di?(e=Fn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fn.removeChild(n.stateNode));break;case 18:Fn!==null&&(Di?(e=Fn,n=n.stateNode,e.nodeType===8?xw(e.parentNode,n):e.nodeType===1&&xw(e,n),yd(e)):xw(Fn,n.stateNode));break;case 4:r=Fn,i=Di,Fn=n.stateNode.containerInfo,Di=!0,Ko(e,t,n),Fn=r,Di=i;break;case 0:case 11:case 14:case 15:if(!Jn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&iO(n,t,o),i=i.next}while(i!==r)}Ko(e,t,n);break;case 1:if(!Jn&&(Uc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Qt(n,t,s)}Ko(e,t,n);break;case 21:Ko(e,t,n);break;case 22:n.mode&1?(Jn=(r=Jn)||n.memoizedState!==null,Ko(e,t,n),Jn=r):Ko(e,t,n);break;default:Ko(e,t,n)}}function HR(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lhe),t.forEach(function(r){var i=Yhe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Fi(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,s=o;e:for(;s!==null;){switch(s.tag){case 5:Fn=s.stateNode,Di=!1;break e;case 3:Fn=s.stateNode.containerInfo,Di=!0;break e;case 4:Fn=s.stateNode.containerInfo,Di=!0;break e}s=s.return}if(Fn===null)throw Error(oe(160));GR(a,o,i),Fn=null,Di=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){Qt(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)VR(t,e),t=t.sibling}function VR(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fi(t,e),ba(e),r&4){try{$d(3,e,e.return),f0(3,e)}catch(v){Qt(e,e.return,v)}try{$d(5,e,e.return)}catch(v){Qt(e,e.return,v)}}break;case 1:Fi(t,e),ba(e),r&512&&n!==null&&Uc(n,n.return);break;case 5:if(Fi(t,e),ba(e),r&512&&n!==null&&Uc(n,n.return),e.flags&32){var i=e.stateNode;try{od(i,"")}catch(v){Qt(e,e.return,v)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&xD(i,a),R2(s,o);var c=R2(s,a);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?AD(i,f):u==="dangerouslySetInnerHTML"?ED(i,f):u==="children"?od(i,f):w2(i,u,f,c)}switch(s){case"input":N2(i,a);break;case"textarea":_D(i,a);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?Ec(i,!!a.multiple,h,!1):d!==!!a.multiple&&(a.defaultValue!=null?Ec(i,!!a.multiple,a.defaultValue,!0):Ec(i,!!a.multiple,a.multiple?[]:"",!1))}i[Ad]=a}catch(v){Qt(e,e.return,v)}}break;case 6:if(Fi(t,e),ba(e),r&4){if(e.stateNode===null)throw Error(oe(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(v){Qt(e,e.return,v)}}break;case 3:if(Fi(t,e),ba(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{yd(t.containerInfo)}catch(v){Qt(e,e.return,v)}break;case 4:Fi(t,e),ba(e);break;case 13:Fi(t,e),ba(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(uO=ln())),r&4&&HR(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Jn=(c=Jn)||u,Fi(t,e),Jn=c):Fi(t,e),ba(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(ye=e,u=e.child;u!==null;){for(f=ye=u;ye!==null;){switch(d=ye,h=d.child,d.tag){case 0:case 11:case 14:case 15:$d(4,d,d.return);break;case 1:Uc(d,d.return);var p=d.stateNode;if(typeof p.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(v){Qt(r,n,v)}}break;case 5:Uc(d,d.return);break;case 22:if(d.memoizedState!==null){qR(f);continue}}h!==null?(h.return=d,ye=h):qR(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{i=f.stateNode,c?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=MD("display",o))}catch(v){Qt(e,e.return,v)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){Qt(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Fi(t,e),ba(e),r&4&&HR(e);break;case 21:break;default:Fi(t,e),ba(e)}}function ba(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(YR(n)){var r=n;break e}n=n.return}throw Error(oe(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(od(i,""),r.flags&=-33);var a=WR(e);sO(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=WR(e);oO(e,s,o);break;default:throw Error(oe(161))}}catch(l){Qt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ihe(e,t,n){ye=e,UR(e)}function UR(e,t,n){for(var r=(e.mode&1)!==0;ye!==null;){var i=ye,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||u0;if(!o){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Jn;s=u0;var c=Jn;if(u0=o,(Jn=l)&&!c)for(ye=i;ye!==null;)o=ye,l=o.child,o.tag===22&&o.memoizedState!==null?KR(i):l!==null?(l.return=o,ye=l):KR(i);for(;a!==null;)ye=a,UR(a),a=a.sibling;ye=i,u0=s,Jn=c}XR(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ye=a):XR(e)}}function XR(e){for(;ye!==null;){var t=ye;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Jn||f0(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Jn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ji(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&qF(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}qF(t,o,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&yd(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(oe(163))}Jn||t.flags&512&&aO(t)}catch(d){Qt(t,t.return,d)}}if(t===e){ye=null;break}if(n=t.sibling,n!==null){n.return=t.return,ye=n;break}ye=t.return}}function qR(e){for(;ye!==null;){var t=ye;if(t===e){ye=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ye=n;break}ye=t.return}}function KR(e){for(;ye!==null;){var t=ye;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{f0(4,t)}catch(l){Qt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Qt(t,i,l)}}var a=t.return;try{aO(t)}catch(l){Qt(t,a,l)}break;case 5:var o=t.return;try{aO(t)}catch(l){Qt(t,o,l)}}}catch(l){Qt(t,t.return,l)}if(t===e){ye=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ye=s;break}ye=t.return}}var jhe=Math.ceil,d0=Wa.ReactCurrentDispatcher,lO=Wa.ReactCurrentOwner,pi=Wa.ReactCurrentBatchConfig,qe=0,An=null,pn=null,Rn=0,Rr=0,Xc=Ho(0),wn=0,zd=null,nl=0,h0=0,cO=0,Bd=null,Or=null,uO=0,qc=1/0,Za=null,p0=!1,fO=null,Zo=null,v0=!1,Qo=null,g0=0,Yd=0,dO=null,y0=-1,m0=0;function ur(){return qe&6?ln():y0!==-1?y0:y0=ln()}function Jo(e){return e.mode&1?qe&2&&Rn!==0?Rn&-Rn:mhe.transition!==null?(m0===0&&(m0=WD()),m0):(e=ht,e!==0||(e=window.event,e=e===void 0?16:QD(e.type)),e):1}function Ri(e,t,n,r){if(50<Yd)throw Yd=0,dO=null,Error(oe(185));dd(e,n,r),(!(qe&2)||e!==An)&&(e===An&&(!(qe&2)&&(h0|=n),wn===4&&es(e,Rn)),_r(e,r),n===1&&qe===0&&!(t.mode&1)&&(qc=ln()+500,Vg&&Uo()))}function _r(e,t){var n=e.callbackNode;mde(e,t);var r=Mg(e,e===An?Rn:0);if(r===0)n!==null&&zD(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&zD(n),t===1)e.tag===0?yhe(QR.bind(null,e)):FF(QR.bind(null,e)),hhe(function(){!(qe&6)&&Uo()}),n=null;else{switch(GD(r)){case 1:n=H2;break;case 4:n=BD;break;case 16:n=_g;break;case 536870912:n=YD;break;default:n=_g}n=o8(n,ZR.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ZR(e,t){if(y0=-1,m0=0,qe&6)throw Error(oe(327));var n=e.callbackNode;if(Kc()&&e.callbackNode!==n)return null;var r=Mg(e,e===An?Rn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=b0(e,r);else{t=r;var i=qe;qe|=2;var a=e8();(An!==e||Rn!==t)&&(Za=null,qc=ln()+500,il(e,t));do try{Rhe();break}catch(s){JR(e,s)}while(!0);Cw(),d0.current=a,qe=i,pn!==null?t=0:(An=null,Rn=0,t=wn)}if(t!==0){if(t===2&&(i=V2(e),i!==0&&(r=i,t=hO(e,i))),t===1)throw n=zd,il(e,0),es(e,r),_r(e,ln()),n;if(t===6)es(e,r);else{if(i=e.current.alternate,!(r&30)&&!Dhe(i)&&(t=b0(e,r),t===2&&(a=V2(e),a!==0&&(r=a,t=hO(e,a))),t===1))throw n=zd,il(e,0),es(e,r),_r(e,ln()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(oe(345));case 2:al(e,Or,Za);break;case 3:if(es(e,r),(r&130023424)===r&&(t=uO+500-ln(),10<t)){if(Mg(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){ur(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=bw(al.bind(null,e,Or,Za),t);break}al(e,Or,Za);break;case 4:if(es(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Li(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=ln()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jhe(r/1960))-r,10<r){e.timeoutHandle=bw(al.bind(null,e,Or,Za),r);break}al(e,Or,Za);break;case 5:al(e,Or,Za);break;default:throw Error(oe(329))}}}return _r(e,ln()),e.callbackNode===n?ZR.bind(null,e):null}function hO(e,t){var n=Bd;return e.current.memoizedState.isDehydrated&&(il(e,t).flags|=256),e=b0(e,t),e!==2&&(t=Or,Or=n,t!==null&&pO(t)),e}function pO(e){Or===null?Or=e:Or.push.apply(Or,e)}function Dhe(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ni(a(),i))return!1}catch(o){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function es(e,t){for(t&=~cO,t&=~h0,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Li(t),r=1<<n;e[n]=-1,t&=~r}}function QR(e){if(qe&6)throw Error(oe(327));Kc();var t=Mg(e,0);if(!(t&1))return _r(e,ln()),null;var n=b0(e,t);if(e.tag!==0&&n===2){var r=V2(e);r!==0&&(t=r,n=hO(e,r))}if(n===1)throw n=zd,il(e,0),es(e,t),_r(e,ln()),n;if(n===6)throw Error(oe(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,al(e,Or,Za),_r(e,ln()),null}function vO(e,t){var n=qe;qe|=1;try{return e(t)}finally{qe=n,qe===0&&(qc=ln()+500,Vg&&Uo())}}function rl(e){Qo!==null&&Qo.tag===0&&!(qe&6)&&Kc();var t=qe;qe|=1;var n=pi.transition,r=ht;try{if(pi.transition=null,ht=1,e)return e()}finally{ht=r,pi.transition=n,qe=t,!(qe&6)&&Uo()}}function gO(){Rr=Xc.current,Nt(Xc)}function il(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dhe(n)),pn!==null)for(n=pn.return;n!==null;){var r=n;switch(kw(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Gg();break;case 3:Hc(),Nt(br),Nt(Kn),Rw();break;case 5:Dw(r);break;case 4:Hc();break;case 13:Nt(Ut);break;case 19:Nt(Ut);break;case 10:Tw(r.type._context);break;case 22:case 23:gO()}n=n.return}if(An=e,pn=e=ts(e.current,null),Rn=Rr=t,wn=0,zd=null,cO=h0=nl=0,Or=Bd=null,Js!==null){for(t=0;t<Js.length;t++)if(n=Js[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Js=null}return e}function JR(e,t){do{var n=pn;try{if(Cw(),n0.current=o0,r0){for(var r=Xt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}r0=!1}if(tl=0,Mn=xn=Xt=null,Id=!1,jd=0,lO.current=null,n===null||n.return===null){wn=1,zd=t,pn=null;break}e:{var a=e,o=n.return,s=n,l=t;if(t=Rn,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=s,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var d=u.alternate;d?(u.updateQueue=d.updateQueue,u.memoizedState=d.memoizedState,u.lanes=d.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=SR(o);if(h!==null){h.flags&=-257,kR(h,o,s,a,t),h.mode&1&&_R(a,c,t),t=h,l=c;var p=t.updateQueue;if(p===null){var v=new Set;v.add(l),t.updateQueue=v}else p.add(l);break e}else{if(!(t&1)){_R(a,c,t),yO();break e}l=Error(oe(426))}}else if($t&&s.mode&1){var g=SR(o);if(g!==null){!(g.flags&65536)&&(g.flags|=256),kR(g,o,s,a,t),Aw(Vc(l,s));break e}}a=l=Vc(l,s),wn!==4&&(wn=2),Bd===null?Bd=[a]:Bd.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var y=wR(a,l,t);XF(a,y);break e;case 1:s=l;var m=a.type,b=a.stateNode;if(!(a.flags&128)&&(typeof m.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Zo===null||!Zo.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t;var x=OR(a,s,t);XF(a,x);break e}}a=a.return}while(a!==null)}n8(n)}catch(w){t=w,pn===n&&n!==null&&(pn=n=n.return);continue}break}while(!0)}function e8(){var e=d0.current;return d0.current=o0,e===null?o0:e}function yO(){(wn===0||wn===3||wn===2)&&(wn=4),An===null||!(nl&268435455)&&!(h0&268435455)||es(An,Rn)}function b0(e,t){var n=qe;qe|=2;var r=e8();(An!==e||Rn!==t)&&(Za=null,il(e,t));do try{Fhe();break}catch(i){JR(e,i)}while(!0);if(Cw(),qe=n,d0.current=r,pn!==null)throw Error(oe(261));return An=null,Rn=0,wn}function Fhe(){for(;pn!==null;)t8(pn)}function Rhe(){for(;pn!==null&&!cde();)t8(pn)}function t8(e){var t=a8(e.alternate,e,Rr);e.memoizedProps=e.pendingProps,t===null?n8(e):pn=t,lO.current=null}function n8(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=The(n,t),n!==null){n.flags&=32767,pn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{wn=6,pn=null;return}}else if(n=Che(n,t,Rr),n!==null){pn=n;return}if(t=t.sibling,t!==null){pn=t;return}pn=t=e}while(t!==null);wn===0&&(wn=5)}function al(e,t,n){var r=ht,i=pi.transition;try{pi.transition=null,ht=1,$he(e,t,n,r)}finally{pi.transition=i,ht=r}return null}function $he(e,t,n,r){do Kc();while(Qo!==null);if(qe&6)throw Error(oe(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(oe(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(bde(e,a),e===An&&(pn=An=null,Rn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||v0||(v0=!0,o8(_g,function(){return Kc(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=pi.transition,pi.transition=null;var o=ht;ht=1;var s=qe;qe|=4,lO.current=null,Nhe(e,n),VR(n,e),ahe(yw),Cg=!!gw,yw=gw=null,e.current=n,Ihe(n),ude(),qe=s,ht=o,pi.transition=a}else e.current=n;if(v0&&(v0=!1,Qo=e,g0=i),a=e.pendingLanes,a===0&&(Zo=null),hde(n.stateNode),_r(e,ln()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(p0)throw p0=!1,e=fO,fO=null,e;return g0&1&&e.tag!==0&&Kc(),a=e.pendingLanes,a&1?e===dO?Yd++:(Yd=0,dO=e):Yd=0,Uo(),null}function Kc(){if(Qo!==null){var e=GD(g0),t=pi.transition,n=ht;try{if(pi.transition=null,ht=16>e?16:e,Qo===null)var r=!1;else{if(e=Qo,Qo=null,g0=0,qe&6)throw Error(oe(331));var i=qe;for(qe|=4,ye=e.current;ye!==null;){var a=ye,o=a.child;if(ye.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(ye=c;ye!==null;){var u=ye;switch(u.tag){case 0:case 11:case 15:$d(8,u,a)}var f=u.child;if(f!==null)f.return=u,ye=f;else for(;ye!==null;){u=ye;var d=u.sibling,h=u.return;if(BR(u),u===c){ye=null;break}if(d!==null){d.return=h,ye=d;break}ye=h}}}var p=a.alternate;if(p!==null){var v=p.child;if(v!==null){p.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(v!==null)}}ye=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,ye=o;else e:for(;ye!==null;){if(a=ye,a.flags&2048)switch(a.tag){case 0:case 11:case 15:$d(9,a,a.return)}var y=a.sibling;if(y!==null){y.return=a.return,ye=y;break e}ye=a.return}}var m=e.current;for(ye=m;ye!==null;){o=ye;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,ye=b;else e:for(o=m;ye!==null;){if(s=ye,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:f0(9,s)}}catch(w){Qt(s,s.return,w)}if(s===o){ye=null;break e}var x=s.sibling;if(x!==null){x.return=s.return,ye=x;break e}ye=s.return}}if(qe=i,Uo(),va&&typeof va.onPostCommitFiberRoot=="function")try{va.onPostCommitFiberRoot(Sg,e)}catch(w){}r=!0}return r}finally{ht=n,pi.transition=t}}return!1}function r8(e,t,n){t=Vc(n,t),t=wR(e,t,1),e=qo(e,t,1),t=ur(),e!==null&&(dd(e,1,t),_r(e,t))}function Qt(e,t,n){if(e.tag===3)r8(e,e,n);else for(;t!==null;){if(t.tag===3){r8(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zo===null||!Zo.has(r))){e=Vc(n,e),e=OR(t,e,1),t=qo(t,e,1),e=ur(),t!==null&&(dd(t,1,e),_r(t,e));break}}t=t.return}}function zhe(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=ur(),e.pingedLanes|=e.suspendedLanes&n,An===e&&(Rn&n)===n&&(wn===4||wn===3&&(Rn&130023424)===Rn&&500>ln()-uO?il(e,0):cO|=n),_r(e,t)}function i8(e,t){t===0&&(e.mode&1?(t=Eg,Eg<<=1,!(Eg&130023424)&&(Eg=4194304)):t=1);var n=ur();e=Xa(e,t),e!==null&&(dd(e,t,n),_r(e,n))}function Bhe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),i8(e,n)}function Yhe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(oe(314))}r!==null&&r.delete(t),i8(e,n)}var a8;a8=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||br.current)wr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return wr=!1,Phe(e,t,n);wr=!!(e.flags&131072)}else wr=!1,$t&&t.flags&1048576&&RF(t,Xg,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;c0(e,t),e=t.pendingProps;var i=Rc(t,Kn.current);Gc(t,n),i=Bw(null,t,r,e,i,n);var a=Yw();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xr(r)?(a=!0,Hg(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Iw(t),i.updater=s0,t.stateNode=i,i._reactInternals=t,Xw(t,r,e,n),t=Qw(null,t,r,!0,a,n)):(t.tag=0,$t&&a&&Sw(t),cr(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(c0(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Ghe(r),e=ji(r,e),i){case 0:t=Zw(null,t,r,e,n);break e;case 1:t=TR(null,t,r,e,n);break e;case 11:t=ER(null,t,r,e,n);break e;case 14:t=MR(null,t,r,ji(r.type,e),n);break e}throw Error(oe(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ji(r,i),Zw(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ji(r,i),TR(e,t,r,i,n);case 3:e:{if(LR(t),e===null)throw Error(oe(387));r=t.pendingProps,a=t.memoizedState,i=a.element,UF(e,t),e0(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Vc(Error(oe(423)),t),t=NR(e,t,r,n,i);break e}else if(r!==i){i=Vc(Error(oe(424)),t),t=NR(e,t,r,n,i);break e}else for(Fr=Go(t.stateNode.containerInfo.firstChild),Dr=t,$t=!0,Ii=null,n=HF(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Bc(),r===i){t=Ka(e,t,n);break e}cr(e,t,r,n)}t=t.child}return t;case 5:return KF(t),e===null&&Mw(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,mw(r,i)?o=null:a!==null&&mw(r,a)&&(t.flags|=32),CR(e,t),cr(e,t,o,n),t.child;case 6:return e===null&&Mw(t),null;case 13:return IR(e,t,n);case 4:return jw(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yc(t,null,r,n):cr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ji(r,i),ER(e,t,r,i,n);case 7:return cr(e,t,t.pendingProps,n),t.child;case 8:return cr(e,t,t.pendingProps.children,n),t.child;case 12:return cr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Mt(Zg,r._currentValue),r._currentValue=o,a!==null)if(Ni(a.value,o)){if(a.children===i.children&&!br.current){t=Ka(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=qa(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Lw(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(oe(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Lw(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}cr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Gc(t,n),i=di(i),r=r(i),t.flags|=1,cr(e,t,r,n),t.child;case 14:return r=t.type,i=ji(r,t.pendingProps),i=ji(r.type,i),MR(e,t,r,i,n);case 15:return AR(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ji(r,i),c0(e,t),t.tag=1,xr(r)?(e=!0,Hg(t)):e=!1,Gc(t,n),bR(t,r,i),Xw(t,r,i,n),Qw(null,t,r,!0,e,n);case 19:return DR(e,t,n);case 22:return PR(e,t,n)}throw Error(oe(156,t.tag))};function o8(e,t){return $D(e,t)}function Whe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(e,t,n,r){return new Whe(e,t,n,r)}function mO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ghe(e){if(typeof e=="function")return mO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===S2)return 11;if(e===M2)return 14}return 2}function ts(e,t){var n=e.alternate;return n===null?(n=vi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function x0(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")mO(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case kc:return ol(n.children,i,a,t);case O2:o=8,i|=8;break;case _2:return e=vi(12,n,t,i|2),e.elementType=_2,e.lanes=a,e;case k2:return e=vi(13,n,t,i),e.elementType=k2,e.lanes=a,e;case E2:return e=vi(19,n,t,i),e.elementType=E2,e.lanes=a,e;case vD:return w0(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case hD:o=10;break e;case pD:o=9;break e;case S2:o=11;break e;case M2:o=14;break e;case Do:o=16,r=null;break e}throw Error(oe(130,e==null?e:typeof e,""))}return t=vi(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ol(e,t,n,r){return e=vi(7,e,r,t),e.lanes=n,e}function w0(e,t,n,r){return e=vi(22,e,r,t),e.elementType=vD,e.lanes=n,e.stateNode={isHidden:!1},e}function bO(e,t,n){return e=vi(6,e,null,t),e.lanes=n,e}function xO(e,t,n){return t=vi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hhe(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=U2(0),this.expirationTimes=U2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=U2(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wO(e,t,n,r,i,a,o,s,l){return e=new Hhe(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=vi(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Iw(a),e}function Vhe(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Sc,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function s8(e){if(!e)return Vo;e=e._reactInternals;e:{if(Xs(e)!==e||e.tag!==1)throw Error(oe(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(xr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(oe(171))}if(e.tag===1){var n=e.type;if(xr(n))return jF(e,n,t)}return t}function l8(e,t,n,r,i,a,o,s,l){return e=wO(n,r,!0,e,i,a,o,s,l),e.context=s8(null),n=e.current,r=ur(),i=Jo(n),a=qa(r,i),a.callback=t!=null?t:null,qo(n,a,i),e.current.lanes=i,dd(e,i,r),_r(e,r),e}function O0(e,t,n,r){var i=t.current,a=ur(),o=Jo(i);return n=s8(n),t.context===null?t.context=n:t.pendingContext=n,t=qa(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=qo(i,t,o),e!==null&&(Ri(e,i,o,a),Jg(e,i,o)),o}function _0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function c8(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function OO(e,t){c8(e,t),(e=e.alternate)&&c8(e,t)}function Uhe(){return null}var u8=typeof reportError=="function"?reportError:function(e){console.error(e)};function _O(e){this._internalRoot=e}S0.prototype.render=_O.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(oe(409));O0(e,t,null,null)},S0.prototype.unmount=_O.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rl(function(){O0(null,e,null,null)}),t[Ga]=null}};function S0(e){this._internalRoot=e}S0.prototype.unstable_scheduleHydration=function(e){if(e){var t=UD();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Bo.length&&t!==0&&t<Bo[n].priority;n++);Bo.splice(n,0,e),n===0&&KD(e)}};function SO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function k0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function f8(){}function Xhe(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var c=_0(o);a.call(c)}}var o=l8(t,r,e,0,null,!1,!1,"",f8);return e._reactRootContainer=o,e[Ga]=o.current,Ed(e.nodeType===8?e.parentNode:e),rl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var c=_0(l);s.call(c)}}var l=wO(e,0,!1,null,null,!1,!1,"",f8);return e._reactRootContainer=l,e[Ga]=l.current,Ed(e.nodeType===8?e.parentNode:e),rl(function(){O0(t,l,n,r)}),l}function E0(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var s=i;i=function(){var l=_0(o);s.call(l)}}O0(t,o,e,i)}else o=Xhe(n,t,e,i,r);return _0(o)}HD=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fd(t.pendingLanes);n!==0&&(X2(t,n|1),_r(t,ln()),!(qe&6)&&(qc=ln()+500,Uo()))}break;case 13:rl(function(){var r=Xa(e,1);if(r!==null){var i=ur();Ri(r,e,1,i)}}),OO(e,1)}},q2=function(e){if(e.tag===13){var t=Xa(e,134217728);if(t!==null){var n=ur();Ri(t,e,134217728,n)}OO(e,134217728)}},VD=function(e){if(e.tag===13){var t=Jo(e),n=Xa(e,t);if(n!==null){var r=ur();Ri(n,e,t,r)}OO(e,t)}},UD=function(){return ht},XD=function(e,t){var n=ht;try{return ht=e,t()}finally{ht=n}},B2=function(e,t,n){switch(t){case"input":if(N2(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Wg(r);if(!i)throw Error(oe(90));mD(r),N2(r,i)}}}break;case"textarea":_D(e,n);break;case"select":t=n.value,t!=null&&Ec(e,!!n.multiple,t,!1)}},LD=vO,ND=rl;var qhe={usingClientEntryPoint:!1,Events:[Pd,Dc,Wg,CD,TD,vO]},Wd={findFiberByHostInstance:qs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Khe={bundleType:Wd.bundleType,version:Wd.version,rendererPackageName:Wd.rendererPackageName,rendererConfig:Wd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=FD(e),e===null?null:e.stateNode},findFiberByHostInstance:Wd.findFiberByHostInstance||Uhe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var M0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!M0.isDisabled&&M0.supportsFiber)try{Sg=M0.inject(Khe),va=M0}catch(e){}}Nr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qhe,Nr.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!SO(t))throw Error(oe(200));return Vhe(e,t,null,n)},Nr.createRoot=function(e,t){if(!SO(e))throw Error(oe(299));var n=!1,r="",i=u8;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=wO(e,1,!1,null,null,n,!1,r,i),e[Ga]=t.current,Ed(e.nodeType===8?e.parentNode:e),new _O(t)},Nr.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(oe(188)):(e=Object.keys(e).join(","),Error(oe(268,e)));return e=FD(t),e=e===null?null:e.stateNode,e},Nr.flushSync=function(e){return rl(e)},Nr.hydrate=function(e,t,n){if(!k0(t))throw Error(oe(200));return E0(null,e,t,!0,n)},Nr.hydrateRoot=function(e,t,n){if(!SO(e))throw Error(oe(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=u8;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=l8(t,null,e,1,n!=null?n:null,i,!1,a,o),e[Ga]=t.current,Ed(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new S0(t)},Nr.render=function(e,t,n){if(!k0(t))throw Error(oe(200));return E0(null,e,t,!1,n)},Nr.unmountComponentAtNode=function(e){if(!k0(e))throw Error(oe(40));return e._reactRootContainer?(rl(function(){E0(null,null,e,!1,function(){e._reactRootContainer=null,e[Ga]=null})}),!0):!1},Nr.unstable_batchedUpdates=vO,Nr.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!k0(n))throw Error(oe(200));if(e==null||e._reactInternals===void 0)throw Error(oe(38));return E0(e,t,n,!1,r)},Nr.version="18.3.1-next-f1338f8080-20240426";function d8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d8)}catch(e){console.error(e)}}d8(),sD.exports=Nr;var h8=sD.exports;const Zhe=U8({__proto__:null,default:ou(h8)},[h8]);var kO=function(){return kO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},kO.apply(this,arguments)},Gd=kO({},Zhe),Qhe=Gd.version,Jhe=Gd.render;Gd.unmountComponentAtNode;var EO;try{var epe=Number((Qhe||"").split(".")[0]);epe>=18&&(EO=Gd.createRoot)}catch(e){}function p8(e){var t=Gd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&typeof t=="object"&&(t.usingClientEntryPoint=e)}var v8="__rc_react_root__";function tpe(e,t){p8(!0);var n=t[v8]||EO(t);p8(!1),n.render(e),t[v8]=n}function npe(e,t){Jhe(e,t)}function rpe(e,t){if(EO){tpe(e,t);return}npe(e,t)}var A0=new Map;typeof document!="undefined"&&A0.set("tooltip",document.createElement("div"));var ipe=function(e,t){t===void 0&&(t=!1);var n=null;if(t)n=A0.get("tooltip");else if(n=document.createElement("div"),e!=null&&e.key){var r=A0.get(e.key);r?n=r:A0.set(e.key,n)}return rpe(e,n),n},ape=function(e){if(typeof document=="undefined")return"loading";var t=e.attachShadow({mode:"open"}),n=document.createElement("div"),r=document.createElement("style");r.innerHTML=`.loading {
180
+ display: inline-block;
181
+ position: relative;
182
+ width: 80px;
183
+ height: 80px;
184
+ }
185
+ .loading div {
186
+ position: absolute;
187
+ top: 33px;
188
+ width: 13px;
189
+ height: 13px;
190
+ border-radius: 50%;
191
+ background: #ccc;
192
+ animation-timing-function: cubic-bezier(0, 1, 1, 0);
193
+ }
194
+ .loading div:nth-child(1) {
195
+ left: 8px;
196
+ animation: loading1 0.6s infinite;
197
+ }
198
+ .loading div:nth-child(2) {
199
+ left: 8px;
200
+ animation: loading2 0.6s infinite;
201
+ }
202
+ .loading div:nth-child(3) {
203
+ left: 32px;
204
+ animation: loading2 0.6s infinite;
205
+ }
206
+ .loading div:nth-child(4) {
207
+ left: 56px;
208
+ animation: loading3 0.6s infinite;
209
+ }
210
+ @keyframes loading1 {
211
+ 0% {
212
+ transform: scale(0);
213
+ }
214
+ 100% {
215
+ transform: scale(1);
216
+ }
217
+ }
218
+ @keyframes loading3 {
219
+ 0% {
220
+ transform: scale(1);
221
+ }
222
+ 100% {
223
+ transform: scale(0);
224
+ }
225
+ }
226
+ @keyframes loading2 {
227
+ 0% {
228
+ transform: translate(0, 0);
229
+ }
230
+ 100% {
231
+ transform: translate(24px, 0);
232
+ }
233
+ }
234
+ `,n.classList.add("loading"),n.innerHTML="<div></div><div></div><div></div><div></div>",t.appendChild(r),t.appendChild(n)},ope=function(e){var t=e.loadingTemplate,n=e.theme,r=n===void 0?"light":n,i=K.useRef(null);K.useEffect(function(){!t&&i.current&&ape(i.current)},[]);var a=function(){return t||K.createElement("div",{ref:i})};return K.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:r==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},a())},spe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lpe=function(e){spe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state={hasError:!1},n.renderError=function(r){var i=n.props.errorTemplate;switch(r){default:return typeof i=="function"?i(r):i||K.createElement("h5",null,"组件出错了,请核查后重试: ",r.message)}},n}return t.getDerivedStateFromError=function(n){return{hasError:!0,error:n}},t.getDerivedStateFromProps=function(n,r){return r.children!==n.children?{children:n.children,hasError:!1,error:void 0}:null},t.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):K.createElement(K.Fragment,null,this.props.children)},t}(K.Component),cpe=function(e){var t=/react|\.jsx|children:\[\(|return\s+[A-Za-z0-9].createElement\((?!['"][g|circle|ellipse|image|rect|line|polyline|polygon|text|path|html|mesh]['"])([^\)])*,/i;return t.test(e)},MO=function(){return MO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},MO.apply(this,arguments)};function upe(e,t){var n=K.useRef(),r=K.useRef(),i=K.useRef(null),a=t.onReady,o=t.onEvent,s=function(u,f){var d;u===void 0&&(u="image/png");var h=(d=i.current)===null||d===void 0?void 0:d.getElementsByTagName("canvas")[0];return h==null?void 0:h.toDataURL(u,f)},l=function(u,f,d){u===void 0&&(u="download"),f===void 0&&(f="image/png");var h=u;u.indexOf(".")===-1&&(h="".concat(u,".").concat(f.split("/")[1]));var p=s(f,d),v=document.createElement("a");return v.href=p,v.download=h,document.body.appendChild(v),v.click(),document.body.removeChild(v),v=null,h},c=function(u,f){f===void 0&&(f=!1);var d=Object.keys(u),h=f;d.forEach(function(p){var v=u[p];p==="tooltip"&&(h=!0),B.isFunction(v)&&cpe("".concat(v))?u[p]=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return ipe(v.apply(void 0,g),h)}:B.isArray(v)?v.forEach(function(g){c(g,h)}):B.isObject(v)?c(v,h):h=f})};return K.useEffect(function(){n.current&&!B.isEqual(r.current,t)&&(r.current=B.cloneDeep(t),c(t),n.current.update(t),n.current.render())},[t]),K.useEffect(function(){if(!i.current)return function(){return null};r.current||(r.current=B.cloneDeep(t)),c(t);var u=new e(i.current,MO({},t));u.toDataURL=s,u.downloadImage=l,u.render(),n.current=u,a&&a(u);var f=function(d){o&&o(u,d)};return u.on("*",f),function(){n.current&&(n.current.destroy(),n.current.off("*",f),n.current=void 0)}},[]),{chart:n,container:i}}const fpe={field:"value",size:[1,1],round:!1,padding:0,sort:(e,t)=>t.value-e.value,as:["x","y"],ignoreParentValue:!0},dpe="nodeIndex",Hd="childNodeCount",hpe="nodeAncestor",AO="Invalid field: it must be a string!";function ppe(e,t){const{field:n,fields:r}=e;if(Si(n))return n;if(Ea(n))return console.warn(AO),n[0];if(console.warn(`${AO} will try to get fields instead.`),Si(r))return r;if(Ea(r)&&r.length)return r[0];throw new TypeError(AO)}function vpe(e){const t=[];if(e&&e.each){let n,r;e.each(i=>{var a,o;i.parent!==n?(n=i.parent,r=0):r+=1;const s=oY((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(l=>t.find(c=>c.name===l.name)||l),({depth:l})=>l>0&&l<i.depth);i[hpe]=s,i[Hd]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[dpe]=r,t.push(i)})}else e&&e.eachNode&&e.eachNode(n=>{t.push(n)});return t}function gpe(e,t){t=dY({},fpe,t);const n=t.as;if(!Ea(n)||n.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=ppe(t)}catch(l){console.warn(l)}const a=(l=>VQ().size(t.size).round(t.round).padding(t.padding)(ec(l).sum(c=>gY(c.children)?t.ignoreParentValue?0:c[r]-uY(c.children,(u,f)=>u+f[r],0):c[r]).sort(t.sort)))(e),o=n[0],s=n[1];return a.each(l=>{var c,u;l[o]=[l.x0,l.x1,l.x1,l.x0],l[s]=[l.y1,l.y1,l.y0,l.y0],l.name=l.name||((c=l.data)===null||c===void 0?void 0:c.name)||((u=l.data)===null||u===void 0?void 0:u.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(f=>{n.indexOf(f)===-1&&delete l[f]})}),vpe(a)}var ype=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Zc="sunburst",PO="markType",g8="path",P0="ancestor-node";function mpe(e){const{data:t,encode:n}=e,{color:r,value:i}=n,o=gpe(t,{field:i,type:"hierarchy.partition",as:["x","y"]}),s=[];return o.forEach(l=>{var c,u,f,d;if(l.depth===0)return null;let h=l.data.name;const p=[h];let v=Object.assign({},l);for(;v.depth>1;)h=`${(c=v.parent.data)===null||c===void 0?void 0:c.name} / ${h}`,p.unshift((u=v.parent.data)===null||u===void 0?void 0:u.name),v=v.parent;const g=Object.assign(Object.assign(Object.assign({},SE(l.data,[i])),{[g8]:h,[P0]:v.data.name}),l);r&&r!==P0&&(g[r]=l.data[r]||((d=(f=l.parent)===null||f===void 0?void 0:f.data)===null||d===void 0?void 0:d[r])),s.push(g)}),s.map(l=>{const c=l.x.slice(0,2),u=[l.y[2],l.y[0]];return c[0]===c[1]&&(u[0]=u[1]=(l.y[2]+l.y[0])/2),Object.assign(Object.assign({},l),{x:c,y:u,fillOpacity:Math.pow(.85,l.depth)})})}const y8={id:Zc,encode:{x:"x",y:"y",key:g8,color:P0,value:"value"},axis:{x:!1,y:!1},style:{[PO]:Zc,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Hd]:Hd,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},m8=e=>{const{encode:t,data:n=[],legend:r}=e,i=ype(e,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(qi(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},y8.encode),t),{value:s}=o,l=mpe({encode:o,data:n});return console.log(l,"rectData"),[Wh({},y8,Object.assign(Object.assign({type:"rect",data:l,encode:o,tooltip:{title:"path",items:[c=>({name:s,value:c[s]})]}},i),{coordinate:a}))]};m8.props={};var bpe=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const xpe=e=>e.querySelectorAll(".element").filter(t=>qi(t,["style",PO])===Zc);function wpe(e){return we(e).select(`.${Af}`).node()}const Ope={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function _pe(e={}){const{breadCrumb:t={},isFixedColor:n=!1}=e,r=Wh({},Ope,t);return i=>{const{update:a,setState:o,container:s,view:l,options:c}=i,u=s.ownerDocument,f=wpe(s),d=c.marks.find(({id:b})=>b===Zc),{state:h}=d,p=u.createElement("g");f.appendChild(p);const v=(b,x)=>bpe(this,void 0,void 0,function*(){if(p.removeChildren(),b){const w=u.createElement("text",{style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});p.appendChild(w);let O="";const _=b==null?void 0:b.split(" / ");let S=r.style.y,k=p.getBBox().width;const E=f.getBBox().width,M=_.map((P,A)=>{const L=u.createElement("text",{style:Object.assign(Object.assign({x:k,text:" / "},r.style),{y:S})});p.appendChild(L),k+=L.getBBox().width,O=`${O}${P} / `;const N=u.createElement("text",{name:O.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:P,x:k,depth:A+1},r.style),{y:S})});return p.appendChild(N),k+=N.getBBox().width,k>E&&(S=p.getBBox().height,k=0,L.attr({x:k,y:S}),k+=L.getBBox().width,N.attr({x:k,y:S}),k+=N.getBBox().width),N});[w,...M].forEach((P,A)=>{if(A===M.length)return;const L=Object.assign({},P.attributes);P.attr("cursor","pointer"),P.addEventListener("mouseenter",()=>{P.attr(r.active)}),P.addEventListener("mouseleave",()=>{P.attr(L)}),P.addEventListener("click",()=>{v(P.name,qi(P,["style","depth"]))})})}o("drillDown",w=>{const{marks:O}=w,_=O.map(S=>{if(S.id!==Zc&&S.type!=="rect")return S;const{data:k}=S,E=Object.fromEntries(["color"].map(P=>[P,{domain:l.scale[P].getOptions().domain}])),M=k.filter(P=>{const A=P.path;return n||(P[P0]=A.split(" / ")[x]),b?new RegExp(`^${b}.+`).test(A):!0});return Wh({},S,n?{data:M,scale:E}:{data:M})});return Object.assign(Object.assign({},w),{marks:_})}),yield a()}),g=b=>{const x=b.target;if(qi(x,["style",PO])!==Zc||qi(x,["markType"])!=="rect"||!qi(x,["style",Hd]))return;const w=qi(x,["__data__","key"]),O=qi(x,["style","depth"]);x.style.cursor="pointer",v(w,O)};f.addEventListener("click",g);const y=lY(Object.assign(Object.assign({},h.active),h.inactive)),m=()=>{xpe(f).forEach(x=>{const w=qi(x,["style",Hd]);if(qi(x,["style","cursor"])!=="pointer"&&w){x.style.cursor="pointer";const _=SE(x.attributes,y);x.addEventListener("mouseenter",()=>{x.attr(h.active)}),x.addEventListener("mouseleave",()=>{x.attr(Wh(_,h.inactive))})}})};return f.addEventListener("mousemove",m),()=>{p.remove(),f.removeEventListener("click",g),f.removeEventListener("mousemove",m)}}}function Spe(){return{"interaction.drillDown":_pe,"mark.sunburst":m8}}var C0=function(){return C0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},C0.apply(this,arguments)},kpe=mfe(Vfe,C0(C0({},K4()),Spe())),rt=function(e){var t=Mpe(e),n=t.children,r=n===void 0?[]:n,i=B.omit(t,[].concat(w8,T0.map(function(c){return c.key}))),a=function(c){var u;return(u=Lpe.find(function(f){return f.key===c}))===null||u===void 0?void 0:u.callback},o=function(c,u,f){var d=a(u);d?d(c,u,f):c[u]=ns({},c[u],f)},s=function(c){Object.keys(c).forEach(function(u){if(c[u]){var f=T0.find(function(p){return p.key===u});if(f){var d=f.type,h=f.extend_keys;d?r.push(l(ns({},B.pick(c,h),{type:d},c[u]))):B.isArray(c[u])&&c[u].forEach(function(p){r.push(l(p))})}}})},l=function(c){return s(c),Object.keys(TO).forEach(function(u){var f=TO[u];if(!B.isUndefined(c[u]))if(B.isObject(f)){var d=f.value,h=f.target,p=d(c[u]);o(c,h,p)}else B.set(c,f,c[u])}),c};return r.forEach(function(c){var u=ns({},i,c);l(ns(c,u))}),s(t),Epe(t),e},b8=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Epe=function(e){var t=e.children,n=t===void 0?[]:t,r=Object.keys(TO).concat(T0.map(function(i){return i.key}));return r.forEach(function(i){delete e[i]}),n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(e).forEach(function(i){b8(b8([],w8,!0),NO.map(function(a){return a.key}),!0).includes(i)||delete e[i]}),e},Mpe=function(e){var t=e.options,n=t.children,r=n===void 0?[]:n;return r.forEach(function(i){Object.keys(i).forEach(function(a){B.isArray(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[CO]}))})}),t},x8=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},Ape=function(e,t){if(B.isArray(t))return t},ns=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return B.mergeWith.apply(void 0,x8(x8([],e,!1),[Ape],!1))};function Vd(e){switch(typeof e){case"function":return e;case"string":return function(t){return B.get(t,[e])};default:return function(){return e}}}var Ud=function(){return Ud=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ud.apply(this,arguments)},Ppe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Cpe=["renderer"],w8=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction"],CO="__transform__",Tpe="__skipDelCustomKeys__",sl=function(e,t){return B.isBoolean(t)?{type:e,available:t}:Ud({type:e},t)},TO={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",sizeField:"encode.size",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",fontSizeField:"encode.fontSize",radius:"coordinate.outerRadius",innerRadius:"coordinate.innerRadius",startAngle:"coordinate.startAngle",endAngle:"coordinate.endAngle",focusX:"coordinate.focusX",focusY:"coordinate.focusY",distortionX:"coordinate.distortionX",distortionY:"coordinate.distortionY",visual:"coordinate.visual",stack:{target:"transform",value:function(e){return sl("stackY",e)}},normalize:{target:"transform",value:function(e){return sl("normalizeY",e)}},percent:{target:"transform",value:function(e){return sl("normalizeY",e)}},group:{target:"transform",value:function(e){return sl("dodgeX",e)}},sort:{target:"transform",value:function(e){return sl("sortX",e)}},symmetry:{target:"transform",value:function(e){return sl("symmetryY",e)}},diff:{target:"transform",value:function(e){return sl("diffY",e)}},meta:{target:"scale",value:function(e){return e}},label:{target:"labels",value:function(e){return e}},shape:"style.shape",connectNulls:{target:"style",value:function(e){return B.isBoolean(e)?{connect:e}:e}}},LO=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],T0=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:LO},{key:"point",type:"point",extend_keys:LO},{key:"area",type:"area",extend_keys:LO}],Lpe=[{key:"transform",callback:function(e,t,n){var r;e[t]=e[t]||[];var i=n.available,a=i===void 0?!0:i,o=Ppe(n,["available"]);if(a)e[t].push(Ud((r={},r[CO]=!0,r),o));else{var s=e[t].indexOf(function(l){return l.type===n.type});s!==-1&&e[t].splice(s,1)}}},{key:"labels",callback:function(e,t,n){var r;if(!n||B.isArray(n)){e[t]=n||[];return}n.text||(n.text=e.yField),e[t]=e[t]||[],e[t].push(Ud((r={},r[CO]=!0,r),n))}}],NO=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],Npe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),L0=function(){return L0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},L0.apply(this,arguments)},Ipe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},O8=function(e){Npe(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Ipe(n,["style"]);return e.call(this,L0({style:L0({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return t}(qr),jpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),N0=function(){return N0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},N0.apply(this,arguments)},Dpe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Fpe=function(e){jpe(t,e);function t(n){n===void 0&&(n={});var r=n.style,i=Dpe(n,["style"]);return e.call(this,N0({style:N0({fill:"#eee"},r)},i))||this}return t}(Ts),Rpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_8=function(e){Rpe(t,e);function t(n,r,i){var a=e.call(this,{style:ns(i,r)})||this;return a.chart=n,a}return t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},t.prototype.disconnectedCallback=function(){},t.prototype.attributeChangedCallback=function(n){},t.prototype.update=function(n,r){var i;return this.attr(ns({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},t.prototype.clear=function(){this.removeChildren()},t.prototype.getElementsLayout=function(){var n=this.chart.getContext().canvas,r=n.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,l=o.y,c=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:l,width:c,height:u,key:f.key,data:f})}),i},t.prototype.bindEvents=function(n,r){},t}(Qu),$pe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),I0=function(){return I0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},I0.apply(this,arguments)},zpe=function(e){$pe(t,e);function t(n,r){return e.call(this,n,r,{type:t.tag})||this}return t.prototype.getConversionTagLayout=function(){var n=this.direction==="vertical",r=this.getElementsLayout(),i=r[0],a=i.x,o=i.y,s=i.height,l=i.width,c=i.data,u=["items",0,"value"],f=B.get(c,u),d=n?r[1].y-o-s:r[1].x-a-l,h=[],p=this.attributes,v=p.size,g=v===void 0?40:v,y=p.arrowSize,m=y===void 0?20:y,b=p.spacing,x=b===void 0?4:b;return r.forEach(function(w,O){if(O>0){var _=w.x,S=w.y,k=w.height,E=w.width,M=w.data,P=w.key,A=B.get(M,u),L=g/2;if(n){var N=_+E/2,T=S;h.push({points:[[N+L,T-d+x],[N+L,T-m-x],[N,T-x],[N-L,T-m-x],[N-L,T-d+x]],center:[N,T-d/2-x],width:d,value:[f,A],key:P})}else{var N=_,T=S+k/2;h.push({points:[[_-d+x,T-L],[_-m-x,T-L],[N-x,T],[_-m-x,T+L],[_-d+x,T+L]],center:[N-d/2-x,T],width:d,value:[f,A],key:P})}f=A}}),h},t.prototype.render=function(){this.setDirection(),this.drawConversionTag()},t.prototype.setDirection=function(){var n=this.chart.getCoordinate(),r=B.get(n,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},t.prototype.drawConversionTag=function(){var n=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,l=o.formatter;r.forEach(function(c){var u=c.points,f=c.center,d=c.value,h=c.key,p=d[0],v=d[1],g=f[0],y=f[1],m=new Fpe({style:I0({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),b=new O8({style:I0({x:g,y,text:B.isFunction(l)?l(p,v):(v/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});n.appendChild(m),n.appendChild(b)})},t.prototype.update=function(){var n=this,r=this.getConversionTagLayout();r.forEach(function(i){var a=i.points,o=i.center,s=i.key,l=o[0],c=o[1],u=n.getElementById("polygon-".concat(s)),f=n.getElementById("text-".concat(s));u.setAttribute("points",a),f.setAttribute("x",l),f.setAttribute("y",c)})},t.tag="ConversionTag",t}(_8),IO=32,S8=16,k8=48,Bpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xd=function(){return Xd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Xd.apply(this,arguments)},Ype=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Wpe=function(e){Bpe(t,e);function t(n,r){return e.call(this,n,r,{type:t.tag})||this}return t.prototype.render=function(){this.drawText()},t.prototype.getBidirectionalBarAxisTextLayout=function(){var n=this.attributes.layout,r=n==="vertical",i=this.getElementsLayout(),a=r?B.uniqBy(i,"x"):B.uniqBy(i,"y"),o=["title"],s=[],l=this.chart.getContext().views,c=B.get(l,[0,"layout"]),u=c.width,f=c.height;return a.forEach(function(d){var h=d.x,p=d.y,v=d.height,g=d.width,y=d.data,m=d.key,b=B.get(y,o);r?s.push({x:h+g/2,y:f,text:b,key:m}):s.push({x:u,y:p+v/2,text:b,key:m})}),B.uniqBy(s,"text").length!==s.length&&(s=Object.values(B.groupBy(s,"text")).map(function(d){var h,p=d.reduce(function(v,g){return v+(r?g.x:g.y)},0);return Xd(Xd({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},t.prototype.transformLabelStyle=function(n){var r={},i=/^label[A-Z]/;return Object.keys(n).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=n[a])}),r},t.prototype.drawText=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=Ype(i,["layout","labelFormatter"]);r.forEach(function(l){var c=l.x,u=l.y,f=l.text,d=l.key,h=new O8({style:Xd({x:c,y:u,text:B.isFunction(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?IO*2:120,maxLines:2,textOverflow:"ellipsis"},n.transformLabelStyle(s)),id:"text-".concat(d)});n.appendChild(h)})},t.prototype.update=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout();r.forEach(function(i){var a=i.x,o=i.y,s=i.key,l=n.getElementById("text-".concat(s));l.setAttribute("x",a),l.setAttribute("y",o)})},t.tag="BidirectionalBarAxisText",t}(_8),Gpe={ConversionTag:zpe,BidirectionalBarAxisText:Wpe},Hpe=function(){function e(t,n){this.container=new Map,this.chart=t,this.config=n,this.init()}return e.prototype.init=function(){var t=this;NO.forEach(function(n){var r,i=n.key,a=n.shape,o=t.config[i];if(o){var s=new Gpe[a](t.chart,o),l=t.chart.getContext().canvas;l.appendChild(s),t.container.set(i,s)}else(r=t.container.get(i))===null||r===void 0||r.clear()})},e.prototype.update=function(){var t=this;this.container.size&&NO.forEach(function(n){var r=n.key,i=t.container.get(r);i==null||i.update()})},e}(),Vpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qc=function(){return Qc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qc.apply(this,arguments)},E8="data-chart-source-type",Ke=function(e){Vpe(t,e);function t(n,r){var i=e.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=i.mergeOption(r),i.createG2(),i.bindEvents(),i}return t.prototype.getChartOptions=function(){return Qc(Qc({},B.pick(this.options,Cpe)),{container:this.container})},t.prototype.getSpecOptions=function(){return this.type==="base"||this[Tpe]?Qc(Qc({},this.options),this.getChartOptions()):this.options},t.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new kpe(this.getChartOptions()),this.container.setAttribute(E8,"Ant Design Charts")},t.prototype.bindEvents=function(){var n=this;this.chart&&this.chart.on("*",function(r){r!=null&&r.type&&n.emit(r.type,r)})},t.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},t.prototype.getDefaultOptions=function(){},t.prototype.render=function(){var n=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){n.annotation=new Hpe(n.chart,n.options)}),this.bindSizeSensor()},t.prototype.update=function(n){this.options=this.mergeOption(n)},t.prototype.mergeOption=function(n){return ns({},this.getBaseOptions(),this.getDefaultOptions(),n)},t.prototype.changeData=function(n){this.chart.changeData(n)},t.prototype.changeSize=function(n,r){this.chart.changeSize(n,r)},t.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(E8)},t.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:this.options})},t.prototype.triggerResize=function(){this.chart.forceFit()},t.prototype.bindSizeSensor=function(){var n=this,r=this.options.autoFit,i=r===void 0?!0:r;i&&this.chart.on(nt.AFTER_CHANGE_SIZE,function(){n.annotation.update()})},t}(Lb),Upe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xpe=function(e){Upe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="base",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return function(n){return n}},t}(Ke),jO=function(){return jO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},jO.apply(this,arguments)};function qpe(e){var t=e.options,n=t.stack,r=t.tooltip,i=t.xField;if(!n)return e;var a=T0.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){t[s]&&(o=!0,B.set(t,[s,"stack"],jO({y1:"y"},typeof n=="object"?n:{})))}),o&&!B.isBoolean(r)&&!r&&B.set(t,"tooltip",{title:i,items:[{channel:"y"}]}),e}function qt(e){return B.flow(qpe)(e)}function Kpe(e){var t=e.options.layout,n=t===void 0?"horizontal":t;return e.options.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}],e}function Zpe(e){Kpe(e);var t=e.options.layout,n=t===void 0?"horizontal":t;return e.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}])}),e}function Qpe(e){return B.flow(qt,rt)(e)}var Jpe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eve=function(e){Jpe(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="area",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Qpe},t}(Ke),Jc=function(){return Jc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Jc.apply(this,arguments)};function M8(e){var t=function(n){var r=n.options;B.get(r,"children.length")>1&&B.set(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,l=r.yField,c=B.get(i,"y.domain",[]);if(a&&c.length&&B.isArray(o)){var u="domainMax",f=o.map(function(d){var h;return Jc(Jc({originData:Jc({},d)},B.omit(d,l)),(h={},h[u]=c[c.length-1],h))});s.unshift(Jc({type:"interval",data:f,yField:u,tooltip:!1,style:{fill:"#eee"},label:!1},a))}return n};return B.flow(t,qt,rt)(e)}var tve=function(){var e=function(t,n){return function(r){var i=t.fill,a=i===void 0?"#2888FF":i,o=t.stroke,s=t.fillOpacity,l=s===void 0?1:s,c=t.strokeOpacity,u=c===void 0?.2:c,f=t.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],y=(p[1]-h[1])/2,m=n.document,b=m.createElement("g",{}),x=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],[v[0]-d,h[1]+y],g],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),w=m.createElement("polygon",{style:{points:[[h[0]-d,h[1]+y],p,v,[v[0]-d,h[1]+y]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),O=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],p,[h[0]+d,h[1]+y]],fill:a,fillOpacity:l-.2}});return b.appendChild(x),b.appendChild(w),b.appendChild(O),b}};Q4("shape.interval.bar25D",e)},nve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();tve();var rve=function(e){nve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Bar",n}return t.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return M8},t}(Ke),ive=function(){var e=function(t,n){return function(r){var i=t.fill,a=i===void 0?"#2888FF":i,o=t.stroke,s=t.fillOpacity,l=s===void 0?1:s,c=t.strokeOpacity,u=c===void 0?.2:c,f=t.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],v=n.document,g=v.createElement("g",{}),y=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),m=v.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:l,stroke:o,strokeOpacity:u}}),b=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:l-.2}});return g.appendChild(m),g.appendChild(y),g.appendChild(b),g}};Q4("shape.interval.column25D",e)},ave=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();ive();var ove=function(e){ave(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="column",n}return t.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlight:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return M8},t}(Ke);function sve(e){var t=function(r){var i=r.options,a=i.children,o=a===void 0?[]:a,s=i.legend;return s&&o.forEach(function(l){if(!B.get(l,"colorField")){var c=B.get(l,"yField");B.set(l,"colorField",function(){return c})}}),r},n=function(r){var i=r.options,a=i.annotations,o=a===void 0?[]:a,s=i.children,l=s===void 0?[]:s,c=i.scale,u=!1;return B.get(c,"y.key")||l.forEach(function(f,d){if(!B.get(f,"scale.y.key")){var h="child".concat(d,"Scale");B.set(f,"scale.y.key",h);var p=f.annotations,v=p===void 0?[]:p;v.length>0&&(B.set(f,"scale.y.independent",!1),v.forEach(function(g){B.set(g,"scale.y.key",h)})),!u&&o.length>0&&B.get(f,"scale.y.independent")===void 0&&(u=!0,B.set(f,"scale.y.independent",!1),o.forEach(function(g){B.set(g,"scale.y.key",h)}))}}),r};return B.flow(t,n,qt,rt)(e)}var lve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),A8=function(e){lve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="DualAxes",n}return t.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return sve},t}(Ke);function cve(e){var t=function(a){var o=a.options,s=o.xField,l=o.colorField;return l||B.set(o,"colorField",s),a},n=function(a){var o=a.options,s=o.compareField,l=o.transform,c=o.isTransposed,u=c===void 0?!0:c,f=o.coordinate;return l||(s?B.set(o,"transform",[]):B.set(o,"transform",[{type:"symmetryY"}])),!f&&u&&B.set(o,"coordinate",{transform:[{type:"transpose"}]}),a},r=function(a){var o=a.options,s=o.compareField,l=o.seriesField,c=o.data,u=o.children,f=o.yField,d=o.isTransposed,h=d===void 0?!0:d;if(s||l){var p=Object.values(B.groupBy(c,function(v){return v[s||l]}));u[0].data=p[0],u.push({type:"interval",data:p[1],yField:function(v){return-v[f]}}),delete o.compareField,delete o.data}return l&&(B.set(o,"type","spaceFlex"),B.set(o,"ratio",[1,1]),B.set(o,"direction",h?"row":"col"),delete o.seriesField),a},i=function(a){var o=a.options,s=o.tooltip,l=o.xField,c=o.yField;return s||B.set(o,"tooltip",{title:!1,items:[function(u){return{name:u[l],value:u[c]}}]}),a};return B.flow(t,n,r,i,qt,rt)(e)}var uve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fve=function(e){uve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="column",n}return t.getDefaultOptions=function(){return{type:"view",scale:{x:{padding:0}},animate:{enter:{type:"fadeIn"}},axis:!1,shapeField:"funnel",label:{position:"inside",transform:[{type:"contrastReverse"}]},children:[{type:"interval"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return cve},t}(Ke);function dve(e){return B.flow(qt,rt)(e)}var hve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pve=function(e){hve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="line",n}return t.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return dve},t}(Ke),gi=function(){return gi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gi.apply(this,arguments)};function vve(e){var t=function(n){var r=n.options,i=r.angleField,a=r.data,o=r.label,s=r.tooltip,l=r.colorField,c=Vd(l);if(B.isArray(a)&&a.length>0){var u=a.reduce(function(d,h){return d+h[i]},0);if(u===0){var f=a.map(function(d){var h;return gi(gi({},d),(h={},h[i]=1,h))});B.set(r,"data",f),o&&B.set(r,"label",gi(gi({},o),{formatter:function(){return 0}})),s!==!1&&(B.isFunction(s)?B.set(r,"tooltip",function(d,h,p){var v;return s(gi(gi({},d),(v={},v[i]=0,v)),h,p.map(function(g){var y;return gi(gi({},g),(y={},y[i]=0,y))}))}):B.set(r,"tooltip",gi(gi({},s),{items:[function(d,h,p){return{name:c(d,h,p),value:0}}]})))}}return n};return B.flow(t,rt)(e)}var gve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yve=function(e){gve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="pie",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return vve},t}(Ke);function mve(e){return B.flow(qt,rt)(e)}var bve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xve=function(e){bve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="scatter",n}return t.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return mve},t}(Ke);function wve(e){var t=function(n){return B.set(n,"options.coordinate",{type:B.get(n,"options.coordinateType","polar")}),n};return B.flow(t,rt)(e)}var Ove=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_ve=function(e){Ove(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="radar",n}return t.getDefaultOptions=function(){return{axis:{x:{grid:!0,line:!0},y:{zIndex:1,title:!1,line:!0,nice:!0}},meta:{x:{padding:.5,align:0}},interaction:{tooltip:{style:{crosshairsLineDash:[4,4]}}},children:[{type:"line"}],coordinateType:"polar"}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return wve},t}(Ke),Qa=function(){return Qa=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qa.apply(this,arguments)},Sve="__stock-range__",kve="trend",Eve="up",Mve="down";function Ave(e){var t=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=B.map(a,function(s){var l=s&&Qa({},s);if(Array.isArray(o)&&l){var c=o[0],u=o[1],f=o[2],d=o[3];l[kve]=l[c]<=l[u]?Eve:Mve,l[Sve]=[l[c],l[u],l[f],l[d]]}return l}),r},n=function(r){var i=r.options,a=i.xField,o=i.yField,s=i.fallingFill,l=i.risingFill,c=o[0],u=o[1],f=o[2],d=o[3],h=Vd(a);return r.options.children=B.map(r.options.children,function(p,v){var g=v===0;return Qa(Qa({},p),{tooltip:{title:function(y,m,b){var x=h(y,m,b);return x instanceof Date?x.toLocaleString():x},items:[{field:f},{field:d},{field:c},{field:u}]},encode:Qa(Qa({},p.encode||{}),{y:g?[f,d]:[c,u],color:function(y){return Math.sign(y[u]-y[c])}}),style:Qa(Qa({},p.style||{}),{lineWidth:g?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&B.set(r,"options.scale.color.range[0]",s),l&&B.set(r,"options.scale.color.range[2]",l),r};return B.flow(t,n,rt)(e)}var Pve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cve=["#26a69a","#999999","#ef5350"],Tve=function(e){Pve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="stock",n}return t.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:Cve},y:{nice:!0}},children:[{type:"link"},{type:"link"}],axis:{x:{title:!1,grid:!1},y:{title:!1,grid:!0,gridLineDash:null}},animate:{enter:{type:"scaleInY"}},interaction:{tooltip:{shared:!0,marker:!1,groupName:!1,crosshairs:!0}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Ave},t}(Ke);function Lve(e){return B.flow(qt,rt)(e)}var Nve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ive=function(e){Nve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyLine",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],animate:{enter:{type:"growInX",duration:500}},padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Lve},t}(Ke);function jve(e){return B.flow(qt,rt)(e)}var Dve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fve=function(e){Dve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyArea",n}return t.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return jve},t}(Ke);function Rve(e){return B.flow(qt,rt)(e)}var $ve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zve=function(e){$ve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyColumn",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],padding:0,margin:0,tooltip:!1}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Rve},t}(Ke),DO=function(){return DO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},DO.apply(this,arguments)};function Bve(e){var t=function(n){var r=n.options,i=r.percent,a=r.color,o=a===void 0?[]:a;if(!i)return n;var s={scale:{color:{range:o.length?o:[]}},data:[1,i]};return Object.assign(r,DO({},s)),n};return B.flow(t,qt,rt)(e)}var Yve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wve=function(e){Yve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyProgress",n}return t.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Bve},t}(Ke),FO=function(){return FO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},FO.apply(this,arguments)};function Gve(e){var t=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return B.set(r,"options.coordinate.innerRadius",o),r},n=function(r){var i=r.options,a=i.percent,o=i.color,s=o===void 0?[]:o;if(!a)return r;var l={scale:{color:{range:s.length?s:[]}},data:[1,a]};return Object.assign(i,FO({},l)),r};return B.flow(t,n,qt,rt)(e)}var Hve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vve=function(e){Hve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="TinyRing",n}return t.getDefaultOptions=function(){return{type:"view",data:[],margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Gve},t}(Ke);function Uve(e){return B.flow(rt)(e)}var Xve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qve=function(e){Xve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="rose",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Uve},t}(Ke),RO="__start__",eu="__end__",$O="__waterfall_value__",zO=function(){return zO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},zO.apply(this,arguments)},Kve=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function Zve(e){var t=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.yField;return o.length&&(o.reduce(function(l,c,u){var f,d=Vd(s),h=d(c,u,o);if(u===0||c.isTotal)c[RO]=0,c[eu]=h,c[$O]=h;else{var p=(f=l[eu])!==null&&f!==void 0?f:d(l,u,o);c[RO]=p,c[eu]=p+h,c[$O]=l[eu]}return c},[]),Object.assign(i,{yField:[RO,eu]})),r},n=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.xField,l=i.children,c=i.linkStyle,u=Kve([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[eu]),d},[]),u.shift(),l.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:zO({stroke:"#697474"},c),label:!1,tooltip:!1}),r};return B.flow(t,n,qt,rt)(e)}var Qve=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jve=function(e){Qve(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="waterfall",n}return t.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:$O,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlight:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Zve},t}(Ke);function ege(e){var t=function(n){var r=n.options,i=r.data,a=r.binNumber,o=r.binWidth,s=r.children,l=r.channel,c=l===void 0?"count":l,u=B.get(s,"[0].transform[0]",{});return B.isNumber(o)?(B.assign(u,{thresholds:B.ceil(B.divide(i.length,o)),y:c}),n):(B.isNumber(a)&&B.assign(u,{thresholds:a,y:c}),n)};return B.flow(t,qt,rt)(e)}var tge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nge=function(e){tge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Histogram",n}return t.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlight:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return ege},t}(Ke);function rge(e){var t=function(r){var i=r.options,a=i.tooltip,o=a===void 0?{}:a,s=i.colorField,l=i.sizeField;return o&&!o.field&&(o.field=s||l),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return B.flow(t,n,qt,rt)(e)}var ige=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),age=function(e){ige(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="heatmap",n}return t.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point",interaction:{elementHighlight:{background:!0}}}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return rge},t}(Ke);function oge(e){var t=function(n){var r=n.options.boxType,i=r===void 0?"box":r;return n.options.children[0].type=i,n};return B.flow(t,qt,rt)(e)}var sge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lge=function(e){sge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="box",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"box"}],axis:{y:{title:!1},x:{title:!1}},tooltip:{items:[{name:"min",channel:"y"},{name:"q1",channel:"y1"},{name:"q2",channel:"y2"},{name:"q3",channel:"y3"},{name:"max",channel:"y4"}]}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return oge},t}(Ke);function cge(e){var t=function(n){var r=n.options,i=r.data,a=[{type:"custom",callback:function(s){return{links:s}}}];if(B.isArray(i))i.length>0?B.set(r,"data",{value:i,transform:a}):delete r.children;else if(B.get(i,"type")==="fetch"&&B.get(i,"value")){var o=B.get(i,"transform");B.isArray(o)?B.set(i,"transform",o.concat(a)):B.set(i,"transform",a)}return n};return B.flow(t,qt,rt)(e)}var uge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fge=function(e){uge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="sankey",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return cge},t}(Ke),$i=function(){return $i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$i.apply(this,arguments)},j0=["#f0efff","#5B8FF9","#3D76DD"];function BO(e,t,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=B.map(e,function(s){var l,c,u=B.get(s,[t]);if(B.isNil(u))return[];if(B.isString(u)){var f=Number(u);return isNaN(f)?[]:(l={},l[n]=s[n],l[t]=f,l)}return B.isArray(u)?(a=!0,i=Math.max(i,u.length),B.map(r?u.sort(function(d,h){return h-d}):u,function(d,h){var p;return p={},p[n]=s[n],p[t]=d,p.index=h,p})):(i=Math.max(1,i),c={},c[n]=s[n],c[t]=u,c)}).flat();return a?[o.map(function(s){return $i({index:0},s)}),i]:[o,i]}function YO(e,t){return new Array(e).fill("").map(function(n,r){return B.isArray(t)?t[r%t.length]:t})}function dge(e){var t=function(i){var a=i.options,o=a.color,s=a.rangeField,l=s===void 0?"ranges":s,c=a.measureField,u=c===void 0?"measures":c,f=a.targetField,d=f===void 0?"targets":f,h=a.xField,p=h===void 0?"title":h,v=a.mapField,g=a.data,y=BO(g,l,p),m=y[0],b=y[1],x=BO(g,u,p,!1),w=x[0],O=x[1],_=BO(g,d,p,!1),S=_[0],k=_[1],E=B.get(o,[l],j0[0]),M=B.get(o,[u],j0[1]),P=B.get(o,[d],j0[2]),A=[YO(b,E),YO(O,M),YO(k,P)].flat();return i.options.children=B.map(i.options.children,function(L,N){var T=[m,w,S][N],I=[l,u,d][N];return $i($i({},L),{data:T,encode:$i($i({},L.encode||{}),{x:p,y:I,color:function(C){var j=C.index,D=B.isNumber(j)?"".concat(I,"_").concat(j):I;return v?B.get(v,[I,j],D):D}}),style:$i($i({},L.style||{}),{zIndex:function(C){return-C[I]}}),labels:N!==0?B.map(L.labels,function(C){return $i($i({},C),{text:I})}):void 0})}),i.options.scale.color.range=A,i.options.legend.color.itemMarker=function(L){return v&&B.includes(v==null?void 0:v[d],L)||(L==null?void 0:L.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&B.set(i,"options.children[2].shapeField","hyphen"),i},r=function(i){var a=i.options,o=a.range,s=o===void 0?{}:o,l=a.measure,c=l===void 0?{}:l,u=a.target,f=u===void 0?{}:u,d=a.children;return i.options.children=[s,c,f].map(function(h,p){return ns(d[p],h)}),i};return B.flow(t,n,r,Zpe,rt)(e)}var hge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pge=function(e){hge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="bullet",n}return t.getDefaultOptions=function(){return{type:"view",scale:{color:{range:j0}},legend:{color:{itemMarker:function(n){return n==="target"?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return dge},t}(Ke);function vge(e){var t=function(n){var r=n.options.data;return n.options.data={value:r},n};return B.flow(t,qt,rt)(e)}var gge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yge=function(e){gge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Gauge",n}return t.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return vge},t}(Ke);function mge(e){var t=function(n){var r=n.options.percent;return B.isNumber(r)&&(B.set(n,"options.data",r),delete n.options.percent),n};return B.flow(t,qt,rt)(e)}var bge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xge=function(e){bge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Liquid",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return mge},t}(Ke);function wge(e){return B.flow(qt,rt)(e)}var Oge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_ge=function(e){Oge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="WordCloud",n}return t.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return wge},t}(Ke);function Sge(e){var t=function(n){var r=n.options,i=r.data;return i&&B.set(r,"data",{value:i}),n};return B.flow(t,qt,rt)(e)}var kge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ege=function(e){kge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="treemap",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Sge},t}(Ke),ll=function(){return ll=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ll.apply(this,arguments)};function Mge(e){var t=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,l=a.coordinate,c=B.isNumber(o)?o/(2*Math.PI)*360:-90,u=B.isNumber(s)?(Number(s)+c)/180*Math.PI:Math.PI;return B.set(i,["options","coordinate"],ll(ll({},l),{endAngle:u,startAngle:o!=null?o:-Math.PI/2})),i},n=function(i){var a=i.options,o=a.tooltip,s=a.xField,l=a.yField,c=Vd(s),u=Vd(l);return o||B.set(a,"tooltip",{title:!1,items:[function(f,d,h){return{name:c(f,d,h),value:u(f,d,h)}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,l=a.scale,c=a.coordinate,u=a.xField,f=B.get(l,"y.domain",[]);return o&&s.unshift(ll({type:"interval",xField:u,yField:f[f.length-1],colorField:o.color,scale:{color:{type:"identity"}},style:{fillOpacity:o.opacity,fill:o.color?void 0:"#e0e4ee"},coordinate:ll(ll({},c),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return B.flow(t,n,r,qt,rt)(e)}var Age=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pge=function(e){Age(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="radial",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"radial",innerRadius:.1,outerRadius:1,endAngle:Math.PI},animate:{enter:{type:"waveIn",duration:800}},axis:{y:{nice:!0,labelAutoHide:!0,labelAutoRotate:!1},x:{title:!1,nice:!0,labelAutoRotate:!1,labelAutoHide:{type:"equidistance",cfg:{minGap:6}}}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Mge},t}(Ke);function Cge(e){return B.flow(rt)(e)}var Tge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lge=function(e){Tge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="CirclePacking",n}return t.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Cge},t}(Ke),D0=function(){return D0=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},D0.apply(this,arguments)};function Nge(e){var t=function(n){var r=n.options,i=r.xField,a=r.yField,o=r.seriesField,s=r.children,l=s==null?void 0:s.map(function(c){return D0(D0({},c),{xField:i,yField:a,seriesField:o,colorField:o,data:c.type==="density"?{transform:[{type:"kde",field:a,groupBy:[i,o]}]}:c.data})}).filter(function(c){return r.violinType!=="density"||c.type==="density"});return B.set(r,"children",l),r.violinType==="polar"&&B.set(r,"coordinate",{type:"polar"}),B.set(r,"violinType",void 0),n};return B.flow(t,qt,rt)(e)}var Ige=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jge=function(e){Ige(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="violin",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"density",sizeField:"size",tooltip:!1},{type:"boxplot",shapeField:"violin",style:{opacity:.5,point:!1}}],animate:{enter:{type:"fadeIn"}}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Nge},t}(Ke),qd=function(){return qd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},qd.apply(this,arguments)},Dge=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};function Fge(e){var t=function(a){var o=a.options,s=o.yField,l=o.children;return l.forEach(function(c,u){B.set(c,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,l=o.children,c=o.data;if(B.isPlainObject(c))return a;var u=B.isArray(B.get(c,[0]))?c:[c,c];return l.forEach(function(f,d){B.set(f,"data",Dge([],u[d].map(function(h){return qd({groupKey:s[d]},h)}),!0))}),a},r=function(a){var o=a.options,s=o.yField,l=s[0],c=s[1],u=o.tooltip;return u||B.set(o,"tooltip",{items:[{field:l,value:l},{field:c,value:c}]}),a},i=function(a){var o=a.options,s=o.children,l=o.layout,c=o.coordinate.transform,u=o.paddingBottom,f=u===void 0?k8:u,d=o.paddingLeft,h=d===void 0?k8:d,p=o.axis;B.set(o,"axisText",qd(qd({},(p==null?void 0:p.x)||{}),{layout:l}));var v=s[0],g=s[1];if(l==="vertical")B.set(o,"direction","col"),B.set(o,"paddingLeft",h),B.set(o,"coordinate.transform",c.filter(function(w){return w.type!=="transpose"})),B.set(v,"paddingBottom",S8),B.set(g,"paddingTop",S8),B.set(g,"axis",{x:{position:"top"}}),B.set(g,"scale",{y:{range:[0,1]}});else{B.set(o,"paddingBottom",f),B.set(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?IO:y,b=g.paddingLeft,x=b===void 0?IO:b;B.set(v,"paddingRight",m),B.set(v,"axis",{x:{position:"right"}}),B.set(g,"paddingLeft",x)}return a};return B.flow(t,n,r,i,qt,rt)(e)}var Rge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$ge=function(e){Rge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="BidirectionalBar",n}return t.getDefaultOptions=function(){return{type:"spaceFlex",coordinate:{transform:[{type:"transpose"}]},scale:{y:{nice:!0}},direction:"row",layout:"horizontal",legend:!1,axis:{y:{title:!1},x:{title:!1,label:!1}},children:[{type:"interval"},{type:"interval"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Fge},t}(Ke),cl;(function(e){e.color="key",e.d="path"})(cl||(cl={}));function zge(e){var t=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return B.isArray(i)&&(B.set(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[cl.color,cl.d]}]}),B.set(r,"colorField",a),B.set(r,["children","0","encode","d"],cl.d)),B.set(n,"options",B.omit(r,["sizeField","setsField"])),n};return B.flow(t,rt)(e)}var Bge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yge=function(e){Bge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="venn",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:cl.color,d:cl.d}}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return zge},t}(Ke);function Wge(e){var t=function(n){return n};return B.flow(t,rt)(e)}var Gge=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hge=function(e){Gge(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="Sunburst",n}return t.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},t.prototype.getDefaultOptions=function(){return t.getDefaultOptions()},t.prototype.getSchemaAdaptor=function(){return Wge},t}(Ke),Vge={Base:Xpe,Line:pve,Column:ove,Pie:yve,Area:eve,Bar:rve,DualAxes:A8,Funnel:fve,Scatter:xve,Radar:_ve,Rose:qve,Stock:Tve,TinyLine:Ive,TinyArea:Fve,TinyColumn:zve,TinyProgress:Wve,TinyRing:Vve,Waterfall:Jve,Histogram:nge,Heatmap:age,Box:lge,Sankey:fge,Bullet:pge,Gauge:yge,Liquid:xge,WordCloud:_ge,Treemap:Ege,RadialBar:Pge,CirclePacking:Lge,Violin:jge,BidirectionalBar:$ge,Venn:Yge,Mix:A8,Sunburst:Hge},WO=function(){return WO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},WO.apply(this,arguments)},P8=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ul=K.forwardRef(function(e,t){var n=e.chartType,r=n===void 0?"Base":n,i=P8(e,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit",flex:1}:a,s=i.containerAttributes,l=s===void 0?{}:s,c=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=P8(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),p=upe(Vge[r],h),v=p.chart,g=p.container;return K.useImperativeHandle(t,function(){return v.current}),K.createElement(lpe,{errorTemplate:d},u&&K.createElement(ope,{loadingTemplate:f}),K.createElement("div",WO({className:c,style:o,ref:g},l)))}),GO=function(){return GO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},GO.apply(this,arguments)},Uge=K.forwardRef(function(e,t){return K.createElement(ul,GO({},e,{chartType:"Area",ref:t}))}),HO=function(){return HO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},HO.apply(this,arguments)},Xge=K.forwardRef(function(e,t){return K.createElement(ul,HO({},e,{chartType:"Bar",ref:t}))}),VO=function(){return VO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},VO.apply(this,arguments)},qge=K.forwardRef(function(e,t){return K.createElement(ul,VO({},e,{chartType:"Column",ref:t}))}),UO=function(){return UO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},UO.apply(this,arguments)},Kge=K.forwardRef(function(e,t){return K.createElement(ul,UO({},e,{chartType:"DualAxes",ref:t}))}),XO=function(){return XO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},XO.apply(this,arguments)},Zge=K.forwardRef(function(e,t){return K.createElement(ul,XO({},e,{chartType:"Line",ref:t}))}),qO=function(){return qO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},qO.apply(this,arguments)},Qge=K.forwardRef(function(e,t){return K.createElement(ul,qO({},e,{chartType:"Pie",ref:t}))}),KO=function(){return KO=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},KO.apply(this,arguments)},Jge=K.forwardRef(function(e,t){return K.createElement(ul,KO({},e,{chartType:"Scatter",ref:t}))});const e0e=e=>t=>{const{service:n}=K.useContext(bi),r=K.useRef(null),[i,a]=K.useState(0);return K.useEffect(()=>{const o=r.current;if(!o||n.loading===!0)return;const s=new ResizeObserver(l=>{l.forEach(c=>{a(c.contentRect.height)})});return s.observe(o),()=>s.disconnect()},[n.loading]),G.jsx("div",{ref:r,style:i?{height:`${i}px`}:{},children:G.jsx(e,se(se({},t),i?{height:i}:{}))})},{booleanField:F0}=m_,t0e={isStack:e=>F0(se({name:"isStack",title:"isStack"},e)),smooth:e=>F0(se({name:"smooth",title:"smooth"},e)),isPercent:e=>F0(se({name:"isPercent",title:"isPercent"},e)),isGroup:e=>F0(se({name:"isGroup",title:"isGroup"},e))};class fl extends q0{constructor({name:n,title:r,Component:i,config:a}){super({name:n,title:r,Component:e0e(i),config:["xField","yField","seriesField",...a||[]]});mi(this,"init",(n,{measures:r,dimensions:i})=>{const{xField:a,yField:o,seriesField:s}=this.infer(n,{measures:r,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:o==null?void 0:o.value,seriesField:s==null?void 0:s.value}}});this.addConfigs(t0e)}getProps({data:n,general:r,advanced:i,fieldProps:a}){return se(_e(se(se({legend:{color:{itemLabelText:s=>{const l=a[r.seriesField],c=l==null?void 0:l.transformer;return c?c(s.label):s.label}}},tooltip:(s,l,c,u)=>{var g,y;const f=(g=u.y)==null?void 0:g.field,d=a[f],h=(d==null?void 0:d.label)||f,p=d==null?void 0:d.transformer,v=(y=u.y)==null?void 0:y.value[l];return{name:h,value:p?p(v):v}},axis:{x:{labelFormatter:s=>{const l=a[r.xField],c=l==null?void 0:l.transformer;return c?c(s):s}},y:{labelFormatter:s=>{const l=a[r.yField],c=l==null?void 0:l.transformer;return c?c(s):s}}},data:n,theme:"classic",animate:{enter:{type:!1},update:{type:!1},exit:{type:!1}},colorField:r.seriesField,stack:r.isStack,percent:r.isPercent?!0:void 0},r.smooth?{shapeField:"smooth"}:{}),r),{seriesField:r.isGroup?r.seriesField:void 0}),i)}getReference(){return{title:this.title,link:`https://ant-design-charts-next.antgroup.com/examples#statistics-${this.name}`}}}class n0e extends fl{constructor(){super({name:"dualAxes",title:"Dual Axes Chart",Component:Kge});mi(this,"init",(n,{measures:r,dimensions:i})=>{const{xField:a,yFields:o}=this.infer(n,{measures:r,dimensions:i});return{general:{xField:a==null?void 0:a.value,yField:(o==null?void 0:o.map(s=>s.value))||[]}}});this.config=["xField",{yField:{title:'{{t("yField")}}',type:"array","x-decorator":"FormItem","x-component":"ArrayItems",items:{type:"void","x-component":"Space",properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},input:{type:"string","x-decorator":"FormItem","x-component":"Select","x-reactions":"{{ useChartFields }}","x-component-props":{style:{minWidth:"200px"}},required:!0},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}},properties:{add:{type:"void",title:'{{t("Add")}}',"x-component":"ArrayItems.Addition"}}}}]}getProps({data:n,general:r,advanced:i,fieldProps:a,ctx:o}){var l;const s=super.getProps({data:n,general:r,advanced:i,fieldProps:a,ctx:o});return _e(se({},B.omit(s,["legend","tooltip"])),{children:((l=s.yField)==null?void 0:l.map((c,u)=>{var f;return{type:"line",yField:c,colorField:()=>{const d=a[c];return(d==null?void 0:d.label)||c},axis:{y:{title:((f=a[c])==null?void 0:f.label)||c,position:u===0?"left":"right",labelFormatter:d=>{const h=a[c],p=h==null?void 0:h.transformer;return p?p(d):d}}}}}))||[]})}}class r0e extends fl{constructor(){super({name:"pie",title:"Pie Chart",Component:Qge});mi(this,"init",(n,{measures:r,dimensions:i})=>{const{xField:a,yField:o}=this.infer(n,{measures:r,dimensions:i});return{general:{colorField:a==null?void 0:a.value,angleField:o==null?void 0:o.value}}});this.config=[{property:"field",name:"angleField",title:"angleField",required:!0},{property:"field",name:"colorField",title:"colorField",required:!0}]}getProps({data:n,general:r,advanced:i,fieldProps:a,ctx:o}){const s=super.getProps({data:n,general:r,advanced:i,fieldProps:a,ctx:o});return _e(se({},s),{tooltip:(l,c,u,f)=>{const d=f.y0.field,h=a[d],p=(h==null?void 0:h.label)||d,v=h==null?void 0:h.transformer,g=f.y0.value[c];return{name:p,value:v?v(g):g}}})}}const i0e=[new fl({name:"line",title:"Line Chart",Component:Zge,config:["smooth","isStack"]}),new fl({name:"area",title:"Area Chart",Component:Uge,config:["smooth",{property:"isStack",defaultValue:!0},"isPercent"]}),new fl({name:"column",title:"Column Chart",Component:qge,config:["isGroup","isStack","isPercent"]}),new fl({name:"bar",title:"Bar Chart",Component:Xge,config:["isGroup","isStack","isPercent"]}),new r0e,new n0e,new fl({name:"scatter",title:"Scatter Chart",Component:Jge})];class R0 extends Y.Plugin{constructor(){super(...arguments);mi(this,"charts",new X8)}load(){return $r(this,null,function*(){this.charts.setGroup("Built-in",[...i0e,...T$]),this.app.addComponents({ChartV2BlockInitializer:M$,ChartV2BlockDesigner:S$,ChartV2Block:_$}),this.app.schemaInitializerManager.add(E$),this.app.schemaInitializerManager.add(t$),this.app.schemaInitializerManager.add(u$);const n=this.app.schemaInitializerManager.get("page:addBlock");n==null||n.add("otherBlocks.chartV2",{title:Ve("Charts"),Component:"ChartV2BlockInitializer"})})}}Oe.Chart=q0,Oe.ChartConfigContext=Yi,Oe.default=R0,Oe.useChartFilter=as,Object.defineProperties(Oe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});