@nocobase/plugin-data-visualization 1.7.0-beta.5 → 1.7.0-beta.6
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Scatter:function(){return V5},Box:function(){return Hf},Bar:function(){return VH},Mix:function(){return HD},Pie:function(){return V1},DualAxes:function(){return VX},Histogram:function(){return Hl},Rose:function(){return Hr},Tiny:function(){return He},Venn:function(){return HI},Area:function(){return VG},Base:function(){return VW},BidirectionalBar:function(){return HN},Line:function(){return VJ},measureTextWidth:function(){return HW},Waterfall:function(){return Ho},Gauge:function(){return Hb},Radar:function(){return V4},Stock:function(){return Hy},Treemap:function(){return HM},RadialBar:function(){return H_},WordCloud:function(){return HE},Sankey:function(){return Hh},Bullet:function(){return Hv},Column:function(){return Vq},Heatmap:function(){return Hu},CirclePacking:function(){return Hj},Funnel:function(){return VZ},G2:function(){return tE},Sunburst:function(){return Hz},Liquid:function(){return HO},Violin:function(){return HT}});var l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G,V,H,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tv,tm={};n.r(tm),n.d(tm,{geoAlbers:function(){return ii},geoAlbersUsa:function(){return io},geoAzimuthalEqualArea:function(){return r5},geoAzimuthalEqualAreaRaw:function(){return r2},geoAzimuthalEquidistant:function(){return r1},geoAzimuthalEquidistantRaw:function(){return r0},geoConicConformal:function(){return ir},geoConicConformalRaw:function(){return ie},geoConicEqualArea:function(){return rJ},geoConicEqualAreaRaw:function(){return rQ},geoConicEquidistant:function(){return rZ},geoConicEquidistantRaw:function(){return rK},geoEqualEarth:function(){return r7},geoEqualEarthRaw:function(){return r9},geoEquirectangular:function(){return rY},geoEquirectangularRaw:function(){return rq},geoGnomonic:function(){return rU},geoGnomonicRaw:function(){return rH},geoIdentity:function(){return r6},geoMercator:function(){return rI},geoMercatorRaw:function(){return rL},geoNaturalEarth1:function(){return rV},geoNaturalEarth1Raw:function(){return rG},geoOrthographic:function(){return r$},geoOrthographicRaw:function(){return rW},geoProjection:function(){return rC},geoProjectionMutator:function(){return rN},geoStereographic:function(){return r4},geoStereographicRaw:function(){return r3},geoTransverseMercator:function(){return rF},geoTransverseMercatorRaw:function(){return rD}});var tb={};n.r(tb),n.d(tb,{add:function(){return ao},adjoint:function(){return oL},clone:function(){return o_},copy:function(){return oP},create:function(){return oS},determinant:function(){return oI},equals:function(){return ac},exactEquals:function(){return au},frob:function(){return ai},fromQuat:function(){return o2},fromQuat2:function(){return oK},fromRotation:function(){return oH},fromRotationTranslation:function(){return oX},fromRotationTranslationScale:function(){return o0},fromRotationTranslationScaleOrigin:function(){return o1},fromScaling:function(){return oV},fromTranslation:function(){return oG},fromValues:function(){return oj},fromXRotation:function(){return oU},fromYRotation:function(){return oq},fromZRotation:function(){return oY},frustum:function(){return o5},getRotation:function(){return oJ},getScaling:function(){return oQ},getTranslation:function(){return oZ},identity:function(){return oT},invert:function(){return oN},lookAt:function(){return ae},mul:function(){return af},multiply:function(){return oR},multiplyScalar:function(){return al},multiplyScalarAndAdd:function(){return as},ortho:function(){return o7},orthoNO:function(){return o9},orthoZO:function(){return at},perspective:function(){return o4},perspectiveFromFieldOfView:function(){return o8},perspectiveNO:function(){return o3},perspectiveZO:function(){return o6},rotate:function(){return oz},rotateX:function(){return oB},rotateY:function(){return oW},rotateZ:function(){return o$},scale:function(){return oF},set:function(){return oA},str:function(){return ar},sub:function(){return ap},subtract:function(){return aa},targetTo:function(){return an},translate:function(){return oD},transpose:function(){return oC}});var tx={};n.r(tx),n.d(tx,{frequency:function(){return AB},id:function(){return AW},name:function(){return A$},weight:function(){return Az}});var tO={};n.r(tO),n.d(tO,{area:function(){return C9},bottom:function(){return Na},bottomLeft:function(){return Na},bottomRight:function(){return Na},inside:function(){return Na},left:function(){return Na},outside:function(){return Nc},right:function(){return Na},spider:function(){return Np},surround:function(){return Nd},top:function(){return Na},topLeft:function(){return Na},topRight:function(){return Na}});var tw={};n.r(tw),n.d(tw,{interpolateBlues:function(){return L4},interpolateBrBG:function(){return Lv},interpolateBuGn:function(){return LI},interpolateBuPu:function(){return LD},interpolateCividis:function(){return Ia},interpolateCool:function(){return Im},interpolateCubehelixDefault:function(){return Ig},interpolateGnBu:function(){return Lz},interpolateGreens:function(){return L8},interpolateGreys:function(){return L7},interpolateInferno:function(){return Ij},interpolateMagma:function(){return IP},interpolateOrRd:function(){return LW},interpolateOranges:function(){return Io},interpolatePRGn:function(){return Lb},interpolatePiYG:function(){return LO},interpolatePlasma:function(){return IA},interpolatePuBu:function(){return LH},interpolatePuBuGn:function(){return LG},interpolatePuOr:function(){return LE},interpolatePuRd:function(){return Lq},interpolatePurples:function(){return Ie},interpolateRainbow:function(){return Ix},interpolateRdBu:function(){return LM},interpolateRdGy:function(){return L_},interpolateRdPu:function(){return LX},interpolateRdYlBu:function(){return Lj},interpolateRdYlGn:function(){return LT},interpolateReds:function(){return Ir},interpolateSinebow:function(){return Ik},interpolateSpectral:function(){return LN},interpolateTurbo:function(){return IM},interpolateViridis:function(){return I_},interpolateWarm:function(){return Iv},interpolateYlGn:function(){return LJ},interpolateYlGnBu:function(){return LZ},interpolateYlOrBr:function(){return L1},interpolateYlOrRd:function(){return L5},schemeAccent:function(){return Nj},schemeBlues:function(){return L3},schemeBrBG:function(){return Lg},schemeBuGn:function(){return LL},schemeBuPu:function(){return LR},schemeCategory10:function(){return NP},schemeDark2:function(){return NA},schemeGnBu:function(){return LF},schemeGreens:function(){return L6},schemeGreys:function(){return L9},schemeObservable10:function(){return NT},schemeOrRd:function(){return LB},schemeOranges:function(){return Ii},schemePRGn:function(){return Lm},schemePaired:function(){return NC},schemePastel1:function(){return NN},schemePastel2:function(){return NL},schemePiYG:function(){return Lx},schemePuBu:function(){return LV},schemePuBuGn:function(){return L$},schemePuOr:function(){return Lw},schemePuRd:function(){return LU},schemePurples:function(){return It},schemeRdBu:function(){return Lk},schemeRdGy:function(){return LS},schemeRdPu:function(){return LY},schemeRdYlBu:function(){return LP},schemeRdYlGn:function(){return LA},schemeReds:function(){return In},schemeSet1:function(){return NI},schemeSet2:function(){return NR},schemeSet3:function(){return ND},schemeSpectral:function(){return LC},schemeTableau10:function(){return NF},schemeYlGn:function(){return LQ},schemeYlGnBu:function(){return LK},schemeYlOrBr:function(){return L0},schemeYlOrRd:function(){return L2}});var tE={};n.r(tE),n.d(tE,{AREA_CLASS_NAME:function(){return EO},Academy:function(){return m0},Bin:function(){return S5},BinX:function(){return S3},COMPONENT_CLASS_NAME:function(){return Eb},Chart:function(){return Dr},ChartEvent:function(){return ke},Classic:function(){return mX},ClassicDark:function(){return mQ},Dark:function(){return mZ},DiffY:function(){return _i},DodgeX:function(){return S6},ELEMENT_CLASS_NAME:function(){return Eg},Filter:function(){return _T},FlexX:function(){return __},Group:function(){return _m},GroupColor:function(){return _O},GroupX:function(){return _b},GroupY:function(){return _x},Jitter:function(){return S7},JitterX:function(){return _t},JitterY:function(){return _e},LABEL_CLASS_NAME:function(){return Ex},LABEL_LAYER_CLASS_NAME:function(){return Ey},Light:function(){return mY},LinearAxis:function(){return xY},MAIN_LAYER_CLASS_NAME:function(){return Ed},MASK_CLASS_NAME:function(){return Ew},MaybeDefaultX:function(){return g0},MaybeDefaultY:function(){return g5},MaybeFunctionAttribute:function(){return vi},MaybeGradient:function(){return dw},MaybeIdentityX:function(){return gl},MaybeIdentityY:function(){return ga},MaybeKey:function(){return hj},MaybeSeries:function(){return dE},MaybeSize:function(){return yy},MaybeStackY:function(){return De},MaybeTitle:function(){return hS},MaybeTooltip:function(){return h_},MaybeTuple:function(){return yK},MaybeTupleX:function(){return gz},MaybeTupleY:function(){return g$},MaybeVisualPosition:function(){return yQ},MaybeZeroPadding:function(){return y1},MaybeZeroX:function(){return iD},MaybeZeroY:function(){return yd},MaybeZeroY1:function(){return iR},MaybeZeroZ:function(){return Dn},NormalizeY:function(){return _l},PLOT_CLASS_NAME:function(){return Em},Pack:function(){return _P},Runtime:function(){return R7},Sample:function(){return _A},Select:function(){return _p},SelectX:function(){return _d},SelectY:function(){return _g},Selection:function(){return pH},SortColor:function(){return _S},SortX:function(){return _k},SortY:function(){return _M},StackEnter:function(){return _o},StackY:function(){return S_},SymmetryY:function(){return _r},VIEW_CLASS_NAME:function(){return Ev},corelib:function(){return Pr},extend:function(){return TQ},geolib:function(){return ih},graphlib:function(){return A3},plotlib:function(){return TK},register:function(){return R6},render:function(){return RB},renderToMountedElement:function(){return RW},select:function(){return pV},stdlib:function(){return TZ}});var tk={}.toString,tM=function(t,e){return tk.call(t)==="[object "+e+"]"},tS=function(t){return Array.isArray?Array.isArray(t):tM(t,"Array")},t_=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},tP=function(t,e){if(!!t){if(tS(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(t_(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},tj=function(t){return tM(t,"Function")},tA=Array.prototype;tA.splice,tA.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tT=function(t){return tM(t,"Number")},tC=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return tP(t,function(n,r){!(tj(t)&&"prototype"===r)&&e.push(n)}),e},tN=function(t){if(!("object"==typeof(e=t)&&null!==e)||!tM(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},tL=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&tN(a)?(!tN(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tS(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tI=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tR=function(t,e){if(!tI(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var tD=function(t){return t};function tF(t){var e;return null==(e=t)?0:tI(t)?t.length:Object.keys(t).length}var tz=function(t,e){return(tz=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function tB(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tz(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tW=function(){return(tW=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function t$(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function tG(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function tV(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function tH(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tU(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tq(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function tY(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function tX(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}!function(t,e){if(!tj(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!eG&&(eG=document.createElement("canvas").getContext("2d")),eG.font=[o,a,i,n+"px",r].join(" "),eG.measureText(tM(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tq([t],tC(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class tK{constructor(t){this.options=tL({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tL({},this.options,t),this.rescale(t)}rescale(t){}}function tZ(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function tQ(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function tJ(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var t0=n("254"),t1=n.n(t0);function t2(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function t5(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=t2(a,o,e+1/3),s=t2(a,o,e);return[255*l,255*s,255*t2(a,o,e-1/3),i]}(r):null}let t3=(t,e)=>n=>t*(1-n)+e*n,t4=(t,e)=>{let n=t5(t),r=t5(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},t6=(t,e)=>"number"==typeof t&&"number"==typeof e?t3(t,e):"string"==typeof t&&"string"==typeof e?t4(t,e):()=>t,t8=(t,e)=>{let n=t3(t,e);return t=>Math.round(n(t))};function t9(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let t7=Math.sqrt(50),et=Math.sqrt(10),ee=Math.sqrt(2);function en(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=t7?10:o>=et?5:o>=ee?2:1)*10**i:-(10**-i)/(o>=t7?10:o>=et?5:o>=ee?2:1)}function er(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=t7?i*=10:o>=et?i*=5:o>=ee&&(i*=2),e<t?-i:i}let ei=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=en(l,s,n))>0?r=en(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=en(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},eo=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=tZ(o,a),i=n(l,s)):(r=tZ(a,o),i=n(s,l)),tQ(i,r)},ea=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=tZ(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=tJ(t,e,1,r)-1,a=i[n];return tQ(o[n],a)(e)}},el=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?ea:eo)(t,e,r?t8:n)};class es extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t3,tickCount:5}}map(t){return t9(t)?this.output(t):this.options.unknown}invert(t){return t9(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return ei}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):tD}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=el(n.map(t),r,o,i);this.output=tQ(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=el(i,r.map(t),t3);this.input=tQ(e,n,o)}}let eu=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=en(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class ec extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5}}chooseTransforms(){return[tD,tD]}clone(){return new ec(this.options)}}var ef=function(t){return null==t},ep=function(t){return ef(t)?"":t.toString()},eh=function(t){var e=ep(t);return e.charAt(0).toUpperCase()+e.substring(1)},ed=t=>t;function ey(t,e){t&&ev.hasOwnProperty(t.type)&&ev[t.type](t,e)}var eg={Feature:function(t,e){ey(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ey(n[r].geometry,e)}},ev={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){em(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)em(n[r],e,0)},Polygon:function(t,e){eb(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eb(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ey(n[r],e)}};function em(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eb(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)em(t[n],e,1);e.polygonEnd()}function ex(t,e){t&&eg.hasOwnProperty(t.type)?eg[t.type](t,e):ey(t,e)}class eO{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ew=Math.PI,eE=ew/2,ek=ew/4,eM=2*ew,eS=180/ew,e_=ew/180,eP=Math.abs,ej=Math.atan,eA=Math.atan2,eT=Math.cos,eC=Math.ceil,eN=Math.exp,eL=Math.log,eI=Math.pow,eR=Math.sin,eD=Math.sign||function(t){return t>0?1:t<0?-1:0},eF=Math.sqrt,ez=Math.tan;function eB(t){return t>1?0:t<-1?ew:Math.acos(t)}function eW(t){return t>1?eE:t<-1?-eE:Math.asin(t)}function e$(){}var eG,eV,eH,eU,eq,eY=new eO,eX=new eO,eK={point:e$,lineStart:e$,lineEnd:e$,polygonStart:function(){eK.lineStart=eZ,eK.lineEnd=e0},polygonEnd:function(){eK.lineStart=eK.lineEnd=eK.point=e$,eY.add(eP(eX)),eX=new eO},result:function(){var t=eY/2;return eY=new eO,t}};function eZ(){eK.point=eQ}function eQ(t,e){eK.point=eJ,eV=eU=t,eH=eq=e}function eJ(t,e){eX.add(eq*t-eU*e),eU=t,eq=e}function e0(){eJ(eV,eH)}var e1=1/0,e2=1/0,e5=-1/0,e3=e5,e4={point:function(t,e){t<e1&&(e1=t),t>e5&&(e5=t),e<e2&&(e2=e),e>e3&&(e3=e)},lineStart:e$,lineEnd:e$,polygonStart:e$,polygonEnd:e$,result:function(){var t=[[e1,e2],[e5,e3]];return e5=e3=-(e2=e1=1/0),t}},e6,e8,e9,e7,nt=0,ne=0,nn=0,nr=0,ni=0,no=0,na=0,nl=0,ns=0,nu={point:nc,lineStart:nf,lineEnd:nd,polygonStart:function(){nu.lineStart=ny,nu.lineEnd=ng},polygonEnd:function(){nu.point=nc,nu.lineStart=nf,nu.lineEnd=nd},result:function(){var t=ns?[na/ns,nl/ns]:no?[nr/no,ni/no]:nn?[nt/nn,ne/nn]:[NaN,NaN];return nt=ne=nn=nr=ni=no=na=nl=ns=0,t}};function nc(t,e){nt+=t,ne+=e,++nn}function nf(){nu.point=np}function np(t,e){nu.point=nh,nc(e9=t,e7=e)}function nh(t,e){var n=t-e9,r=e-e7,i=eF(n*n+r*r);nr+=i*(e9+t)/2,ni+=i*(e7+e)/2,no+=i,nc(e9=t,e7=e)}function nd(){nu.point=nc}function ny(){nu.point=nv}function ng(){nm(e6,e8)}function nv(t,e){nu.point=nm,nc(e6=e9=t,e8=e7=e)}function nm(t,e){var n=t-e9,r=e-e7,i=eF(n*n+r*r);nr+=i*(e9+t)/2,ni+=i*(e7+e)/2,no+=i,na+=(i=e7*t-e9*e)*(e9+t),nl+=i*(e7+e),ns+=3*i,nc(e9=t,e7=e)}function nb(t){this._context=t}nb.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,eM)}},result:e$};var nx,nO,nw,nE,nk,nM=new eO,nS={point:e$,lineStart:function(){nS.point=n_},lineEnd:function(){nx&&nP(nO,nw),nS.point=e$},polygonStart:function(){nx=!0},polygonEnd:function(){nx=null},result:function(){var t=+nM;return nM=new eO,t}};function n_(t,e){nS.point=nP,nO=nE=t,nw=nk=e}function nP(t,e){nE-=t,nk-=e,nM.add(eF(nE*nE+nk*nk)),nE=t,nk=e}class nj{constructor(t){this._append=null==t?nA:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nA;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(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(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function nA(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nT(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),ex(t,i(o))),o.result()}return a.area=function(t){return ex(t,i(eK)),eK.result()},a.measure=function(t){return ex(t,i(nS)),nS.result()},a.bounds=function(t){return ex(t,i(e4)),e4.result()},a.centroid=function(t){return ex(t,i(nu)),nu.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ed):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nj(n)):new nb(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new nj(n)),a},a.projection(t).digits(n).context(e)}function nC(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function nN(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nL(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nI={}.toString,nR=function(t,e){return nI.call(t)==="[object "+e+"]"},nD=function(t){return Array.isArray?Array.isArray(t):nR(t,"Array")},nF=function(t){return"object"==typeof t&&null!==t},nz=function(t){if(!nF(t)||!nR(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},nB=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&nz(a)?(!nz(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nD(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nW=function(t){var e=ep(t);return e.charAt(0).toLowerCase()+e.substring(1)};function n$(t){return t}function nG(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),n$)}function nV(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function nH(t=""){throw Error(t)}function nU(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))!r.has(e)&&("transform"===e&&t.attr(e,""),t.attr(e,i))}function nq(t){return null!=t&&!Number.isNaN(t)}function nY(t,e){return nX(t,e)||{}}function nX(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nW(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function nK(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function nZ(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function nQ(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function nJ(t){return null===t||!1===t}function n0(t,e,n={},r=!1){return nJ(t)||Array.isArray(t)&&r?t:nB(n,nY(t,e))}function n1(t,e={}){return nJ(t)||Array.isArray(t)||!n2(t)?t:nB(e,t)}function n2(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function n5(t,e){return"object"==typeof t?nY(t,e):t}function n3(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function n4(t,e){return eP(t)>ew&&(t-=Math.round(t/eM)*eM),[t,e]}function n6(t,e,n){return(t%=eM)?e||n?n3(n9(t),n7(e,n)):n9(t):e||n?n7(e,n):n4}function n8(t){return function(e,n){return eP(e+=t)>ew&&(e-=Math.round(e/eM)*eM),[e,n]}}function n9(t){var e=n8(t);return e.invert=n8(-t),e}function n7(t,e){var n=eT(t),r=eR(t),i=eT(e),o=eR(e);function a(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*n+l*r;return[eA(s*i-c*o,l*n-u*r),eW(c*i+s*o)]}return a.invert=function(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*i-s*o;return[eA(s*i+u*o,l*n+c*r),eW(c*n-l*r)]},a}n4.invert=n4;function rt(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:e$,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function re(t,e){return 1e-6>eP(t[0]-e[0])&&1e-6>eP(t[1]-e[1])}function rn(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rr(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(re(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new rn(r,t,null,!0)),s.push(n.o=new rn(r,null,n,!1)),l.push(n=new rn(a,t,null,!1)),s.push(n.o=new rn(a,null,n,!0))}}),l.length){for(s.sort(e),ri(l),ri(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function ri(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ro(t){return[eA(t[1],t[0]),eW(t[2])]}function ra(t){var e=t[0],n=t[1],r=eT(n);return[r*eT(e),r*eR(e),eR(n)]}function rl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rs(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ru(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rf(t){var e=eF(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rp(t){return eP(t[0])<=ew?t[0]:eD(t[0])*((eP(t[0])+ew)%eM-ew)}function rh(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rd(t,e,n,r){return function(i){var o,a,l,s=e(i),u=rt(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=m,p.lineEnd=b,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=rh(a);var t=function(t,e){var n=rp(e),r=e[1],i=eR(r),o=[eR(n),-eT(n),0],a=0,l=0,s=new eO;1===i?r=eE+1e-6:-1===i&&(r=-eE-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length){for(var f,p,h=f[p-1],d=rp(h),y=h[1]/2+ek,g=eR(y),v=eT(y),m=0;m<p;++m,d=x,g=w,v=E,h=b){var b=f[m],x=rp(b),O=b[1]/2+ek,w=eR(O),E=eT(O),k=x-d,M=k>=0?1:-1,S=M*k,_=S>ew,P=g*w;if(s.add(eA(P*M*eR(S),v*E+P*eT(S))),a+=_?k+M*eM:k,_^d>=n^x>=n){var j=rs(ra(h),ra(b));rf(j);var A=rs(o,j);rf(A);var T=(_^k>=0?-1:1)*eW(A[2]);(r>T||r===T&&(j[0]||j[1]))&&(l+=_^k>=0?1:-1)}}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(!f&&(i.polygonStart(),f=!0),rr(a,rg,t,n,i)):t&&(!f&&(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function m(){c.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(!f&&(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(ry))}}return p}}function ry(t){return t.length>1}function rg(t,e){return((t=t.x)[0]<0?t[1]-eE-1e-6:eE-t[1])-((e=e.x)[0]<0?e[1]-eE-1e-6:eE-e[1])}var rv=rd(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l=o>0?ew:-ew,s=eP(o-n);1e-6>eP(s-ew)?(t.point(n,r=(r+a)/2>0?eE:-eE),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):i!==l&&s>=ew&&(1e-6>eP(n-i)&&(n-=1e-6*i),1e-6>eP(o-l)&&(o-=1e-6*l),r=function(t,e,n,r){var i,o,a=eR(t-n);return eP(a)>1e-6?ej((eR(e)*(o=eT(r))*eR(n)-eR(r)*(i=eT(e))*eR(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=o,r=a),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eE,r.point(-ew,i),r.point(0,i),r.point(ew,i),r.point(ew,0),r.point(ew,-i),r.point(0,-i),r.point(-ew,-i),r.point(-ew,0),r.point(-ew,i);else if(eP(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ew:-ew;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ew,-eE]);function rm(t,e){e=ra(e),e[0]-=t,rf(e);var n=eB(-e[1]);return((0>-e[2]?-n:n)+eM-1e-6)%eM}var rb=-1e9;function rx(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>eP(r[0]-t)?i>0?0:3:1e-6>eP(r[0]-n)?i>0?2:1:1e-6>eP(r[1]-e)?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,m,b=a,x=rt(),O={point:w,lineStart:function(){O.point=E,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(E(f,p),h&&g&&x.rejoin(),s.push(x.result())),O.point=w,g&&b.lineEnd()},polygonStart:function(){b=x,s=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=m&&e,i=(s=rh(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&rr(s,l,e,o,a),a.polygonEnd()),b=a,s=u=c=null}};function w(t,e){i(t,e)&&b.point(t,e)}function E(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(b.lineStart(),b.point(o,a));else if(l&&g)b.point(o,a);else{var s=[d=Math.max(rb,Math.min(1e9,d)),y=Math.max(rb,Math.min(1e9,y))],x=[o=Math.max(rb,Math.min(1e9,o)),a=Math.max(rb,Math.min(1e9,a))];(function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,!h&&a<0)return;if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,!!d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}})(s,x,t,e,n,r)?(!g&&(b.lineStart(),b.point(s[0],s[1])),b.point(x[0],x[1]),!l&&b.lineEnd(),m=!1):l&&(b.lineStart(),b.point(o,a),m=!1)}d=o,y=a,g=l}return O}}function rO(t){return function(e){var n=new rw;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rw(){}function rE(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ex(n,t.stream(e4)),e(e4.result()),null!=r&&t.clipExtent(r),t}function rk(t,e,n){return rE(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function rM(t,e,n){return rk(t,[[0,0],e],n)}function rS(t,e,n){return rE(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function r_(t,e,n){return rE(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}rw.prototype={constructor:rw,point:function(t,e){this.stream.point(t,e)},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()}};var rP=eT(30*e_);function rj(t,e){return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,m=c-i,b=v*v+m*m;if(b>4*e&&y--){var x=a+p,O=l+h,w=s+d,E=eF(x*x+O*O+w*w),k=eW(w/=E),M=1e-6>eP(eP(w)-1)||1e-6>eP(o-f)?(o+f)/2:eA(O,x),S=t(M,k),_=S[0],P=S[1],j=_-r,A=P-i,T=m*j-v*A;(T*T/b>e||eP((v*j+m*A)/b-.5)>.3||a*p+l*h+s*d<rP)&&(n(r,i,o,a,l,s,_,P,M,x/=E,O/=E,w,y,g),g.point(_,P),n(_,P,M,x,O,w,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=m,e.lineStart()}function m(r,i){var o=ra([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=O,y.lineEnd=w}function O(t,e){m(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=m}function w(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return rO({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var rA=rO({point:function(t,e){this.stream.point(t*e_,e*e_)}});function rT(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=eT(o),l=eR(o),s=a*t,u=l*t,c=a/t,f=l/t,p=(l*n-a*e)/t,h=(l*e+a*n)/t;function d(t,o){return[s*(t*=r)-u*(o*=i)+e,n-u*t-s*o]}return d.invert=function(t,e){return[r*(c*t-f*e+p),i*(h-f*t-c*e)]},d}function rC(t){return rN(function(){return t})()}function rN(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,m=0,b=0,x=1,O=1,w=null,E=rv,k=null,M=ed,S=.5;function _(t){return s(t[0]*e_,t[1]*e_)}function P(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eS,t[1]*eS]}function j(){var t=rT(f,0,0,x,O,b).apply(null,e(d,y)),r=rT(f,p-t[0],h-t[1],x,O,b);return n=n6(g,v,m),l=n3(e,r),s=n3(n,l),a=rj(l,S),A()}function A(){return u=c=null,_}return _.stream=function(t){var e;return u&&c===t?u:u=rA((e=n,rO({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(E(a(M(c=t)))))},_.preclip=function(t){return arguments.length?(E=t,w=void 0,A()):E},_.postclip=function(t){return arguments.length?(M=t,k=r=i=o=null,A()):M},_.clipAngle=function(t){return arguments.length?(E=+t?function(t){var e=eT(t),n=2*e_,r=e>0,i=eP(e)>1e-6;function o(t,n){return eT(t)*eT(n)>e}function a(t,n,r){var i=ra(t),o=ra(n),a=[1,0,0],l=rs(i,o),s=rl(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=rs(a,l),p=rc(a,e*s/c);ru(p,rc(l,-e*u/c));var h=rl(p,f),d=rl(f,f),y=h*h-d*(rl(p,p)-1);if(!(y<0)){var g=eF(y),v=rc(f,(-h-g)/d);if(ru(v,p),v=ro(v),!r)return v;var m,b=t[0],x=n[0],O=t[1],w=n[1];x<b&&(m=b,b=x,x=m);var E=x-b,k=1e-6>eP(E-ew);if(!k&&w<O&&(m=O,O=w,w=m),k||E<1e-6?k?O+w>0^v[1]<(1e-6>eP(v[0]-b)?O:w):O<=v[1]&&v[1]<=w:E>ew^(b<=v[0]&&v[0]<=x)){var M=rc(f,(-h+g)/d);return ru(M,p),[v,ro(M)]}}}function l(e,n){var i=r?t:ew-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rd(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ew:-ew),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||re(e,d)||re(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),g&&(!e||!re(e,y))&&t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=eT(e),l=eR(e),s=r*n;null==i?(i=e+r*eM,o=e-s/2):(i=rm(a,i),o=rm(a,o),(r>0?i<o:i>o)&&(i+=r*eM));for(var u,c=i;r>0?c>o:c<o;c-=s)u=ro([a,-l*eT(c),-l*eR(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ew,t-ew])}(w=t*e_):(w=null,rv),A()):w*eS},_.clipExtent=function(t){return arguments.length?(M=null==t?(k=r=i=o=null,ed):rx(k=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),A()):null==k?null:[[k,r],[i,o]]},_.scale=function(t){return arguments.length?(f=+t,j()):f},_.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],j()):[p,h]},_.center=function(t){return arguments.length?(d=t[0]%360*e_,y=t[1]%360*e_,j()):[d*eS,y*eS]},_.rotate=function(t){return arguments.length?(g=t[0]%360*e_,v=t[1]%360*e_,m=t.length>2?t[2]%360*e_:0,j()):[g*eS,v*eS,m*eS]},_.angle=function(t){return arguments.length?(b=t%360*e_,j()):b*eS},_.reflectX=function(t){return arguments.length?(x=t?-1:1,j()):x<0},_.reflectY=function(t){return arguments.length?(O=t?-1:1,j()):O<0},_.precision=function(t){return arguments.length?(a=rj(l,S=t*t),A()):eF(S)},_.fitExtent=function(t,e){return rk(_,t,e)},_.fitSize=function(t,e){return rM(_,t,e)},_.fitWidth=function(t,e){return rS(_,t,e)},_.fitHeight=function(t,e){return r_(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&P,j()}}function rL(t,e){return[t,eL(ez((eE+e)/2))]}function rI(){return rR(rL).scale(961/eM)}function rR(t){var e,n,r,i=rC(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ew*a(),l=i((function(t){function e(e){return e=t(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e}return t=n6(t[0]*e_,t[1]*e_,t.length>2?t[2]*e_:0),e.invert=function(e){return e=t.invert(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rL?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function rD(t,e){return[eL(ez((eE+e)/2)),-t]}function rF(){var t=rR(rD),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function rz(t){return function(e,n){var r=eT(e),i=eT(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eR(e),o*eR(n)]}}function rB(t){return function(e,n){var r=eF(e*e+n*n),i=t(r),o=eR(i);return[eA(e*o,r*eT(i)),eW(r&&n*o/r)]}}function rW(t,e){return[eT(e)*eR(t),eR(e)]}function r$(){return rC(rW).scale(249.5).clipAngle(90.000001)}function rG(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function rV(){return rC(rG).scale(175.295)}function rH(t,e){var n=eT(e),r=eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function rU(){return rC(rH).scale(144.049).clipAngle(60)}function rq(t,e){return[t,e]}function rY(){return rC(rq).scale(152.63)}function rX(t){var e=0,n=ew/3,r=rN(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*e_,n=t[1]*e_):[e*eS,n*eS]},i}function rK(t,e){var n=eT(t),r=t===e?eR(t):(n-eT(e))/(e-t),i=n/r+t;if(1e-6>eP(r))return rq;function o(t,e){var n=i-e,o=r*t;return[n*eR(o),i-n*eT(o)]}return o.invert=function(t,e){var n=i-e,o=eA(t,eP(n))*eD(n);return n*r<0&&(o-=ew*eD(t)*eD(n)),[o/r,i-eD(r)*eF(t*t+n*n)]},o}function rZ(){return rX(rK).scale(131.154).center([0,13.9389])}rL.invert=function(t,e){return[t,2*ej(eN(e))-eE]},rD.invert=function(t,e){return[-e,2*ej(eN(t))-eE]},rW.invert=rB(eW),rG.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(eP(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},rH.invert=rB(ej),rq.invert=rq;function rQ(t,e){var n=eR(t),r=(n+eR(e))/2;if(1e-6>eP(r))return function(t){var e=eT(t);function n(t,n){return[t*e,eR(n)/e]}return n.invert=function(t,n){return[t/e,eW(n*e)]},n}(t);var i=1+n*(2*r-n),o=eF(i)/r;function a(t,e){var n=eF(i-2*r*eR(e))/r;return[n*eR(t*=r),o-n*eT(t)]}return a.invert=function(t,e){var n=o-e,a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,eW((i-(t*t+n*n)*r*r)/(2*r))]},a}function rJ(){return rX(rQ).scale(155.424).center([0,33.6442])}var r0=rz(function(t){return(t=eB(t))&&t/eR(t)});function r1(){return rC(r0).scale(79.4188).clipAngle(179.999)}r0.invert=rB(function(t){return t});var r2=rz(function(t){return eF(2/(1+t))});function r5(){return rC(r2).scale(124.75).clipAngle(179.999)}function r3(t,e){var n=eT(e),r=1+eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function r4(){return rC(r3).scale(250).clipAngle(142)}function r6(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=rO({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),v=ed;function m(){return d=l*c,y=l*f,o=a=null,b}function b(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return b.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},b.stream=function(t){return o&&a===t?o:o=g(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,m()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,ed):rx(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==h?null:[[h,n],[r,i]]},b.scale=function(t){return arguments.length?(l=+t,m()):l},b.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],m()):[s,u]},b.angle=function(n){return arguments.length?(e=eR(p=n%360*e_),t=eT(p),m()):p*eS},b.reflectX=function(t){return arguments.length?(c=t?-1:1,m()):c<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return rk(b,t,e)},b.fitSize=function(t,e){return rM(b,t,e)},b.fitWidth=function(t,e){return rS(b,t,e)},b.fitHeight=function(t,e){return r_(b,t,e)},b}r2.invert=rB(function(t){return 2*eW(t/2)}),r3.invert=rB(function(t){return 2*ej(t)});var r8=eF(3)/2;function r9(t,e){var n=eW(r8*eR(e)),r=n*n,i=r*r*r;return[t*eT(n)/(r8*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function r7(){return rC(r9).scale(177.158)}function it(t){return ez((eE+t)/2)}function ie(t,e){var n=eT(t),r=t===e?eR(t):eL(n/eT(e))/eL(it(e)/it(t)),i=n*eI(it(t),r)/r;if(!r)return rL;function o(t,e){i>0?e<-eE+1e-6&&(e=-eE+1e-6):e>eE-1e-6&&(e=eE-1e-6);var n=i/eI(it(e),r);return[n*eR(r*t),i-n*eT(r*t)]}return o.invert=function(t,e){var n=i-e,o=eD(r)*eF(t*t+n*n),a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,2*ej(eI(i/o,1/r))-eE]},o}function ir(){return rX(ie).scale(109.5).parallels([30,30])}function ii(){return rJ().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}r9.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o,a,l=0;l<12&&(a=n*(1.340264+-.081106*r+i*(893e-6+.003796*r))-e,n-=o=a/(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r)),i=(r=n*n)*r*r,!(1e-12>eP(o)));++l);return[r8*t*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))/eT(n),eW(eR(n)/r8)]};function io(){var t,e,n,r,i,o,a=ii(),l=rJ().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=rJ().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return rk(c,t,e)},c.fitSize=function(t,e){return rM(c,t,e)},c.fitWidth=function(t,e){return rS(c,t,e)},c.fitHeight=function(t,e){return r_(c,t,e)},c.scale(1070)}var ia=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function il(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return nC(eC(r/d)*d,n,d).map(c).concat(nC(eC(l/y)*y,a,y).map(f)).concat(nC(eC(e/p)*p,t,p).filter(function(t){return eP(t%d)>1e-6}).map(s)).concat(nC(eC(o/h)*h,i,h).filter(function(t){return eP(t%y)>1e-6}).map(u))}return v.lines=function(){return m().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=nN(o,i,90),u=nL(e,t,g),c=nN(l,a,90),f=nL(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function is(t){return"geoPath"===t.type}let iu=()=>t=>{let e;let{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=ia(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tm[`geo${eh(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(il);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();!function(t,e,n,r){let{outline:i=(()=>{let t=e.filter(is);if(t.find(t=>t.sphere))return{type:"Sphere"};return{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;if("geometry"===e)return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if("feature"===e)return{type:"FeatureCollection",features:[t]};if("featureCollection"===e)return t})(t).features)}})()}=r,{size:o="fitExtent"}=r;"fitExtent"===o?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,i,n):"fitWidth"===o?function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=nT(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(t,i,n):void 0}(s,l,{x:t,y:n,width:r,height:i},o),!function(t,e){var n;for(let[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(s,o),e=nT(s);let u=new ec({domain:[t,t+r]}),c=new ec({domain:[n,n+i]}),f=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[u.map(n),c.map(r)]},p=t=>{if(!t)return null;let[e,n]=t,r=[u.invert(e),c.invert(n)];return s.invert(r)};return{transform:t=>f(t),untransform:t=>p(t)}}]]}},children:l.flatMap(t=>is(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:n1(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};iu.props={};var ic=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ip=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},ic(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function ih(){return{"composition.geoView":iu,"composition.geoPath":ip}}ip.props={};let id=()=>[["cartesian"]];id.props={};let iy=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},ig=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=iy(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};ig.props={};let iv=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];iv.props={transform:!0};let im=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),ib=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=im(t);return[...iv(),...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ib.props={};let ix=()=>[["parallel",0,1,0,1]];ix.props={};let iO=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];iO.props={transform:!0};let iw=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),iE=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=iw(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};iE.props={};let ik=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...ix(),...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ik.props={};let iM=({value:t})=>e=>e.map(()=>t);iM.props={};let iS=({value:t})=>e=>e.map(e=>e[t]);iS.props={};let i_=({value:t})=>e=>e.map(t);i_.props={};let iP=({value:t})=>()=>t;function ij(t,e){if(null!==t)return{type:"column",value:t,field:e}}function iA(t,e){return Object.assign(Object.assign({},ij(t,e)),{inferred:!0})}function iT(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}iP.props={};function iC(t,e){let n=[];for(let r of t)n[r]=e;return n}function iN(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function iL(t,...e){for(let n of e){if("string"!=typeof n)return[n,null];{let[e,r]=iN(t,n);if(null!==e)return[e,r]}}return[null,null]}function iI(t){return!(t instanceof Date)&&"object"==typeof t}let iR=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{y1:iA(iC(t,0))}})]};iR.props={};let iD=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{x:iA(iC(t,0))},scale:{x:{guide:null}}})]};function iF(t){return function(){return t}}iD.props={};let iz=Math.abs,iB=Math.atan2,iW=Math.cos,i$=Math.max,iG=Math.min,iV=Math.sin,iH=Math.sqrt,iU=Math.PI,iq=iU/2,iY=2*iU;function iX(t){return t>=1?iq:t<=-1?-iq:Math.asin(t)}let iK=Math.PI,iZ=2*iK,iQ=iZ-1e-6;function iJ(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class i0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?iJ:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return iJ;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6){if(Math.abs(c*l-s*u)>1e-6&&i){let p=n-o,h=r-a,d=l*l+s*s,y=Math.sqrt(d),g=Math.sqrt(f),v=i*Math.tan((iK-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),m=v/g,b=v/y;Math.abs(m-1)>1e-6&&this._append`L${t+m*u},${e+m*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+b*l},${this._y1=e+b*s}`}else this._append`L${this._x1=t},${this._y1=e}`}else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,n=+n,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%iZ+iZ),f>iQ?this._append`A${n},${n},0,1,${c},${t-a},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=iK)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function i1(){return new i0}function i2(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new i0(e)}function i5(t){return t.innerRadius}function i3(t){return t.outerRadius}function i4(t){return t.startAngle}function i6(t){return t.endAngle}function i8(t){return t&&t.padAngle}i1.prototype=i0.prototype;function i9(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/iH(l*l+s*s),c=u*s,f=-u*l,p=t+c,h=e+f,d=n+c,y=r+f,g=(p+d)/2,v=(h+y)/2,m=d-p,b=y-h,x=m*m+b*b,O=i-o,w=p*y-d*h,E=(b<0?-1:1)*iH(i$(0,O*O*x-w*w)),k=(w*b-m*E)/x,M=(-w*m-b*E)/x,S=(w*b+m*E)/x,_=(-w*m+b*E)/x,P=k-g,j=M-v,A=S-g,T=_-v;return P*P+j*j>A*A+T*T&&(k=S,M=_),{cx:k,cy:M,x01:-c,y01:-f,x11:k*(i/O-1),y11:M*(i/O-1)}}function i7(){var t=i5,e=i3,n=iF(0),r=null,i=i4,o=i6,a=i8,l=null,s=i2(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-iq,d=o.apply(this,arguments)-iq,y=iz(d-h),g=d>h;if(!l&&(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12){if(y>iY-1e-12)l.moveTo(p*iW(h),p*iV(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*iW(d),f*iV(d)),l.arc(0,0,f,d,h,g));else{var v,m,b=h,x=d,O=h,w=d,E=y,k=y,M=a.apply(this,arguments)/2,S=M>1e-12&&(r?+r.apply(this,arguments):iH(f*f+p*p)),_=iG(iz(p-f)/2,+n.apply(this,arguments)),P=_,j=_;if(S>1e-12){var A=iX(S/f*iV(M)),T=iX(S/p*iV(M));(E-=2*A)>1e-12?(A*=g?1:-1,O+=A,w-=A):(E=0,O=w=(h+d)/2),(k-=2*T)>1e-12?(T*=g?1:-1,b+=T,x-=T):(k=0,b=x=(h+d)/2)}var C=p*iW(b),N=p*iV(b),L=f*iW(w),I=f*iV(w);if(_>1e-12){var R,D=p*iW(x),F=p*iV(x),z=f*iW(O),B=f*iV(O);if(y<iU){if(R=function(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,p=f*s-c*u;if(!(p*p<1e-12))return p=(c*(e-o)-f*(t-i))/p,[t+p*s,e+p*u]}(C,N,z,B,D,F,L,I)){var W,$=C-R[0],G=N-R[1],V=D-R[0],H=F-R[1],U=1/iV(((W=($*V+G*H)/(iH($*$+G*G)*iH(V*V+H*H)))>1?0:W<-1?iU:Math.acos(W))/2),q=iH(R[0]*R[0]+R[1]*R[1]);P=iG(_,(f-q)/(U-1)),j=iG(_,(p-q)/(U+1))}else P=j=0}}k>1e-12?j>1e-12?(v=i9(z,B,C,N,p,j,g),m=i9(D,F,L,I,p,j,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),j<_?l.arc(v.cx,v.cy,j,iB(v.y01,v.x01),iB(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,j,iB(v.y01,v.x01),iB(v.y11,v.x11),!g),l.arc(0,0,p,iB(v.cy+v.y11,v.cx+v.x11),iB(m.cy+m.y11,m.cx+m.x11),!g),l.arc(m.cx,m.cy,j,iB(m.y11,m.x11),iB(m.y01,m.x01),!g))):(l.moveTo(C,N),l.arc(0,0,p,b,x,!g)):l.moveTo(C,N),f>1e-12&&E>1e-12?P>1e-12?(v=i9(L,I,D,F,f,-P,g),m=i9(C,N,z,B,f,-P,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),P<_?l.arc(v.cx,v.cy,P,iB(v.y01,v.x01),iB(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,P,iB(v.y01,v.x01),iB(v.y11,v.x11),!g),l.arc(0,0,f,iB(v.cy+v.y11,v.cx+v.x11),iB(m.cy+m.y11,m.cx+m.x11),g),l.arc(m.cx,m.cy,P,iB(m.y11,m.x11),iB(m.y01,m.x01),!g))):l.arc(0,0,f,w,O,g):l.lineTo(L,I)}}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-iU/2;return[iW(r)*n,iV(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:iF(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iF(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:iF(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:iF(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:iF(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function ot(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function oe(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function on(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function or(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function oi(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function oo(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function oa(t){return or(t)||oe(t)}function ol(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function os(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}var ou=n("420"),oc="undefined"!=typeof Float32Array?Float32Array:Array;function of(){var t=new oc(3);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function op(t){var e=new oc(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function oh(t){return Math.hypot(t[0],t[1],t[2])}function od(t,e,n){var r=new oc(3);return r[0]=t,r[1]=e,r[2]=n,r}function oy(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function og(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function ov(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function om(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}!Math.hypot&&(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function ob(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ox(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function oO(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ow(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function oE(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ok(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}var oM=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function oS(){var t=new oc(16);return oc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function o_(t){var e=new oc(16);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 oP(t,e){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 oj(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new oc(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function oA(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function oT(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oC(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function oN(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],m=n*l-r*a,b=n*s-i*a,x=n*u-o*a,O=r*s-i*l,w=r*u-o*l,E=i*u-o*s,k=c*y-f*d,M=c*g-p*d,S=c*v-h*d,_=f*g-p*y,P=f*v-h*y,j=p*v-h*g,A=m*j-b*P+x*_+O*S-w*M+E*k;return A?(A=1/A,t[0]=(l*j-s*P+u*_)*A,t[1]=(i*P-r*j-o*_)*A,t[2]=(y*E-g*w+v*O)*A,t[3]=(p*w-f*E-h*O)*A,t[4]=(s*S-a*j-u*M)*A,t[5]=(n*j-i*S+o*M)*A,t[6]=(g*x-d*E-v*b)*A,t[7]=(c*E-p*x+h*b)*A,t[8]=(a*P-l*S+u*k)*A,t[9]=(r*S-n*P-o*k)*A,t[10]=(d*w-y*x+v*m)*A,t[11]=(f*x-c*w-h*m)*A,t[12]=(l*M-a*_-s*k)*A,t[13]=(n*_-r*M+i*k)*A,t[14]=(y*b-d*O-g*m)*A,t[15]=(c*O-f*b+p*m)*A,t):null}function oL(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function oI(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function oR(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],m=e[15],b=n[0],x=n[1],O=n[2],w=n[3];return t[0]=b*r+x*l+O*f+w*y,t[1]=b*i+x*s+O*p+w*g,t[2]=b*o+x*u+O*h+w*v,t[3]=b*a+x*c+O*d+w*m,b=n[4],x=n[5],O=n[6],w=n[7],t[4]=b*r+x*l+O*f+w*y,t[5]=b*i+x*s+O*p+w*g,t[6]=b*o+x*u+O*h+w*v,t[7]=b*a+x*c+O*d+w*m,b=n[8],x=n[9],O=n[10],w=n[11],t[8]=b*r+x*l+O*f+w*y,t[9]=b*i+x*s+O*p+w*g,t[10]=b*o+x*u+O*h+w*v,t[11]=b*a+x*c+O*d+w*m,b=n[12],x=n[13],O=n[14],w=n[15],t[12]=b*r+x*l+O*f+w*y,t[13]=b*i+x*s+O*p+w*g,t[14]=b*o+x*u+O*h+w*v,t[15]=b*a+x*c+O*d+w*m,t}function oD(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function oF(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oz(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P=r[0],j=r[1],A=r[2],T=Math.hypot(P,j,A);return T<1e-6?null:(P*=T=1/T,j*=T,A*=T,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],m=e[11],b=P*P*a+o,x=j*P*a+A*i,O=A*P*a-j*i,w=P*j*a-A*i,E=j*j*a+o,k=A*j*a+P*i,M=P*A*a+j*i,S=j*A*a-P*i,_=A*A*a+o,t[0]=l*b+f*x+y*O,t[1]=s*b+p*x+g*O,t[2]=u*b+h*x+v*O,t[3]=c*b+d*x+m*O,t[4]=l*w+f*E+y*k,t[5]=s*w+p*E+g*k,t[6]=u*w+h*E+v*k,t[7]=c*w+d*E+m*k,t[8]=l*M+f*S+y*_,t[9]=s*M+p*S+g*_,t[10]=u*M+h*S+v*_,t[11]=c*M+d*S+m*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function oB(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function oW(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function o$(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(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[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function oG(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function oV(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oH(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function oU(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oq(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oY(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oX(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,m=a*u;return t[0]=1-(h+y),t[1]=f+m,t[2]=p-v,t[3]=0,t[4]=f-m,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function oK(t,e){var n=new oc(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),oX(t,e,n),t}function oZ(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function oQ(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function oJ(t,e){var n=new oc(3);oQ(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function o0(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,m=l*u,b=l*c,x=r[0],O=r[1],w=r[2];return t[0]=(1-(d+g))*x,t[1]=(p+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(p-b)*O,t[5]=(1-(f+g))*O,t[6]=(y+v)*O,t[7]=0,t[8]=(h+m)*w,t[9]=(y-v)*w,t[10]=(1-(f+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function o1(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,m=s*u,b=s*c,x=s*f,O=r[0],w=r[1],E=r[2],k=i[0],M=i[1],S=i[2],_=(1-(y+v))*O,P=(h+x)*O,j=(d-b)*O,A=(h-x)*w,T=(1-(p+v))*w,C=(g+m)*w,N=(d+b)*E,L=(g-m)*E,I=(1-(p+y))*E;return t[0]=_,t[1]=P,t[2]=j,t[3]=0,t[4]=A,t[5]=T,t[6]=C,t[7]=0,t[8]=N,t[9]=L,t[10]=I,t[11]=0,t[12]=n[0]+k-(_*k+A*M+N*S),t[13]=n[1]+M-(P*k+T*M+L*S),t[14]=n[2]+S-(j*k+C*M+I*S),t[15]=1,t}function o2(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o5(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function o3(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}of();var o4=o3;function o6(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function o8(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function o9(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var o7=o9;function at(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function ae(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],m=r[1],b=r[2],x=n[0],O=n[1],w=n[2];return 1e-6>Math.abs(d-x)&&1e-6>Math.abs(y-O)&&1e-6>Math.abs(g-w)?oT(t):(h=1/Math.hypot(c=d-x,f=y-O,p=g-w),c*=h,f*=h,p*=h,(h=Math.hypot(i=m*p-b*f,o=b*c-v*p,a=v*f-m*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function an(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function ar(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function ai(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function ao(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function aa(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function al(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function as(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function au(t,e){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]}function ac(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],m=e[0],b=e[1],x=e[2],O=e[3],w=e[4],E=e[5],k=e[6],M=e[7],S=e[8],_=e[9],P=e[10],j=e[11],A=e[12],T=e[13],C=e[14],N=e[15];return Math.abs(n-m)<=1e-6*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=1e-6*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(l-E)<=1e-6*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(s-k)<=1e-6*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(c-S)<=1e-6*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-_)<=1e-6*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(p-P)<=1e-6*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(h-j)<=1e-6*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(d-A)<=1e-6*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(y-T)<=1e-6*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(v-N)<=1e-6*Math.max(1,Math.abs(v),Math.abs(N))}var af=oR,ap=aa;function ah(){var t=new oc(9);return oc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ad(){var t=new oc(4);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ay(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function ag(){var t=new oc(4);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function av(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function am(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}ad();function ab(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function ax(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}var aO=function(t,e,n,r){var i=new oc(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},aw=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},aE=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};of(),od(1,0,0),od(0,1,0),ag(),ag(),ah();Pm=new oc(2),oc!=Float32Array&&(Pm[0]=0,Pm[1]=0);var ak={}.toString,aM=function(t,e){return ak.call(t)==="[object "+e+"]"},aS=function(t){return aM(t,"Number")};function a_(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var aP=function(t){return null==t},aj=function(t){return aM(t,"String")},aA=function(t,e,n){return t<e?e:t>n?n:t},aT={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function aC(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return aT[e]===t.length-1&&"achlmqstvz".includes(e)})}function aN(t){return aC(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function aL(t){return aN(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var aI={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function aR(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=aT[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,aT[n]))),aT[n]););}function aD(t){return t>=48&&t<=57}function aF(t){var e,n=t.pathValue,r=t.max;for(;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var az=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function aB(t){if(aL(t))return[].concat(t);for(var e=function(t){if(aN(t))return[].concat(t);var e=function(t){if(aC(t))return[].concat(t);var e=new az(t);for(aF(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=aT[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){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}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,aF(t),t.data=[],!o){aR(t);return}for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l))!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t);else!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!aD(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&aD(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&aD(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;aD(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&aD(r.charCodeAt(o)))for(;o<n&&aD(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t);if(t.err.length)return;t.data.push(t.param),aF(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,aF(t))}if(t.index>=t.max)break;if(!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}aR(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=tW({},aI),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if(!"TQ".includes(n)&&(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function aW(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function a$(t,e,n,r,i){var o=a_([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i){if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=aW([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function aG(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function aV(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,m=t,b=e,x=0,O=[m,b,0],w=[m,b],E=0,k={x:0,y:0},M=[{x:m,y:b}];v&&s<=0&&(k={x:m,y:b});for(var S=0;S<=g;S+=1){if(m=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,E=S/g)).x,b=c.y,p&&M.push({x:m,y:b}),d&&(x+=a_(w,[m,b])),w=[m,b],v&&x>=s&&s>O[2]){var _=(x-s)/(x-O[2]);k={x:w[0]*(1-_)+O[0]*_,y:w[1]*(1-_)+O[1]*_}}O=[m,b,x]}return v&&s>=x&&(k={x:a,y:l}),{length:x,point:k,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function aH(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=aB(t),h="number"==typeof e,d=[],y=0,g=0,v=0,m=0,b=[],x=[],O=0,w={x:0,y:0},E=w,k=w,M=w,S=0,_=0,P=p.length;_<P;_+=1)d=(u="M"===(c=(f=p[_])[0]))?d:[y,g].concat(f.slice(1)),u?(v=f[1],E=w={x:v,y:m=f[2]},O=0,h&&e<.001&&(M=w)):"L"===c?(O=(r=a$(d[0],d[1],d[2],d[3],(e||0)-S)).length,w=r.min,E=r.max,k=r.point):"A"===c?(O=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,m="number"==typeof u,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];m&&u<=0&&(M={x:b,y:x});for(var _=0;_<=v;_+=1){if(b=(f=function(t,e,n,r,i,o,a,l,s,u){var c,f=Math.abs,p=Math.sin,h=Math.cos,d=Math.sqrt,y=Math.PI,g=f(n),v=f(r),m=y/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===g||0===v)return a$(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:h(m)*b+p(m)*x,y:-p(m)*b+h(m)*x},w=Math.pow(O.x,2)/Math.pow(g,2)+Math.pow(O.y,2)/Math.pow(v,2);w>1&&(g*=d(w),v*=d(w));var E=(Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(O.y,2)-Math.pow(v,2)*Math.pow(O.x,2))/(Math.pow(g,2)*Math.pow(O.y,2)+Math.pow(v,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*d(E=E<0?0:E),M={x:k*(g*O.y/v),y:k*(-(v*O.x)/g)},S={x:h(m)*M.x-p(m)*M.y+(t+l)/2,y:p(m)*M.x+h(m)*M.y+(e+s)/2},_={x:(O.x-M.x)/g,y:(O.y-M.y)/v},P=aG({x:1,y:0},_);var j=aG(_,{x:(-O.x-M.x)/g,y:(-O.y-M.y)/v});!a&&j>0?j-=2*y:a&&j<0&&(j+=2*y);var A=P+(j%=2*y)*u,T=g*h(A),C=v*p(A);return{x:h(m)*T-p(m)*C+S.x,y:p(m)*T+h(m)*C+S.y}}(t,e,n,r,i,o,a,l,s,k=_/v)).x,x=f.y,h&&S.push({x:b,y:x}),y&&(O+=a_(E,[b,x])),E=[b,x],m&&O>=u&&u>w[2]){var P=(O-u)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return m&&u>=O&&(M={x:l,y:s}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-S,n||{})).length,w=i.min,E=i.max,k=i.point):"C"===c?(O=(o=aV(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-S,n||{})).length,w=o.min,E=o.max,k=o.point):"Q"===c?(O=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,m=0,b=[g,v,0],x=[g,v],O=0,w={x:0,y:0},E=[{x:g,y:v}];y&&a<=0&&(w={x:g,y:v});for(var k=0;k<=d;k+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,O=k/d)).x,v=s.y,c&&E.push({x:g,y:v}),p&&(m+=a_(x,[g,v])),x=[g,v],y&&m>=a&&a>b[2]){var M=(m-a)/(m-b[2]);w={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[g,v,m]}return y&&a>=m&&(w={x:i,y:o}),{length:m,point:w,min:{x:Math.min.apply(null,E.map(function(t){return t.x})),y:Math.min.apply(null,E.map(function(t){return t.y}))},max:{x:Math.max.apply(null,E.map(function(t){return t.x})),y:Math.max.apply(null,E.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-S,n||{})).length,w=a.min,E=a.max,k=a.point):"Z"===c&&(O=(l=a$((d=[y,g,v,m])[0],d[1],d[2],d[3],(e||0)-S)).length,w=l.min,E=l.max,k=l.point),h&&S<e&&S+O>=e&&(M=k),x.push(E),b.push(w),S+=O,y=(s="Z"!==c?f.slice(-2):[v,m])[0],g=s[1];return h&&e>=S&&(M={x:y,y:g}),{length:S,point:M,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,x.map(function(t){return t.x})),y:Math.max.apply(null,x.map(function(t){return t.y}))}}}var aU=function(t){return Array.isArray?Array.isArray(t):aM(t,"Array")},aq=function(t){if(!!aU(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},aY=function(t){if(!!aU(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aX=function(t,e){return(t%e+e)%e};function aK(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aZ=function(t,e,n,r){return tY(tY([],aW([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function aQ(t,e){if(void 0===e&&(e=!1),aL(n=t)&&n.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i,o=[].concat(t);return e?[o,[]]:o}for(var a=aB(t),l=tW({},aI),s=[],u="",c=a.length,f=[],p=0;p<c;p+=1){a[p]&&(u=a[p][0]),s[p]=u;var h=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,m=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,m=r,b=i,x=s,O=u,w=120*Math.PI/180,E=Math.PI/180*(+o||0),k=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=aK(g,v,-E)).x,v=f.y,x=(f=aK(x,O,-E)).x,O=f.y;var M=(g-x)/2,S=(v-O)/2,_=M*M/(m*m)+S*S/(b*b);_>1&&(m*=_=Math.sqrt(_),b*=_);var P=m*m,j=b*b,A=(a===l?-1:1)*Math.sqrt(Math.abs((P*j-P*S*S-j*M*M)/(P*S*S+j*M*M)));d=A*m*S/b+(g+x)/2,y=-(A*b)*M/m+(v+O)/2,p=Math.asin(((v-y)/b*1e9>>0)/1e9),h=Math.asin(((O-y)/b*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=x<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var T=h-p;if(Math.abs(T)>w){var C=h,N=x,L=O;x=d+m*Math.cos(h=p+w*(l&&h>p?1:-1)),k=t(x,O=y+b*Math.sin(h),m,b,o,0,l,N,L,[h,C,d,y])}T=h-p;var I=Math.cos(p),R=Math.cos(h),D=Math.tan(T/4),F=4/3*m*D,z=4/3*b*D,B=[g,v],W=[g+F*Math.sin(p),v-z*I],$=[x+F*Math.sin(h),O-z*R],G=[x,O];if(W[0]=2*B[0]-W[0],W[1]=2*B[1]-W[1],c)return W.concat($,G,k);k=W.concat($,G,k);for(var V=[],H=0,U=k.length;H<U;H+=1)V[H]=H%2?aK(k[H-1],k[H],E).y:aK(k[H],k[H+1],E).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":;return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],s=1/3,u=2/3,[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(aZ(y,g,h,d));case"Z":if(y===v&&g===m)return["C",y,g,v,m,v,m];return["C"].concat(aZ(y,g,v,m))}return t}(a[p],l);a[p]=h,!function(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}(a,s,p),c=a.length,"Z"===u&&f.push(p),i=(r=a[p]).length,l.x1=+r[i-2],l.y1=+r[i-1],l.x2=+r[i-4]||l.x1,l.y2=+r[i-3]||l.y1}return e?[a,f]:a}function aJ(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g=e&&n[e-1].slice(-2).concat(t.slice(1)),v=e?aV(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],{bbox:!1}).length:0;if(e){;y=v?(void 0===i&&(i=.5),o=(r=g).slice(0,2),a=r.slice(2,4),l=r.slice(4,6),s=r.slice(6,8),u=aW(o,a,i),c=aW(a,l,i),f=aW(l,s,i),p=aW(u,c,i),h=aW(c,f,i),d=aW(p,h,i),[["C"].concat(u,p,d),["C"].concat(h,f,s)]):[t,t]}else y=[t];return{s:t,ss:y,l:v}})}function a0(t){var e,n,r;return e=0,n=0,r=0,aQ(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l,s,u,c,f,p,h=t.slice(1),d=h[0],y=h[1],g=h[2],v=h[3],m=h[4],b=h[5];return o=e,a=n,l=d,s=y,u=g,c=v,f=m,r=3*(((p=b)-a)*(l+u)-(f-o)*(s+c)+s*(o-u)-l*(a-c)+p*(u+o/3)-f*(c+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var a1=function(t){return aM(t,"Boolean")},a2=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},a5=function(t){return void 0===t};function a3(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function a4(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function a6(){}var a8=1.4285714285714286,a9="\\s*([+-]?\\d+)\\s*",a7="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",lt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",le=/^#([0-9a-f]{3,8})$/,ln=RegExp("^rgb\\("+[a9,a9,a9]+"\\)$"),lr=RegExp("^rgb\\("+[lt,lt,lt]+"\\)$"),li=RegExp("^rgba\\("+[a9,a9,a9,a7]+"\\)$"),lo=RegExp("^rgba\\("+[lt,lt,lt,a7]+"\\)$"),la=RegExp("^hsl\\("+[a7,lt,lt]+"\\)$"),ll=RegExp("^hsla\\("+[a7,lt,lt,a7]+"\\)$"),ls={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function lu(){return this.rgb().formatHex()}a3(a6,lf,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:lu,formatHex:lu,formatHsl:function(){return lb(this).formatHsl()},formatRgb:lc,toString:lc});function lc(){return this.rgb().formatRgb()}function lf(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=le.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?lp(e):3===n?new ld(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?lh(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?lh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ln.exec(t))?new ld(e[1],e[2],e[3],1):(e=lr.exec(t))?new ld(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=li.exec(t))?lh(e[1],e[2],e[3],e[4]):(e=lo.exec(t))?lh(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=la.exec(t))?lm(e[1],e[2]/100,e[3]/100,1):(e=ll.exec(t))?lm(e[1],e[2]/100,e[3]/100,e[4]):ls.hasOwnProperty(t)?lp(ls[t]):"transparent"===t?new ld(NaN,NaN,NaN,0):null}function lp(t){return new ld(t>>16&255,t>>8&255,255&t,1)}function lh(t,e,n,r){return r<=0&&(t=e=n=NaN),new ld(t,e,n,r)}function ld(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ly(){return"#"+lv(this.r)+lv(this.g)+lv(this.b)}function lg(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function lv(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function lm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new lx(t,e,n,r)}function lb(t){if(t instanceof lx)return new lx(t.h,t.s,t.l,t.opacity);if(!(t instanceof a6)&&(t=lf(t)),!t)return new lx;if(t instanceof lx)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new lx(a,l,s,t.opacity)}a3(ld,function(t,e,n,r){var i;return 1==arguments.length?(!((i=t)instanceof a6)&&(i=lf(i)),i)?new ld((i=i.rgb()).r,i.g,i.b,i.opacity):new ld:new ld(t,e,n,null==r?1:r)},a4(a6,{brighter:function(t){return t=null==t?a8:Math.pow(a8,t),new ld(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ld(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:ly,formatHex:ly,formatRgb:lg,toString:lg}));function lx(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function lO(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}a3(lx,function(t,e,n,r){return 1==arguments.length?lb(t):new lx(t,e,n,null==r?1:r)},a4(a6,{brighter:function(t){return t=null==t?a8:Math.pow(a8,t),new lx(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new lx(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ld(lO(t>=240?t-240:t+120,i,r),lO(t,i,r),lO(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function lw(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function lE(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function lk(t,e){var n=Math.min.apply(Math,tY([],tU(t),!1)),r=Math.min.apply(Math,tY([],tU(e),!1));return{x:n,y:r,width:Math.max.apply(Math,tY([],tU(t),!1))-n,height:Math.max.apply(Math,tY([],tU(e),!1))-r}}function lM(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,tY([],tU(t.concat([h])),!1)),i.apply(void 0,tY([],tU(e.concat([h])),!1))],y=lE(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){;var v=a-f,m=a+f,d=[i.apply(void 0,tY([],tU(t.concat([v])),!1)),i.apply(void 0,tY([],tU(e.concat([v])),!1))],y=lE(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var b=[i.apply(void 0,tY([],tU(t.concat([m])),!1)),i.apply(void 0,tY([],tU(e.concat([m])),!1))],x=lE(s[0],s[1],b[0],b[1]);m<=1&&x<l?(a=m,l=x):f*=.5}}return{x:i.apply(void 0,tY([],tU(t.concat([a])),!1)),y:i.apply(void 0,tY([],tU(e.concat([a])),!1))}}function lS(t,e,n,r){return lE(t,e,n,r)}function l_(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function lP(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function lj(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(lw(l,0))!lw(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;lw(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function lA(t,e,n,r,i,o,a,l,s,u,c){var f=lM([t,n,i,a],[e,r,o,l],s,u,lP,c);return lE(f.x,f.y,s,u)}function lT(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function lC(t,e,n){var r=t+n-2*e;if(lw(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var lN="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},lL={exports:{}};Pb=lL,PO=0,Pw=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length){if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(!o&&(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;!i&&(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){;for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u=e.children[l],c=s(u),f=function(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}(t,u)-c;f<o?(o=f,i=c<i?c:i,a=u):f===o&&c<i&&(i=c,a=u)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){!i&&(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;){if(i=l.pop(),!(i-(r=l.pop())<=o)){var s,u,c,f,p,h=r+Math.ceil((i-r)/o/2)*o;s=n,u=h,c=r,f=i,p=a,function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}}(s,u,c||0,f||s.length-1,p||e),l.push(r,h,h,i)}}}return n},Pb.exports=Pw();var lI=lL.exports;(PE=PQ||(PQ={})).GROUP="g",PE.CIRCLE="circle",PE.ELLIPSE="ellipse",PE.IMAGE="image",PE.RECT="rect",PE.LINE="line",PE.POLYLINE="polyline",PE.POLYGON="polygon",PE.TEXT="text",PE.PATH="path",PE.HTML="html",PE.MESH="mesh",(Pk=PJ||(PJ={}))[Pk.ZERO=0]="ZERO",Pk[Pk.NEGATIVE_ONE=1]="NEGATIVE_ONE";var lR=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),lD=function(){function t(t){this.clipSpaceNearZ=PJ.NEGATIVE_ONE,this.plugins=[],this.config=tW({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function lF(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function lz(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lB(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lW(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function l$(t){return void 0===t?0:t>360||t<-360?t%360:t}function lG(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?op(t):aS(t)?od(t,e,n):od(t[0],t[1]||e,t[2]||n)}function lV(t){return Math.PI/180*t}function lH(t){return 180/Math.PI*t}function lU(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w;if(16===e.length){;return n=t,r=e,a=.5*Math.PI,s=(l=tU(oQ(of(),r),3))[0],u=l[1],c=l[2],(f=Math.asin(-r[2]/s))<a?f>-a?(i=Math.atan2(r[6]/u,r[10]/c),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/u,r[5]/u)):(o=0,i=Math.atan2(r[4]/u,r[5]/u)),n[0]=i,n[1]=f,n[2]=o,n}return p=t,d=(h=e)[0],y=h[1],g=h[2],v=h[3],O=d*d+(m=y*y)+(b=g*g)+(x=v*v),(w=d*v-y*g)>.499995*O?(p[0]=Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):w<-.499995*O?(p[0]=-Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):(p[0]=Math.asin(2*(d*g-v*y)),p[1]=Math.atan2(2*(d*v+y*g),1-2*(b+x)),p[2]=Math.atan2(2*(d*y+g*v),1-2*(m+b))),p}function lq(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=lH(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var lY=oS(),lX=oS(),lK=ad(),lZ=[of(),of(),of()],lQ=of();function lJ(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var l0=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){lF(this.center,t),lF(this.halfExtents,e),lz(this.min,this.center,this.halfExtents),lB(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lB(this.center,e,t),lW(this.center,this.center,.5),lz(this.halfExtents,e,t),lW(this.halfExtents,this.halfExtents,.5),lF(this.min,t),lF(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],m=g[1],b=g[2],x=e.halfExtents,O=x[0],w=x[1],E=x[2],k=v-O,M=v+O,S=m-w,_=m+w,P=b-E,j=b+E;k<c&&(c=k),M>f&&(f=M),S<p&&(p=S),_>h&&(h=_),P<d&&(d=P),j>y&&(y=j),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),m=Math.abs(u),b=Math.abs(c),x=Math.abs(f),O=Math.abs(p),w=Math.abs(h),E=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=m*o[0]+b*o[1]+x*o[2],r[2]=O*o[0]+w*o[1]+E*o[2],lz(this.min,n,r),lB(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t;var u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n);var c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return lF([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return lF([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),l1=function(){function t(t,e){this.distance=t||0,this.normal=e||od(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return oO(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/oh(this.normal);ob(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&ow(n,t,e,i),o},t}();(PM=P0||(P0={}))[PM.OUTSIDE=0xffffffff]="OUTSIDE",PM[PM.INSIDE=0]="INSIDE",PM[PM.INDETERMINATE=0x7fffffff]="INDETERMINATE";var l2=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new l1)}return t.prototype.extractFromVPMatrix=function(t){var e=tU(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];og(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,og(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,og(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,og(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,og(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,og(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),l5=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),l3=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),l4="Method not implemented.",l6="Use document.documentElement instead.";(PS=P1||(P1={}))[PS.ORBITING=0]="ORBITING",PS[PS.EXPLORING=1]="EXPLORING",PS[PS.TRACKING=2]="TRACKING",(P_=P2||(P2={}))[P_.DEFAULT=0]="DEFAULT",P_[P_.ROTATIONAL=1]="ROTATIONAL",P_[P_.TRANSLATIONAL=2]="TRANSLATIONAL",P_[P_.CINEMATIC=3]="CINEMATIC",(PP=P5||(P5={}))[PP.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",PP[PP.PERSPECTIVE=1]="PERSPECTIVE";var l8={UPDATED:"updated"},l9=function(){function t(){this.clipSpaceNearZ=PJ.NEGATIVE_ONE,this.eventEmitter=new ou,this.matrix=oS(),this.right=od(1,0,0),this.up=od(0,1,0),this.forward=od(0,0,1),this.position=od(0,0,1),this.focalPoint=od(0,0,0),this.distanceVector=od(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=oS(),this.projectionMatrixInverse=oS(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=P1.EXPLORING,this.trackingMode=P2.DEFAULT,this.projectionMode=P5.PERSPECTIVE,this.frustum=new l2,this.orthoMatrix=oS()}return t.prototype.isOrtho=function(){return this.projectionMode===P5.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===P1.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===P1.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==P1.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return oN(oS(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oG(oS(),[t,e,0]);this.jitteredProjectionMatrix=oR(oS(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===P5.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===P5.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===P5.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},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===P5.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},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===P5.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===P5.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=od(a.x-r,a.y-i,0),s=oO(l,this.right)/oh(this.right),u=oO(l,this.up)/oh(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=P5.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h,d,y=this.near*Math.tan(lV(.5*this.fov))/this.zoom,g=2*y,v=this.aspect*g,m=-.5*v;if(null===(d=this.view)||void 0===d?void 0:d.enabled){var b=this.view.fullWidth,x=this.view.fullHeight;m+=this.view.offsetX*v/b,y-=this.view.offsetY*g/x,v*=this.view.width/b,g*=this.view.height/x}return i=this.projectionMatrix,o=m,a=m+v,l=y,s=y-g,u=t,c=this.far,f=this.clipSpaceNearZ===PJ.ZERO,f?(p=-c/(c-u),h=-c*u/(c-u)):(p=-(c+u)/(c-u),h=-2*c*u/(c-u)),i[0]=2*u/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*u/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=p,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,oF(this.projectionMatrix,this.projectionMatrix,od(1,-1,1)),oN(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=P5.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null===(a=this.view)||void 0===a?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===PJ.NEGATIVE_ONE?o7(this.projectionMatrix,f,p,d,h,i,o):at(this.projectionMatrix,f,p,d,h,i,o),oF(this.projectionMatrix,this.projectionMatrix,od(1,-1,1)),oN(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=lG(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=od(0,1,0);if(this.focalPoint=lG(t,e,n),this.trackingMode===P2.CINEMATIC){var i=om(of(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=lH(Math.asin(e/oh(i))),a=90+lH(Math.atan2(n,t)),l=oS();oW(l,l,lV(a)),oB(l,l,lV(o)),r=oE(of(),[0,1,0],l)}return oN(this.matrix,ae(oS(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=of();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=av(ag(),[0,0,1],lV(this.roll));oT(this.matrix);var e=av(ag(),[1,0,0],lV((this.rotateWorld&&this.type!==P1.TRACKING||this.type===P1.TRACKING?1:-1)*this.elevation)),n=av(ag(),[0,1,0],lV((this.rotateWorld&&this.type!==P1.TRACKING||this.type===P1.TRACKING?1:-1)*this.azimuth)),r=am(ag(),n,e);r=am(ag(),r,t);var i=o2(oS(),r);this.type===P1.ORBITING||this.type===P1.EXPLORING?(oD(this.matrix,this.matrix,this.focalPoint),oR(this.matrix,this.matrix,i),oD(this.matrix,this.matrix,[0,0,this.distance])):this.type===P1.TRACKING&&(oD(this.matrix,this.matrix,this.position),oR(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lG(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){oy(this.right,lG(ay(ad(),[1,0,0,0],this.matrix))),oy(this.up,lG(ay(ad(),[0,1,0,0],this.matrix))),oy(this.forward,lG(ay(ad(),[0,0,1,0],this.matrix))),ox(this.right,this.right),ox(this.up,this.up),ox(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=oh(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===P1.TRACKING?(this.elevation=lH(Math.asin(e/r)),this.azimuth=lH(Math.atan2(-t,-n))):this.rotateWorld?(this.elevation=lH(Math.asin(e/r)),this.azimuth=lH(Math.atan2(-t,-n))):(this.elevation=-lH(Math.asin(e/r)),this.azimuth=-lH(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){oy(this.position,lG(ay(ad(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a,l;n=this.distanceVector,r=[0,0,-this.distance],i=(t=ah(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t),o=r[0],a=r[1],l=r[2],n[0]=o*i[0]+a*i[3]+l*i[6],n[1]=o*i[1]+a*i[4]+l*i[7],n[2]=o*i[2]+a*i[5]+l*i[8],ov(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=om(of(),this.focalPoint,this.position),this.distance=oh(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===P5.ORTHOGRAPHIC){var t=this.position,e=av(ag(),[0,0,1],-this.roll*Math.PI/180);o1(this.orthoMatrix,e,od((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),od(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=oR(oS(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(l8.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(l4)},t.prototype.pan=function(t,e){throw Error(l4)},t.prototype.dolly=function(t){throw Error(l4)},t.prototype.createLandmark=function(t,e){throw Error(l4)},t.prototype.gotoLandmark=function(t,e){throw Error(l4)},t.prototype.cancelLandmarkAnimation=function(){throw Error(l4)},t}();function l7(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(l7.Cache||Map),n}l7.Cache=Map,(Pj=P3||(P3={}))[Pj.kUnknown=0]="kUnknown",Pj[Pj.kNumber=1]="kNumber",Pj[Pj.kPercentage=2]="kPercentage",Pj[Pj.kEms=3]="kEms",Pj[Pj.kPixels=4]="kPixels",Pj[Pj.kRems=5]="kRems",Pj[Pj.kDegrees=6]="kDegrees",Pj[Pj.kRadians=7]="kRadians",Pj[Pj.kGradians=8]="kGradians",Pj[Pj.kTurns=9]="kTurns",Pj[Pj.kMilliseconds=10]="kMilliseconds",Pj[Pj.kSeconds=11]="kSeconds",Pj[Pj.kInteger=12]="kInteger",(PA=P4||(P4={}))[PA.kUNumber=0]="kUNumber",PA[PA.kUPercent=1]="kUPercent",PA[PA.kULength=2]="kULength",PA[PA.kUAngle=3]="kUAngle",PA[PA.kUTime=4]="kUTime",PA[PA.kUOther=5]="kUOther",(PT=P6||(P6={}))[PT.kAll=0]="kAll",PT[PT.kNonNegative=1]="kNonNegative",PT[PT.kInteger=2]="kInteger",PT[PT.kNonNegativeInteger=3]="kNonNegativeInteger",PT[PT.kPositiveInteger=4]="kPositiveInteger",(PC=P8||(P8={}))[PC.kYes=0]="kYes",PC[PC.kNo=1]="kNo",(PN=P9||(P9={}))[PN.kYes=0]="kYes",PN[PN.kNo=1]="kNo";var st=[{name:"em",unit_type:P3.kEms},{name:"px",unit_type:P3.kPixels},{name:"deg",unit_type:P3.kDegrees},{name:"rad",unit_type:P3.kRadians},{name:"grad",unit_type:P3.kGradians},{name:"ms",unit_type:P3.kMilliseconds},{name:"s",unit_type:P3.kSeconds},{name:"rem",unit_type:P3.kRems},{name:"turn",unit_type:P3.kTurns}];(PL=P7||(P7={}))[PL.kUnknownType=0]="kUnknownType",PL[PL.kUnparsedType=1]="kUnparsedType",PL[PL.kKeywordType=2]="kKeywordType",PL[PL.kUnitType=3]="kUnitType",PL[PL.kSumType=4]="kSumType",PL[PL.kProductType=5]="kProductType",PL[PL.kNegateType=6]="kNegateType",PL[PL.kInvertType=7]="kInvertType",PL[PL.kMinType=8]="kMinType",PL[PL.kMaxType=9]="kMaxType",PL[PL.kClampType=10]="kClampType",PL[PL.kTransformType=11]="kTransformType",PL[PL.kPositionType=12]="kPositionType",PL[PL.kURLImageType=13]="kURLImageType",PL[PL.kColorType=14]="kColorType",PL[PL.kUnsupportedColorType=15]="kUnsupportedColorType";var se=function(t){var e;if(!t)return P3.kUnknown;if("number"===t)return P3.kNumber;if("percent"===t||"%"===t)return P3.kPercentage;return e=t,st.find(function(t){return t.name===e}).unit_type},sn=function(t){switch(t){case P3.kNumber:case P3.kInteger:return P4.kUNumber;case P3.kPercentage:return P4.kUPercent;case P3.kPixels:return P4.kULength;case P3.kMilliseconds:case P3.kSeconds:return P4.kUTime;case P3.kDegrees:case P3.kRadians:case P3.kGradians:case P3.kTurns:return P4.kUAngle;default:return P4.kUOther}},sr=function(t){switch(t){case P4.kUNumber:return P3.kNumber;case P4.kULength:return P3.kPixels;case P4.kUPercent:return P3.kPercentage;case P4.kUTime:return P3.kSeconds;case P4.kUAngle:return P3.kDegrees;default:return P3.kUnknown}},si=function(t){var e=1;switch(t){case P3.kPixels:case P3.kDegrees:case P3.kSeconds:break;case P3.kMilliseconds:e=.001;break;case P3.kRadians:e=180/Math.PI;break;case P3.kGradians:e=.9;break;case P3.kTurns:e=360}return e},so=function(t){switch(t){case P3.kNumber:case P3.kInteger:break;case P3.kPercentage:return"%";case P3.kEms:return"em";case P3.kRems:return"rem";case P3.kPixels:return"px";case P3.kDegrees:return"deg";case P3.kRadians:return"rad";case P3.kGradians:return"grad";case P3.kMilliseconds:return"ms";case P3.kSeconds:return"s";case P3.kTurns:return"turn"}return""},sa=function(){function t(){}return t.isAngle=function(t){return t===P3.kDegrees||t===P3.kRadians||t===P3.kGradians||t===P3.kTurns},t.isLength=function(t){return t>=P3.kEms&&t<P3.kDegrees},t.isRelativeUnit=function(t){return t===P3.kPercentage||t===P3.kEms||t===P3.kRems},t.isTime=function(t){return t===P3.kSeconds||t===P3.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(P8.kNo,P9.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=P7.kUnitType&&this.getType()<=P7.kClampType},t}(),sl=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tB(e,t),e.prototype.getType=function(){return P7.kColorType},e.prototype.to=function(t){return this},e}(sa);(PI=jt||(jt={}))[PI.Constant=0]="Constant",PI[PI.LinearGradient=1]="LinearGradient",PI[PI.RadialGradient=2]="RadialGradient";var ss=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tB(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return P7.kColorType},e}(sa),su=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tB(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return P7.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(sa),sc=l7(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),sf=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function sp(t){return"function"==typeof t}var sh={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},sd=l7(function(t){var e=sc(t),n=sh[e];return e=(null==n?void 0:n.alias)||e}),sy=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(!function(t){if(!t)throw Error()}(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},sg=function(t){return sr(sn(t))},sv=function(t){function e(e,n){void 0===n&&(n=P3.kNumber);var r,i=t.call(this)||this;return r="string"==typeof n?se(n):n,i.unit=r,i.value=e,i}return tB(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return P7.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=sg(this.unit);if(n!==sg(t)||n===P3.kUnknown)return null;var r=si(this.unit)/si(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case P3.kUnknown:break;case P3.kInteger:r=Number(this.value).toFixed(0);break;case P3.kNumber:case P3.kPercentage:case P3.kEms:case P3.kRems:case P3.kPixels:case P3.kDegrees:case P3.kRadians:case P3.kGradians:case P3.kMilliseconds:case P3.kSeconds:case P3.kTurns:var i=this.value,o=so(this.unit);if(i<-999999||i>999999){var a=so(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?sy(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+=r},e}(sa),sm=new sv(0,"px");new sv(1,"px");var sb=new sv(0,"deg"),sx=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return tB(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(sl),sO=new su("unset"),sw={"":sO,unset:sO,initial:new su("initial"),inherit:new su("inherit")},sE=function(t){return!sw[t]&&(sw[t]=new su(t)),sw[t]},sk=new sx(0,0,0,0,!0),sM=new sx(0,0,0,0),sS=l7(function(t,e,n,r){return new sx(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),s_=function(t,e){return void 0===e&&(e=P3.kNumber),new sv(t,e)},sP=new sv(50,"%");(PR=je||(je={}))[PR.Standard=0]="Standard",(PD=jn||(jn={}))[PD.ADDED=0]="ADDED",PD[PD.REMOVED=1]="REMOVED",PD[PD.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var sj={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l3(0,0,0,0)};(PF=jr||(jr={})).COORDINATE="<coordinate>",PF.COLOR="<color>",PF.PAINT="<paint>",PF.NUMBER="<number>",PF.ANGLE="<angle>",PF.OPACITY_VALUE="<opacity-value>",PF.SHADOW_BLUR="<shadow-blur>",PF.LENGTH="<length>",PF.PERCENTAGE="<percentage>",PF.LENGTH_PERCENTAGE="<length> | <percentage>",PF.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",PF.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",PF.LIST_OF_POINTS="<list-of-points>",PF.PATH="<path>",PF.FILTER="<filter>",PF.Z_INDEX="<z-index>",PF.OFFSET_DISTANCE="<offset-distance>",PF.DEFINED_PATH="<defined-path>",PF.MARKER="<marker>",PF.TRANSFORM="<transform>",PF.TRANSFORM_ORIGIN="<transform-origin>",PF.TEXT="<text>",PF.TEXT_TRANSFORM="<text-transform>";var sA=function(){var t={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]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!m(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=m(e);if(i){!m(t.startCall)&&n("Missing (");var o=r(i);return!m(t.endCall)&&n("Missing )"),o}}function a(){return function(){return v("directional",t.sideOrCorner,1)}()||function(){return v("angular",t.angleValue,1)}()}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,m(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t=function(){var t=v("shape",/^(circle)/i,0);return t&&(t.style=g()||u()),t}()||function(){var t=v("shape",/^(ellipse)/i,0);return t&&(t.style=y()||u()),t}();if(t)t.at=c();else{var e=u();if(e){t=e;var n=c();n&&(t.at=n)}else{var r=f();r&&(t={type:"default-radial",at:r})}}return t}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return!t&&n("Missing positioning value"),t}}function f(){var t=function(){return{x:y(),y:y()}}();if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);m(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=function(){return function(){return v("hex",t.hexColor,1)}()||function(){return o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})}()||function(){return o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})}()||function(){return v("literal",t.literalColor,0)}()}();return!e&&n("Expected color definition"),e.length=y(),e}function d(){return m(t.number)[1]}function y(){return v("%",t.percentageValue,1)||function(){return v("position-keyword",t.positionKeywords,1)}()||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=m(e);if(r)return{type:t,value:r[n]}}function m(t){var n=/^[\n\r\t\s]+/.exec(e);n&&b(n[0].length);var r=t.exec(e);return r&&b(r[0].length),r}function b(t){e=e.substring(t)}return function(t){var i;return e=t,i=function(){return p(r)}(),e.length>0&&n("Invalid input not EOF"),i}}(),sT=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,sC=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sN=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sL=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,sI={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},sR=l7(function(t){var e;return s_(e="angular"===t.type?Number(t.value):sI[t.value]||0,"deg")}),sD=l7(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:s_(e,r),cy:s_(n,i)}}),sF=l7(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return sA(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!==(e=t[i-1].length)&&void 0!==e?e:{type:"%",value:"100"},i>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null===(r=t[l].length)||void 0===r?void 0:r.value;if(!aP(s)&&!aP(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){return{offset:s_(Number(t.length.value),"%"),color:function(t){var e=t.type,n=t.value;if("hex"===e)return"#".concat(n);if("literal"===e)return n;if("rgb"===e)return"rgb(".concat(n.join(","),")");else return"rgba(".concat(n.join(","),")")}(t)}});if("linear-gradient"===e)return new ss(jt.LinearGradient,{angle:n?sR(n):sb,steps:i});if("radial-gradient"===e&&(!n&&(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sD(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?sE(f):s_(f,c)}return new ss(jt.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=sT.exec(t);if(r){var i=(null===(e=r[2].match(sL))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return[new ss(jt.LinearGradient,{angle:s_(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=tU(t,2),n=e[0],r=e[1];return{offset:s_(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=sC.exec(t);if(n){var r=(null===(e=n[4].match(sL))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:s_(50,"%"),cy:s_(50,"%"),steps:r.map(function(t){var e=tU(t,2),n=e[0],r=e[1];return{offset:s_(100*Number(n),"%"),color:r}})}}return null}(t);if(o){if(!aj(o))return[new ss(jt.RadialGradient,o)];t=o}}else if("p"===n)return function(t){var e=sN.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(t)}});function sz(t){return t&&!!t.image}function sB(t){return t&&!aP(t.r)&&!aP(t.g)&&!aP(t.b)}var sW=l7(function(t){if(sz(t))return tW({repetition:"repeat"},t);if(aP(t)&&(t=""),"transparent"===t)return sM;"currentColor"===t&&(t="black");var e=sF(t);if(e)return e;var n=lf(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),sS.apply(void 0,tY([],tU(r),!1))});function s$(t,e){if(!!sB(t)&&!!sB(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(aA(e[n],0,255));return e[3]=aA(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sG(t,e){if(aP(e))return s_(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return s_(Number(e),"px");if("deg".search(t)>=0)return s_(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return s_(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sV=function(t){return sG(/px/g,t)},sH=l7(sV);l7(function(t){return sG(RegExp("%","g"),t)});var sU=function(t){return aS(t)||isFinite(Number(t))?s_(Number(t)||0,"px"):sG(RegExp("px|%|em|rem","g"),t)},sq=l7(sU),sY=function(t){return sG(RegExp("deg|rad|grad|turn","g"),t)},sX=l7(sY);function sK(t){var e=0;if(t.unit===P3.kDegrees)e=t.value;else if(t.unit===P3.kRadians)e=lH(Number(t.value));else if(t.unit===P3.kTurns)e=360*Number(t.value);return e}function sZ(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):aj(t)?n=t.split(" ").map(function(t){return Number(t)}):aS(t)&&(n=[t]),2===e)return 1===n.length?[n[0],n[0]]:[n[0],n[1]];if(1===n.length)return[n[0],n[0],n[0],n[0]];if(2===n.length)return[n[0],n[1],n[0],n[1]];else if(3===n.length)return[n[0],n[1],n[2],n[1]];else return[n[0],n[1],n[2],n[3]]}function sQ(t){return aj(t)?t.split(" ").map(function(t){return sq(t)}):t.map(function(t){return sq(t.toString())})}function sJ(t,e,n){if(0===t.value)return 0;if(t.unit===P3.kPixels)return Number(t.value);if(t.unit===P3.kPercentage&&n){var r=n.nodeName===PQ.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var s0=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function s1(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;if(i=e.index+e[0].length,s0.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sG(/deg|rad|grad|turn|px|%/g,t)||sW(t)})}),n.lastIndex===t.length)return r}return[]}function s2(t){return t.toString()}var s5=function(t){return"number"==typeof t?s_(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?s_(Number(t)):s_(0)},s3=l7(s5);function s4(t,e){return[t,e,s2]}function s6(t,e){return function(n,r){return[n,r,function(n){return s2(aA(n,t,e))}]}}function s8(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function s9(t){if(0===t.parsedStyle.path.totalLength){var e;t.parsedStyle.path.totalLength=aH(t.parsedStyle.path.absolutePath,void 0,tW(tW({},void 0),{bbox:!1,length:!0})).length}return t.parsedStyle.path.totalLength}l7(function(t){return aj(t)?t.split(" ").map(s3):t.map(s3)});function s7(t,e){return t[0]===e[0]&&t[1]===e[1]}function ut(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function ue(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var un=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},ur=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s,u=lV(r=aX(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-a.x)/2,f=(t.y-a.y)/2,p={x:Math.cos(u)*c+Math.sin(u)*f,y:-Math.sin(u)*c+Math.cos(u)*f},h=Math.pow(p.x,2)/Math.pow(e,2)+Math.pow(p.y,2)/Math.pow(n,2);h>1&&(e=Math.sqrt(h)*e,n=Math.sqrt(h)*n);var d=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(p.y,2)-Math.pow(n,2)*Math.pow(p.x,2))/(Math.pow(e,2)*Math.pow(p.y,2)+Math.pow(n,2)*Math.pow(p.x,2)),y=(i!==o?1:-1)*Math.sqrt(d=d<0?0:d),g={x:y*(e*p.y/n),y:y*(-(n*p.x)/e)},v={x:Math.cos(u)*g.x-Math.sin(u)*g.y+(t.x+a.x)/2,y:Math.sin(u)*g.x+Math.cos(u)*g.y+(t.y+a.y)/2},m={x:(p.x-g.x)/e,y:(p.y-g.y)/n},b=un({x:1,y:0},m);var x=un(m,{x:(-p.x-g.x)/e,y:(-p.y-g.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(u)*w-Math.sin(u)*E+v.x,y:Math.sin(u)*w+Math.cos(u)*E+v.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:v,resultantRx:e,resultantRy:n}};function ui(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=ur({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=ur({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function uo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ua(t,e){return uo(t)*uo(e)?(t[0]*e[0]+t[1]*e[1])/(uo(t)*uo(e)):1}function ul(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ua(t,e))}function us(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function uu(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p,h=[];switch(t.nodeName){case PQ.LINE:var d=t.parsedStyle,y=d.x1,g=d.y1,v=d.x2,m=d.y2;h=[["M",void 0===y?0:y,void 0===g?0:g],["L",void 0===v?0:v,void 0===m?0:m]];break;case PQ.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;h=us(O,O,E,M);break;case PQ.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;h=us(void 0===_?0:_,void 0===P?0:P,E,M);break;case PQ.POLYLINE:case PQ.POLYGON:;n=t.parsedStyle.points.points,r=t.nodeName===PQ.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),h=i;break;case PQ.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;h=function(t,e,n,r,i){if(i){var o=tU(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=c+f!==0?1:0;return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return aA(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case PQ.PATH:h=tY([],tU(t.parsedStyle.path.absolutePath),!1)}if(h.length){;return o=h,a=t,l=e,c=void 0===(u=(s=a.parsedStyle).defX)?0:u,p=void 0===(f=s.defY)?0:f,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=od(e[1]-c,e[2]-p,0);l&&oE(r,r,l),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=od(e[1]-c,e[2]-p,0),o=od(e[3]-c,e[4]-p,0),a=od(e[5]-c,e[6]-p,0);l&&(oE(i,i,l),oE(o,o,l),oE(a,a,l)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(a[0],",").concat(a[1])}else if("A"===e[0]){var s=od(e[6]-c,e[7]-p,0);l&&oE(s,s,l),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=od(e[1]-c,e[2]-p,0),o=od(e[3]-c,e[4]-p,0);l&&(oE(i,i,l),oE(o,o,l)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}}var uc=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=aB(t)}catch(n){e=aB(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&s7(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=aX(lV(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,m=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,b=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,x=[(f-g)/n,(p-v)/r],O=[(-1*f-g)/n,(-1*p-v)/r],w=ul([1,0],x),E=ul(x,O);return -1>=ua(x,O)&&(E=Math.PI),ua(x,O)>=1&&(E=0),0===a&&E>0&&(E-=2*Math.PI),1===a&&E<0&&(E+=2*Math.PI),{cx:m,cy:b,rx:s7(t,[u,c])?0:n,ry:s7(t,[u,c])?0:r,startAngle:w,endAngle:w+E,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s);c.arcParams=f}if("Z"===u)n=i,r=t[o+1];else{var p=s.length;n=[s[p-2],s[p-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&s7(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;c.nextPoint=h;var d=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===u){var y=[s[1],s[2]];c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===u){var g=e[l-1],y=ue(g.currentPoint,d);"Q"===g.command?(c.command="Q",c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===u){var v=[s[1],s[2]],m=[s[3],s[4]];c.startTangent=[d[0]-v[0],d[1]-v[1]],c.endTangent=[n[0]-m[0],n[1]-m[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[v[0]-m[0],v[1]-m[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===u){var g=e[l-1],v=ue(g.currentPoint,d),m=[s[1],s[2]];"C"===g.command?(c.command="C",c.startTangent=[d[0]-v[0],d[1]-v[1]]):(c.command="SQ",c.startTangent=[d[0]-m[0],d[1]-m[1]]),c.endTangent=[n[0]-m[0],n[1]-m[1]]}else if("A"===u){var b=ui(c,0),x=b.x,O=b.y,w=ui(c,1,!1),E=w.x,k=w.y;c.startTangent=[x,O],c.endTangent=[E,k]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=lC(t,n,i)[0],l=lC(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(lT(t,n,i,a)),void 0!==l&&u.push(lT(e,r,o,l)),lk(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=lj(t,n,i,a),f=lj(e,r,o,l),p=0;p<c.length;p++)s.push(lP(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(lP(e,r,o,l,f[p]));return lk(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d,y,g,v,m,b=(h=t,d=0,y=n,g=r,y*Math.cos(v=i)*Math.cos(m=c[f])-g*Math.sin(v)*Math.sin(m)+h);b<s&&(s=b),b>u&&(u=b)}for(var x=Math.atan(r/(n*Math.tan(i))),O=1/0,w=-1/0,E=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var k=x+f;o<a?o<k&&k<a&&E.push(k):a<k&&k<o&&E.push(k)}for(var f=0;f<E.length;f++){var M,S,_,P,j,A,T=(M=0,S=e,_=n,P=r,_*Math.sin(j=i)*Math.cos(A=E[f])+P*Math.cos(j)*Math.sin(A)+S);T<O&&(O=T),T>w&&(w=T)}return{x:s,y:O,width:u-s,height:w-O}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=aq(n),h=aq(r),d=aY(n),y=aY(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=(g=ut(a,e)).xExtra:l[0]===d&&(d+=(g=ut(a,e)).xExtra),l[1]===h?h-=(g=ut(a,e)).yExtra:l[1]===y&&(y+=(g=ut(a,e)).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},uf=l7(uc);function up(t){return aj(t)?uf(t):uc(t)}function uh(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=t.curve,g=e.curve;(!y||0===y.length)&&(y=aQ(t.absolutePath,!1),t.curve=y),(!g||0===g.length)&&(g=aQ(e.absolutePath,!1),e.curve=g);var v=[y,g];y.length!==g.length&&(v=function t(e,n,r){var i=aJ(e),o=aJ(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=y?1:0,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(y,g));var m=a0(v[0])!==a0(v[1])?[["M"].concat((i=(r=v[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):v[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[m,(o=v[1],a=m,l=o.length-1,s=[],u=0,c=0,(d=(h=(p=(f=o).length)-1,f.map(function(t,e){return f.map(function(t,n){var r=e+n;return 0===n||f[r]&&"M"===f[r][0]?["M"].concat(f[r].slice(-2)):(r>=p&&(r-=h),f[r])})}))).forEach(function(t,e){o.slice(1).forEach(function(t,n){c+=a_(o[(e+n)%l].slice(-2),a[n%l].slice(-2))}),s[e]=c,c=0}),d[u=s.indexOf(Math.min.apply(null,s))]),function(t){return t}]}function ud(t,e){n=aj(t)?t.split(" ").map(function(t){var e=tU(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t;var n,r,i,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=lE(r[0],r[1],i[0],i[1])}return e}(n);n.forEach(function(t,e){if(n[e+1]){var s,u,c;(r=[0,0])[0]=a/l,s=t[0],u=t[1],c=n[e+1][0],i=lE(s,u,c,n[e+1][1]),a+=i,r[1]=a/l,o.push(r)}});var s=Math.min.apply(Math,tY([],tU(n.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,tY([],tU(n.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:n,totalLength:l,segments:o}}function uy(t,e){return[t.points,e.points,function(t){return t}]}function ug(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function uv(t){return t}var um={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],uv],matrix3d:["NNNNNNNNNNNNNNNN",uv],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ug([null,null,new sv(1)]),uv],scalex:["N",ug([null,new sv(1),new sv(1)]),ug([null,new sv(1)])],scaley:["N",ug([new sv(1),null,new sv(1)]),ug([new sv(1),null])],scalez:["N",ug([new sv(1),new sv(1),null])],scale3d:["NNN",uv],skew:["Aa",null,uv],skewx:["A",null,ug([null,sb])],skewy:["A",null,ug([sb,null])],translate:["Tt",ug([null,null,sm]),uv],translatex:["T",ug([null,sm,sm]),ug([null,sm])],translatey:["T",ug([sm,null,sm]),ug([sm,null])],translatez:["L",ug([sm,sm,null])],translate3d:["TTL",uv]};function ub(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=um[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?sb:sX(t)},N:s3,T:sq,L:sH})[p.toUpperCase()](f):({a:sb,n:u[0],t:sm})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ux(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=um[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?sb:sY(t)},N:s5,T:sU,L:sV})[p.toUpperCase()](f):({a:sb,n:u[0],t:sm})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function uO(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lV(sK(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=lV(sK(t.d[0]))),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[Math.cos(i=lV(sK(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=lV(sK(t.d[3]));var e,n,r,i,o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.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,t.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,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=lV(sK(t.d[0]));return[1,Math.tan(lV(sK(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=lV(sK(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lV(sK(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=sJ(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sJ(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sJ(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=sJ(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=sJ(t.d[0],0,null)||0,1];case"translate3d":return e=sJ(t.d[0],0,null)||0,n=sJ(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,r=sJ(t.d[2],0,null)||0,1];case"perspective":var f=sJ(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function uw(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function uE(t){var e,n=[0,0,0],r=[1,1,1],i=[0,0,0],o=[0,0,0,1],a=[0,0,0,1];return!function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(lY,t))return;if(oP(lX,lY),lX[3]=0,lX[7]=0,lX[11]=0,lX[15]=1,1e-8>Math.abs(oI(lX)))return;var a,l,s,u,c,f,p,h,d,y=lY[3],g=lY[7],v=lY[11],m=lY[12],b=lY[13],x=lY[14],O=lY[15];if(0!==y||0!==g||0!==v){if(lK[0]=y,lK[1]=g,lK[2]=v,lK[3]=O,!oN(lX,lX))return;oC(lX,lX),ay(i,lK,lX)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=m,e[1]=b,e[2]=x,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(lZ,lY),n[0]=oh(lZ[0]),ox(lZ[0],lZ[0]),r[0]=oO(lZ[0],lZ[1]),lJ(lZ[1],lZ[1],lZ[0],1,-r[0]),n[1]=oh(lZ[1]),ox(lZ[1],lZ[1]),r[0]/=n[1],r[1]=oO(lZ[0],lZ[2]),lJ(lZ[2],lZ[2],lZ[0],1,-r[1]),r[2]=oO(lZ[1],lZ[2]),lJ(lZ[2],lZ[2],lZ[1],1,-r[2]),n[2]=oh(lZ[2]),ox(lZ[2],lZ[2]),r[1]/=n[2],r[2]/=n[2],a=lQ,l=lZ[1],s=lZ[2],u=l[0],c=l[1],f=l[2],p=s[0],h=s[1],d=s[2],a[0]=c*d-f*h,a[1]=f*p-u*d,a[2]=u*h-c*p,0>oO(lZ[0],lQ))for(var w=0;w<3;w++)n[w]*=-1,lZ[w][0]*=-1,lZ[w][1]*=-1,lZ[w][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lZ[0][0]-lZ[1][1]-lZ[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lZ[0][0]+lZ[1][1]-lZ[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lZ[0][0]-lZ[1][1]+lZ[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lZ[0][0]+lZ[1][1]+lZ[2][2],0)),lZ[2][1]>lZ[1][2]&&(o[0]=-o[0]),lZ[0][2]>lZ[2][0]&&(o[1]=-o[1]),lZ[1][0]>lZ[0][1]&&(o[2]=-o[2])}(0===(e=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(uO).reduce(uw),n,r,i,o,a),[[n,r,i,a,o]]}var uk=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[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])}}();function uM(t){return t.toFixed(6).replace(".000000","")}function uS(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=uE(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=uE(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=aA(r,-1,1);var i=[];if(1===r)i=t;else{for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a)}return i}(n[0][3],r[0][3],t[5]);return uk(t[0],t[1],t[2],e,t[4]).map(uM).join(",")}])}function u_(t){return t.replace(/[xy]/,"")}function uP(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function uj(t,e,n){var r=!1;if(!t.length||!e.length){!t.length&&(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map(function(t){return"number"==typeof t?s_(a):s_(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=uS(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u,c,f=t[i].t,p=e[i].t,h=t[i].d,d=e[i].d,y=um[f],g=um[p],v=void 0;if(u=f,c=p,"perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=uS([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(f===p)v=f;else if(y[2]&&g[2]&&u_(f)===u_(p))v=u_(f),h=y[2](h),d=g[2](d);else if(y[1]&&g[1]&&uP(f)===uP(p))v=uP(f),h=y[1](h),d=g[1](d);else{var s=uS(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var m=[],b=[],x=[],O=0;O<h.length;O++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=sg(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=so(t.unit)):(sv.isLength(t.unit)||sv.isLength(e.unit))&&(a=sJ(t,i,n),l=sJ(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(h[O],d[O],n,!1,O);m[O]=s[0],b[O]=s[1],x.push(s[2])}o.push(m),a.push(b),l.push([v,x])}if(r){var w=o;o=a,a=w}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var uA=l7(function(t){if(!aj(t))return[s_(t[0]||0,"px"),s_(t[1]||0,"px")];if("text-anchor"===t)return[s_(0,"px"),s_(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sq(uC(e[0])),sq(uC(e[1]))]}),uT=function(t){if(!aj(t))return[s_(t[0]||0,"px"),s_(t[1]||0,"px")];if("text-anchor"===t)return[s_(0,"px"),s_(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sU(uC(e[0])),sU(uC(e[1]))]};function uC(t){if("center"===t)return"50%";if("left"===t||"top"===t)return"0";if("right"===t||"bottom"===t)return"100%";return t}var uN=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:jr.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:jr.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:jr.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:jr.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:jr.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:jr.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:jr.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:jr.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:jr.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:jr.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:jr.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:jr.FILTER},{n:"clipPath",syntax:jr.DEFINED_PATH},{n:"textPath",syntax:jr.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:jr.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===PQ.CIRCLE||t===PQ.ELLIPSE?"center":t===PQ.TEXT?"text-anchor":"left top"},l:!0,syntax:jr.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===PQ.CIRCLE||t===PQ.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:jr.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:jr.COORDINATE},{n:"cy",int:!0,d:"0",syntax:jr.COORDINATE},{n:"cz",int:!0,d:"0",syntax:jr.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:jr.COORDINATE},{n:"y",int:!0,d:"0",syntax:jr.COORDINATE},{n:"z",int:!0,d:"0",syntax:jr.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"y1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"z1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"x2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"y2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"z2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:jr.PATH,p:50},{n:"points",int:!0,l:!0,syntax:jr.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:jr.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:jr.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:jr.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:jr.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:jr.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:jr.NUMBER,d:function(t){return t===PQ.PATH||t===PQ.POLYGON||t===PQ.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:jr.MARKER},{n:"markerEnd",syntax:jr.MARKER},{n:"markerMid",syntax:jr.MARKER},{n:"markerStartOffset",syntax:jr.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:jr.LENGTH,l:!0,int:!0,d:"0"}],uL=uN.filter(function(t){return!!t.l}).map(function(t){return t.n}),uI={},uR=new WeakMap,uD=function(t,e){var n=uR.get(t);return!n||0===n.length||n.includes(e)},uF=function(){function t(t){var e=this;this.runtime=t,uN.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){tY([t.n],tU(t.a||[]),!1).forEach(function(e){uI[e]=t})},t.prototype.unregisterMetadata=function(t){delete uI[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<uL.length;s++)if(uL[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sW(e.fill)),e.stroke&&(t.parsedStyle.stroke=sW(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sW(e.shadowColor)),e.filter&&(t.parsedStyle.filter=s1(e.filter)),!aP(e.radius)&&(t.parsedStyle.radius=sZ(e.radius,4)),!aP(e.lineDash)&&(t.parsedStyle.lineDash=sZ(e.lineDash,2)),e.points&&(t.parsedStyle.points=ud(e.points,t)),""===e.path&&(t.parsedStyle.path=tW({},sj)),e.path&&(t.parsedStyle.path=up(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=sZ(e.anchor,2)),e.transform&&(t.parsedStyle.transform=ub(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=uA(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),((t.nodeName===PQ.CIRCLE||t.nodeName===PQ.ELLIPSE)&&(!aP(e.cx)||!aP(e.cy))||(t.nodeName===PQ.RECT||t.nodeName===PQ.IMAGE||t.nodeName===PQ.GROUP||t.nodeName===PQ.HTML||t.nodeName===PQ.TEXT||t.nodeName===PQ.MESH)&&(!aP(e.x)||!aP(e.y)||!aP(e.z))||t.nodeName===PQ.LINE&&(!aP(e.x1)||!aP(e.y1)||!aP(e.z1)||!aP(e.x2)||!aP(e.y2)||!aP(e.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),!aP(e.zIndex)&&this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),!aP(e.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;!u&&(t.attributes[n]=e[n]),!d&&(null===(r=uI[n])||void 0===r?void 0:r.l)&&(d=!0)}),!c&&y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=uI[t],o=e;if((""===e||aP(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=sE(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=sE(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=uI[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof su){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)!aP(u)&&(e=this.parseProperty(t,sp(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});if(!aP(f))return f;this.addUnresolveProperty(n,t);return}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof su?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=uI[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=uR.get(t);!n&&(uR.set(t,[]),n=uR.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&uD(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=uR.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uR.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;!r.contentBounds&&(r.contentBounds=new l0),!r.renderBounds&&(r.renderBounds=new l0);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,m=i.filter,b=i.transformOrigin,x=i.anchor;e===PQ.TEXT?delete i.anchor:e===PQ.MESH&&(i.anchor[2]=.5);var O=[(1-2*(x&&x[0]||0))*a/2+(void 0===u?0:u),(1-2*(x&&x[1]||0))*l/2+(void 0===c?0:c),(1-2*(x&&x[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(O,p);var w=e===PQ.POLYLINE||e===PQ.POLYGON||e===PQ.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var E=((d||0)+(y||0))*w;p[0]+=E,p[1]+=E}if(r.renderBounds.update(O,p),v&&g&&"inner"!==g){var k=r.renderBounds,M=k.min,S=k.max,_=i.shadowBlur,P=i.shadowOffsetX,j=i.shadowOffsetY,A=_||0,T=P||0,C=j||0,N=M[0]-A+T,L=S[0]+A+T,I=M[1]-A+C,R=S[1]+A+C;M[0]=Math.min(M[0],N),S[0]=Math.max(S[0],L),M[1]=Math.min(M[1],I),S[1]=Math.max(S[1],R),r.renderBounds.setMinMax(M,S)}(void 0===m?[]:m).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,lB(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),x=i.anchor;var D=a<0,F=l<0,z=(D?-1:1)*(b?sJ(b[0],0,t):0),B=(F?-1:1)*(b?sJ(b[1],1,t):0);z-=(D?-1:1)*(x&&x[0]||0)*r.contentBounds.halfExtents[0]*2,B-=(F?-1:1)*(x&&x[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,B),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(!t.style.rawLineWidth&&(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===PQ.CIRCLE&&(!t.style.rawR&&(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===PQ.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=uI[t];return!!e&&e.inh},t}(),uz=function(){function t(){this.parser=sX,this.parserUnmemoize=sY,this.parserWithCSSDisabled=null,this.mixer=s4}return t.prototype.calculator=function(t,e,n,r){return sK(n)},t}(),uB=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof su&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),uW=function(){function t(){this.parser=sW,this.parserWithCSSDisabled=sW,this.mixer=s$}return t.prototype.calculator=function(t,e,n,r){return n instanceof su?"none"===n.value?sk:sM:n},t}(),u$=function(){function t(){this.parser=s1}return t.prototype.calculator=function(t,e,n){return n instanceof su?[]:n},t}();function uG(t){var e=t.parsedStyle.fontSize;return aP(e)?null:e}var uV=function(){function t(){this.parser=sq,this.parserUnmemoize=sU,this.parserWithCSSDisabled=null,this.mixer=s4}return t.prototype.calculator=function(t,e,n,r,i){if(aS(n))return n;if(!sv.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===P3.kPercentage)return 0;if(n.unit===P3.kEms){if(r.parentNode){var l=uG(r.parentNode);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}else if(n.unit===P3.kRems){if(null===(o=null==r?void 0:r.ownerDocument)||void 0===o?void 0:o.documentElement){var l=uG(r.ownerDocument.documentElement);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),uH=function(){function t(){this.mixer=s8}return t.prototype.parser=function(t){var e,n=sQ(aS(t)?[t]:t);return e=1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uU=function(){function t(){this.mixer=s8}return t.prototype.parser=function(t){var e,n=sQ(aS(t)?[t]:t);return e=1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uq=oS();function uY(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[sm,sm];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[sm];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[sm];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[sm];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[sm,sm,sm];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[sb];e.rotateLocal(0,0,sK(s[0]))}else if("rotatex"===i){var s=o||[sb];e.rotateLocal(sK(s[0]),0,0)}else if("rotatey"===i){var s=o||[sb];e.rotateLocal(0,sK(s[0]),0)}else if("rotatez"===i){var s=o||[sb];e.rotateLocal(0,0,sK(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(lV(u[0]),lV(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lV(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],lV(u[0]))}else if("matrix"===i){var c=tU(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(oA(uq,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(oA.apply(tb,tY([uq],tU(o.map(function(t){return t.value})),!1)),uq[12]+=n,uq[13]+=r,e.setLocalTransform(uq))}),e.getLocalTransform()}var uX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case PQ.CIRCLE:case PQ.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;!aP(a)&&(n=a),!aP(l)&&(r=l),!aP(s)&&(i=s);break;case PQ.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case PQ.RECT:case PQ.IMAGE:case PQ.GROUP:case PQ.HTML:case PQ.TEXT:case PQ.MESH:!aP(t.parsedStyle.x)&&(n=t.parsedStyle.x),!aP(t.parsedStyle.y)&&(r=t.parsedStyle.y),!aP(t.parsedStyle.z)&&(i=t.parsedStyle.z)}if(t.nodeName!==PQ.PATH&&t.nodeName!==PQ.POLYLINE&&t.nodeName!==PQ.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!aP(n)||!aP(r)||!aP(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)uY(h,t);else{var d=tU(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(aP(n)?y:n,aP(r)?g:r,aP(i)?v:i)}}},e}(uV),uK=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof su&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),uZ=function(){function t(){this.mixer=s4,this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uQ=function(){function t(){this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null,this.mixer=s6(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(!!n){var i=n.nodeName;if(i===PQ.LINE||i===PQ.PATH||i===PQ.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uJ=function(){function t(){this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null,this.mixer=s6(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),u0=function(){function t(){this.parser=up,this.parserWithCSSDisabled=up,this.mixer=uh}return t.prototype.calculator=function(t,e,n){return n instanceof su&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l3(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===PQ.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),u1=function(){function t(){this.parser=ud,this.mixer=uy}return t.prototype.postProcessor=function(t,e){if((t.nodeName===PQ.POLYGON||t.nodeName===PQ.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),u2=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.mixer=s6(0,1/0),e}return tB(e,t),e}(uV),u5=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof su)return"unset"===n.value?"":n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),u3=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),u4={},u6=0,u8="undefined"!=typeof window&&void 0!==window.document;function u9(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function u7(t){var e,n=t;do{if(null===(e=n.parsedStyle)||void 0===e?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function ct(t,e){if(u8)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var ce={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},cn="object"==typeof performance&&performance.now?performance:Date;function cr(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var ci=1,co="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},ca=Date.now(),cl={},cs=Date.now(),cu=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-cs,r=ci++;return(cl[r]=t,Object.keys(cl).length>1)?r:(setTimeout(function(){cs=e;var t=cl;cl={},Object.keys(t).forEach(function(e){return t[e](co.performance&&"function"==typeof co.performance.now?co.performance.now():Date.now()-ca)})},n>16?0:16-n),r)},cc=function(t){delete cl[t]},cf=function(t){return"string"!=typeof t?cu:""===t?co.requestAnimationFrame:co[t+"RequestAnimationFrame"]},cp=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!cf(t)}),ch=cf(cp);var cd="string"!=typeof(Pz=cp)?cc:""===Pz?co.cancelAnimationFrame:co[Pz+"CancelAnimationFrame"]||co[Pz+"CancelRequestAnimationFrame"];co.requestAnimationFrame=ch,co.cancelAnimationFrame=cd;var cy=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,tY([],tU(t),!1))}))},t}(),cg=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tG(this,void 0,void 0,function(){var e,n,r;return tV(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,tY([],tU(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),cv=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),cm=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),cb=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],cx=/([\"\'])[^\'\"]+\1/,cO=function(){function t(){this.parser=ub,this.parserUnmemoize=ux,this.parserWithCSSDisabled=ux,this.mixer=uj}return t.prototype.calculator=function(t,e,n,r){return n instanceof su?[]:n},t.prototype.postProcessor=function(t){uY(t.parsedStyle.transform,t)},t}(),cw=function(){this.parser=uA,this.parserUnmemoize=uT},cE=function(){function t(){this.parser=s3,this.parserUnmemoize=s5}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=jn.Z_INDEX_CHANGED)}},t}(),ck=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),cM=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry;return{width:2*n,height:2*r}},t}(),cS=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),l=Math.min(n,i),s=Math.max(n,i);return{width:a-o,height:s-l}},t}(),c_=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),cP=function(){function t(){}return t.prototype.update=function(t){if(t.points&&aU(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,tY([],tU(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,tY([],tU(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,tY([],tU(e.map(function(t){return t[1]})),!1)),o=Math.max.apply(Math,tY([],tU(e.map(function(t){return t[1]})),!1));return{width:r-n,height:o-i}}return{width:0,height:0}},t}(),cj=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!aj(n)&&(!o&&(o=n.width,t.width=o),!a&&(a=n.height,t.height=a)),{width:o,height:a}},t}(),cA=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!aP(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],m=0;"center"===o||"middle"===o?(m=a/2,v=[.5,1]):("right"===o||"end"===o)&&(m=a,v=[1,1]);var b=0;return"middle"===l?b=g[1]:"top"===l||"hanging"===l?b=2*g[1]:"alphabetic"===l?b=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(b=0),s&&(m+=s),u&&(b+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:m,offsetY:b}},t}(),cT=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new l5,this.page=new l5,this.canvas=new l5,this.viewport=new l5,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(l4)},t}(),cC=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.client=new l5,e.movement=new l5,e.offset=new l5,e.global=new l5,e.screen=new l5,e}return tB(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(l4)},e}(cT),cN=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tB(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(cC),cL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(cC),cI=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return tB(e,t),e}(cT),cR=function(){function t(){this.emitter=new ou}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=a1(n)&&n||a2(n)&&n.capture,i=a2(n)&&n.once,o=sp(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=tU(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=sp(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if((null===(t=e[0].target)||void 0===t?void 0:t.name)===l)c.apply(void 0,tY([],tU(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=a1(n)&&n||a2(n)&&n.capture,i=sp(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=sp(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cI(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],!e&&(t.target=this),null===(r=t.manager)||void 0===r||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),cD=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return tB(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===PQ.TEXT&&(n+=this.style.text);try{for(var r=tH(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===PQ.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===PQ.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(l4)},e.prototype.lookupNamespaceURI=function(t){throw Error(l4)},e.prototype.lookupPrefix=function(t){throw Error(l4)},e.prototype.normalize=function(){throw Error(l4)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p)){if(s===o)return e.DOCUMENT_POSITION_PRECEDING;break}if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),!t(this)&&(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(cR),cF=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new ou,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=oS(),this.tmpVec3=of(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=cn.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}cD.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],!a.clicksByButton[t.button]&&(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,!(null===(e=i.detail)||void 0===e?void 0:e.preventClick)&&(!n.context.config.useNativeClickEvent&&("mouse"===c.pointerType||"touch"===c.pointerType)&&n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),cD.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&cD.isNode(o)&&o.parentNode;f&&f!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;){;f=f.parentNode}if(!f||f===(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),cD.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),cD.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),cD.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),cD.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=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)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new l5(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new l5(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=oR(this.tmpMatrix,s,l),c=og(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return oE(c,c,u),new l5(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=oR(this.tmpMatrix,n,r),o=og(this.tmpVec3,t.x,t.y,0);oE(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new l5((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){!this.mappingTable[t]&&(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(!!this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){if(n){t.eventPhase=t.AT_TARGET;var r=this.rootTarget.defaultView||null;t.currentTarget=r,this.notifyListeners(t,e)}else t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e);this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(!!t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)cD.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=tH(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(cN);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(cL);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return!this.mappingState.trackingData[t]&&(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(cL);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(cN);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=cn.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){!this.eventPool.has(t)&&this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;!this.eventPool.has(e)&&this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r){if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)}},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||cD.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=cD.isNode(e)&&e.parentNode}},t}(),cz=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||c5.offscreenCanvas)this.canvas=t||c5.offscreenCanvas,this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context?this.context:(this.getOrCreateCanvas(t,e),this.context)},t}();(PB=ji||(ji={}))[PB.CAMERA_CHANGED=0]="CAMERA_CHANGED",PB[PB.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",PB[PB.NONE=2]="NONE";var cB=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new cv,initAsync:new cy,dirtycheck:new cm,cull:new cm,beginFrame:new cv,beforeRender:new cv,render:new cv,afterRender:new cv,endFrame:new cv,destroy:new cv,pick:new cg,pickSync:new cm,pointerDown:new cv,pointerUp:new cv,pointerMove:new cv,pointerOut:new cv,pointerOver:new cv,pointerWheel:new cv,pointerCancel:new cv,click:new cv}}return t.prototype.init=function(t){var e=this,n=tW(tW({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(ji.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(ji.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==jn.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>u9(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(u9)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(ji.DISPLAY_OBJECT_CHANGED)},t}(),cW=/\[\s*(.*)=(.*)\s*\]/,c$=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null}},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]}},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;else{var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(cW),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return aP(n)?"":n.toString?n.toString():""},t}(),cG=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return tB(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(cT);function cV(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(PW=jo||(jo={})).REPARENT="reparent",PW.DESTROY="destroy",PW.ATTR_MODIFIED="DOMAttrModified",PW.INSERTED="DOMNodeInserted",PW.REMOVED="removed",PW.MOUNTED="DOMNodeInsertedIntoDocument",PW.UNMOUNTED="DOMNodeRemovedFromDocument",PW.BOUNDS_CHANGED="bounds-changed",PW.CULLED="culled";var cH=new cG(jo.REPARENT,null,"","","",0,"",""),cU=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new cI(jo.BOUNDS_CHANGED),this.rotate=(e=ag(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=od(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=ag();ax(a,n[0],n[1],n[2]);var l=h.getRotation(t);aw(e,h.getRotation(t.parentNode)),ab(e,e),am(a,e,a),am(o.localRotation,a,l),aE(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=ag(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=od(e,r,i));var o=t.transformable;ax(n,e[0],e[1],e[2]),am(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=ag(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=od(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){ax(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);aw(r,ab(ag(),a)),am(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=od(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,m,b,x,O,w=t.transformable;if(!ok(e,of()))i=e,o=e,l=(a=w.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,m=s*v-u*g,b=u*y-l*v,x=l*g-s*y,y*=O=2*c,g*=O,v*=O,m*=2,b*=2,x*=2,i[0]=f+y+m,i[1]=p+g+b,i[2]=d+v+x,ov(w.localPosition,w.localPosition,e),h.dirtifyLocal(t,w)},this.setPosition=(i=oS(),o=of(),function(t,e){var n=t.transformable;if(o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,!ok(h.getPosition(t),o))oy(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(oP(i,t.parentNode.transformable.worldTransform),oN(i,i),oE(n.localPosition,o,i)):oy(n.localPosition,o),h.dirtifyLocal(t,n)}),this.setLocalPosition=(a=of(),function(t,e){var n=t.transformable;if(a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,!ok(n.localPosition,a))oy(n.localPosition,a),h.dirtifyLocal(t,n)}),this.translate=(l=of(),s=of(),u=of(),function(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=og(s,e,n,r)),!ok(e,l))ov(u,h.getPosition(t),e),h.setPosition(t,u)}),this.setRotation=function(){var t=ag();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=aO(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(aw(t,h.getRotation(e.parentNode)),ab(t,t),am(a.localRotation,t,n),aE(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=oS(),f=of(),p=aO(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(o1(t.localTransform,t.localRotation,t.localPosition,od(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=oT(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),oR(t.localTransform,t.localTransform,e)}var n=o1(c,p,f,t.localScale,t.origin);oR(t.localTransform,t.localTransform,n)}else o1(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,aP(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null===(r=null==a?void 0:a.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=jn.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cH)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null===(e=null==i?void 0:i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=jn.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=od(e,n,r));var i=t.transformable;ax(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=od(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=od(e[0],e[1],e[2]||n.localScale[2]);if(!ok(r,n.localScale))oy(n.localScale,r),this.dirtifyLocal(t,n)},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=aO(e,n,r,i));var o=t.transformable;aw(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){if("number"==typeof e){;r=e,i=n,(o=new oc(2))[0]=r,o[1]=i,e=o}var r,i,o,a,l,s=t.transformable;a=s.localSkew,l=e,a[0]=l[0],a[1]=l[1],this.dirtifyLocal(t,s)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,!e.dirtyFlag&&this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){!e.dirtyFlag&&this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=tU(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)cV(n),n=n.parentNode;e&&t.forEach(function(t){cV(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);!a&&(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),!a[t]&&(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new cG(jo.ATTR_MODIFIED,n,e,e,t,cG.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oZ(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oJ(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return oQ(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return(void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag)?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=oZ(of(),e),r=oJ(ag(),e),i=oQ(of(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(l0.isEmpty(r))return null;var i=n||new l0;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new l0},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new l0).update(r.center,r.halfExtents))}),e){var a=u7(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return!o&&(o=new l0),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=oS();t.parentNode.transformable&&(e=oN(oS(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!l0.isEmpty(n)){var r=new l0;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);!l0.isEmpty(i)&&(r=new l0).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=tU(r.getMin(),2),l=a[0],s=a[1],u=tU(r.getMax(),2),c=u[0],f=u[1];return new l3(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new l3((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;!e.dirtyFlag&&n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?oR(e.worldTransform,r.worldTransform,e.localTransform):oP(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),cq="|\xc9q\xc5",cY="M",cX=1.4,cK=2,cZ=[10,13],cQ=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],cJ=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,c0=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),c1=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),c2=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&(!!(t&&(c1.exec(n)||c0.exec(t)))||!1)},this.trimByKinsokuShorui=function(t){var e=tY([],tU(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=cq+cY,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(cY).width),s=cK*l;l=l*cX|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=aS(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!cx.test(u)&&0>cb.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),m=0;if(c){c.getTotalLength();for(var b=0;b<g.length;b++)var x=y.measureText(g[b]).width+(g[b].length-1)*u}else{for(var b=0;b<g.length;b++){var O=y.measureText(g[b]).width+(g[b].length-1)*u;v[b]=O,m=Math.max(m,O)}var x=m+a,w=o||d.fontSize+a,E=Math.max(w,d.fontSize+a)+(g.length-1)*(w+p);w+=p;var k=0;return"middle"===l?k=-E/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?k=-E:("top"===l||"hanging"===l)&&(k=0),{font:h,width:x,height:E,lines:g,lineWidths:v,lineHeight:w,maxLineWidth:m,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new l3(n-a/2,k+e*w,t+a,w)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),b=0;b<m.length;b++){var x=m[b],O=t[b-1],w=t[b+1],E=g(x);if(this.isNewline(x)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+E>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var k=p[h].length,M=0,S=k,_=0;_<k;_++){var P=g(p[h][_]);if(M+P+v>c){S=_;break}M+=P}p[h]=(p[h]||"").slice(0,S)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(x))continue;!this.canBreakInLastChar(x)&&(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(x,w)&&(p=this.trimByKinsokuShorui(p),d+=g(O||""))}d+=E,p[h]=(p[h]||"")+x}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&cQ.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&cZ.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=tY([],tU(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i),a=r+1,l=r+(o?0:1);return e[e.length-1]+=n.slice(a,n.length),e[e.length-2]=n.slice(0,l),e},t.prototype.canBreakInLastChar=function(t){return!(t&&cJ.test(t))&&!0},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!cJ.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),c5={};var c3=(PG=new cj,PV=new cP,(P$={})[PQ.CIRCLE]=new ck,P$[PQ.ELLIPSE]=new cM,P$[PQ.RECT]=PG,P$[PQ.IMAGE]=PG,P$[PQ.GROUP]=PG,P$[PQ.LINE]=new cS,P$[PQ.TEXT]=new cA(c5),P$[PQ.POLYLINE]=PV,P$[PQ.POLYGON]=PV,P$[PQ.PATH]=new c_,P$[PQ.HTML]=null,P$[PQ.MESH]=null,P$);var c4=(PU=new uW,Pq=new uV,(PH={})[jr.PERCENTAGE]=null,PH[jr.NUMBER]=new uZ,PH[jr.ANGLE]=new uz,PH[jr.DEFINED_PATH]=new uB,PH[jr.PAINT]=PU,PH[jr.COLOR]=PU,PH[jr.FILTER]=new u$,PH[jr.LENGTH]=Pq,PH[jr.LENGTH_PERCENTAGE]=Pq,PH[jr.LENGTH_PERCENTAGE_12]=new uH,PH[jr.LENGTH_PERCENTAGE_14]=new uU,PH[jr.COORDINATE]=new uX,PH[jr.OFFSET_DISTANCE]=new uQ,PH[jr.OPACITY_VALUE]=new uJ,PH[jr.PATH]=new u0,PH[jr.LIST_OF_POINTS]=new u1,PH[jr.SHADOW_BLUR]=new u2,PH[jr.TEXT]=new u5,PH[jr.TEXT_TRANSFORM]=new u3,PH[jr.TRANSFORM]=new cO,PH[jr.TRANSFORM_ORIGIN]=new cw,PH[jr.Z_INDEX]=new cE,PH[jr.MARKER]=new uK,PH);c5.CameraContribution=l9,c5.AnimationTimeline=null,c5.EasingFunction=null,c5.offscreenCanvasCreator=new cz,c5.sceneGraphSelector=new c$,c5.sceneGraphService=new cU(c5),c5.textService=new c2(c5),c5.geometryUpdaterFactory=c3,c5.CSSPropertySyntaxFactory=c4,c5.styleValueRegistry=new uF(c5),c5.layoutRegistry=null,c5.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},c5.enableCSSParsing=!0,c5.enableDataset=!1,c5.enableStyleSyntax=!0,c5.enableSizeAttenuation=!1;var c6=0,c8=new cG(jo.INSERTED,null,"","","",0,"",""),c9=new cG(jo.REMOVED,null,"","","",0,"",""),c7=new cI(jo.DESTROY),ft=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.entity=c6++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:je.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.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]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=c5.enableCSSParsing?{anchor:sO,opacity:sO,fillOpacity:sO,strokeOpacity:sO,fill:sO,stroke:sO,transform:sO,transformOrigin:sO,visibility:sO,pointerEvents:sO,lineWidth:sO,lineCap:sO,lineJoin:sO,increasedLineWidthForHitTesting:sO,fontSize:sO,fontFamily:sO,fontStyle:sO,fontWeight:sO,fontVariant:sO,textAlign:sO,textBaseline:sO,textTransform:sO,zIndex:sO,filter:sO,shadowType:sO}:null,e.parsedStyle={},e.attributes={},e}return tB(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(l4)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return c5.sceneGraphService.attach(t,this,e),(null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),c8.relatedNode=this,t.dispatchEvent(c8),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return c9.relatedNode=this,t.dispatchEvent(c9),(null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),c5.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return c5.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return c5.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return c5.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return c5.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return c5.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return c5.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return c5.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(c5.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=tU(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,tY([],tU(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,tY([],tU(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,tY([],tU(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(c7),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return c5.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return c5.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return c5.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return c5.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return c5.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return c5.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=sd(t);return e=this.attributes[n],c5.enableCSSParsing&&aP(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(l4)},e.prototype.getAttributeNode=function(t){throw Error(l4)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(l4)},e.prototype.hasAttributeNS=function(t,e){throw Error(l4)},e.prototype.removeAttributeNS=function(t,e){throw Error(l4)},e.prototype.removeAttributeNode=function(t){throw Error(l4)},e.prototype.setAttributeNS=function(t,e,n){throw Error(l4)},e.prototype.setAttributeNode=function(t){throw Error(l4)},e.prototype.setAttributeNodeNS=function(t){throw Error(l4)},e.prototype.toggleAttribute=function(t,e){throw Error(l4)},e}(cD);function fe(t){return!!(null==t?void 0:t.nodeName)}var fn=new cG(jo.ATTR_MODIFIED,null,null,null,null,cG.MODIFICATION,null,null),fr={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},fi={anchor:[0,0],fill:sk,stroke:sk,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},fo=tW(tW({},fi),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),fa=tY(tY([],tU(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),fl="data-",fs=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!==(n=r.config.capture)&&void 0!==n?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||PQ.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,c5.enableCSSParsing?fi:fo,r.config.initialParsedStyle),c5.enableCSSParsing&&Object.assign(r.attributes,fr),r.initAttributes(r.config.style);var i=c5.globalThis.Proxy?c5.globalThis.Proxy:function(){};return c5.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(fl).concat(sf(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(fl).concat(sf(e)),n),!0}})),c5.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return tB(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=tW({},this.attributes);for(var r in n){var i=n[r];fe(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};c5.enableCSSParsing&&(n.usedAttributes=fa);var r={};for(var i in t)r[sd(i)]=t[i];c5.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=sd(e);if(!a5(n))(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];c5.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(fn.relatedNode=this,fn.prevValue=o,fn.newValue=e,fn.attrName=t,fn.prevParsedValue=a,fn.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(fn):(fn.target=this,this.ownerDocument.defaultView.dispatchEvent(fn,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=tU(t.getMin(),2),n=e[0],r=e[1],i=tU(t.getMax(),2);return new l3(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setOrigin(this,lG(t,e,n)),this},e.prototype.getOrigin=function(){return c5.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setPosition(this,lG(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setLocalPosition(this,lG(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.translate(this,lG(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.translateLocal(this,lG(t,e,n)),this},e.prototype.getPosition=function(){return c5.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return c5.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lG(t,e,n)),c5.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lG(t,e,n)),c5.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return c5.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return c5.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return lH(tU(lU(of(),c5.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return lH(tU(lU(of(),c5.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return c5.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return c5.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return aP(e)&&aP(n)?c5.sceneGraphService.rotateLocal(this,0,0,t):c5.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return aP(e)&&aP(n)?c5.sceneGraphService.rotate(this,0,0,t):c5.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return c5.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return c5.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return c5.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return c5.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return c5.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return c5.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return c5.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return c5.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return c5.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){c5.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,tY([],tU(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,tY([],tU(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=tU(e,2),i=r[0],o=r[1];return i?a2(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=t||this.getWorldTransform(),m=tU(oZ(of(),v),2),b=m[0],x=m[1],O=tU(oQ(of(),v),2),w=O[0],E=O[1],k=oJ(ag(),v),M=tU(lU(of(),k),3),S=M[0],_=M[2];return e=S||_,n=b,r=x,i=w,o=E,a=Math.cos(e),l=Math.sin(e),s=i*a,u=o*l,c=0,f=-i*l,p=o*a,h=0,d=n,y=r,(g=new oc(9))[0]=s,g[1]=u,g[2]=0,g[3]=f,g[4]=p,g[5]=0,g[6]=d,g[7]=y,g[8]=1,g},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=tU(lq(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=tU(lq(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){c5.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){c5.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(ft),fu=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;c5.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},fc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.CIRCLE,style:c5.enableCSSParsing?tW({cx:"",cy:"",r:""},n):tW({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:c5.enableCSSParsing?null:[sP,sP]}},r))||this}return tB(e,t),e}(fs),ff=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,tW({style:c5.enableCSSParsing?tW({x:"",y:""},r):tW({},r)},i))||this).isCustomElement=!0,n}return tB(e,t),e}(fs),fp=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.ELLIPSE,style:c5.enableCSSParsing?tW({cx:"",cy:"",rx:"",ry:""},n):tW({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:c5.enableCSSParsing?null:[sP,sP]}},r))||this}return tB(e,t),e}(fs),fh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.GROUP,style:c5.enableCSSParsing?tW({x:"",y:"",width:"",height:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fd=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,tW({type:PQ.HTML,style:c5.enableCSSParsing?tW({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tW({},r)},i))||this).cullable.enable=!1,n}return tB(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new l3(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect(),i=new l0,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=oN(oS(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!l0.isEmpty(e)){var n=new l0;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(fs),fy=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.IMAGE,style:c5.enableCSSParsing?tW({x:"",y:"",img:"",width:"",height:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fg=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.LINE,style:tW({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,m=t?s:u;if(!!m&&!!fe(m)){var b=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),b=Math.atan2(n,e),m.setLocalEulerAngles(180*b/Math.PI+a),m.setLocalPosition(r+Math.cos(b)*o,i+Math.sin(b)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=l_(r,i,o,a,t),c=u.x,f=u.y,p=oE(of(),od(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return lE(t.x1,t.y1,t.x2,t.y2)},e}(fs),fv=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.PATH,style:c5.enableCSSParsing?tW({path:"",miterLimit:""},r):tW({},r),initialParsedStyle:c5.enableCSSParsing?null:{miterLimit:4,path:tW({},sj)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&fe(s)&&n.placeMarkerMid(s),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(!!d&&!!fe(d)){var y=0;if(t){var g=tU(this.getStartTangent(),2),v=g[0],m=g[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=c||0,a=this.markerStartAngle}else{var b=tU(this.getEndTangent(),2),v=b[0],m=b[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&fe(t))for(var o=1;o<n.length-1;o++){var a=tU(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return s9(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n,r=this.parsedStyle,i=r.defX,o=r.defY;var a=aH(r.path.absolutePath,t,tW(tW({},void 0),{bbox:!1,length:!0})).point,l=a.x,s=a.y,u=oE(of(),od(l-i,s-o,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(u[0],u[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*s9(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(fs),fm=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.POLYGON,style:c5.enableCSSParsing?tW({points:"",miterLimit:"",isClosed:!0},r):tW({},r),initialParsedStyle:c5.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&fe(s)&&n.placeMarkerMid(s),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(!!g&&!!fe(g)&&!!y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var m=y.length;this.parsedStyle.isClosed?(e=y[m-1][0]-y[0][0],n=y[m-1][1]-y[0][1]):(r=y[m-1][0]-h,i=y[m-1][1]-d,e=y[m-2][0]-y[m-1][0],n=y[m-2][1]-y[m-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&fe(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(fs),fb=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.POLYLINE,style:c5.enableCSSParsing?tW({points:"",miterLimit:"",isClosed:!1},n):tW({},n),initialParsedStyle:c5.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tB(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=l_(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=oE(of(),od(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(fm),fx=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.RECT,style:c5.enableCSSParsing?tW({x:"",y:"",width:"",height:"",radius:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fO=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.TEXT,style:c5.enableCSSParsing?tW({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):tW({fill:"black"},n),initialParsedStyle:c5.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return tB(e,t),e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(fs),fw=function(){function t(){this.registry={},this.define(PQ.CIRCLE,fc),this.define(PQ.ELLIPSE,fp),this.define(PQ.RECT,fx),this.define(PQ.IMAGE,fy),this.define(PQ.LINE,fg),this.define(PQ.GROUP,fh),this.define(PQ.PATH,fv),this.define(PQ.POLYGON,fm),this.define(PQ.POLYLINE,fb),this.define(PQ.TEXT,fO),this.define(PQ.HTML,fd)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),fE=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new c5.AnimationTimeline(e)}catch(t){}var n={};return uN.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=sp(i)?i(PQ.GROUP):i)}),e.documentElement=new fh({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tB(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);!n&&(console.warn("Unsupported tagName: ",t),n="tspan"===t?fO:fh);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(l4)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return tG(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tV(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return tG(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tV(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(l6)},e.prototype.insertBefore=function(t,e){throw Error(l6)},e.prototype.removeChild=function(t,e){throw Error(l6)},e.prototype.replaceChild=function(t,e,n){throw Error(l6)},e.prototype.append=function(){throw Error(l6)},e.prototype.prepend=function(){throw Error(l6)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(cD),fk=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new cI(jo.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),fM=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new cN(null),this.rootWheelEvent=new cL(null),this.onPointerMove=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||aP(r)||aP(i)){var l=this.context.eventService.client2Viewport(new l5(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=ce[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=cn.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];a5(i.button)&&(i.button=0),a5(i.buttons)&&(i.buttons=1),a5(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),a5(i.width)&&(i.width=i.radiusX||1),a5(i.height)&&(i.height=i.radiusY||1),a5(i.tiltX)&&(i.tiltX=0),a5(i.tiltY)&&(i.tiltY=0),a5(i.pointerType)&&(i.pointerType="touch"),a5(i.pointerId)&&(i.pointerId=i.identifier||0),a5(i.pressure)&&(i.pressure=i.force||.5),a5(i.twist)&&(i.twist=0),a5(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(a5(t.isPrimary)&&(t.isPrimary=!0),a5(t.width)&&(t.width=1),a5(t.height)&&(t.height=1),a5(t.tiltX)&&(t.tiltX=0),a5(t.tiltY)&&(t.tiltY=0),a5(t.pointerType)&&(t.pointerType="mouse"),a5(t.pointerId)&&(t.pointerId=1),a5(t.pressure)&&(t.pressure=.5),a5(t.twist)&&(t.twist=0),a5(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),fS=[PQ.CIRCLE,PQ.ELLIPSE,PQ.IMAGE,PQ.RECT,PQ.LINE,PQ.POLYLINE,PQ.POLYGON,PQ.TEXT,PQ.PATH,PQ.HTML],f_=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(l0.isEmpty(o))return!1;var a=t.getFrustum(),l=null===(r=null===(n=e.parentNode)||void 0===n?void 0:n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||P0.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==P0.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===P0.OUTSIDE||n===P0.INSIDE)return n;for(var i=P0.INSIDE,o=fS.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(oO(c,e.getPositiveFarPoint(r[a]))+f<0)return P0.OUTSIDE;oO(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),fP=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;c5.enableSizeAttenuation&&c5.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),c5.enableCSSParsing&&c5.styleValueRegistry.recalc(e),c5.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),c5.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(jo.MOUNTED,u),a.addEventListener(jo.UNMOUNTED,c),a.addEventListener(jo.ATTR_MODIFIED,l),a.addEventListener(jo.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(jo.MOUNTED,u),a.removeEventListener(jo.UNMOUNTED,c),a.removeEventListener(jo.ATTR_MODIFIED,l),a.removeEventListener(jo.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=tU(i.getMin(),2),a=o[0],l=o[1],s=tU(i.getMax(),2),u=s[0],c=s[1];!r.aabb&&(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}r.aabb&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.minX)&&!isNaN(r.aabb.minY)&&e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(PY=ja||(ja={})).READY="ready",PY.BEFORE_RENDER="beforerender",PY.RERENDER="rerender",PY.AFTER_RENDER="afterrender",PY.BEFORE_DESTROY="beforedestroy",PY.AFTER_DESTROY="afterdestroy",PY.RESIZE="resize",PY.DIRTY_RECTANGLE="dirtyrectangle",PY.RENDERER_CHANGED="rendererchanged";var fj=new cI(jo.MOUNTED),fA=new cI(jo.UNMOUNTED),fT=new cI(ja.BEFORE_RENDER),fC=new cI(ja.RERENDER),fN=new cI(ja.AFTER_RENDER),fL=function(t){function e(e){var n,r,i,o,a=t.call(this)||this;a.Element=fs,a.inited=!1,a.context={},a.document=new fE,a.document.defaultView=a,a.customElements=new fw;var l=e.container,s=e.canvas,u=e.offscreenCanvas,c=e.width,f=e.height,p=e.devicePixelRatio,h=e.renderer,d=e.background,y=e.cursor,g=e.document,v=e.requestAnimationFrame,m=e.cancelAnimationFrame,b=e.createImage,x=e.supportsPointerEvents,O=e.supportsTouchEvents,w=e.supportsCSSTransform,E=e.supportsMutipleCanvasesInOneContainer,k=e.useNativeClickEvent,M=e.alwaysTriggerPointerEventOnCanvas,S=e.isTouchEvent,_=e.isMouseEvent;!E&&!function(t,e){if(t){var n="string"==typeof t?t:t.id||u6++;u4[n]&&u4[n].destroy(),u4[n]=e}}(l,a);var P=c,j=f,A=p;if(s){;A=(A=p||u8&&window.devicePixelRatio||1)>=1?Math.ceil(A):1,P=c||("auto"===(r=ct(n=s,"width"))?n.offsetWidth:parseFloat(r))||s.width/A,j=f||("auto"===(o=ct(i=s,"height"))?i.offsetHeight:parseFloat(o))||s.height/A}return u&&(c5.offscreenCanvas=u),a.devicePixelRatio=A,a.requestAnimationFrame=null!=v?v:ch.bind(c5.globalThis),a.cancelAnimationFrame=null!=m?m:cd.bind(c5.globalThis),a.supportsTouchEvents=null!=O?O:"ontouchstart"in c5.globalThis,a.supportsPointerEvents=null!=x?x:!!c5.globalThis.PointerEvent,a.isTouchEvent=null!=S?S:function(t){return a.supportsTouchEvents&&t instanceof c5.globalThis.TouchEvent},a.isMouseEvent=null!=_?_:function(t){return!c5.globalThis.MouseEvent||t instanceof c5.globalThis.MouseEvent&&(!a.supportsPointerEvents||!(t instanceof c5.globalThis.PointerEvent))},a.initRenderingContext({container:l,canvas:s,width:P,height:j,renderer:h,offscreenCanvas:u,devicePixelRatio:A,cursor:y||"default",background:d||"transparent",createImage:b,document:g,supportsCSSTransform:w,useNativeClickEvent:k,alwaysTriggerPointerEventOnCanvas:M}),a.initDefaultCamera(P,j,h.clipSpaceNearZ),a.initRenderer(h,!0),a}return tB(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new c5.CameraContribution;i.clipSpaceNearZ=n,i.setType(P1.EXPLORING,P2.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(l8.UPDATED,function(){r.context.renderingContext.renderReasons.add(ji.CAMERA_CHANGED),c5.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){c5.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),!e&&this.dispatchEvent(new cI(ja.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),!e&&this.dispatchEvent(new cI(ja.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===P5.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cI(ja.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(fT),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(fC)}),this.dispatchEvent(fN)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new lI,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new fM,new fP,new fk([new f_])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tW(tW({},c5),this.context)),this.context.renderingService=new cB(c5,this.context),this.context.eventService=new cF(c5,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new cI(ja.READY))}):r.dispatchEvent(new cI(ja.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cI(ja.RENDERER_CHANGED)),!e&&r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(c5)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),tY([],tU(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(c5)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(fA):(fA.target=t,this.dispatchEvent(fA,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?!t.isConnected&&(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(fj):(fj.target=t,this.dispatchEvent(fj,!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: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(cR),fI={}.toString,fR=function(t,e){return fI.call(t)==="[object "+e+"]"},fD=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.landmarks=[],e}return tB(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=l$(e),this.relAzimuth=l$(t),this.relRoll=l$(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===P1.EXPLORING){var r=av(ag(),[1,0,0],lV((this.rotateWorld?1:-1)*this.relElevation)),i=av(ag(),[0,1,0],lV((this.rotateWorld?1:-1)*this.relAzimuth)),o=av(ag(),[0,0,1],lV(this.relRoll)),a=am(ag(),i,r);a=am(ag(),a,o);var l=o2(oS(),a);oD(this.matrix,this.matrix,[0,0,-this.distance]),oR(this.matrix,this.matrix,l),oD(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lG(t,e,0),r=op(this.position);return ov(r,r,ob(of(),this.right,n[0])),ov(r,r,ob(of(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=op(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getDistance():this.type===P1.TRACKING&&ov(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new c5.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!==(n=l[1])&&void 0!==n?n:this.position[1],null!==(r=l[2])&&void 0!==r?r:this.position[2]),p.setFocalPoint(u[0],null!==(i=u[1])&&void 0!==i?i:this.focalPoint[1],null!==(o=u[2])&&void 0!==o?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:o_(p.getWorldTransform()),right:op(p.right),up:op(p.up),forward:op(p.forward),position:op(p.getPosition()),focalPoint:op(p.getFocalPoint()),distanceVector:op(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=fR(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=fR(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,m=(void 0===u?void 0:u)||c5.EasingFunction(void 0===a?"linear":a),b=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},x=function(t){void 0===i&&(i=t);var e=t-i;if(e>s){b();return}var r=m(e/s),o=of(),a=of(),l=1,u=0;if(ow(o,n.focalPoint,y,r),ow(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),oM(o,y)+oM(a,d)<=.01&&void 0==g&&void 0==v){b();return}n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(x))};this.canvas.requestAnimationFrame(x)}},e.prototype.syncFromLandmark=function(t){this.matrix=oP(this.matrix,t.matrix),this.right=oy(this.right,t.right),this.up=oy(this.up,t.up),this.forward=oy(this.forward,t.forward),this.position=oy(this.position,t.position),this.focalPoint=oy(this.focalPoint,t.focalPoint),this.distanceVector=oy(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(l9);c5.CameraContribution=fD;var fF=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),fz=0,fB=new WeakMap,fW=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){var n;if(t===e)return t;return js&&((n=t)===js||n===jl)?js:null}(e[n-1],t);if(r){e[n-1]=r;return}}else(function(t){fH.push(t),!fV&&(fV=!0,void 0!==c5.globalThis?c5.globalThis.setTimeout(fU):fU())})(this.observer);e[n]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(jo.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(jo.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(jo.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(jo.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(jo.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(jo.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fB.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case jo.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=function(t,e){return jl=new fF(t,e)}("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cG.ADDITION?null:t.prevValue;fG(n,function(t){if(t.attributes)return t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(r)&&-1===t.attributeFilter.indexOf(i)?void 0:t.attributeOldValue?function(t){return js?js:((js=fF.copy(jl)).oldValue=t,js)}(o):e});break;case jo.REMOVED:case jo.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===jo.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=function(t,e){return jl=new fF(t,e)}("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fG(n,function(t){if(t.childList)return e})}(function(){jl=js=void 0})()},t}();function f$(t,e){return jl=new fF(t,e)}!function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=fz++}t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=fB.get(t);!r&&fB.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}!n&&(n=new fW(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fB.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t}}();function fG(t,e){for(var n=t;n;n=n.parentNode){var r=fB.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}var fV=!1,fH=[];function fU(){fV=!1;var t=fH;fH=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();!function(t){t.nodes.forEach(function(e){var n=fB.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})})}(t),n.length&&(t.callback(n,t),e=!0)}),e&&fU()}var fq=function(t,e,n){return t<e?e:t>n?n:t},fY={}.toString,fX=function(t){var e;return e=t,"[object Number]"===fY.call(e)},fK=function(t){return null==t},fZ=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return tB(e,t),e}(cT),fQ=0,fJ=function(){function t(t,e){var n;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=e,this.id="".concat(fQ++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),!this.pending&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return!this.finishedPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;if(!isNaN(t=Number(t))){if(this.timeline.restart(),!this._paused&&null!==this._startTime&&(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime===t)return;this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),!isNaN(t=Number(t)))!this._paused&&!this._idle&&(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=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),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=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())},t.prototype.cancel=function(){var t=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 e=new fZ(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):!this._isFinished&&this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(l4)},t.prototype.addEventListener=function(t,e,n){throw Error(l4)},t.prototype.removeEventListener=function(t,e,n){throw Error(l4)},t.prototype.dispatchEvent=function(t){throw Error(l4)},t.prototype.commitStyles=function(){throw Error(l4)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new fZ(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new fZ(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),f0=.1,f1="function"==typeof Float32Array,f2=function(t,e){return 1-3*e+3*t},f5=function(t,e){return 3*e-6*t},f3=function(t){return 3*t},f4=function(t,e,n){return((f2(e,n)*t+f5(e,n))*t+f3(e))*t},f6=function(t,e,n){return 3*f2(e,n)*t*t+2*f5(e,n)*t+f3(e)},f8=function(t,e,n,r,i){var o,a,l=0;do(o=f4(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},f9=function(t,e,n,r){for(var i=0;i<4;++i){var o=f6(e,n,r);if(0===o)break;var a=f4(e,n,r)-t;e-=a/o}return e},f7=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=f1?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=f4(o*f0,t,n);var a=function(e){for(var r=0,o=1,a=10;o!==a&&i[o]<=e;++o)r+=f0;var l=r+(e-i[--o])/(i[o+1]-i[o])*f0,s=f6(l,t,n);return s>=.001?f9(e,l,t,n):0===s?l:f8(e,r,r+f0,t,n)};return function(t){return 0===t||1===t?t:f4(a(t),e,r)}},pt=function(t){return Math.pow(t,2)},pe=function(t){return Math.pow(t,3)},pn=function(t){return Math.pow(t,4)},pr=function(t){return Math.pow(t,5)},pi=function(t){return Math.pow(t,6)},po=function(t){return 1-Math.cos(t*Math.PI/2)},pa=function(t){return 1-Math.sqrt(1-t*t)},pl=function(t){return t*t*(3*t-2)},ps=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},pu=function(t,e){void 0===e&&(e=[]);var n=tU(e,2),r=n[0],i=n[1],o=fq(Number(void 0===r?1:r),1,10),a=fq(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},pc=function(t,e,n){void 0===e&&(e=[]);var r=tU(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=fq(o,.1,1e3),l=fq(l,.1,1e3),u=fq(u,.1,1e3),f=fq(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},pf=function(t,e){void 0===e&&(e=[]);var n=tU(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fq(t,0,1)*i)/i},pp=function(t,e){void 0===e&&(e=[]);var n=tU(e,4);return f7(n[0],n[1],n[2],n[3])(t)},ph=f7(.42,0,1,1),pd=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},py=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},pg=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},pv={steps:pf,"step-start":function(t){return pf(t,[1,"start"])},"step-end":function(t){return pf(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":pp,ease:function(t){return pp(t,[.25,.1,.25,1])},in:ph,out:pd(ph),"in-out":py(ph),"out-in":pg(ph),"in-quad":pt,"out-quad":pd(pt),"in-out-quad":py(pt),"out-in-quad":pg(pt),"in-cubic":pe,"out-cubic":pd(pe),"in-out-cubic":py(pe),"out-in-cubic":pg(pe),"in-quart":pn,"out-quart":pd(pn),"in-out-quart":py(pn),"out-in-quart":pg(pn),"in-quint":pr,"out-quint":pd(pr),"in-out-quint":py(pr),"out-in-quint":pg(pr),"in-expo":pi,"out-expo":pd(pi),"in-out-expo":py(pi),"out-in-expo":pg(pi),"in-sine":po,"out-sine":pd(po),"in-out-sine":py(po),"out-in-sine":pg(po),"in-circ":pa,"out-circ":pd(pa),"in-out-circ":py(pa),"out-in-circ":pg(pa),"in-back":pl,"out-back":pd(pl),"in-out-back":py(pl),"out-in-back":pg(pl),"in-bounce":ps,"out-bounce":pd(ps),"in-out-bounce":py(ps),"out-in-bounce":pg(ps),"in-elastic":pu,"out-elastic":pd(pu),"in-out-elastic":py(pu),"out-in-elastic":pg(pu),spring:pc,"spring-in":pc,"spring-out":pd(pc),"spring-in-out":py(pc),"spring-out-in":pg(pc)},pm=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},pb=function(t){return t};function px(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var pO="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",pw=RegExp("cubic-bezier\\("+pO+","+pO+","+pO+","+pO+"\\)"),pE=/steps\(\s*(\d+)\s*\)/,pk=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function pM(t){var e=pw.exec(t);if(e)return f7.apply(void 0,tY([],tU(e.slice(1).map(Number)),!1));var n=pE.exec(t);if(n)return px(Number(n[1]),0);var r=pk.exec(t);if(r)return px(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]);return pv[pm(t)]||pv.linear}function pS(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var p_=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!c5.enableCSSParsing&&fX(i)?i:n(i)}},pP=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=pb,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=pM(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function pj(t,e){if(null===t)return[];!Array.isArray(t)&&(t=function(t){var e=[];for(var n in t){if(!(n in["easing","offset","composite"])){var r=t[n];!Array.isArray(r)&&(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(fK(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),!r&&!function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!fK(l)&&!fK(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var pA="backwards|forwards|both|none".split("|"),pT="reverse|alternate|alternate-reverse".split("|"),pC=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=(i=!1,o=r=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}(null!=(r=n)?r:{duration:"auto"}),a=i,l=new pP,a&&(l.fill="both",l.duration="auto"),"number"!=typeof o||isNaN(o)?void 0!==o&&Object.keys(o).forEach(function(t){if(void 0!==o[t]&&null!==o[t]&&"auto"!==o[t]){if(!(("number"==typeof l[t]||"duration"===t)&&("number"!=typeof o[t]||isNaN(o[t])))&&("fill"!==t||-1!==pA.indexOf(o[t]))&&("direction"!==t||-1!==pT.indexOf(o[t])))l[t]=o[t]}}):l.duration=o,l),this.timing.effect=this,this.timing.activeDuration=Math.abs(function(t){var e;return 0===t.duration||0===t.iterations?0:("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(s=this.timing)/(s.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=pj(e,this.timing),this.interpolations=(u=this.normalizedKeyframes,c=this.timing,f=this.target,h=function(t,e){var n=[];for(var r in t){for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=uI[t];if(i&&i.syntax&&i.int){var o=c5.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(c5.enableCSSParsing){var s=c5.styleValueRegistry.parseProperty(t,e,r,!1),u=c5.styleValueRegistry.parseProperty(t,n,r,!1);a=c5.styleValueRegistry.computeProperty(t,s,r,!1),l=c5.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=p_.apply(void 0,tY([],tU(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return p_(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(p=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(pS(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:pM(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(u,c),f),function(t,e){if(null!==e)h.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in p)pS(n)&&t.setAttribute(n,null)});var y=c5.globalThis.Proxy;this.computedTiming=y?new y(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return d.animation&&d.animation.currentTime||null;else if("currentIteration"===e)return d.animation&&"running"===d.animation.playState?t.currentIteration||0:null;else if("progress"===e)return d.animation&&"running"===d.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),x=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,b,n.delay);if(null===x)return null;var O="auto"===n.duration?0:n.duration;var w=(r=O,i=b,o=n.iterations,a=x,l=n.iterationStart,0===r?1!==i&&(l+=o):l+=a/r,l);var E=(s=w,u=n.iterationStart,c=b,f=n.iterations,p=x,h=O,0==(d=s===1/0?u%1:s%1)&&2===c&&0!==f&&(0!==p||0===h)&&(d=1),d);var k=(y=b,g=n.iterations,v=E,m=w,2===y&&g===1/0?1/0:1===v?Math.floor(m)-1:Math.floor(m)),M=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,k,E);return n.currentIteration=k,n.progress=M,n.easingFunction(M)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=pj(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function pN(t,e){return Number(t.id)-Number(e.id)}var pL=function(){function t(t){var e=this;this.document=t,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(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(pN),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new fJ(new pC(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(pN),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return!this.ticking&&(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){!this.timelineTicking&&(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,tY([],tU(a),!1)),(i=this.pendingEffects).push.apply(i,tY([],tU(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();c5.EasingFunction=pM,c5.AnimationTimeline=pL;class pI extends Map{constructor(t,e=pD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(pR(this,t))}has(t){return super.has(pR(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function pR({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function pD(t){return null!==t&&"object"==typeof t?t.valueOf():t}function pF(t){return t}function pz(t,...e){return pG(t,pF,pF,e)}function pB(t,...e){return pG(t,Array.from,pF,e)}function pW(t,e,...n){return pG(t,pF,e,n)}function p$(t,e,...n){return pG(t,Array.from,e,n)}function pG(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new pI,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}function pV(t){return new pH([t],null,t,t.ownerDocument)}class pH{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new pH("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new pH(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new pH([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new pH(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new pH(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pH([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new pH([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=pz(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new pH([],r,this._parent,this._document),new pH(i,null,this._parent,this._document),new pH(o,null,this._parent,this._document),new pH([],a,this._parent,this._document),new pH(l,null,this._parent,this._document)];return new pH(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pH(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pH.registry[t];return e?new e:nH(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new pH([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function pU([t,e],[n,r]){return[t-n,e-r]}function pq([t,e],[n,r]){return[t+n,e+r]}function pY([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pX([t,e]){return Math.atan2(e,t)}function pK([t,e]){return pX([t,e])+Math.PI/2}function pZ(t,e){let n=pX(t),r=pX(e);return n<r?r-n:2*Math.PI-(n-r)}function pQ(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function pJ([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function p0(t,e,n){return Math.max(e,Math.min(t,n))}function p1(t,e=10){return"number"!=typeof t?t:1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}pH.registry={g:fh,rect:fx,circle:fc,path:fv,text:fO,ellipse:fp,image:fy,line:fg,polygon:fm,polyline:fb,html:fd};var p2=function(t){return nR(t,"Number")};function p5(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function p3(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function p4(t){return t.map((t,e)=>e)}function p6(t){return t[t.length-1]}function p8(t,e){let n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function p9(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function p7(t,e,n,r,i){let o=pX(pU(r,e))+Math.PI,a=pX(pU(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function ht(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)return e?180:90;return e?90:0})(r,o),s=p4(a),[u,c]=p5(s,t=>a[t]),f=new ec({domain:[u,c],range:[0,100]}),p=t=>p2(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function he(t){let[e,n,r,i]=t;return[i,e,n,r]}function hn(t,e,n){let[r,i,,o]=ot(t)?he(e):e,[a,l]=n,s=t.getCenter(),u=pK(pU(r,s)),c=pK(pU(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:pY(o,s),outerRadius:pY(r,s)}}function hr(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function hi(t,e){if(!oe(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function ho(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}var ha=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hl(t,e,n,r,i={}){let{inset:o=0,radius:a=0,insetLeft:l=o,insetTop:s=o,insetRight:u=o,insetBottom:c=o,radiusBottomLeft:f=a,radiusBottomRight:p=a,radiusTopLeft:h=a,radiusTopRight:d=a,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,m=ha(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!oe(r)&&!or(r)){let n=!!ot(r),[i,,o]=n?he(e):e,[a,b]=i,[x,O]=pU(o,i),w=Math.abs(x),E=Math.abs(O),k=(x>0?a:a+x)+l,M=(O>0?b:b+O)+s,S=w-(l+u),_=E-(s+c),P=n?p0(S,v,1/0):p0(S,y,g),j=n?p0(_,y,g):p0(_,v,1/0),A=n?k:k-(P-S)/2,T=n?M-(j-_)/2:M-(j-_);return pV(t.createElement("rect",{})).style("x",A).style("y",T).style("width",P).style("height",j).style("radius",[h,d,p,f]).call(p9,m).node()}let{y:b,y1:x}=n,O=r.getCenter(),w=hn(r,e,[b,x]),E=i7().cornerRadius(a).padAngle(o*Math.PI/180);return pV(t.createElement("path",{})).style("path",E(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",a).style("inset",o).call(p9,m).node()}let hs=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=ha(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=ha(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:m=y,radiusBottomLeft:b=y,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:E=x,innerRadiusBottomLeft:k=x,lineWidth:M="stroke"===n||d?h:0,inset:S=0,insetLeft:_=S,insetRight:P=S,insetBottom:j=S,insetTop:A=S,minWidth:T,maxWidth:C,minHeight:N}=a,L=ha(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:I=c,opacity:R}=r,D=[i?g:O,i?v:w,o?m:E,o?b:k],F=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];return ot(l)&&F.push(F.shift()),pV(hl(s,e,r,l,Object.assign(Object.assign({radius:y},Object.fromEntries(F.map((t,e)=>[t,D[e]]))),{inset:S,insetLeft:_,insetRight:P,insetBottom:j,insetTop:A,minWidth:T,maxWidth:C,minHeight:N}))).call(p9,p).style("fill","transparent").style(n,I).style(hr(t),R).style("lineWidth",M).style("stroke",void 0===d?I:d).call(p9,L).node()}};hs.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hu=(t,e)=>hs(Object.assign({colorAttribute:"fill"},t),e);hu.props=Object.assign(Object.assign({},hs.props),{defaultMarker:"square"});let hc=(t,e)=>hs(Object.assign({colorAttribute:"stroke"},t),e);function hf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function hp(t){this._context=t}function hh(t){return new hp(t)}function hd(t){return t[0]}function hy(t){return t[1]}function hg(t,e){var n=iF(!0),r=null,i=hh,o=null,a=i2(l);function l(l){var s,u,c,f=(l=hf(l)).length,p=!1;for(null==r&&(o=i(c=a())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+t(u,s,l),+e(u,s,l));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?hd:iF(t),e="function"==typeof e?e:void 0===e?hy:iF(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:iF(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),l):r},l}function hv(){}function hm(t){this._context=t}function hb(t){return new hm(t)}hc.props=Object.assign(Object.assign({},hs.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,hp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},hm.prototype={areaStart:hv,areaEnd:hv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var hx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hO(t,e,n){let[r,i,o,a]=t;if(ot(n)){let t=[e?e[0][0]:i[0],i[1]];return[r,t,[e?e[3][0]:o[0],o[1]],a]}let l=[i[0],e?e[0][1]:i[1]];return[r,l,[o[0],e?e[3][1]:o[1]],a]}let hw=(t,e)=>{let{adjustPoints:n=hO}=t,r=hx(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=hx(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=ot(i)?he(f):f,{color:g=u,opacity:v}=e,m=hg().curve(hb)([p,h,d,y]);return pV(o.createElement("path",{})).call(p9,c).style("path",m).style("fill",g).style("fillOpacity",v).call(p9,r).node()}};function hE(t,e,n){let[r,i,o,a]=t;if(ot(n)){let t=[e?e[0][0]:(i[0]+o[0])/2,i[1]];return[r,t,[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]}let l=[i[0],e?e[0][1]:(i[1]+o[1])/2];return[r,l,[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}hw.props={defaultMarker:"square"};let hk=(t,e)=>hw(Object.assign({adjustPoints:hE},t),e);function hM(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}hk.props={defaultMarker:"square"};let hS=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(nJ(i))return[t,n];let{title:o}=i;if(void 0!==o)return[t,n];let a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>iN(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];let l=[];for(let e of t)l[e]={value:a.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=hM(t.getMonth()+1),r=hM(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${hM(o)}:${hM(a)}:${hM(l)}`:i}(t[e]):t[e]).join(", ")};return[t,nB({},n,{tooltip:{title:l}})]}};hS.props={};let h_=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(nJ(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,nB({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};h_.props={};var hP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let hj=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=hP(n,["key"]);if(void 0!==r)return[t,e];let o=Object.values(i).map(({value:t})=>t),a=t.map(t=>o.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,nB({},e,{encode:{key:ij(a)}})]};function hA(t={}){let{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{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 hT(t={}){return[...hA(t),{name:"title",scale:"identity"}]}function hC(){return[{type:hS,channel:"color"},{type:h_,channel:["x","y"]}]}function hN(){return[{type:hS,channel:"x"},{type:h_,channel:["y"]}]}hj.props={};function hL(t={}){return hA(t)}function hI(){return[{type:hj}]}function hR(){return[]}function hD(t,e){return t.getBandWidth(t.invert(e))}function hF(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=s?0:.5,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,p=!!(null==a?void 0:a.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),d=!!(null==s?void 0:s.getBandWidth);return p||h?(t,e)=>{let n=p?hD(a,r[e]):0,u=h?hD(l,i[e]):0,y=d&&o?(hD(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function hz(t){return parseFloat(t)/100}function hB(t,e,n,r){let{x:i,y:o}=n,{innerWidth:a,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=o[t],r="string"==typeof e?hz(e)*a:+e;return[[r,"string"==typeof n?hz(n)*l:+n]]});return[t,s]}function hW(t){return"function"==typeof t?t:e=>e[t]}function h$(t,e){return Array.from(t,hW(e))}function hG(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:o,nodes:a}=t,l=h$(o,n),s=h$(o,r),u=h$(o,i);return{links:o.map((t,e)=>({target:s[e],source:l[e],value:u[e]})),nodes:a||Array.from(new Set([...l,...s]),t=>({key:t}))}}function hV(t,e){return t.getBandWidth(t.invert(e))}let hH={rect:hu,hollow:hc,funnel:hw,pyramid:hk},hU=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,series:l,size:s}=n,u=e.x,c=e.series,[f]=r.getSize(),p=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=p[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],d=Array.from(t,t=>{let e=hV(u,i[t]),n=c?hV(c,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,[f,p]=h(+i[t]+s,e*n,t),d=+o[t],y=+a[t];return[[f,d],[p,d],[p,y],[f,y]].map(t=>r.map(t))});return[t,d]};hU.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:hH,channels:[...hT({shapes:Object.keys(hH)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...hI(),{type:iR},{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}};let hq={rect:hu,hollow:hc},hY=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]],s=[+o[t],+l[t]];return[e,n,s,[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};hY.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:hq,channels:[...hT({shapes:Object.keys(hq)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:iR}],postInference:[...hN()],interaction:{shareTooltip:!0}};var hX=hZ(hh);function hK(t){this._curve=t}function hZ(t){function e(e){return new hK(t(e))}return e._curve=t,e}function hQ(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(hZ(t)):e()._curve},t}hK.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};function hJ(t){let e="function"==typeof t?t:t.render;return class extends ff{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var h0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let h1=hJ(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;pV(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(p9,r),pV(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(p9,i)}),h2=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=h0(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f;let{color:p,lineWidth:h}=c,d=h0(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:m,seriesY:b}=e,x=hi(s,e),O=ot(s),w=r&&v?ht(v,m,b,r,i,O):y,E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),w&&{stroke:w}),g&&{lineWidth:g}),x&&{transform:x}),l);if(oe(s)){let t=s.getCenter();f=e=>hQ(hg().curve(hX)).angle((n,r)=>pK(pU(e[r],t))).radius((n,r)=>pY(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=hg().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[k,M]=function(t,e){let n=[],r=[],i=!1,o=null;for(let a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),S=nY(E,"connect"),_=!!M.length;if(!_||a&&!Object.keys(S).length)return pV(u.createElement("path",{})).style("d",f(k)||[]).call(p9,E).node();if(_&&!a)return pV(u.createElement("path",{})).style("d",f(t)).call(p9,E).node();return pV(new h1).style("style1",Object.assign(Object.assign({},E),S)).style("style2",E).style("d1",M.map(f).join(",")).style("d2",f(t)).node()}};h2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let h5=(t,e)=>{let{coordinate:n}=e;return(...r)=>h2(Object.assign({curve:oe(n)?hb:hh},t),e)(...r)};function h3(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function h4(t,e){this._context=t,this._k=(1-e)/6}function h6(t,e){this._context=t,this._k=(1-e)/6}function h8(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function h9(t,e){this._context=t,this._alpha=e}function h7(t,e){this._context=t,this._alpha=e}h5.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"line"}),h4.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:h3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:h3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new h4(t,e)}return n.tension=function(e){return t(+e)},n}(0),h6.prototype={areaStart:hv,areaEnd:hv,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:h3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new h6(t,e)}return n.tension=function(e){return t(+e)},n}(0),h9.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:h8(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return e?new h9(t,e):new h4(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),h7.prototype={areaStart:hv,areaEnd:hv,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:h8(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dt=function t(e){function n(t){return e?new h7(t,e):new h6(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function de(t){return t<0?-1:1}function dn(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),l=(o*i+a*r)/(r+i);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function dr(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function di(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function da(t){this._context=t}function dl(t){this._context=new ds(t)}function ds(t){this._context=t}function du(t){return new da(t)}function dc(t){return new dl(t)}da.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:di(this,this._t0,dr(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,di(this,dr(this,n=dn(this,t,e)),n);break;default:di(this,this._t0,n=dn(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(dl.prototype=Object.create(da.prototype)).point=function(t,e){da.prototype.point.call(this,e,t)},ds.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var df=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dp=(t,e)=>{let n=df(t,[]),{coordinate:r}=e;return(...t)=>h2(Object.assign({curve:oe(r)?dt:ot(r)?dc:du},n),e)(...t)};function dh(t,e){this._context=t,this._t=e}function dd(t){return new dh(t,.5)}function dy(t){return new dh(t,0)}function dg(t){return new dh(t,1)}dp.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"smooth"}),dh.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let dv=(t,e)=>h2(Object.assign({curve:dg},t),e);dv.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"hv"});let dm=(t,e)=>h2(Object.assign({curve:dy},t),e);dm.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"vh"});let db=(t,e)=>h2(Object.assign({curve:dd},t),e);db.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"hvh"});var dx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dO=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=dx(i,["color"]),u=i1();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(nq)&&!function(t,e,n,r,i){let o=pX(pU(n,e)),a=o+Math.PI/2,l=[r/2*Math.cos(a),r/2*Math.sin(a)],s=[i/2*Math.cos(a),i/2*Math.sin(a)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],c=[r/2*Math.cos(o),r/2*Math.sin(o)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),p=function([t,e],[n,r]){return[t+n,e+r]}(n,s),h=function([t,e],[n,r]){return[t+n,e+r]}(p,u),d=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=pU(d,s),g=pU(n,s),v=pU(e,l),m=pU(v,c),b=pU(e,c),x=pU(f,c);t.moveTo(...f),t.lineTo(...p),t.arcTo(...h,...d,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...m,...b,r/2),t.arcTo(...x,...f,r/2),t.closePath()}(u,n,r,i,a)}return pV(n.createElement("path",{})).call(p9,s).style("fill",a||l).style("d",u.toString()).call(p9,t).node()}};dO.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"line"});let dw=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,nB({},e,{encode:{series:iT(iC(t,void 0))}})]};dw.props={};let dE=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=iN(n,"color");return[t,nB({},e,{encode:{series:ij(o,a)}})]};dE.props={};let dk={line:h5,smooth:dp,hv:dv,vh:dm,hvh:db,trail:dO},dM=(t,e,n,r)=>{var i,o;let{series:a,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=a?Array.from(pz(t,t=>a[t]).values()):[t],p=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,d=((null===(o=null==c?void 0:c.getBandWidth)||void 0===o?void 0:o.call(c))||0)/2;return[p,Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+d]))),f]},dS=(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");let o=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o});return[t,o]},d_=()=>(t,e,n,r)=>(oi(r)?dS:dM)(t,e,n,r);d_.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:dk,channels:[...hT({shapes:Object.keys(dk)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...hI(),{type:dw},{type:dE}],postInference:[...hN(),{type:hS,channel:"color"},{type:h_,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var dP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dj=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];dj.style=["fill"];let dA=dj.bind(void 0);dA.style=["stroke","lineWidth"];let dT=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];dT.style=["fill"];let dC=dT.bind(void 0);dC.style=["fill"];let dN=dT.bind(void 0);dN.style=["stroke","lineWidth"];let dL=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};dL.style=["fill"];let dI=dL.bind(void 0);dI.style=["stroke","lineWidth"];let dR=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};dR.style=["fill"];let dD=dR.bind(void 0);dD.style=["stroke","lineWidth"];let dF=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};dF.style=["fill"];let dz=dF.bind(void 0);dz.style=["stroke","lineWidth"];let dB=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};dB.style=["fill"];let dW=dB.bind(void 0);dW.style=["stroke","lineWidth"];let d$=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};d$.style=["fill"];let dG=d$.bind(void 0);dG.style=["stroke","lineWidth"];let dV=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];dV.style=["stroke","lineWidth"];let dH=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];dH.style=["stroke","lineWidth"];let dU=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];dU.style=["stroke","lineWidth"];let dq=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];dq.style=["stroke","lineWidth"];let dY=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];dY.style=["stroke","lineWidth"];let dX=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];dX.style=["stroke","lineWidth"];let dK=dX.bind(void 0);dK.style=["stroke","lineWidth"];let dZ=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];dZ.style=["stroke","lineWidth"];let dQ=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];dQ.style=["stroke","lineWidth"];let dJ=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];dJ.style=["stroke","lineWidth"];let d0=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];d0.style=["stroke","lineWidth"];let d1=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];d1.style=["stroke","lineWidth"];let d2=new Map([["bowtie",d$],["cross",dH],["dash",dK],["diamond",dL],["dot",dX],["hexagon",dB],["hollowBowtie",dG],["hollowDiamond",dI],["hollowHexagon",dW],["hollowPoint",dA],["hollowSquare",dN],["hollowTriangle",dD],["hollowTriangleDown",dz],["hv",dQ],["hvh",d0],["hyphen",dY],["line",dV],["plus",dq],["point",dj],["rect",dC],["smooth",dZ],["square",dT],["tick",dU],["triangleDown",dF],["triangle",dR],["vh",dJ],["vhv",d1]]);var d5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let d3=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=d5(t,["colorAttribute","symbol","mode"]),a=d2.get(r)||d2.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,p=o.stroke?c||1:c,{color:h=f,transform:d,opacity:y}=r,[g,v]=ho(e),m=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||oo(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}(i,e,r,l)||o.r||u.r;return pV(s.createElement("path",{})).call(p9,u).style("fill","transparent").style("d",a(g,v,m)).style("lineWidth",p).style("transform",d).style("stroke",h).style(hr(t),y).style(n,h).call(p9,o).node()}};d3.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let d4=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);d4.props=Object.assign({defaultMarker:"hollowPoint"},d3.props);let d6=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);d6.props=Object.assign({defaultMarker:"hollowDiamond"},d3.props);let d8=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);d8.props=Object.assign({defaultMarker:"hollowHexagon"},d3.props);let d9=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);d9.props=Object.assign({defaultMarker:"hollowSquare"},d3.props);let d7=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);d7.props=Object.assign({defaultMarker:"hollowTriangleDown"},d3.props);let yt=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);yt.props=Object.assign({defaultMarker:"hollowTriangle"},d3.props);let ye=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);ye.props=Object.assign({defaultMarker:"hollowBowtie"},d3.props);let yn=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);yn.props=Object.assign({defaultMarker:"point"},d3.props);let yr=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);yr.props=Object.assign({defaultMarker:"plus"},d3.props);let yi=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);yi.props=Object.assign({defaultMarker:"diamond"},d3.props);let yo=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);yo.props=Object.assign({defaultMarker:"square"},d3.props);let ya=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);ya.props=Object.assign({defaultMarker:"triangle"},d3.props);let yl=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);yl.props=Object.assign({defaultMarker:"hexagon"},d3.props);let ys=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);ys.props=Object.assign({defaultMarker:"cross"},d3.props);let yu=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);yu.props=Object.assign({defaultMarker:"bowtie"},d3.props);let yc=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);yc.props=Object.assign({defaultMarker:"hyphen"},d3.props);let yf=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);yf.props=Object.assign({defaultMarker:"line"},d3.props);let yp=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);yp.props=Object.assign({defaultMarker:"tick"},d3.props);let yh=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);yh.props=Object.assign({defaultMarker:"triangleDown"},d3.props);let yd=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{y:iA(iC(t,0))},scale:{y:{guide:null}}})]};yd.props={};let yy=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{size:iT(iC(t,3))}})]};yy.props={};let yg={hollow:d4,hollowDiamond:d6,hollowHexagon:d8,hollowSquare:d9,hollowTriangleDown:d7,hollowTriangle:yt,hollowBowtie:ye,point:yn,plus:yr,diamond:yi,square:yo,triangle:ya,hexagon:yl,cross:ys,bowtie:yu,hyphen:yc,line:yf,tick:yp,triangleDown:yh},yv=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l,y1:s,size:u,dx:c,dy:f}=r,[p,h]=i.getSize(),d=hF(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t],i=s?(+a[t]+ +s[t])/2:+a[t];return[r+e,i+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],o=r/p,a=r/h;return[i.map(d([e-o,n-a],t)),i.map(d([e+o,n+a],t))]}):Array.from(e,t=>[i.map(d(y(t),t))]);return[e,g]};yv.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:yg,channels:[...hT({shapes:Object.keys(yg)}),{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:[...hI(),{type:iD},{type:yd}],postInference:[{type:yy},...hC()]};var ym=function(t){return"function"==typeof t};function yb(t){yO(t,!0)}function yx(t){yO(t,!1)}function yO(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}var yw=function(t){return"object"==typeof t&&null!==t},yE={}.toString,yk=function(t,e){return yE.call(t)==="[object "+e+"]"},yM=function(t){if(!yw(t)||!yk(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},yS=function(t){return Array.isArray?Array.isArray(t):yk(t,"Array")},y_=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=tU(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?yM(l)?(!yM(t[a])&&(t[a]={}),n<r?y_(t[a],l,n+1,r):t[a]=e[a]):yS(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},yP=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)y_(t,e[r]);return t},yj=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,tY([],tU(e),!1))||this;return r.addEventListener(jo.INSERTED,function(){yx(r)}),r}return tB(e,t),e}(fh);function yA(t){var e=t.appendChild(new yj({class:"offscreen"}));return yx(e),e}function yT(){yO(this,"hidden"!==this.attributes.visibility)}var yC=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,yP({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return tB(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=yA(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&yT.call(this)},e.prototype.update=function(t,e){var n;return this.attr(yP({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(ff);function yN(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}var yL=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({style:tW({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return tB(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=yA(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(fO),yI=function(){var t,e,n;function r(e,n,r,i,o,a,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],l=tU(Array.isArray(a)?a:[a,null],2),s=l[0],u=l[1],c=r(s,o);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var o=0;o<this._elements.length;o++){var f=this._elements[o],s=f.__data__,c=r(s,o);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=tX(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),o=tX(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return o.attr("className",i),o},r.prototype.maybeAppendByName=function(e,r){var i=tX(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});var i,o,a,l,s,u=[],c=[],f=new Set(this._elements),p=[],h=new Set,d=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]}));for(var g=(i=this._elements,o=function(t){return r(t.__data__)},a=new Map,i.forEach(function(t){var e=o(t);!a.has(e)&&a.set(e,[]),a.get(e).push(t)}),a),v=0;v<t.length;v++){var m=t[v],b=n(m,v),x=r(m,v);if(d.has(b)){var O=d.get(b);O.__data__=m,O.__facet__=!1,c.push(O),f.delete(O),d.delete(b)}else if(y.has(b)){var O=y.get(b);O.__data__=m,O.__facet__=!0,c.push(O),y.delete(b)}else if(g.has(b)){var w=g.get(b);p.push([m,w]);try{for(var E=(l=void 0,tH(w)),k=E.next();!k.done;k=E.next()){var O=k.value;f.delete(O)}}catch(t){l={error:t}}finally{try{k&&!k.done&&(s=E.return)&&s.call(E)}finally{if(l)throw l.error}}g.delete(b)}else if(d.has(x)){var O=d.get(x);O.__toData__?O.__toData__.push(m):O.__toData__=[m],h.add(O),f.delete(O)}else u.push(m)}var M=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],p,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,M)},r.prototype.merge=function(t){var n=tY(tY([],tU(this._elements),!1),tU(t._elements),!1),r=tY(tY([],tU(this._transitions),!1),tU(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];return n?new n:function(t){throw Error(t)}("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var o=tU(t,2),a=o[0],l=o[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(a,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){var e=this._transitions;return this.each(function(n,r){e[r]=t.call(this,n,r)})},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,tY([this._parent,this],tU(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var o="string"==typeof n?this.createElement(n):n();return r.appendChild(o),new e([o],null,this._parent,this._document)},r.registry={g:fh,rect:fx,circle:fc,path:fv,text:yL,ellipse:fp,image:fy,line:fg,polygon:fm,polyline:fb,html:fd},r}();function yR(t){return new yI([t],null,t,t.ownerDocument)}var yD=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},yF=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},yz=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},yB=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},yW=function(t){return yk(t,"String")},y$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,n){var r,i,o=t.symbol,a=t.size,l=void 0===a?16:a,s=t$(t,["symbol","size"]);var u=["base64","url","image"].includes(i=function(t){var e="default";if(yB(t)&&t instanceof Image)e="image";else if(ym(t))e="symbol";else if(yW(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(r=o))?"image":r&&"symbol"===i?"path":null;yN(!!u,yR(n),function(t){t.maybeAppendByClassName("marker",u).attr("className","marker ".concat(u,"-marker")).call(function(t){if("image"===u){var n=2*l;t.styles({img:o,width:n,height:n,x:-l,y:-l})}else{var n=l/2,r=ym(o)?o:e.getSymbol(o);t.styles(tW({path:null==r?void 0:r(0,0,n)},s))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(yC);y$.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),y$.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),y$.registerSymbol("line",yF),y$.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),y$.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),y$.registerSymbol("circle",yD),y$.registerSymbol("point",yD),y$.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),y$.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),y$.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),y$.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),y$.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),y$.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),y$.registerSymbol("line",yF),y$.registerSymbol("dot",yz),y$.registerSymbol("dash",yz),y$.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),y$.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),y$.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),y$.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),y$.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});var yG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yV=(t,e,n)=>{let r=pY(t,e),i=pY(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(pY(n,t),2))/(2*r*i)},yH=hJ(t=>{let e;let n=t.attributes,{className:r,class:i,transform:o,rotate:a,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:p=c,text:h,background:d,connector:y,startMarker:g,endMarker:v,coordCenter:m,innerHTML:b}=n,x=yG(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([u,c,f,p].some(t=>!p2(t))){t.children.forEach(t=>t.remove());return}let O=nY(x,"background"),{padding:w}=O,E=yG(O,["padding"]),k=nY(x,"connector"),{points:M=[]}=k,S=yG(k,["points"]),_=[[+f,+p],[+u,+c]];e=b?pV(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",b).call(p9,Object.assign({transform:l,transformOrigin:s},x)).node():pV(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(p9,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},x)).node();let P=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return hg()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(yV(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return hg()(c)}(pV(t).maybeAppend("background","rect").style("zIndex",-1).call(p9,function(t,e=[]){let[n=0,r=0,i=n,o=r]=e,a=t.parentNode,l=a.getEulerAngles();a.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[p,h]=u;return a.setEulerAngles(l),{x:c-o,y:f-n,width:2*p+o+r,height:2*h+n+i}}(e,w)).call(p9,d?E:{}).node(),_,M,m),j=g&&new y$({id:"startMarker",style:Object.assign({x:0,y:0},nY(x,"startMarker"))}),A=v&&new y$({id:"endMarker",style:Object.assign({x:0,y:0},nY(x,"endMarker"))});pV(t).maybeAppend("connector","path").style("zIndex",0).style("path",P).style("markerStart",j).style("markerEnd",A).call(p9,y?S:{})}),yU=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:o,text:a="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(a),stroke:o,fill:o,fontSize:l},[[f,p]]=e;return pV(new yH).style("x",f).style("y",p).call(p9,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(p9,c).call(p9,t).node()}};yU.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yY=hJ(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=yq(e,["class","x","y"]),a=nY(o,"marker"),{size:l=24}=a,s=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",o,a],["Z"]]})(l/2),[u,c]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(pV(t).maybeAppend("marker",()=>new y$({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());pV(t).maybeAppend("text","text").style("x",u).style("y",c).call(p9,o)}),yX=(t,e)=>{let n=yq(t,[]);return(t,e,r)=>{let{color:i}=r,o=yq(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return pV(new yY).call(p9,o).style("x",u).style("y",c).call(p9,s).call(p9,n).node()}};yX.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let yK=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(iI))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),o=r.map(t=>t[1]);return[t,nB({},e,{encode:{x:ij(i),y:ij(o)}})]};yK.props={};var yZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yQ=()=>(t,e)=>{let{data:n,style:r={}}=e,i=yZ(e,["data","style"]),{x:o,y:a}=r,l=yZ(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],nB({},i,{data:[0],cartesian:!0,encode:{x:ij([o||0]),y:ij([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};yQ.props={};let yJ={text:yU,badge:yX},y0=t=>{let{cartesian:e=!1}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};y0.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:yJ,channels:[...hT({shapes:Object.keys(yJ)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...hI(),{type:yK},{type:yQ}],postInference:[...hC()]};let y1=()=>(t,e)=>[t,nB({scale:{x:{padding:0},y:{padding:0}}},e)];y1.props={};let y2={cell:hu,hollow:hc},y5=()=>(t,e,n,r)=>{let{x:i,y:o}=n,a=e.x,l=e.y,s=Array.from(t,t=>{let e=a.getBandWidth(a.invert(+i[t])),n=l.getBandWidth(l.invert(+o[t])),s=+i[t],u=+o[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function y3(t,e,n){var r=null,i=iF(!0),o=null,a=hh,l=null,s=i2(u);function u(u){var c,f,p,h,d,y=(u=hf(u)).length,g=!1,v=Array(y),m=Array(y);for(null==o&&(l=a(d=s())),c=0;c<=y;++c){if(!(c<y&&i(h=u[c],c,u))===g){if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=c-1;p>=f;--p)l.point(v[p],m[p]);l.lineEnd(),l.areaEnd()}}g&&(v[c]=+t(h,c,u),m[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):m[c]))}if(d)return l=null,d+""||null}function c(){return hg().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?hd:iF(+t),e="function"==typeof e?e:void 0===e?iF(0):iF(+e),n="function"==typeof n?n:void 0===n?hy:iF(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iF(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:iF(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:iF(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}y5.props={defaultShape:"cell",defaultLabelShape:"label",shape:y2,composite:!1,channels:[...hT({shapes:Object.keys(y2)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...hI(),{type:iD},{type:yd},{type:y1}],postInference:[...hC()]};var y4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let y6=hJ(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;pV(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(p9,i),pV(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(p9,r)}),y8=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=y4(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:p,seriesX:h,seriesY:d}=e,y=ot(l),g=hi(l,e),v=r&&p?ht(p,h,d,r,void 0,y):f,m=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[b,x]=function(t,e){let n=[],r=[],i=[],o=!1,a=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))o=!0;else{if(n.push(u),r.push(c),o&&a){o=!1;let[t,e]=a;i.push([t,u,e,c])}a=[u,c]}}return[n.concat(r),i]}(t,i),O=nY(m,"connect"),w=!!x.length,E=t=>pV(s.createElement("path",{})).style("d",t||"").call(p9,m).node();if(oe(l)){let e=t=>{var e,r,o,a,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),p=t.slice(t.length/2);return(r=(e=y3().curve(hX)).curve,o=e.lineX0,a=e.lineX1,s=e.lineY0,u=e.lineY1,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 hQ(o())},delete e.lineX0,e.lineEndAngle=function(){return hQ(a())},delete e.lineX1,e.lineInnerRadius=function(){return hQ(s())},delete e.lineY0,e.lineOuterRadius=function(){return hQ(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(hZ(t)):r()._curve},e).angle((t,e)=>pK(pU(f[e],c))).outerRadius((t,e)=>pY(f[e],c)).innerRadius((t,e)=>pY(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):pV(new y6).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?y3().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):y3().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):pV(new y6).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}}};y8.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let y9=(t,e)=>{let{coordinate:n}=e;return(...r)=>y8(Object.assign({curve:oe(n)?hb:hh},t),e)(...r)};y9.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"square"});var y7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gt=(t,e)=>{let n=y7(t,[]),{coordinate:r}=e;return(...t)=>y8(Object.assign({curve:oe(r)?dt:ot(r)?dc:du},n),e)(...t)};gt.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"smooth"});let ge=(t,e)=>(...n)=>y8(Object.assign({curve:dd},t),e)(...n);ge.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"hvh"});let gn=(t,e)=>(...n)=>y8(Object.assign({curve:dy},t),e)(...n);gn.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"vh"});let gr=(t,e)=>(...n)=>y8(Object.assign({curve:dg},t),e)(...n);gr.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"hv"});let gi={area:y9,smooth:gt,hvh:ge,vh:gn,hv:gr},go=()=>(t,e,n,r)=>{var i,o;let{x:a,y:l,y1:s,series:u}=n,{x:c,y:f}=e,p=u?Array.from(pz(t,t=>u[t]).values()):[t],h=p.map(t=>t[0]).filter(t=>void 0!==t),d=((null===(i=null==c?void 0:c.getBandWidth)||void 0===i?void 0:i.call(c))||0)/2,y=((null===(o=null==f?void 0:f.getBandWidth)||void 0===o?void 0:o.call(f))||0)/2;return[h,Array.from(p,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let o=t[i];n[i]=r.map([+a[o]+d,+l[o]+y]),n[e+i]=r.map([+a[o]+d,+s[o]+y])}return n}),p]};go.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:gi,channels:[...hT({shapes:Object.keys(gi)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...hI(),{type:dE},{type:iR},{type:y1}],postInference:[...hN()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let ga=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=iN(n,"y");return[t,nB({},e,{encode:{y1:ij([...i])}})]};ga.props={};let gl=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=iN(n,"x");return[t,nB({},e,{encode:{x1:ij([...i])}})]};gl.props={};var gs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gu=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=gs(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=gs(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=i1();if(h.moveTo(...f),h.lineTo(...p),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*pY(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-a-o,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=a-o;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,p,{arrowSize:r});h.moveTo(...p),h.lineTo(...t),h.moveTo(...p),h.lineTo(...e)}return pV(o.createElement("path",{})).call(p9,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(p9,i).node()}};gu.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gc=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>gu(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};gc.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gp=(t,e)=>{let n=gf(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=gf(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=i1();if(p.moveTo(c[0],c[1]),oe(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=pJ(c,f),e=pY(c,f)/2;p7(p,c,f,t,e)}return pV(i.createElement("path",{})).call(p9,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(p9,n).node()}};gp.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gd=(t,e)=>{let n=gh(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=gh(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=i1();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),pV(r.createElement("path",{})).call(p9,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(p9,n).node()}};gd.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gg=(t,e)=>{let{cornerRatio:n=1/3}=t,r=gy(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=gy(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=i1();if(oe(n)){let o=n.getCenter(),a=pY(t,o),l=pY(e,o);return i.moveTo(t[0],t[1]),p7(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return ot(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}(f,p,i,n);return pV(o.createElement("path",{})).call(p9,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(p9,r).node()}};gg.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gv={link:gc,arc:gp,smooth:gd,vhv:gg},gm=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=hF(n,r,t),c=e.map(t=>[i.map(u([+o[t],+a[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};gm.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:gv,channels:[...hT({shapes:Object.keys(gv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:ga},{type:gl}],postInference:[...hC()]};var gb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gx=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=gb(o,["color"]),{color:s=a,src:u="",size:c=32,transform:f=""}=i,{width:p=c,height:h=c}=t,[[d,y]]=e,[g,v]=n.getSize();p="string"==typeof p?hz(p)*g:p,h="string"==typeof h?hz(h)*v:h;let m=d-Number(p)/2,b=y-Number(h)/2;return pV(r.createElement("image",{})).call(p9,l).style("x",m).style("y",b).style("img",u).style("stroke",s).style("transform",f).call(p9,t).style("width",p).style("height",h).node()}};gx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gO={image:gx},gw=t=>{let{cartesian:e}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};gw.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:gO,channels:[...hT({shapes:Object.keys(gO)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...hI(),{type:yK},{type:yQ}],postInference:[...hC()]};var gE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gk=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=gE(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){var n;let r=i1();if(oe(e)){let n=e.getCenter(),i=[...t,t[0]],o=i.map(t=>pY(t,n));return i.forEach((e,i)=>{if(0===i){r.moveTo(e[0],e[1]);return}let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?p7(r,l,e,n,a):r.lineTo(e[0],e[1])}),r.closePath(),r}return n=r,t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return pV(r.createElement("path",{})).call(p9,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(p9,t).node()}};gk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gS=(t,e)=>{let n=gM(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=gM(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=i1();if(oe(e)){let t=e.getCenter(),l=pY(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),p7(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),p7(a,r,n,t,l),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return pV(i.createElement("path",{})).call(p9,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(p9,n).node()}};gS.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g_={polygon:gk,ribbon:gS},gP=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let a=i[n][t];if(void 0===a)break;let l=o[n][t];e.push(r.map([+a,+l]))}return e});return[t,a]};gP.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:g_,channels:[...hT({shapes:Object.keys(g_)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[...hC()]};var gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gA=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=gj(o,["color","fill","stroke"]),p=function(t,e){let n=i1();if(oe(e)){let r=e.getCenter(),[i,o]=r,a=pX(pU(t[0],r)),l=pX(pU(t[1],r)),s=pY(r,t[2]),u=pY(r,t[3]),c=pY(r,t[8]),f=pY(r,t[10]),p=pY(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,s,a,l),n.arc(i,o,s,l,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,u,a,l),n.lineTo(...t[6]),n.arc(i,o,f,l,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,c,a,l),n.arc(i,o,c,l,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,p,a,l),n.arc(i,o,p,l,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return pV(r.createElement("path",{})).call(p9,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(p9,t).node()}};gA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gC=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=gT(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=i1();if(!oe(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[o,a]=i,l=pY(i,t[3]),s=pY(i,t[8]),u=pY(i,t[10]),c=pX(pU(t[2],i)),f=Math.asin(n/s),p=c-f,h=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.arc(o,a,l,p,h),r.lineTo(Math.cos(h)*u+o,Math.sin(h)*u+a),r.arc(o,a,u,h,p,!0),r.lineTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let d=(p+h)/2;return r.moveTo(Math.cos(d)*(s+n/2)+o,Math.sin(d)*(s+n/2)+a),r.arc(Math.cos(d)*s+o,Math.sin(d)*s+a,n/2,d,2*Math.PI+d),r.closePath(),r}(e,n,4);return pV(r.createElement("path",{})).call(p9,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(p9,t).node()}};gC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gN={box:gA,violin:gC},gL=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,y2:l,y3:s,y4:u,series:c}=n,f=e.x,p=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(p?p.getBandWidth(p.invert(+(null==c?void 0:c[t]))):1),h=(+(null==c?void 0:c[t])||0)*e,d=+i[t]+h+n/2,[y,g,v,m,b]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,b],[d+n/2,b],[d,b],[d,m],[d-n/2,m],[d+n/2,m],[d+n/2,g],[d-n/2,g],[d-n/2,v],[d+n/2,v],[d,g],[d,y],[d-n/2,y],[d+n/2,y]].map(t=>r.map(t))});return[t,h]};gL.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:gN,channels:[...hT({shapes:Object.keys(gN)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...hI(),{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}};let gI={vector:gu},gR=()=>(t,e,n,r)=>{let{x:i,y:o,size:a,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=+l[t]/180*Math.PI,n=+a[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([+i[t]-c/2,+o[t]-f/2]),r.map([+i[t]+c/2,+o[t]+f/2])]});return[t,c]};gR.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:gI,channels:[...hT({shapes:Object.keys(gI)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...hI()],postInference:[...hC()]};var gD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gF=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=gD(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s,u,c;let{color:f,lineWidth:p}=l,h=gD(l,["color","lineWidth"]),{color:d=f,size:y=p}=e;let g=n?(s=a,u=r,c=Object.assign({fill:i.stroke||d,stroke:i.stroke||d},nY(i,"arrow")),s.createElement("path",{style:Object.assign({path:`M ${u},${u} L -${u},0 L ${u},-${u} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},c)})):null,v=function(t,e){if(!oe(e))return hg().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return i7()({startAngle:0,endAngle:2*Math.PI,outerRadius:pY(t[0],n),innerRadius:pY(t[1],n)})}(t,o),m=function(t,e){if(!oe(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return pV(a.createElement("path",{})).call(p9,h).style("d",v).style("stroke",d).style("lineWidth",y).style("transform",m).style("markerEnd",g).call(p9,i).node()}};gF.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gz=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(iI)?[t,e]:[t,nB({},e,{encode:{x:ij(n)}})]};gz.props={};let gB={line:gF},gW=t=>(e,n,r,i)=>{let{x:o}=r,a=hF(n,r,nB({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[o[t],1];return[e,[o[t],0]].map(e=>i.map(a(e,t)))});return[e,l]};gW.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:gB,channels:[...hL({shapes:Object.keys(gB)}),{name:"x",required:!0}],preInference:[...hI(),{type:gz}],postInference:[]};let g$=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(iI)?[t,e]:[t,nB({},e,{encode:{y:ij(n)}})]};g$.props={};let gG={line:gF},gV=t=>(e,n,r,i)=>{let{y:o}=r,a=hF(n,r,nB({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[0,o[t]];return[e,[1,o[t]]].map(e=>i.map(a(e,t)))});return[e,l]};gV.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:gG,channels:[...hL({shapes:Object.keys(gG)}),{name:"y",required:!0}],preInference:[...hI(),{type:g$}],postInference:[]};var gH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gU(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let gq=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=gH(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{var u;let{color:c,connectLength1:f}=n,p=gH(n,["color","connectLength1"]),{color:h,transform:d}=e,y=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(ot(t)){let t=o+n,e=t+i;return[[t,a],[e,a],[e,s],[l+r,s]]}let u=a-n,c=u-i;return[[o,u],[o,c],[l,c],[l,s-r]]}(s,t,r,i,null!=o?o:f),g=nY(Object.assign(Object.assign({},l),n),"endMarker");return pV(new fv).call(p9,p).style("path",(u=y,hg().x(t=>t[0]).y(t=>t[1])(u))).style("stroke",h||c).style("transform",d).style("markerEnd",a?new y$({className:"marker",style:Object.assign(Object.assign({},g),{symbol:gU})}):null).call(p9,l).node()}};gq.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gY={connector:gq},gX=(...t)=>gm(...t);function gK(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:o}=n;return t=>{var e;let n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function gZ(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=gK("x",e,i,r.x),l=gK("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=a(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>o.map(t))});return[t,s]}}gX.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:gY,channels:[...hL({shapes:Object.keys(gY)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[]};let gQ={range:hu},gJ=()=>gZ();gJ.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:gQ,channels:[...hL({shapes:Object.keys(gQ)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[]};let g0=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(iI))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nB({},e,{encode:{x:ij(r(n,0)),x1:ij(r(n,1))}})]}return[t,e]};g0.props={};let g1={range:hu},g2=()=>gZ({extendY:!0});g2.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:g1,channels:[...hL({shapes:Object.keys(g1)}),{name:"x",required:!0}],preInference:[...hI(),{type:g0}],postInference:[]};let g5=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(iI))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nB({},e,{encode:{y:ij(r(n,0)),y1:ij(r(n,1))}})]}return[t,e]};g5.props={};let g3={range:hu},g4=()=>gZ({extendX:!0});g4.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:g3,channels:[...hL({shapes:Object.keys(g3)}),{name:"y",required:!0}],preInference:[...hI(),{type:g5}],postInference:[]};var g6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let g8=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=g6(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=g6(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return pV(a.createElement("path",{})).call(p9,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(p9,i).node()}};g8.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g9=(t,e)=>g8(Object.assign({colorAttribute:"fill"},t),e);g9.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g7=(t,e)=>g8(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);g7.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vt={path:g9,hollow:g7},ve=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];ve.props={defaultShape:"path",defaultLabelShape:"label",shape:vt,composite:!1,channels:[...hT({shapes:Object.keys(vt)}),{name:"d",scale:"identity"}],preInference:[...hI()],postInference:[]};var vn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vr=(t,e)=>{let{render:n}=t,r=vn(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};vr.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vi=()=>(t,e)=>{let{style:n={}}=e;return[t,nB({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};vi.props={};let vo=t=>{let{cartesian:e}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};vo.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:vr},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:yK},{type:yQ},{type:vi}]};var va=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vl=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=va(i,["color"]),{color:s=a}=r,[u,...c]=e,f=i1();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),pV(n.createElement("path",{})).call(p9,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(p9,t).node()}};vl.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vs={density:vl},vu=()=>(t,e,n,r)=>{let{x:i,series:o}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===a||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==o?void 0:o[e]))):1,f=(+(null==o?void 0:o[e])||0)*n,p=+i[e]+f+n*c/2;return[...a.map((n,r)=>[p+ +l[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[p-+l[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function vc(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function vf(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function vp(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}vu.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:vs,channels:[...hT({shapes:Object.keys(vs)}),{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:[...hI(),{type:iR},{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}},vp(3);function vh(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}let vd=function(t,e=(...t)=>`${t[0]}`,n=16){let r=vp(n);return(...n)=>{let i=e(...n),o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}((t,e,n)=>{let r=vh(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var vy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vg=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=vy(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),m=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),b=vc(t,t=>t[2]),x=vf(t,t=>t[2]);let O=g&&v?function(t,e,n,r,i,o,a){let l=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)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=vh(a,t,e).getContext("2d"),u=function(t,e){var n;let r=vh(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return("string"==typeof(n=t)?n.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):n).forEach(([t,e])=>{i.addColorStop(t,e)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),!function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=vd(c,1-a,o),y=(f-e)/(n-e);t.globalAlpha=Math.max(y,.001),t.drawImage(d,p,h)};}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=vh(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,b,x,m,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return!d(n,e)&&(t[e]=n),t},{})),c):{canvas:null};return pV(f.createElement("image",{})).call(p9,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",O.canvas).style("transform",y).call(p9,s).node()}};vg.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vv={heatmap:vg},vm=t=>(t,e,n,r)=>{let{x:i,y:o,size:a,color:l}=n;return[[0],[Array.from(t,t=>{let e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),l[t],e]})]]};vm.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:vv,channels:[...hT({shapes:Object.keys(vv)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...hI(),{type:iD},{type:yd}],postInference:[...hC()]};let vb=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];vb.props={};let vx=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];vx.props={};let vO=t=>new ec(t);vO.props={};let vw=Symbol("defaultUnknown");function vE(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function vk(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==vw)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function vM(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class vS extends tK{getDefaultOptions(){return{domain:[],range:[],unknown:vw}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&vE(this.domainIndexMap,this.getDomain(),this.domainKey),vk({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&vE(this.rangeIndexMap,this.getRange(),this.rangeKey),vk({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=vM(e),this.rangeKey=vM(n),!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 vS(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}let v_=t=>new vS(t);function vP({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}v_.props={};function vj(t){return"object"==typeof t?t.valueOf():t}class vA extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=vj,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(vP({map:this.map,initKey:this.initKey},t))}has(t){return super.has(vP({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class vT extends vS{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:vw,flex:[]}}constructor(t){super(t)}clone(){return new vT(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new vA(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new vA(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let vC=t=>new vT(t);function vN(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}vC.props={};let vL=[1,5,2,2.5,4,3],vI=100*Number.EPSILON,vR=(t,e,n=5,r=!0,i=vL,o=[.25,.2,.5,.05])=>{let a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let h=i[n],d=function(t,e,n){let r=tF(e),i=tR(e,t);return 1-i/(r-1)-n+1}(h,i,s);if(o[0]*d+o[1]+o[2]+o[3]<l.score){s=1/0;break}let y=2;for(;y<1/0;){var u,c,f,p;let n=(u=y)>=(c=a)?2-(u-1)/(c-1):1;if(o[0]*d+o[1]+o[2]*n+o[3]<l.score)break;let g=Math.ceil(Math.log10((e-t)/(y+1)/s/h));for(;g<1/0;){let u=s*h*10**g,c=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(y-1));if(o[0]*d+o[1]*c+o[2]*n+o[3]<l.score)break;let v=Math.floor(e/u)*s-(y-1)*s,m=Math.ceil(t/u)*s;if(v<=m){let n=m-v;for(let c=0;c<=n;c+=1){;let n=u/s*(v+c),d=n+u*(y-1),g=function(t,e,n,r,i,o){var a;let l=tF(e),s=tR(e,t),u=0;let c=(r%(a=o)+a)%a;return(c<vI||o-c<vI)&&r<=0&&i>=0&&(u=1),1-s/(l-1)-n+u}(h,i,s,n,d,u);let m=(f=t,1-.5*(((p=e)-d)**2+(f-n)**2)/(.1*(p-f))**2),b=function(t,e,n,r,i,o){let a=(t-1)/(o-i),l=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/l,l/a)}(y,a,t,e,n,d),x=o[0]*g+o[1]*m+o[2]*b+1*o[3];x>l.score&&(!r||n<=t&&d>=e)&&(l.lmin=n,l.lmax=d,l.lstep=u,l.score=x)}}g+=1}y+=1}}s+=1}let h=vN(l.lmax),d=vN(l.lmin),y=vN(l.lstep),g=Math.floor(Math.round((h-d)/y*1e12)/1e12)+1,v=Array(g);v[0]=vN(d);for(let t=1;t<g;t+=1)v[t]=vN(v[t-1]+y);return v};class vD extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:vR}}map(t){return t9(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new vD(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return tT(r)&&tT(i)?n(r,i,e):[]}}let vF=t=>new vD(t);vF.props={};class vz extends vT{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:vw,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new vz(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let vB=t=>new vz(t);vB.props={};var vW=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,v$="[^\\s]+",vG=/\[([^]*?)\]/gm;function vV(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var vH=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function vU(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}var vq=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],vY=["January","February","March","April","May","June","July","August","September","October","November","December"],vX=vV(vY,3),vK=vV(vq,3),vZ=vU({},{dayNamesShort:vK,dayNames:vq,monthNamesShort:vX,monthNames:vY,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}}),vQ=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},vJ={D:function(t){return String(t.getDate())},DD:function(t){return vQ(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return vQ(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return vQ(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return vQ(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return vQ(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return vQ(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return vQ(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return vQ(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return vQ(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return vQ(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return vQ(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+vQ(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+vQ(Math.floor(Math.abs(e)/60),2)+":"+vQ(Math.abs(e)%60,2)}};vH("monthNamesShort"),vH("monthNames");var v0={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"},v1=function(t,e,n){if(void 0===e&&(e=v0.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=v0[e]||e;var r=[];e=e.replace(vG,function(t,e){return r.push(e),"@@@"});var i=vU(vU({},vZ),n);return(e=e.replace(vW,function(e){return vJ[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};let v2=6e4,v5=36e5,v3=864e5,v4=6048e5,v6=2592e6,v8=31536e6;function v9(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let v7=v9(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),mt=v9(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),me=v9(v2,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+v2*e)},t=>t.getMinutes()),mn=v9(v5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+v5*e)},t=>t.getHours()),mr=v9(v3,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v3*e)},t=>t.getDate()-1),mi=v9(v6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),mo=v9(v4,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=mi.floor(t);return Math.floor((+new Date(+t)-+e)/v4)}),ma={millisecond:v7,second:mt,minute:me,hour:mn,day:mr,week:mo,month:mi,year:v9(v8,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},ml=v9(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ms=v9(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),mu=v9(v2,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+v2*e)},t=>t.getUTCMinutes()),mc=v9(v5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+v5*e)},t=>t.getUTCHours()),mf=v9(v3,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v3*e)},t=>t.getUTCDate()-1),mp=v9(v6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),mh=v9(v4,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v4*e)},t=>{let e=mp.floor(t);return Math.floor((+new Date(+t)-+e)/v4)}),md={millisecond:ml,second:ms,minute:mu,hour:mc,day:mf,week:mh,month:mp,year:v9(v8,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function my(t,e,n,r,i){let o;let a=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:o,minute:a,second:l,millisecond:s}=t?md:ma;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[a,1],[a,5],[a,15],[a,30],[o,1],[o,3],[o,6],[o,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,p=r?(l-a)/r:n||5,h=r||(l-a)/p,d=s.length,y=tJ(s,h,0,d,f);if(y===d){let t=er(a/u.duration,l/u.duration,p);o=[u,t]}else if(y){let[t,e]=h/f(s[y-1])<f(s[y])/h?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;o=[t,n]}else o=[c,Math.max(er(a,l,p),1)];return o}let mg=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=my(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},mv=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=my(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function mm(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class mb extends es{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:mg,interpolate:t3,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return mv}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options,i=t[0];return[i,t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?md:ma,r=e?mm:tD;return e=>v1(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;if(n.floor(t)<t)return".SSS";if(r.floor(t)<t)return":ss";if(i.floor(t)<t)return"hh:mm";if(o.floor(t)<t)return"hh A";if(l.floor(t)<t)return a.floor(t)<t?"MMM DD":"ddd DD";return s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new mb(this.options)}}let mx=t=>new mb(t);mx.props={};let mO=t=>e=>-t(-e),mw=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?mO(r):r},mE=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?mO(n):n},mk=(t,e,n,r=10)=>{let i=t<0,o=mE(r,i),a=mw(r,i),l=e<t,s=l?e:t,u=l?t:e,c=a(s),f=a(u),p=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=o(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}else for(;c<=f;c+=1){let t=o(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}2*p.length<n&&(p=eu(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=eu(c,f,t).map(o)}return l?p.reverse():p},mM=(t,e,n,r)=>{let i=t<0,o=mw(r,i),a=mE(r,i),l=t>e,s=l?e:t,u=l?t:e,c=[a(Math.floor(o(s))),a(Math.ceil(o(u)))];return l?c.reverse():c};class mS extends es{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:t6,tickMethod:mk,tickCount:5}}chooseNice(){return mM}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options,r=t[0];return[r,t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[mw(t,n),mE(t,n)]}clone(){return new mS(this.options)}}let m_=t=>new mS(t);m_.props={};let mP=t=>e=>e<0?-((-e)**t):e**t,mj=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),mA=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class mT extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:t6,tickMethod:eu,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;if(1===t)return[tD,tD];let e=.5===t?mA:mP(t);return[e,mj(t)]}clone(){return new mT(this.options)}}let mC=t=>new mT(t);mC.props={};class mN extends mT{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new mN(this.options)}}let mL=t=>new mN(t);mL.props={};class mI extends tK{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!t9(t))return this.options.unknown;let e=tJ(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new mI(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let mR=t=>new mI(t);mR.props={};class mD extends mI{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:vR}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){!n&&t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new mD(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1,i=e[0];return n(i,e[r],t)}}let mF=t=>new mD(t);mF.props={};class mz extends mI{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:vR}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=ei(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new mz(this.options)}}let mB=t=>new mz(t);mB.props={};let mW=t=>e=>{let n=t(e);return tT(n)?Math.round(n):n},m$=ju=class extends ec{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:tD,tickMethod:eu,tickCount:5}}constructor(t){super(t)}clone(){return new ju(this.options)}};m$=ju=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([(PX=function(t){return[t(0),t(1)]},PK=t=>{let[e,n]=t;return tQ(t3(0,1),tZ(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=PX(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=PK(n.map(t)),a=i?mW(r):r;this.output=tQ(a,o,e,t)},t.prototype.invert=void 0})],m$);let mG=t=>new m$(t);mG.props={};class mV extends tK{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:eu}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return tT(r)&&tT(i)?t(r,i,n):[]}clone(){return new mV(this.options)}}let mH=t=>new mV(t);function mU({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:p,category10:h,category20:d,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:h,category20:d,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:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth: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,strokeWidth: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:e,gridStrokeOpacity:p,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,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"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",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:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[o,o],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,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:s,tickStroke:e,tickStrokeOpacity:c},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,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:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,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:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}mH.props={};let mq=mU({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}),mY=t=>nB({},mq,t);mY.props={};let mX=t=>nB({},mY(),{category10:"category10",category20:"category20"},t);mX.props={};let mK=mU({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",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}),mZ=t=>nB({},mK,{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"}}}},t),mQ=t=>Object.assign({},mZ(),{category10:"category10",category20:"category20"},t);mQ.props={};let mJ=mU({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}),m0=t=>nB({},mJ,{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,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},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}},t);m0.props={};var m1=function(t){return null==t};function m2(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=tU(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){var r;if("boolean"!=typeof(r=t)&&"enter"in r&&"update"in r&&"exit"in r)return!1===t[e]?[e,!1]:[e,tW(tW({},t[e]),n)];return[e,n]}))}function m5(t,e){t?t.finished.then(e):e()}function m3(t,e){"update"in t?t.update(e):t.attr(e)}function m4(t,e,n){return 0===e.length?null:n?t.animate(e,n):(m3(t,{style:e.slice(-1)[0]}),null)}function m6(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=tU(e,2),o=n[0],a=n[1];if(!m1(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?m4(t,[r,i],tW({fill:"both"},n)):(m3(t,i),null)}var m8=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&yM(a)?(!yM(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):yS(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},m9=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=tU(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},m7={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 fv({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",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:[]};m8({},m7,{style:{type:"arc"}}),m8({},m7,{style:{}});var bt=m9({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");function be(t,e){return[t[0]*e,t[1]*e]}function bn(t,e){return[t[0]+e[0],t[1]+e[1]]}function br(t,e){return[t[0]-e[0],t[1]-e[1]]}function bi(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function bo(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function ba(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function bl(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function bs(t){return t*Math.PI/180}function bu(t){return Number((180*t/Math.PI).toPrecision(5))}function bc(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function bf(t,e,n){void 0===n&&(n=!0);var r,i,o=e||(null===(i=t.match(/^([a-z][a-z0-9]+)/))||void 0===i?void 0:i[0])||"",a=t.replace(new RegExp("^(".concat(o,")")),"");return n?(r=a).toString().charAt(0).toLowerCase()+r.toString().slice(1):a}var bp=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function bh(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i,o=tU(t,2),a=o[0],l=o[1];if("className"===a||"class"===a);else if(bp(a,"show")&&bp(bf(a,"show"),e)!==n){;if(a===(i=e,"".concat("show").concat(bc(i))))r[a]=l;else r[a.replace(new RegExp(bc(e)),"")]=l}else if(!bp(a,"show")&&bp(a,e)!==n){var s=bf(a,e);"filter"===s&&"function"==typeof l||(r[s]=l)}}),r}function bd(t,e){return Object.entries(t).reduce(function(t,n){var r=tU(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(bc(i))]=o,t},{})}function by(t,e){void 0===e&&(e=["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(t).forEach(function(t){var o=tU(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function bg(t,e){return ym(t)?t.apply(void 0,tY([],tU(e),!1)):t}function bv(t,e){return!t.style.opacity&&(t.style.opacity=1),m6(t,{opacity:0},e)}var bm=["$el","anchor","cx","cy","d","defX","defY","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 bb(t){var e,n={};for(var r in t){;if(e=r,bm.includes(e))n[r]=t[r]}return n}var bx=m9({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function bO(t){return t.reduce(function(t,e,n){return t.push(tY([0===n?"M":"L"],tU(e),!1)),t},[])}function bw(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return bO(t);if(!i)return[];var o=ba(t[0],i),a=n?0:1;return t.reduce(function(t,e,n){return 0===n?t.push(tY(["M"],tU(e),!1)):t.push(tY(["A",o,o,0,0,a],tU(e),!1)),t},[])}(t,e,n):bO(t)}var bE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l,s,u,c,f,p=t$(t,["type","center","areaFill","closed"]);var h=(i=void 0===(r=(n=t).data)?[]:r,n.closed?i.map(function(t){var e=t.points,n=tU(e,1)[0];return tW(tW({},t),{points:tY(tY([],tU(e),!1),[n],!1)})}):i),d=yR(e).maybeAppendByClassName(bx.lineGroup,"g"),y=yR(e).maybeAppendByClassName(bx.regionGroup,"g");var g=(o=d,a=h,l=t,s=p,u=l.animate,c=l.isBillboard,f=a.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:bw(t.points,l)}}),o.selectAll(bx.line.class).data(f,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=bg(bb(tW({path:t.path},s)),[t,e,f]);this.attr(tW({class:bx.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:c},n))})},function(t){return t.transition(function(t,e){return m6(this,bg(bb(tW({path:t.path},s)),[t,e,f]),u.update)})},function(t){return t.transition(function(){var t=this,e=bv(this,u.exit);return m5(e,function(){return t.remove()}),e})}).transitions()),v=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],l=[],s=0;s<e.length-1;s++){var u=tU([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],l=tU([bw(t,n),bw(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=tU([t[0],e.slice(-1)[0]],2),f=c[0],p=c[1],h=function(t,e){return[s,t,u,e,a].flat()};if("line"===i||"surround"===r)return h([tY(["L"],tU(p),!1)],[tY(["L"],tU(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=tU([ba(p,o),ba(f,o)],2),y=d[0],g=d[1];return h([tY(["A",y,y,0,0,1],tU(p),!1),tY(["L"],tU(p),!1)],[tY(["A",g,g,0,0,0],tU(f),!1),tY(["L"],tU(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(bx.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=bg(t,[t,e,l]);this.attr(n)}).attr("className",bx.region.name)},function(t){return t.transition(function(t,e){return m6(this,bg(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=bv(this,r.exit);return m5(e,function(){return t.remove()}),e})}).transitions()}(y,h,t);return tY(tY([],tU(g),!1),tU(v),!1)},e}(yC),bk=function(t,e,n){for(var r=0,i=yW(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function bM(t,e){var n,r,i,o,a,l,s,u,c,f;if("number"==typeof t&&"number"==typeof e){;return n=t,r=e,function(t){return n*(1-t)+r*t}}if(Array.isArray(t)&&Array.isArray(e)){;return i=t,a=(o=e)?o.length:0,l=i?Math.min(a,i.length):0,function(t){var e=Array(l),n=Array(a),r=0;for(r=0;r<l;++r)e[r]=bM(i[r],o[r]);for(;r<a;++r)n[r]=o[r];for(r=0;r<l;++r)n[r]=e[r](t);return n}}if("object"==typeof t&&"object"==typeof e){;return void 0===(s=t)&&(s={}),void 0===(u=e)&&(u={}),c={},f={},Object.entries(u).forEach(function(t){var e=tU(t,2),n=e[0],r=e[1];n in s?c[n]=bM(s[n],r):f[n]=r}),function(t){return Object.entries(c).forEach(function(e){var n=tU(e,2),r=n[0],i=n[1];return f[r]=i(t)}),f}}return function(e){return t}}var bS=function(t){return yk(t,"Number")};function b_(t){return"function"==typeof t?t():yW(t)||bS(t)?new yL({style:{text:String(t)}}):t}function bP(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&t.scale(i),i}function bj(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)!r.includes(i)&&(n[i]=t[i]);return n}function bA(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=tU(t,2);return[n[0],bg(n[1],e)]}))}function bT(t,e){return e&&ym(e)?t.filter(e):t}function bC(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function bN(t,e){if("linear"===e.type){var n=tU(e.startPos,2),r=n[0],i=n[1],o=tU(e.endPos,2),a=tU([o[0]-r,o[1]-i],2);return bl([a[0],a[1]])}var l=bs(bC(t,e));return[-Math.sin(l),Math.cos(l)]}function bL(t,e,n){var r;return r=bN(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function bI(t,e){return bL(t,e.labelDirection,e)}function bR(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y;if("linear"===e.type){;return n=t,o=(i=tU((r=e).startPos,2))[0],a=i[1],l=tU(r.endPos,2),s=tU([l[0]-o,l[1]-a],2),[o+s[0]*n,a+s[1]*n]}return u=t,f=(c=e).radius,h=(p=tU(c.center,2))[0],d=p[1],[h+f*Math.cos(y=bs(bC(u,c))),d+f*Math.sin(y)]}function bD(t){return 0===bN(0,t)[1]}function bF(t){return 0===bN(0,t)[0]}function bz(t,e){return e-t==360}function bB(t,e,n,r,i){var o=e-t,a=tU([i,i],2),l=a[0],s=a[1],u=tU([bs(t),bs(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=tU(p(c),2),d=h[0],y=h[1],g=tU(p(f),2),v=g[0],m=g[1];if(e-t==360){var b=tU(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,b[0],b[1]],["A",l,s,0,1,0,v,m]]}var x=o>180?1:0,O=t>e?0:1;return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(x,",").concat(O,",").concat(v,",").concat(m)}function bW(t){var e=tU(t,2),n=tU(e[0],2),r=n[0],i=n[1],o=tU(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function b$(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function bG(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var bV=function(t,e,n){if(void 0===n&&(n=128),!ym(t))throw TypeError("Expected a function");var r=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var l=t.apply(this,n);return a.set(o,l),l};return r.cache=function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n),r}(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return jf?jf(t,n):(!jc&&(jc=c5.offscreenCanvasCreator.getOrCreateContext(void 0)),jc.font=[o,a,i,"".concat(n,"px"),r].join(" "),jc.measureText(t).width)},function(t,e){return[t,Object.values(e||bH(t)).join()].join("")},4096),bH=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function bU(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function bq(t,e){var n=bU(t);n&&n.attr(e)}function bY(t,e,n){void 0===n&&(n="..."),bq(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function bX(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l,s,u,c;return"translate(".concat((i=t,o=n,a=r,s=(l=i.getBBox()).width,u=l.height,[(c=tU([o,a].map(function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?s:u):t}),2))[0],c[1]]),")")});t.attr("transform",n)}catch(t){}}var bK=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function bZ(t){if(bS(t))return[t,t,t,t];if(yS(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var bQ=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*a+u,s*r+l*a+c],[l*o-s*a+u,s*o+l*a+c],[l*r-s*i+u,s*r+l*i+c],[l*o-s*i+u,s*o+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function bJ(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=tU(r.min,2),o=i[0],a=i[1],l=tU(r.max,2),s=l[0],u=l[1],c=b0(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=bU(t);if(v){p-=1.5;var m=v.style.textAlign,b=v.style.textBaseline;"center"===m?y=(o+s)/2:("right"===m||"end"===m)&&(y=s),"middle"===b?g=(a+u)/2:"bottom"===b&&(g=u)}var x=tU(bZ(e),4),O=x[0],w=void 0===O?0:O,E=x[1],k=void 0===E?0:E,M=x[2],S=x[3],_=new bQ((h+=o)-(void 0===S?k:S),(d+=a)-w,h+f+k,d+p+(void 0===M?w:M));return t.setEulerAngles(n),_.rotatedPoints(bs(n),y,g)}function b0(t){return t.__bbox__?t.__bbox__:t.getBBox()}function b1(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function b2(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function b5(t,e,n){var r,i,o=e.crossPadding,a=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,l=tU(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=tU(bZ(e),4),d=h[0],y=h[1],g=h[2];return new bQ(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=tU(t.startPos,2),m=v[0],b=v[1],x=tU(t.endPos,2),O=x[0],w=x[1],E=tU(bF(t)?[-e,0,e,0]:[0,e,0,-e],4),k=E[0],M=E[1],S=E[2],_=E[3],P=be(bI(0,t),i),j=new bQ(m,b,O,w);return j.x1+=_,j.y1+=k,j.x2+=M+P[0],j.y2+=S+P[1],j}(e,o);try{for(var u=tH(t),c=u.next();!c.done;c=u.next()){var f,p,h=c.value;if(!function(t){if(s){var e,n,r,i,o,a,l,u,c;return e=s,n=t,i=e.x1,o=e.x2,a=e.y1,l=e.y2,u=bJ(n,void 0),c=[[i,a],[o,a],[o,l],[i,l]],u.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,o=0;do{var a=[t[o],t[(o+1)%n]];if(function(t,e){var n=b2(t[0],t[1],e[0]),r=b2(t[0],t[1],e[1]),i=b2(e[0],e[1],t[0]),o=b2(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&b1(t,e[0])||0===r&&b1(t,e[1])||0===i&&b1(e,t[0])||0===o&&b1(e,t[1]))||!1}(a,r)){if(0===b2(a[0],e,a[1]))return b1(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(c,t)})}return!0}(h))a.add(h);else{;if(l&&(f=l,p=h,f?function(t,e,n){var r,i,o=bJ(t,n).flat(1),a=bJ(e,n).flat(1),l=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return function(t,e){var n=tU(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=tU(e,4),s=l[0],u=l[1],c=l[2],f=l[3],p=o-r,h=a-i,d=c-s,y=f-u,g=p*y-d*h;if(0===g)return!1;var v=g>0,m=r-s,b=i-u,x=p*b-h*m;if(x<0===v)return!1;var O=d*b-y*m;return O<0!==v&&x>g!==v&&O>g!==v&&!0}(e,t)})}(a,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f,p,bZ(n)):0))a.add(l),a.add(h);else l=h}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(a)}function b3(t,e){return(void 0===e&&(e={}),m1(t))?0:"number"==typeof t?t:Math.floor(bV(t,e))}function b4(t){var e=t.getLocalBounds(),n=tU([e.min,e.max],2),r=tU(n[0],2),i=r[0],o=r[1],a=tU(n[1],2),l=a[0],s=a[1];return{x:i,y:o,width:l-i,height:s-o,left:i,bottom:s,top:o,right:l}}function b6(t,e){var n=tU(t,2),r=n[0],i=n[1],o=tU(e,2),a=o[0],l=o[1];return r!==a&&i===l}var b8={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(yx(t),!1)})}},b9=new Map([["hide",function(t,e,n,r){var i,o,a=t.length,l=e.keepHeader,s=e.keepTail;if(!(a<=1)&&(2!==a||!l||!s)){var u=b8.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,tY([1],tU(t.map(function(t){return b0(t).width})),!1));if("linear"===n.type&&(bD(n)||bF(n))){var y=b4(t[0]).left,g=Math.abs(b4(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&b5((o?tY(tY([o],tU(h),!1),[i],!1):tY([i],tU(h),!1)).filter(bK),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=tH(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),b5(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,p=bH(r.getTextShape(t[0])),h=b3(void 0===u?" ":u,p),d=a?b3(a,p):h,y=b3(s,p);(m1(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return b0(t).width})));var g=t.slice(),v=tU(f,4);v[0],v[1],v[2],v[3];for(var m=function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=b5(t,n,f)).length<1)return{value:void 0}},b=y;b>d+h;b-=h){var x=m(b);if("object"==typeof x)return x.value}}}],["wrap",function(t,e,n,r){var i,o,a,l=e.wordWrapWidth,s=void 0===l?50:l,u=e.maxLines,c=void 0===u?3:u,f=e.recoverWhenFailed,p=e.margin,h=void 0===p?[0,0,0,0]:p,d=t.map(function(t){return t.attr("maxLines")||1}),y=Math.min.apply(Math,tY([],tU(d),!1));var g=(o=(i=n).type,a=i.labelDirection,"linear"===o&&bD(i)?"negative"===a?"bottom":"top":"middle"),v=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,s,i,g)})};if(!(y>c)){for(var m=y;m<=c;m++)if(v(m),b5(t,n,h).length<1)return;(void 0===f||f)&&v(d)}}]]);function b7(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function xt(t,e){var n=tU(t,2),r=n[0],i=n[1],o=tU(e,2),a=o[0],l=o[1],s=tU([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function xe(t,e,n){var r=n.type,i=n.labelAlign,o=bI(t,n),a=b7(e),l=b7(bu(xt([1,0],o))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===a?(s="center",u=1===o[1]?"top":"bottom"):!(l%180)&&[90,270].includes(a)?s="center":0===l?bG(a,0,90,!1,!0)?s="start":(bG(a,0,90)||bG(a,270,360))&&(s="start"):90===l?bG(a,0,90,!1,!0)?s="start":(bG(a,90,180)||bG(a,270,360))&&(s="end"):270===l?bG(a,0,90,!1,!0)?s="end":(bG(a,90,180)||bG(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(bG(a,0,90)||bG(a,270,360))&&(s="end")):"parallel"===i?u=bG(l,0,180,!0)?"top":"bottom":"horizontal"===i?bG(l,90,270,!1)?s="end":(bG(l,270,360,!1)||bG(l,0,90))&&(s="start"):"perpendicular"===i&&(s=bG(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function xn(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=bg(l,[t,s,e]),c=tU([bI(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(a,o)],2),f=tU(bn(be(c[0],u+(1===c[1]?bg(r?i:0,[t,s,e]):0)),bR(t.value,n)),2);return{x:f[0],y:f[1]}}function xr(t,e){"text"===t.nodeName&&t.attr(e)}function xi(t){var e,n,r,i,o;e=this.node().childNodes,n=t,r={hide:yx,show:yb,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=xe(e.__data__.value,t,n),i=e.querySelector(bt.labelItem.class);i&&xr(i,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&bY(t,e||1/0,n)},wrap:function(t,e,n){var r,i,o,a;t&&(r=t,i=e,void 0===(o=n)&&(o=2),void 0===a&&(a="top"),bq(r,{wordWrap:!0,wordWrapWidth:i,maxLines:o,textBaseline:a}))},getTextShape:function(t){return t.querySelector("text")}},!(o=void 0===(i=n.labelOverlap)?[]:i).length||o.forEach(function(t){var i,o,a,l=t.type,s=b9.get(l);if(i=e,o=n,a=l,!(o.labelOverlap.length<1)&&("hide"===a?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(i[0]):"rotate"===a?!i.some(function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))}):"ellipsis"!==a&&"wrap"!==a||i.filter(function(t){return t.querySelector("text")}).length>1))null==s||s(e,t,n,r)})}function xo(t,e,n,r,i){var o,a,l,s,u,c=n.indexOf(e);var f=yR(t).append((o=e,a=c,l=n,ym(u=(s=i).labelFormatter)?function(){return b_(bg(u,[o,a,l,bI(o.value,s)]))}:function(){return b_(o.label||"")})).attr("className",bt.labelItem.name).node(),p=tU(by(bA(r,[e,c,n])),2),h=p[0],d=p[1],y=d.transform,g=t$(d,["transform"]);bX(t,y);var v=function(t,e,n){var r,i,o=n.labelAlign;if(null===(i=e.style.transform)||void 0===i?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=bI(t.value,n),s=bN(t.value,n);if("horizontal"===o)return 0;return!bG(r=(bu(a="perpendicular"===o?xt([1,0],l):xt([s[0]<0?-1:1,0],s))+360)%180,-90,90)&&(r+=180),r}(e,t,i);return t.setLocalEulerAngles(+v),xr(f,tW(tW({},xe(e.value,v,i)),h)),bX(t,y),t.attr(g),f}function xa(t,e){return bL(t,e.tickDirection,e)}function xl(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G=(a=yR(this),l=t,s=e,u=n,f=(c=r).tickFormatter,p=xa(l.value,c),h="line",ym(f)&&(h=function(){return bg(f,[l,s,u,p])}),a.append(h).attr("className",bt.tickItem.name));d=t,y=e,g=n,v=G,m=this,b=r,x=i,O=xa(d.value,b),R=(I=(w=d,E=y,k=g,M=O,S=b.tickLength,A=tU((_=M,P=bg(S,[w,E,k]),[[0,0],[(j=tU(_,2))[0]*P,j[1]*P]]),2),C=(T=tU(A[0],2))[0],N=T[1],{x1:C,x2:(L=tU(A[1],2))[0],y1:N,y2:L[1]})).x1,D=I.x2,F=I.y1,z=I.y2,W=(B=tU(by(bA(x,[d,y,g,O])),2))[0],$=B[1],"line"===v.node().nodeName&&v.styles(tW({x1:R,x2:D,y1:F,y2:z},W)),m.attr($),v.styles(W);var V=tU(bR(t.value,r),2);return m6(this,{x:V[0],y:V[1]},o)}var xs=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.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}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}(),xu=m9({text:"text"},"title");function xc(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function xf(t,e){var n=Object.entries(e).reduce(function(e,n){var r=tU(n,2),i=r[0],o=r[1];return!t.node().attr(i)&&(e[i]=o),e},{});t.styles(n)}var xp=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return tB(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(xu.text.class);if(!a)return new xs(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=tU(bZ(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=tU([0,0,+e,+n],4),g=y[0],v=y[1],m=y[2],b=y[3],x=xc(r);if(x.includes("i"))return new xs(g,v,m,b);x.forEach(function(t,r){var i,o;"t"===t&&(v=(i=tU(0===r?[u+h,+n-u-h]:[0,+n],2))[0],b=i[1]),"r"===t&&(m=tU([+e-s-d],1)[0]),"b"===t&&(b=tU([+n-u-f],1)[0]),"l"===t&&(g=(o=tU(0===r?[s+p,+e-s-p]:[0,+e],2))[0],m=o[1])});var O=tU(bZ(o),4),w=O[0],E=O[1],k=O[2],M=O[3],S=tU([M+E,w+k],2),_=S[0],P=S[1];return new xs(g+M,v+w,m-_,b-P)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new xs(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=this;t.width,t.height,t.position,t.spacing;var m=t$(t,["width","height","position","spacing"]),b=tU(by(m),1)[0];var x=(l=(n=t).width,s=n.height,u=n.position,c=tU([+l/2,+s/2],2),p=(f=tU([+c[0],+c[1],"center","middle"],4))[0],h=f[1],d=f[2],y=f[3],(g=xc(u)).includes("l")&&(p=(r=tU([0,"start"],2))[0],d=r[1]),g.includes("r")&&(p=(i=tU([+l,"end"],2))[0],d=i[1]),g.includes("t")&&(h=(o=tU([0,"top"],2))[0],y=o[1]),g.includes("b")&&(h=(a=tU([+s,"bottom"],2))[0],y=a[1]),{x:p,y:h,textAlign:d,textBaseline:y}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;yN(!!m.text,yR(e),function(t){v.title=t.maybeAppendByClassName(xu.text,"text").styles(b).call(xf,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(yC);function xh(t,e,n,r,i){var o=tU(by(bh(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=t$(l,["transform"]);t.styles(a),e.styles(u);var c=s||function(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(i/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(i/2,")")}return""}(t.node(),a.direction,a.position);bX(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=xc(i),l=t.node().getLocalBounds(),s=tU(l.min,2),u=s[0],c=s[1],f=tU(l.halfExtents,2),p=f[0],h=f[1],d=tU(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=tU([u+p,c+h],2),m=v[0],b=v[1],x=tU(bZ(o),4),O=x[0],w=x[1],E=x[2],k=x[3];if(["start","end"].includes(i)&&"linear"===n.type){var M=n.startPos,S=n.endPos,_=tU("start"===i?[M,S]:[S,M],2),P=_[0],j=_[1],A=tU(be(bl([-j[0]+P[0],-j[1]+P[1]]),O),2),T=A[0],C=A[1];return{x:P[0]+T,y:P[1]+C}}return a.includes("t")&&(b-=h+g+O),a.includes("r")&&(m+=p+y+w),a.includes("l")&&(m-=p+2*y+k),a.includes("b")&&(b+=h+2*g+E),{x:m,y:b}}(yR(n._offscreen||n.querySelector(bt.mainGroup.class)),e,r),p=f.x,h=f.y,d=m6(e.node(),{x:p,y:h},i);return bX(t.node(),c),d}function xd(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=yN(i,e.maybeAppendByClassName(bt.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u,c,f,p=e.type,h=bh(e,"line");if("linear"===p)f=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S=e.showTrunc,_=e.startPos,P=e.endPos,j=e.truncRange,A=e.lineExtension,T=tU([_,P],2),C=tU(T[0],2),N=C[0],L=C[1],I=tU(T[1],2),R=I[0],D=I[1];var F=tU(A?(i=_,o=P,void 0===(a=A)&&(a=[0,0]),l=tU([i,o,a],3),u=(s=tU(l[0],2))[0],c=s[1],p=(f=tU(l[1],2))[0],h=f[1],y=(d=tU(l[2],2))[0],g=d[1],m=(v=tU([p-u,h-c],2))[0],w=(O=tU([-y/(x=Math.sqrt(Math.pow(m,2)+Math.pow(b=v[1],2))),g/x],2))[0],[w*m,w*b,(E=O[1])*m,E*b]):[,,,,].fill(0),4),z=F[0],B=F[1],W=F[2],$=F[3],G=function(e){return t.selectAll(bt.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(bt.line.name," ").concat(t.className)}).styles(n).transition(function(t){return m6(this,bW(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return m6(this,bW(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!S||!j)return G([{line:[[N+z,L+B],[R+W,D+$]],className:bt.line.name}]);var V=tU(j,2),H=V[0],U=V[1],q=R-N,Y=D-L,X=tU([N+q*H,L+Y*H],2),K=X[0],Z=X[1],Q=tU([N+q*U,L+Y*U],2),J=Q[0],tt=Q[1],te=G([{line:[[N+z,L+B],[K,Z]],className:bt.lineFirst.name},{line:[[J,tt],[R+W,D+$]],className:bt.lineSecond.name}]);return k=0,(M=e).truncRange,M.truncShape,M.lineExtension,te}(t,e,bj(h,"arrow"),n);else{;r=t,i=e,o=bj(h,"arrow"),a=n,l=i.startAngle,s=i.endAngle,u=i.center,c=i.radius,f=r.selectAll(bt.line.class).data([{path:bB.apply(void 0,tY(tY([l,s],tU(u),!1),[c],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",bt.line.name).styles(i).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,n,r,i,o,f=this;var p=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=bM(e,n),a=Array(Math.ceil(+(void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:o(e/(n.length-1))}});return t.animate(a,tW({fill:"both"},r))}(this,(t=this,n=(e=t.attributes).startAngle,r=e.endAngle,i=e.center,o=e.radius,tY(tY([n,r],tU(i),!1),[o],!1)),tY(tY([l,s],tU(u),!1),[c],!1),a.update);if(p){var h=function(){var t=bk(f.attributes,"__keyframe_data__");f.style.path=bB.apply(void 0,tY([],tU(t),!1))};p.onframe=h,p.onfinish=h}return p}).styles(i)},function(t){return t.remove()}).styles(o).transitions()}return!function(t,e,n,r){var i,o,a=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(o="arc"===e?t.select(bt.line.class):l?t.select(bt.lineSecond.class):t.select(bt.line.class),!a||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=o.node();f&&(f.style.markerEnd=void 0);return}var p=b_(s);p.attr(r),bP(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,p,e,h),f}(e,t,r)})||[],s=yN(o,e.maybeAppendByClassName(bt.tickGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=bT(o,a.tickFilter),u=bh(a,"tick"),i.selectAll(bt.tick.class).data(s,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",bt.tick.name).transition(function(t,e){return xl.call(this,t,e,s,a,u,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),xl.call(this,t,e,s,a,u,l.update)})},function(t){return t.transition(function(){var t=this,e=bv(this.childNodes[0],l.exit);return m5(e,function(){return t.remove()}),e})}).transitions()})||[],u=yN(a,e.maybeAppendByClassName(bt.labelGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=bT(o,a.labelFilter),u=bh(a,"label"),i.selectAll(bt.label.class).data(s,function(t,e){return e}).join(function(t){return t.append("g").attr("className",bt.label.name).transition(function(t){return xo(this,t,o,u,a),this.attr(xn(t,o,a)),this.__bbox__=t.bbox,null}).call(function(){return xi.call(i,a)})},function(t){return t.transition(function(t){var e=function(t,e,n,r){if(void 0===r&&(r="destroy"),i=t,o=e,"text"===i.nodeName&&"text"===o.nodeName&&i.attributes.text===o.attributes.text)return t.remove(),[null];var i,o,a=function(){"destroy"===r?t.destroy():"hide"===r&&yx(t),e.isVisible()&&yb(e)};if(!n)return a(),[null];var l=n.duration,s=void 0===l?0:l,u=n.delay,c=void 0===u?0:u,f=Math.ceil(+s/2),p=+s/4,h=function(t){if("circle"===t.nodeName){var e=tU(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},d=tU(h(t),2),y=d[0],g=d[1],v=tU(h(e),2),m=tU([(y+v[0])/2-y,(g+v[1])/2-g],2),b=m[0],x=m[1],O=t.style.opacity,w=e.style.opacity,E=t.animate([{opacity:void 0===O?1:O,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(x,")")}],tW(tW({fill:"both"},n),{duration:c+f+p})),k=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-x,")"),offset:.01},{opacity:void 0===w?1:w,transform:"translate(0, 0)"}],tW(tW({fill:"both"},n),{duration:f+p,delay:c+f-p}));return m5(k,a),[E,k]}(this.querySelector(bt.labelItem.class),xo(this,t,o,u,a),l.update),n=m6(this,xn(t,o,a),l.update);return this.__bbox__=t.bbox,tY(tY([],tU(e),!1),[n],!1)}).call(function(t){var e,n;e=bk(t,"_transitions").flat().filter(bK),n=function(){return xi.call(i,a)},0===e.length?n():Promise.all(e.map(function(t){return null==t?void 0:t.finished})).then(n)})},function(t){return t.transition(function(){var t=this,e=bv(this.childNodes[0],l.exit);return m5(e,function(){return yR(t).remove()}),e})}).transitions()})||[];return tY(tY(tY([],tU(l),!1),tU(s),!1),tU(u),!1).filter(function(t){return!!t})}var xy=function(t){function e(e){return t.call(this,e,m7)||this}return tB(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=(function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r})(o,u).filter(function(t){var e=t.value;return(!c||!(e>c[0])||!(e<c[1]))&&!0}),p=m2(void 0===n?a:n),h=yN(s,yR(e).maybeAppendByClassName(bt.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u,c,h,d,y,g,v;return n=e,r=f,i=t,o=p,l=(a=bh(i,"grid")).type,s=a.areaFill,u=b$(i),c=bT(r,i.gridFilter),g="segment"===l?(h=c,y=(d=i).gridLength,h.map(function(t,e){var n,r=t.value,i=tU(bR(r,d),2),o=i[0],a=i[1];var l=tU(be(bL(r,(n=d).gridDirection,n),y),2);return{id:e,points:[[o,a],[o+l[0],a+l[1]]]}})):function(t,e){var n=e.gridControlAngles,r=b$(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=tU(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=tU(bR(t.value,e),2),l=tU([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=bs(t),n=tU([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+o,s*i+u*r+a])}),{points:c,id:r}})}(c,i),v=tW(tW({},a),{center:u,areaFill:ym(s)?c.map(function(t,e){return bg(s,[t,e,c])}):s,animate:o,data:g}),n.selectAll(bt.grid.class).data([1]).join(function(t){return t.append(function(){return new bE({style:v})}).attr("className",bt.grid.name)},function(t){return t.transition(function(){return this.update(v)})},function(t){return t.remove()}).transitions()})||[],d=yR(e).maybeAppendByClassName(bt.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&xd(t,yR(this.offscreenGroup),f,m2(!1));var y=xd(t,yR(d.node()),f,p),g=yN(l,yR(e).maybeAppendByClassName(bt.titleGroup,"g"),function(e){var n,i,o,a,l;return n=e,i=r,o=t,a=p,l=o.titleText,n.selectAll(bt.title.class).data([{title:l}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(t){return t.append(function(){return b_(l)}).attr("className",bt.title.name).transition(function(){return xh(yR(this),n,i,o,a.enter)})},function(t){return t.transition(function(){return xh(yR(this),n,i,o,a.update)})},function(t){return t.remove()}).transitions()})||[];return tY(tY(tY([],tU(h),!1),tU(y),!1),tU(g),!1).flat().filter(function(t){return!!t})},e}(yC),xg=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},xv=function(t,e){if(!!t){if(nD(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(xg(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},xm=function(t,e,n){if(!nD(t)&&!nz(t))return t;var r=n;return xv(t,function(t,n){r=e(r,t,n)}),r},xb=function(t,e){return xm(t,function(t,n,r){return!e.includes(r)&&(t[r]=n),t},{})};function xx(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var xO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xw(t){var e;if(!(e=xO.exec(t)))throw Error("invalid format: "+t);return new xE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function xE(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}xw.prototype=xE.prototype,xE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function xk(t,e){var n=xx(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}var xM={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>xk(100*t,e),r:xk,s:function(t,e){var n=xx(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(jp=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+Array(1-o).join("0")+xx(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function xS(t){return t}var x_=Array.prototype.map,xP=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];(function(t){jd=(jh=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?xS:(e=x_.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));){;l=e[a=(a+1)%e.length]}return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?xS:(r=x_.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=xw(t)).fill,n=t.align,r=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):!xM[m]&&(void 0===g&&(g=12),v=!0,m="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===p?a:/[%p]/.test(m)?u:"",O=xM[m],w=/[defgprs%]/.test(m);function E(t){var o,a,u,p=b,E=x;if("c"===m)E=O(t)+E,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:O(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==r&&(k=!1),p=(k?"("===r?r:c:"-"===r||"("===r?"":r)+p,E=("s"===m?xP[8+jp/3]:"")+E+(k&&"("===r?")":""),w){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){E=(46===u?l+t.slice(o+1):t.slice(o))+E,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var M=p.length+t.length+E.length,S=M<d?Array(d-M+1).join(e):"";switch(y&&h&&(t=i(S+t,S.length?d-E.length:1/0),S=""),n){case"<":t=p+t+E+S;break;case"=":t=p+S+t+E;break;case"^":t=S.slice(0,M=S.length>>1)+p+t+E+S.slice(M);break;default:t=S+p+t+E}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return t+""},E}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=xw(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=xx(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=xP[8+i/3];return function(t){return r(o*t)+a}}}}(t)).format,jh.formatPrefix})({thousands:",",grouping:[3],currency:["$",""]});function xj(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],l=a.x,s=a.y,u=tU([l+a.width,s+a.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new xs(e,n,r-e,i-n)}var xA=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===a,p="row"===a||"column"===a,h=f?p?[1,0]:[-1,0]:p?[0,1]:[0,-1],d=tU([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=tU([y,g],2),o=i[0],a=i[1];return y=(e=tU([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new xs(o,a,n,r)}),m=xj(v),b={"flex-start":0,"flex-end":f?r-m.width:i-m.height,center:f?(r-m.width)/2:(i-m.height)/2},x=v.map(function(t){var e=t.x,n=t.y,r=xs.fromRect(t);return r.x=f?e+b[s]:e,r.y=f?n:n+b[s],r});xj(x);var O=function(t){var e=tU(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}};return x.map(function(t){var e=t.x,n=t.y,r=xs.fromRect(t);return r.x=f?e:e+O(r),r.y=f?n+O(r):n,r}).map(function(e){var n,r,i=xs.fromRect(e);return i.x+=null!==(n=t.x)&&void 0!==n?n:0,i.y+=null!==(r=t.y)&&void 0!==r?r:0,i})},xT=function(t,e,n){return[]},xC=function(t,e,n){if(0===e.length)return[];var r={flex:xA,grid:xT},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},xN=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[jo.BOUNDS_CHANGED,jo.INSERTED,jo.REMOVED],n.$margin=bZ(0),n.$padding=bZ(0);var r=e.style||{},i=r.margin,o=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===o?0:o,n.isMutationObserved=!0,n.bindEvents(),n}return tB(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=bZ(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=bZ(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,o=tU(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new xs((void 0===e?0:e)-u,(void 0===n?0:n)-a,r+u+l,i+a+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=tU(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=tU(this.$margin,4),u=s[0];return new xs(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(!!this.attributes.display&&!!this.isConnected){if(!this.children.some(function(t){return!t.isConnected}))try{var t=xC(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(e,n){var r=t[n],i=r.x,o=r.y;e.attr({x:i,y:o})})}catch(t){}}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target.isMutationObserved=!0,t.layout()})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(fh),xL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xI(t,e,n){return t.querySelector(e)?pV(t).select(e):pV(t).append(n)}function xR(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function xD(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},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 t in o&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class xF extends xN{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n)}}class xz extends xF{update(t){var e;let{subOptions:n}=t;this.attr(t),null===(e=this.child)||void 0===e||e.update(n)}}function xB(t,e){var n;return null===(n=t.filter(t=>t.getOptions().name===e))||void 0===n?void 0:n[0]}function xW(t,e,n){let{bbox:r}=t,{position:i="top",size:o,length:a}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,p=o||c||s,h=a||f||u,[d,y]=l?[h,p]:[p,h];return{orientation:l?"horizontal":"vertical",width:d,height:y,size:p,length:h}}function x$(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=xL(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${eh(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var xG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xV(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function xH(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function xU(t,e,n,r,i,o,a,l){var s;(void 0!==n||void 0!==o)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=p5(e,t=>+t),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),p=r||(null===(s=t.getFormatter)||void 0===s?void 0:s.call(t))||f,h=function(t,e){if(oe(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:o,insetLeft:a,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,o,r]:[a,l,n],f=new ec({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(a,l),d=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!oo(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new ec({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new ec({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return oe(l)||ot(l)?c.map((e,n,r)=>{var i,o;let s=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:on(l)&&"center"===a||ot(l)&&(null===(o=t.getTicks)||void 0===o?void 0:o.call(t))&&y(a)||ot(l)&&g(a)?1-u:u,label:f(p(p1(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:g(a)?1-l:l,label:f(p(p1(e),n,r)),id:String(n)}})}let xq=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var o;let{scales:[a]}=i,l=(null===(o=a.getTicks)||void 0===o?void 0:o.call(a))||a.getOptions().domain,s="string"==typeof n?jd(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},xY=xq(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:p,tickMethod:h,transform:d,indexBBox:y}=t,g=xG(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:m,theme:b})=>{var x,O,w,E;let{bbox:k}=v,[M]=i,{domain:S,xScale:_}=M.getOptions(),P=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${nV(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${eh(s)}`]||{})}(t,0,n,0,i,0);if("center"===i){var l;return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(l=o)||l===-Math.PI/2?10:0,tick:"center"!==r&&void 0})}return a}(M,m,b,e,l,o)),u),g),j=function(t,e,n="xy"){let[r,i,o]=xH(e);if("xy"===n)return t.includes("bottom")||t.includes("top")?i:r;if("xz"===n)return t.includes("bottom")||t.includes("top")?o:r;return t.includes("bottom")||t.includes("top")?i:o}(a||l,m,t.plane),A=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+l,a]};if("left"===t)return{startPos:[o+l,a+s],endPos:[o+l,a]};if("right"===t)return{startPos:[o,a+s],endPos:[o,a]};if("top"===t)return{startPos:[o,a+s],endPos:[o+l,a+s]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+s]};if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=ol(r),[f,p]=os(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[m,b]=[t+o-d,n+a-y],[x,O]=[Math.cos(e),Math.sin(e)],w=oe(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[m+v*x,b+v*O],endPos:[m+g*x,b+g*O],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[m,b],gridControlAngles:Array(w).fill(0).map((t,e,n)=>(p-f)/w*e)}}}return{}}(l,o,k,m,_),T=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(m),C=xU(M,S,f,r,p,h,l,m),N=y?C.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):C;let L=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),{type:"linear",data:N,crossSize:s,titleText:xR(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],l=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}(d,P),grid:(x=P.grid,O=m,w=M,!(oe(E=O)&&ot(E)||oi(O))&&(void 0===x?!!w.getTicks:x)),gridLength:j,line:!0,indexBBox:y}),P.line?null:{lineOpacity:0}),A),T),n);return L.labelOverlap.find(t=>"hide"===t.type)&&(L.crossSize=!1),new xy({className:"axis",style:x$(L)})}}),xX=xq(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:l,tickMethod:s,important:u={},style:c={},indexBBox:f,title:p,grid:h=!1}=t,d=xG(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:c}=e,{domain:y}=t.getOptions(),g=xU(t,y,l,o,a,s,r,n),v=f?g.map((t,e)=>{let n=f.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):g,[m,b]=ol(n),x=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=e,u=[o+l/2,a+s/2],c=Math.min(l,s)/2,[f,p]=os(i),[h,d]=xH(i),y={center:u,radius:c,startAngle:f,endAngle:p,gridLength:Math.min(h,d)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,c,m,b,n),{axis:O,axisArc:w={}}=i;return new xy({style:xb(x$(nB({},O,w,x,Object.assign(Object.assign({type:"arc",data:v,titleText:xR(p),grid:h},d),u))),["transform"])})}});xY.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},xX.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let xK=t=>(...e)=>{let n=xY(Object.assign({},{crossPadding:50},t))(...e);return xV(n,t),n};xK.props=Object.assign(Object.assign({},xY.props),{defaultPosition:"bottom"});let xZ=t=>(...e)=>{let n=xY(Object.assign({},{crossPadding:10},t))(...e);return xV(n,t),n};xZ.props=Object.assign(Object.assign({},xY.props),{defaultPosition:"left"});var xQ=function(){},xJ=function(t,e,n){var r=t,i=yW(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(!yB(r[t])&&(r[t]=bS(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},x0=function(t,e,n){return t<e?e:t>n?n:t},x1=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,!n&&t.apply(i,o)},e),a&&t.apply(i,o)}},x2=m9({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"),x5=function(t){function e(e){var n,r,i,o=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,0-(i=6)],["L",(n=0)+i,r=0],["L",n-i,r+i],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return o.playState="idle",o.contentGroup=o.appendChild(new fh({class:x2.contentGroup.name})),o.playWindow=o.contentGroup.appendChild(new fh({class:x2.playWindow.name})),o.innerCurrPage=o.defaultPage,o}return tB(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return x0(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t,e,n=tU(((null===(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])||void 0===e?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,tY([],tU(t),!1))}),2),r=n[0],i=n[1],o=this.attributes,a=o.pageWidth,l=o.pageHeight;return{pageWidth:void 0===a?r:a,pageHeight:void 0===l?i:l}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,l=o.pageHeight;return new xs(n,r,a+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,o=this.playWindow,a=this.pageViews;if("idle"!==i||t<0||a.length<=0||t>=a.length)return null;a[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=tU(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=m4(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return m5(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:x0(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:x0(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(x2.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?yb(e):yx(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,o=r.controllerPadding,a=n.getBBox(),l=a.width;a.height;var s=tU("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),p=f.width,h=f.height,d=e.getBBox(),y=d.width,g=d.height,v=Math.max(p,l,y),m="horizontal"===i?{offset:[[0,0],[p/2+o,0],[p+l+2*o,0]],textAlign:"start"}:{offset:[[v/2,-h-o],[v/2,0],[v/2,g+o]],textAlign:"center"},b=tU(m.offset,3),x=tU(b[0],2),O=x[0],w=x[1],E=tU(b[1],2),k=E[0],M=E[1],S=tU(b[2],2),_=S[0],P=S[1],j=m.textAlign,A=n.querySelector("text");A&&(A.style.textAlign=j),t.setLocalPosition(O,w),n.setLocalPosition(k,M),e.setLocalPosition(_,P)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;!(n.length<2)&&(null===(t=this.pageInfoGroup.querySelector(x2.pageInfo.class))||void 0===t||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=tU(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,l=t.maybeAppendByClassName(x2.controller,"g");if(yO(l.node(),a),a){var s=bh(this.attributes,"button"),u=bh(this.attributes,"pageNum"),c=tU(by(s),2),f=c[0],p=c[1],h=f.size,d=t$(f,["size"]),y=!l.select(x2.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(x2.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(x2.prevBtn,"path"),m=l.maybeAppendByClassName(x2.nextBtnGroup,"g").styles(p);this.nextBtnGroup=m.node(),[v,m.maybeAppendByClassName(x2.nextBtn,"path")].forEach(function(t){t.styles(tW(tW({},d),{transformOrigin:"center"})),bP(t.node(),h,!0)});var b=l.maybeAppendByClassName(x2.pageInfoGroup,"g");this.pageInfoGroup=b.node(),b.maybeAppendByClassName(x2.pageInfo,"text").styles(u),this.updatePageInfo(),l.node().setLocalPosition(i+n,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=yR(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=x1(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(jo.INSERTED,e),this.playWindow.addEventListener(jo.REMOVED,e)},e}(yC);y$.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),y$.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]}),y$.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]});function x3(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var x4=m9({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"),x6=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new fc({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return tB(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,r=t.node().getBBox(),i=r.width,o=r.height,a=e.node().getBBox();return{markerWidth:n,labelWidth:i,valueWidth:a.width,height:Math.max(n,o,a.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=tU(bZ(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.height,l=this.actualSpace,s=l.labelWidth,u=l.valueWidth,c=tU(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=tU(this.span,2);s=(t=tU([d[0]*h,d[1]*h],2))[0],u=t[1]}return{width:o+s+u+f+p,height:a,markerWidth:o,labelWidth:s,valueWidth:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var e=tU(bZ(t),2),n=e[0],r=e[1];return this.showValue?[n,r]:[n,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,o=t.height,a=tU(this.spacing,2),l=a[0];return{height:o,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+l,e+n+l+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(x4.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,o=void 0===i?e.strokeWidth:i,a=n.markerLineWidth,l=void 0===a?e.lineWidth:a,s=n.markerStroke,u=void 0===s?e.stroke:s,c=+(o||l||(u?1:0))*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=bh(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(x4.markerGroup,"g").style("zIndex",0),yN(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(x4.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=tH(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=tU(a.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(i,o),yR(i).styles(r)):(i.remove(),yR(o).attr("className",x4.marker.name).styles(r),t.appendChild(o)):(yR(o).attr("className",x4.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),bP(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=bh(this.attributes,"label"),n=e.text,r=t$(e,["text"]);this.labelGroup=t.maybeAppendByClassName(x4.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(x4.label,function(){return b_(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=bh(this.attributes,"value"),r=n.text,i=t$(n,["text"]);this.valueGroup=t.maybeAppendByClassName(x4.valueGroup,"g").style("zIndex",0),yN(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(x4.value,function(){return b_(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=bh(this.attributes,"background");this.background=t.maybeAppendByClassName(x4.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(x4.background,"rect").styles(tW({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=tU(t.position,3),o=i[0],a=i[1],l=i[2],s=r/2;this.markerGroup.styles({x:o,y:s}),this.labelGroup.styles({x:a,y:s}),bY(this.labelGroup.select(x4.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),bY(this.valueGroup.select(x4.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=yR(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(yC),x8=m9({page:"item-page",navigator:"navigator",item:"item"},"items"),x9=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},x7=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:xQ,mouseenter:xQ,mouseleave:xQ})||this;return n.navigatorShape=[0,0],n}return tB(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=bh(this.attributes,"item");return e.map(function(t,i){var o=t.id,a=void 0===o?i:o,l=t.label,s=t.value;return{id:"".concat(a),index:i,style:tW({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=tU(n,2);return[r[0],bg(r[1],[t,i,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=tU(this.navigatorShape,1)[0],l=tU(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var p,h,d=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var m=tU(v,2),b=m[0],x=m[1],O=(r-a-(u-1)*o)/u,w=e.getBBox().height,E=tU([0,0],2),k=E[0],M=E[1];return"horizontal"===n?(k=(p=tU([f,b*(w+i)],2))[0],M=p[1],f=x===u-1?0:f+O+o):(k=(h=tU([x*(O+o),f],2))[0],M=h[1],f=b===s-1?0:f+w+i),{page:d,index:l,row:b,col:x,pageIndex:y,width:O,height:w,x:k,y:M}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=tU(this.navigatorShape,1)[0],a=tU(this.grid,2),l=a[0],s=a[1],u=tU([e-o,n],2),c=u[0],f=u[1],p=tU([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],m=p[5],b=p[6],x=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),O=p.width,w=p.height,E=0===b?0:i,k=b+E+O;return k<=c&&x9(v,function(t){return t<s})?(h=(n=tU([b+E,x,k],3))[0],d=n[1],b=n[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(m=(o=tU([m+1,0,0,x+w+r],4))[0],v=o[1],b=o[2],(x=o[3])+w<=f&&x9(m,function(t){return t<l}))?(h=(a=tU([b,x,O],3))[0],d=a[1],b=a[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(h=(u=tU([0,0,O,0,y+1,0,0,0],8))[0],d=u[1],b=u[2],x=u[3],y=u[4],g=u[5],m=u[6],v=u[7],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return x3(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(x8.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(x8.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);yR(t).selectAll(x8.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new x6({style:t.style})}).attr("className",x8.item.name).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,o=tU(this.navigatorShape,2),a=o[0],l=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this;var r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=tU(t,2);return{page:e[0],layouts:e[1]}}),i=tY([],tU(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new fh({className:x8.page.name}));e.forEach(function(t){var e=t.x,n=t.y,o=t.index,a=t.width,l=t.height,s=i[o];r.appendChild(s),xJ(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=yP({orientation:this.attributes.orientation},bh(this.attributes,"nav")),n=this;return t.selectAll(x8.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new x5({style:e})}).attr("className",x8.navigator.name).each(function(){n.navigator=this})},function(t){return t.each(function(){this.update(e)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(yR(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new cI(t,{detail:e});this.dispatchEvent(n)},e}(yC),Ot=m9({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Oe={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},On=function(t){function e(e){return t.call(this,e,Oe)||this}return tB(e,t),e.prototype.render=function(t,e){var n=yR(e).maybeAppendByClassName(Ot.markerGroup,"g");this.renderMarker(n);var r=yR(e).maybeAppendByClassName(Ot.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?x3(r,"horizontalHandle","verticalHandle"):i;yN(!!o,t,function(t){var n=bh(e.attributes,"marker"),r=tW({symbol:o},n);e.marker=t.maybeAppendByClassName(Ot.marker,function(){return new y$({style:r})}).update(r)})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,l=n.formatter;yN(r,t,function(t){var n,r=bh(e.attributes,"label"),o=r.text,s=t$(r,["text"]),u=(null===(n=t.select(Ot.marker.class))||void 0===n?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=tU(x3(i,[0,(void 0===f?0:f)+a,"center","top"],[(void 0===c?0:c)+a,0,"start","middle"]),4),h=p[0],d=p[1],y=p[2],g=p[3];t.maybeAppendByClassName(Ot.label,"text").styles(tW(tW({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(yC),Or={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Oi=yP({},Or,{}),Oo=yP({},Or,bd(Oe,"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"}),Oa=m9({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"),Ol=function(t){function e(e){return t.call(this,e,Oi)||this}return tB(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=tU(by(bh(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(Oa.titleGroup,"g").styles(s);var u=tW(tW({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(Oa.title,function(){return new xp({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=tU(by(bh(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=tW(tW({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(Oa.itemsGroup,"g").styles(tW({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(Oa.items.class).data(["items"]).join(function(t){return t.append(function(){return new x7({style:u})}).attr("className",Oa.items.name).each(function(){c.items=yR(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().setLocalPosition(e,n)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new xs(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),i=null===(n=this.items)||void 0===n?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,l=t.getBBox(),s=e.getBBox(),u=xc(r),c=tU(bZ(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=tU(bZ(o),4),g=y[0],v=y[1],m=y[2],b=y[3],x=tU([d+p,f+h],2),O=x[0],w=x[1],E=tU([b+v,g+m],2),k=E[0],M=E[1];if("l"===u[0])return new xs(l.x,l.y,s.width+l.width+O+k,Math.max(s.height+M,l.height));if("t"===u[0])return new xs(l.x,l.y,Math.max(s.width+k,l.width),s.height+l.height+w+M);var S=tU([e.attributes.width||s.width,e.attributes.height||s.height],2),_=S[0],P=S[1];return new xs(s.x,s.y,_+l.width+O+k,P+l.height+w+M)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=yR(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(yC),Os=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function Ou(t){if(Os(t))return t[t.length-1]}var Oc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Of=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=Oc(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=c;return e=>{let{value:r,theme:i}=e,{bbox:a}=r,{width:u,height:p}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:o}=xW(t,e,n);return{width:i,height:o}}(r,t,Of),h=xD(o,n),d=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:u,height:p,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==f&&{gridRow:f}),{titleText:xR(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=xB(t,"size");return n instanceof vD?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=xB(t,"shape"),r=xB(t,"color"),i=n?n.clone():null,o=[];for(let[t,n]of e){let e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var o;return i?i.map(e||"point"):(null===(o=null==t?void 0:t.style)||void 0===o?void 0:o.shape)||n.defaultShape||"point"});"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length||!n)return o[0];let{range:a}=n.getOptions();return o.map(([t,e])=>{let n=0;for(let t=0;t<o.length;t++){let r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,a;let l=(null===(a=null===(i=null===(n=r[`mark.${o}`])||void 0===n?void 0:n.props)||void 0===i?void 0:i.shape[t])||void 0===a?void 0:a.props.defaultMarker)||Ou(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,strokeWidth:i,path:o,stroke:a,lineWidth:l,color:s}=e,u=dP(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=d2.get(t)||d2.get("point");return(...t)=>new fv({style:Object.assign(Object.assign({},u),{path:c(...t),stroke:c.style.includes("stroke")?s||a:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?l||l||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${a[t]}`;return xB(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=xB(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?jd(n):n,s=xB(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=x$(Object.assign({},y,d,c)),v=new xz({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new Ol({className:"legend-category",style:g})),v}};Of.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Op={}.toString,Oh=function(t,e){return Op.call(t)==="[object "+e+"]"},Od=function(t){return Array.isArray?Array.isArray(t):Oh(t,"Array")},Oy=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},Og=function(t,e){if(!!t){if(Od(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(Oy(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},Ov=function(t){return Oh(t,"Function")},Om=Array.prototype;Om.splice,Om.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var Ob=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return Og(t,function(n,r){!(Ov(t)&&"prototype"===r)&&e.push(n)}),e},Ox=function(t){if(!("object"==typeof(e=t)&&null!==e)||!Oh(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},OO=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&Ox(a)?(!Ox(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):Od(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var Ow=function(t){return t};!function(t,e){if(!Ov(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!jg&&(jg=document.createElement("canvas").getContext("2d")),jg.font=[o,a,i,n+"px",r].join(" "),jg.measureText(Oh(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tq([t],Ob(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class OE{constructor(t){this.options=OO({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=OO({},this.options,t),this.rescale(t)}rescale(t){}}function Ok(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function OM(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function OS(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function O_(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=OS(a,o,e+1/3),s=OS(a,o,e);return[255*l,255*s,255*OS(a,o,e-1/3),i]}(r):null}let OP=(t,e)=>n=>t*(1-n)+e*n,Oj=(t,e)=>{let n=O_(t),r=O_(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},OA=(t,e)=>"number"==typeof t&&"number"==typeof e?OP(t,e):"string"==typeof t&&"string"==typeof e?Oj(t,e):()=>t,OT=(t,e)=>{let n=OP(t,e);return t=>Math.round(n(t))};function OC(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let ON=Math.sqrt(50),OL=Math.sqrt(10),OI=Math.sqrt(2);function OR(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=ON?10:o>=OL?5:o>=OI?2:1)*10**i:-(10**-i)/(o>=ON?10:o>=OL?5:o>=OI?2:1)}let OD=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=OR(l,s,n))>0?r=OR(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=OR(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},OF=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=Ok(o,a),i=n(l,s)):(r=Ok(a,o),i=n(s,l)),OM(i,r)},Oz=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=Ok(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,1,r)-1,a=i[n];return OM(o[n],a)(e)}},OB=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?Oz:OF)(t,e,r?OT:n)};class OW extends OE{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:OP,tickCount:5}}map(t){return OC(t)?this.output(t):this.options.unknown}invert(t){return OC(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return OD}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):Ow}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=OB(n.map(t),r,o,i);this.output=OM(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=OB(i,r.map(t),OP);this.input=OM(e,n,o)}}let O$=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=OR(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class OG extends OW{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:OA,tickMethod:O$,tickCount:5}}chooseTransforms(){return[Ow,Ow]}clone(){return new OG(this.options)}}function OV(t,e){return+t.toPrecision(e)}function OH(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var OU={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Oq=m9({background:"background",labelGroup:"label-group",label:"label"},"indicator"),OY=function(t){function e(e){var n=t.call(this,e,OU)||this;return n.point=[0,0],n.group=n.appendChild(new fh({})),n.isMutationObserved=!0,n}return tB(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=tU(bZ(t.padding),4),r=n[0],i=n[1],o=n[2],a=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new xs(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=bh(this.attributes,"background");this.background=yR(this.group).maybeAppendByClassName(Oq.background,"path").styles(tW(tW({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=tU(by(bh(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,t$(i,["text"]));this.label=yR(this.group).maybeAppendByClassName(Oq.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(Oq.label,function(){return b_(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=tU(this.point,2),e=t[0],n=t[1];this.group.attr("x",-e).attr("y",-n)},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,l=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,tY([s+1,1],tU(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=b6.apply(void 0,tY([],tU(t),!1)),r=tU(t,2),i=tU(r[0],2),o=i[0],a=i[1],l=tU(r[1],2),s=l[0],u=l[1],c=tU(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=tU(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,m=g*Math.sqrt(3)/2*.8,b=tU([h,h+y-v,h+y,h+y+v,d],5),x=b[0],O=b[1],w=b[2],E=b[3],k=b[4];return n?(this.point=[w,a-m],[["L",x,a],["L",O,a],["L",w,a-m],["L",E,a],["L",k,a]]):(this.point=[o+m,w],[["L",o,x],["L",o,O],["L",o+m,w],["L",o,E],["L",o,k]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?yx(this):yb(this)},e.prototype.bindEvents=function(){this.label.on(jo.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(yC),OX={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},OK={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},OZ={orientation:"horizontal",showLabel:!0,type:"start"},OQ=m9({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),OJ=m9({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),O0=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,e){var n=t.size,r=void 0===n?10:n,i=t.radius,o=t.orientation,a=t$(t,["size","radius","orientation"]),l=2.4*r,s=yR(e).maybeAppendByClassName(OJ.iconRect,"rect").styles(tW(tW({},a),{width:r,height:l,radius:void 0===i?r/4:i,x:-r/2,y:-l/2})),u=1/3*r,c=2/3*r,f=1/4*l,p=3/4*l;s.maybeAppendByClassName("".concat(OJ.iconLine,"-1"),"line").styles(tW({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(OJ.iconLine,"-2"),"line").styles(tW({x1:c,x2:c,y1:f,y2:p},a)),s.node().setOrigin(r/2,l/2),"vertical"===o?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},e}(yC),O1=function(t){function e(e){return t.call(this,e,OZ)||this}return tB(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=bh(this.attributes,"label"),i=r.transform,o=tU(by(t$(r,["transform"]),[]),2),a=o[0],l=o[1],s=yR(t).maybeAppendByClassName(OJ.labelGroup,"g").styles(l),u=tW(tW({},OK),a),c=u.text,f=t$(u,["text"]);yN(!!n,s,function(t){e.label=t.maybeAppendByClassName(OJ.label,"text").styles(tW(tW({},f),{transform:i,text:"".concat(c)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.orientation,r=e.type,i=tW(tW({orientation:n},OX),bh(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new O0({style:i})}:o;yR(t).maybeAppendByClassName(OJ.iconGroup,"g").selectAll(OJ.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",OJ.icon.name)},function(t){return t.update(i)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(yC);function O2(t,e){var n=tU(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var O5=m9({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function O3(t){var e=t.orientation,n=t.size,r=t.length;return x3(e,[r,n],[n,r])}function O4(t){var e=t.type,n=tU(O3(t),2),r=n[0],i=n[1];return"size"===e?[["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"]]}var O6=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return tB(e,t),e.prototype.render=function(t,e){!function(t,e){var n=bh(e,"track");t.maybeAppendByClassName(O5.track,"path").styles(tW({path:O4(e)},n))}(yR(e).maybeAppendByClassName(O5.trackGroup,"g"),t),!function(t,e){var n=bh(e,"selection"),r=function(t){var e,n,r,i,o,a,l=t.orientation,s=t.color,u=t.block,c=t.partition,f=(a=ym(s)?Array(20).fill(0).map(function(t,e,n){return s(e/(n.length-1))}):s).length,p=a.map(function(t){return sW(t).toString()});if(!f)return"";if(1===f)return p[0];if(u){;return e=c,n=p,r=l,i=Array.from(n),Array(o=e.length).fill(0).reduce(function(t,n,r){var a=i[r%i.length];return t+" ".concat(e[r],":").concat(a).concat(r<o-1?" ".concat(e[r+1],":").concat(a):"")},"l(".concat("horizontal"===r?"0":"270",")"))}return p.reduce(function(t,e,n){return t+" ".concat(n/(f-1),":").concat(e)},"l(".concat(x3(l,"0","270"),")"))}(e),i=t.maybeAppendByClassName(O5.selection,"path").styles(tW({path:O4(e),fill:r},n)),o=i.maybeAppendByClassName(O5.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=tU(O3(t),2),i=r[0],o=r[1],a=tU(n,2),l=a[0],s=a[1],u=x3(e,l*i,0),c=x3(e,0,l*o),f=x3(e,s*i,i),p=x3(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(e)}).node();i.style("clip-path",o)}(yR(e).maybeAppendByClassName(O5.selectionGroup,"g"),t)},e}(yC),O8=function(t){function e(e){var n=t.call(this,e,Oo)||this;return n.eventToOffsetScale=new OG({}),n.innerRibbonScale=new OG({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=O2(r.map(function(t){return t.value}),o).range;n.showIndicator((a[0]+a[1])/2,"".concat(a[0],"-").concat(a[1])),n.dispatchIndicated(o,a)}else{var l=n.getTickValue(o);n.showIndicator(l),n.dispatchIndicated(l)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=tU(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),l=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==l&&(n.prevValue=a,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return tB(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new xs(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(yR(e));var i=this.availableSpace,o=i.x,a=i.y,l=yR(e).maybeAppendByClassName(Oa.contentGroup,"g").styles({x:o,y:a});yN(!!r,l.maybeAppendByClassName(Oa.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(Oa.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Oa.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(s),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t,e=this.attributes,n=e.data,r=e.domain;return r?{min:r[0],max:r[1]}:(t=n,{min:Math.min.apply(Math,tY([],tU(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,tY([],tU(t.map(function(t){return t.value})),!1))})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=tU(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=tU(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return x3(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=bh(this.attributes,"title"),l=tW(tW({},a),{width:i,height:o,text:r}),s=this;t.selectAll(Oa.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new xp({style:l})}).attr("className",Oa.title.name).each(function(){s.title=this})},function(t){return t.update(l)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new xs(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,n=t.labelDirection;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[e][n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new xs(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null===(t=this.label.querySelector(bt.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new xs(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,o=r.height,a=this.ifHorizontal(o,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,o);return{width:i,height:o,size:a,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,l=a.size,s=a.length,u=tU(this.ifHorizontal([o,i],[i,o]),2),c=u[0],f=u[1],p=e?this.handleShape:{size:0,length:0},h=p.size,d=p.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n?n:["bottom","right"].includes(v)?Math.min(c-l,(c-h)/y):c*(1-y)>h?Math.max(c-l,0):Math.max((c-l-h)/y,0);var m=Math.max(d,s),b=f-m,x=tU(this.ifHorizontal([b,g],[g,b]),2),O=x[0],w=x[1],E=["top","left"].includes(v)?l:0,k=tU(this.ifHorizontal([m/2,E],[E,m/2]),2);return new xs(k[0],k[1],O,w)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,l=bh(this.attributes,"ribbon"),s=this.range,u=s.min,c=s.max,f=this.ribbonBBox,p=f.x,h=f.y,d=this.ribbonShape,y=yP({x:p,y:h,length:d.length,size:d.size,type:r,orientation:i,color:o,block:a,partition:n.map(function(t){return(t.value-u)/(c-u)}),range:this.ribbonRange},l);this.ribbon=t.maybeAppendByClassName(Oa.ribbon,function(){return new O6({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(Oa.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=bh(this.attributes,"handle"),i=tU(this.selection,2),o=i[0],a=i[1],l=tW(tW({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?On:O1,c=this;this.handlesGroup.selectAll(Oa.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:l})}).attr("className",function(t){var e=t.type;return"".concat(Oa.handle," ").concat(c.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),c["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",c.onDragStart(e))})},function(t){return t.update(l).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;c["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=tU(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},e.prototype.adjustTitle=function(){var t=this.attributes,e=t.titlePosition,n=t.orientation,r=tU(this.getElementsByClassName(Oa.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!!r&&!!i){if("top-left"===e&&"horizontal"===n){var o=tU(i.getLocalBounds().min,1)[0],a=tU(r.getLocalBounds().min,1)[0];r.style.x=+(this.style.x||0)+(o-a)}}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new xs(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=tU([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new xs(0,0,o,a),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=tU(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,l=this.getOffset(e),s=tU(this.ifHorizontal([i+l,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({x:u,y:c,formatter:n})},e.prototype.renderIndicator=function(t){var e=bh(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(Oa.indicator,function(){return new OY({})}).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var o,a,l=null!==(o=null==n?void 0:n.id)&&void 0!==o?o:r.toString();if(e.push(tW(tW({},n),{id:l,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=tU([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(tW(tW({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(p)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=tU(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,o=bh(this.attributes,"tick"),a=bh(this.attributes,"label"),l=a.align,s=yP(tW({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),bd(o,"tick"),bd(a,"label"),{data:this.labelData}),u=tW(tW(tW({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(Oa.label,function(){return new xy({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,l=this.labelFixedSpacing,s=tU([0,0,0],3),u=s[0],c=s[1],f=s[2],p=null!=i?i:o;if(e){f=p;"positive"===n?"right"===a?(u=p,f=p):"bottom"===a&&(u=f):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))}else"positive"===n?"right"===a||"bottom"===a&&(u=o+l):n;return{offset:u,spacing:r,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,l=o.spacing,s=o.tickLength,u=tU(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!1)}},e.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)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t){this.hideIndicator();return}var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=x0(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+a,l],[a,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),yb(this.indicator.node())},e.prototype.hideIndicator=function(){yx(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i=tU(this.selection,2),o=i[0],a=i[1],l=tU([t,e],2),s=l[0],u=l[1];n&&(s+=o,u+=a);var c=this.range;s=(r=tU(function(t,e,n,r){void 0===r&&(r=4);var i,o=tU(t,2),a=o[0],l=o[1],s=tU(e,2),u=s[0],c=s[1],f=tU(n,2),p=f[0],h=f[1],d=tU([u,c],2),y=d[0],g=d[1],v=g-y;if(y>g&&(y=(i=tU([g,y],2))[0],g=i[1]),v>l-a)return[a,l];if(y<a)return p===a&&h===g?[a,g]:[a,v+a];if(g>l)return h===l&&p===y?[y,l]:[l-v,l];return[y,g]}([c.min,c.max],[s,u],this.selection),2))[0],u=r[1],this.update({defaultValue:[s,u]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return void 0===e?OV((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r,i,o=this.attributes,a=o.data,l=o.block,s=this.range.min;if(l)return O2(a.map(function(t){return t.value}),t).tick;return e=t,n=this.step,i=Math.round((e-(r=s))/n),r+i*n},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=tU(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,tY([],tU(OH(t)),!1));return x0(this.getOffset(u-s,!0),r,i)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return(a.update({domain:[r,i],range:[0,o]}),e)?a.invert(t):a.map(t)},e.prototype.dispatchSelection=function(){var t=new cI("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new cI("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(yC),O9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function O7(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],p6(e)];return[n,r]}let wt=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=O9(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:u})=>{let{bbox:c}=i,{x:p,y:h,width:d,height:y}=c,g=xD(o,n),{legendContinuous:v={}}=a,m=x$(Object.assign({},v,Object.assign(Object.assign({titleText:xR(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>jd(e)(t.label):e},function(t,e,n,r,i,o){let a=xB(t,"color"),l=function(t,e,n){let{size:r}=e,i=xW(t,e,n);return function(t,e,n){var r;if(t.size=e,"horizontal"===(r=n)||0===r)t.height=e;else t.width=e;return t}(i,r,i.orientation)}(n,r,i);if(a instanceof mI){let{range:t}=a.getOptions(),[e,n]=O7(a);return a instanceof mz||a instanceof mD?function(t,e,n,r,i){var o;let a=e.thresholds;let l=(o=r,t=>({value:t/o,label:String(t)}));return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(l)})}(l,a,e,n,t):function(t,e,n){let r=[-1/0,...e.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(l,a,t)}let s=xB(t,"size");return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[sW(e).toString()]})),r}(l,s),[c,f]=O7(u),[p,h]=O7([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof mV)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,s,xB(t,"opacity"),e,o)}(r,u,i,t,wt,a)),s),f)),b=new xF({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:m})});return b.appendChild(new O8({className:"legend-continuous",style:m})),b}};wt.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let we=t=>()=>new fh;we.props={};var wn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wr(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}let wi=(PZ={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=wn(t,["width","title","subtitle","spacing","align"]),s=nY(l,"title"),u=nY(l,"subtitle"),c=xI(e,".title","text").attr("className","title").call(p9,Object.assign(Object.assign(Object.assign({},wr(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();xI(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},wr(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends ff{constructor(t){super(t),this.descriptor=PZ}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(nB({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}}),wo=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new wi({style:nB({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function wa({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}wo.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};function wl(t){return"object"==typeof t?t.valueOf():t}class ws extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=wl,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(wa({map:this.map,initKey:this.initKey},t))}has(t){return super.has(wa({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let wu=Symbol("defaultUnknown");function wc(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function wf(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==wu)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function wp(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class wh extends OE{getDefaultOptions(){return{domain:[],range:[],unknown:wu}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&wc(this.domainIndexMap,this.getDomain(),this.domainKey),wf({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&wc(this.rangeIndexMap,this.getRange(),this.rangeKey),wf({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=wp(e),this.rangeKey=wp(n),!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 wh(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class wd extends wh{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:wu,flex:[]}}constructor(t){super(t)}clone(){return new wd(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new ws(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new ws(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var wy=function(t){if("object"!=typeof t||null===t)return t;if(yS(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=wy(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=wy(t[i]):e[i]=t[i];return e},wg=function(t){function e(e){var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,m8({},{type:"column"},tW({style:r},i)))||this).columnsGroup=new fh({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return tB(e,t),e.prototype.render=function(){var t=this.attributes.columns;yR(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(yP({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(fs),wv=function(t){function e(e){var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,m8({},{type:"lines"},tW({style:r},i)))||this).linesGroup=n.appendChild(new fh),n.areasGroup=n.appendChild(new fh),n.render(),n}return tB(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas;e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(yP({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){yR(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){yR(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(fs),wm=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},wb=function(t,e){if(t===e)return!0;if(!t||!e||yW(t)||yW(e))return!1;if(wm(t)||wm(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=wb(t[r],e[r]));r++);return n}if(yw(t)||yw(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=wb(t[i[r]],e[i[r]]));r++);return n}return!1};function wx(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return tY([e===n?"M":"L"],tU(t),!1)});return e?r.reverse():r}function wO(t,e){if(void 0===e&&(e=!1),t.length<=2)return wx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];!wb(o,n.slice(-2))&&n.push.apply(n,tY([],tU(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=tU(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=bi(p,g),h=bo(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n){if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][n?0:1]],a=t[n?(d+1)%v:d+1];var m=[0,0];m=be(m=br(a,o),.4);var b=ba(g,o),x=ba(g,a),O=b+x;0!==O&&(b/=O,x/=O);var w=be(m,-b),E=be(m,x);s=bn(g,w),l=bi(l=bn(g,E),bo(a,g)),w=be(w=br(l=bo(l,bi(a,g)),g),-b/x),s=bi(s=bn(g,w),bo(o,g)),s=bo(s,bi(o,g)),E=be(E=br(g,s),x/b),l=bn(g,E),f&&(s=bi(s=bo(s,p),h),l=bi(l=bo(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s)}else u=g}return n&&c.push(c.shift()),c}(l,.4,a,n),f=l.length,p=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],o=l[s+1],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]]);return a&&(r=c[f],i=c[f+1],o=tU(l,1)[0],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]])),p}(n,!1);return e?a.unshift(tY(["M"],tU(t[r-1]),!1)):a.unshift(tY(["M"],tU(t[0]),!1)),a}function ww(t,e,n){var r=wy(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var wE=function(t){if(!!yS(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},wk=function(t,e){if(!!yS(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=ym(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},wM=function(t){if(!!yS(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},wS=function(t,e){if(!!yS(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=ym(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function w_(t){return 0===t.length?[0,0]:[wE(wk(t,function(t){return wE(t)||0})),wM(wS(t,function(t){return wM(t)||0}))]}function wP(t){for(var e=wy(t),n=e[0].length,r=tU([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1){for(var l=e[a],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=o[s],o[s]=l[s])}return e}var wj=function(t){function e(e){return t.call(this,e,{type:"line",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 tB(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=wy(t);return bS(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?wP(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=tU(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var o=bh(this.attributes,"area"),a=bh(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=u.x,f=u.y;var p=(d=s,v=(y={type:"line",x:c,y:f}).x,x=(b=tU((m=y.y).getOptions().range||[0,0],2))[0],(O=b[1])>x&&(O=(g=tU([x,O],2))[0],x=g[1]),d.map(function(t){return t.map(function(t,e){return[v.map(e),x0(m.map(t),O,x)]})})),h=[];if(o){var d,y,g,v,m,b,x,O,w,E,k,M,S=this.baseline;if(r)h=i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=wO(o),l=void 0;if(0===i)l=ww(a,e,n);else{var s=wO(t[i-1],!0),u=o[0];s[0][0]="L",l=tY(tY(tY([],tU(a),!1),tU(s),!1),[tY(["M"],tU(u),!1),["Z"]],!1)}r.push(l)}return r}(p,l,S):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=wx(t[i]),a=void 0;if(0===i)a=ww(o,e,n);else{var l=wx(t[i-1],!0);l[0][0]="L",a=tY(tY(tY([],tU(o),!1),tU(l),!1),[["Z"]],!1)}r.push(a)}return r}(p,l,S);else{;w=p,E=i,k=l,M=S,h=w.map(function(t){return ww(E?wO(t):wx(t),k,M)})}}return{lines:p.map(function(e,n){return tW({stroke:t.getColor(n),path:i?wO(e):wx(e)},a)}),areas:h.map(function(e,n){return tW({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=bh(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var a=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=wP(l));var s=this.createScales(l),u=s.x,c=s.y,f=tU(w_(l),2),p=f[0],h=new OG({domain:[0,f[1]-(p>0?0:p)],range:[0,a*o]}),d=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,o){var a=d/l.length;return tW(tW({fill:t.getColor(i)},e),r?{x:u.map(o),y:c.map(n),width:d,height:h.map(y[i][o])}:{x:u.map(o)+a*i,y:n>=0?c.map(n):c.map(0),width:a,height:h.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(r=".container",i="rect",(n=e).querySelector(r)?yR(n).select(r):yR(n).append(i)).attr("className","container").node();var n,r,i,o=t.type,a="spark".concat(o),l="line"===o?this.linesStyle:this.columnsStyle;yR(e).selectAll(".spark").data([o]).join(function(t){return t.append(function(t){return"line"===t?new wv({className:a,style:l}):new wg({className:a,style:l})}).attr("className","spark ".concat(a))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return yS(e)?e[t%e.length]:ym(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,l=void 0===a?[]:a,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,p=tU(w_(t),2),h=p[0],d=p[1],y=new OG({domain:[null!==(e=l[0])&&void 0!==e?e:h,null!==(n=l[1])&&void 0!==n?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new OG({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new wd({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(yC),wA=function(t){function e(e){var n=t.call(this,e,tW(tW(tW({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.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},bd(OZ,"handle")),bd(OX,"handleIcon")),bd(OK,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(OH(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),l=a.x,s=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(OH(t)),l=a-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],l=new cI("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(l),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return tB(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=bh(this.attributes,"sparkline");return tW(tW({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=tU(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=tU(bZ(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],i=t[3],o=this.shape;return{x:i,y:e,width:o.width-(i+n),height:o.height-(e+r)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(OQ.selection.class).each(function(n,r){m6(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&m6(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&m6(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=bh(this.attributes,"track");this.trackShape=yR(t).maybeAppendByClassName(OQ.track,"rect").styles(tW(tW({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=yR(t).maybeAppendByClassName(OQ.brushArea,"rect").styles(tW({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;yN("horizontal"===this.attributes.orientation,yR(t).maybeAppendByClassName(OQ.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(OQ.sparkline,function(){return new wj({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(OQ.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new O1({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(OQ.handle.name," ").concat(e,"-handle")),o["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(o.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;o["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.type,r=e.selectionType;this.foregroundGroup=yR(t).maybeAppendByClassName(OQ.foreground,"g");var i=bh(this.attributes,"selection"),o=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===r?"grab":"invert"===r?"crosshair":"default"}).styles(i)},a=this;this.foregroundGroup.selectAll(OQ.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:tW({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",OQ.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=yR(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),a.onDragStart("selection")(t)}),a.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),a.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),a.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",a.onDragStart("track"))})},function(t){return t.call(o)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=tU(this.range,2),i=r[0],o=r[1],a=tU(this.getValues().map(function(t){return OV(t,e)}),2),l=a[0],s=a[1],u=tU(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return OV(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,x0(f,i,o)];c>f&&(c=(n=tU([f,c],2))[0],f=n[1]);var p=f-c;if(p>o-i)return[i,o];if(c<i)return l===i&&s===f?[i,f]:[i,p+i];if(f>o)return s===o&&l===c?[c,o]:[o-p,o];return[c,f]},e.prototype.calcSelectionArea=function(t){var e=tU(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:a,height:s,x:o,width:n*l},{y:a,height:s,x:n*l+o,width:(r-n)*l},{y:a,height:s,x:r*l,width:(1-r)*l}],[{x:o,width:l,y:a,height:n*s},{x:o,width:l,y:n*s+a,height:(r-n)*s},{x:o,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,l=tU(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([o,a])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,o/2]),y:i+this.getOrientVal([a/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transform:"rotate(90)",textAlign:"start"}:"end"===t?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,l=bh(this.attributes,"handle"),s=bh(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new yL({style:tW(tW(tW({},s),this.inferTextStyle(t)),{text:p})}),d=h.getBBox(),y=d.width,g=d.height;if(h.destroy(),!a){if("value"===r)return{text:p,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:p})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var m=0,b=0,x=this.availableSpace,O=x.width,w=x.height,E=this.calcSelectionArea()[1],k=E.x,M=E.y,S=E.width,_=E.height,P=u+c;if("horizontal"===i){var j=P+y/2;m="start"===t?k-P-y>0?-j:j:O-k-S-P>y?j:-j}else{var A=g+P;b="start"===t?M-c>g?-A:P:w-(M+_)-c>g?A:-P}return{x:m,y:b,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=bh(this.attributes,"handleLabel");return tW(tW(tW({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=bh(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return tW({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,r=e.showLabelOnInteraction,i=e.orientation,o=this.calcHandlePosition(t),a=this.calcHandleText(t),l=n;return!n&&r&&(l=!!this.target||!1),tW(tW(tW(tW({},bd(this.getHandleIconStyle(),"icon")),bd(tW(tW({},this.getHandleLabelStyle(t)),a),"label")),o),{orientation:i,showLabel:l,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e?e:Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=tU(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this.attributes.type,i=tU(this.getValues(),2),o=i[0],a=i[1],l=[o+("range"===r?t:0),a+e].sort();n?this.setValues(l):this.innerSetValues(l,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new cI(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r,!0)}},e.tag="slider",e}(yC);function wT(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wC(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wN(t){let e,n,r;function i(t,r,o=0,a=t.length){if(o<a){if(0!==e(r,r))return a;do{let e=o+a>>>1;0>n(t[e],r)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=wT,n=(e,n)=>wT(t(e),n),r=(e,n)=>t(e)-n):(e=t===wT||t===wC?t:wL,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){let a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{let e=i+o>>>1;0>=n(t[e],r)?i=e+1:o=e}while(i<o)}return i}}}function wL(){return 0}function wI(t){return null===t?NaN:+t}let wR=wN(wT),wD=wR.right,wF=wR.left,wz=wN(wI).center;function wB(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=w$(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>w$(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(wW(n))}function wW(t=wT){if(t===wT)return w$;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function w$(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function wG(t){return!!t.getBandWidth}function wV(t,e,n){var r;if(!wG(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep();let l=(r=wF(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function wH(t,e,n){if(!e)return t.getOptions().domain;if(!wG(t)){let r=wB(e);if(!n)return r;let[i]=r,{range:o}=t.getOptions(),[a,l]=o,s=t.invert(t.map(i)+(a>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){let t=o+Math.round(r.length*n);return r.slice(o,t)}let a=e[e.length-1],l=r.indexOf(a);return r.slice(o,l+1)}function wU(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[wV(a,n,e),wV(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1),f=wH(a,[u[0],c[0]]);return[f,wH(l,[u[1],c[1]])]}function wq(t,e){let n,[r,i]=t;return[e.map(r),e.map(i)+((n=e).getStep?n.getStep():0)]}var wY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let wX=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=wY(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:p}=u,{width:h,height:d}=p,{slider:y={}}=c,g=(null===(l=s.getFormatter)||void 0===l?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?jd(n):n,m="horizontal"===e,b=ot(f)&&m,{trackSize:x=y.trackSize}=i,[O,w]=function(t,e,n){let{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(p,o,x);return new wA({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:O,y:w,trackLength:m?h:d,orientation:e,formatter:t=>(v||g)(wV(s,b?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;return nD(t.sparklineData)?t.sparklineData:function(t,e){let[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:n,slider:r}=t;if((null==r?void 0:r.x)&&0===Object.keys(r.x).length)return Object.fromEntries(e.map(t=>{let e=n[t];return[t,e?e.value:void 0]}))});return(null==n?void 0:n.series)?Object.values(n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{})):null==n?void 0:n.y}(n,["y","series"])}(t,r)},i),a))})}};wX.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let wK=t=>wX(Object.assign(Object.assign({},t),{orientation:"horizontal"}));wK.props=Object.assign(Object.assign({},wX.props),{defaultPosition:"bottom"});let wZ=t=>wX(Object.assign(Object.assign({},t),{orientation:"vertical"}));wZ.props=Object.assign(Object.assign({},wX.props),{defaultPosition:"left"});var wQ=function(t){function e(e){var n=t.call(this,e,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new cI("scroll",r)),n.dispatchEvent(new cI("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=tU(n.getLocalPosition(),2),r=e[0],i=e[1],o=tU(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(OH(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new cI("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new cI("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new cI("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new cI("trackMouseleave",{detail:t.detail}))},n}return tB(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return bZ(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=tU(this.range,2);return x0(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=tU(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=tU(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+l[0]-(a+i),height:+l[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=tU(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,o=e.slidable,a=bh(this.attributes,"track"),l=bh(this.attributes,"thumb"),s=tW(tW({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},bd(a,"track")),bd(l,"selection"));this.slider=yR(t).maybeAppendByClassName("scrollbar",function(){return new wA({style:s})}).update(s).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=tU(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(x0(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.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)},e.tag="scrollbar",e}(yC),wJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let w0=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=wJ(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{let{bbox:a}=n,{x:l,y:s,width:u,height:c}=a,{scrollbar:f={}}=o,{ratio:p,range:h}=t.getOptions(),d="horizontal"===e?u:c,y=d/p,[g,v]=h;return new wQ({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:d,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:d}))})}};w0.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let w1=t=>w0(Object.assign(Object.assign({},t),{orientation:"horizontal"}));w1.props=Object.assign(Object.assign({},w0.props),{defaultPosition:"bottom"});let w2=t=>w0(Object.assign(Object.assign({},t),{orientation:"vertical"}));w2.props=Object.assign(Object.assign({},w0.props),{defaultPosition:"left"});let w5=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w3=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w4=(t,e)=>{let{coordinate:n}=e;return fu({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:jr.NUMBER}),(e,r,i)=>{let[o]=e;return oe(n)?(e=>{let{__data__:r,style:o}=e,{radius:a=0,inset:l=0,fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=o,{points:f,y:p,y1:h}=r,d=hn(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=i7().cornerRadius(a).padAngle(l*Math.PI/180),m=new fv({}),b=n.getCenter(),x=t=>{m.attr({d:v(t),transform:`translate(${b[0]}, ${b[1]})`});let e=uu(m);return m.style.transform="",e},O=e.animate([{scaleInYRadius:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:y+1e-4,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:u,opacity:c}],Object.assign(Object.assign({},i),t));return O.onframe=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},O.onfinish=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:g}))},O})(o):(e=>{let{style:r}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=r,[u,c]=ot(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return e.animate(f,Object.assign(Object.assign({},i),t))})(o)}},w6=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w8=(t,e)=>{fu({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:jr.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!oe(n))return w5(t,e)(r,i,o);let l=n.getCenter(),{__data__:s,style:u}=a,{radius:c=0,inset:f=0,fillOpacity:p=1,strokeOpacity:h=1,opacity:d=1}=u,{points:y,y:g,y1:v}=s,m=i7().cornerRadius(c).padAngle(f*Math.PI/180),b=hn(n,y,[g,v]),{startAngle:x,endAngle:O}=b,w=new fv({}),E=t=>{w.attr({d:m(t),transform:`translate(${l[0]}, ${l[1]})`});let e=uu(w);return w.style.transform="",e},k=a.animate([{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:O,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return k.onframe=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:Number(a.style.waveInArcAngle)}))},k.onfinish=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:O}))},k}};w8.props={};let w9=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:l}],Object.assign(Object.assign({},r),t))};w9.props={};let w7=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:o,strokeOpacity:a,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};w7.props={};let Et=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},Ee=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},En=t=>(e,n,r)=>{var i;let[o]=e,a=(null===(i=o.getTotalLength)||void 0===i?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function Er(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}En.props={};let Ei=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function Eo(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function Ea(t,e){let[n,r,i,o]=Eo(t),a=Math.ceil(Math.sqrt(e/(o/i))),l=[],s=o/Math.ceil(e/a),u=0,c=e;for(;c>0;){let t=Math.min(c,a),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,o=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
|
|
10
|
+
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Scatter:function(){return V5},Box:function(){return Hf},Bar:function(){return VH},Mix:function(){return HD},Pie:function(){return V1},DualAxes:function(){return VX},Histogram:function(){return Hl},Rose:function(){return Hr},Tiny:function(){return He},Venn:function(){return HI},Area:function(){return VG},Base:function(){return VW},BidirectionalBar:function(){return HN},Line:function(){return VJ},measureTextWidth:function(){return HW},Waterfall:function(){return Ho},Gauge:function(){return Hb},Radar:function(){return V4},Stock:function(){return Hy},Treemap:function(){return HM},RadialBar:function(){return H_},WordCloud:function(){return HE},Sankey:function(){return Hh},Bullet:function(){return Hv},Column:function(){return Vq},Heatmap:function(){return Hu},CirclePacking:function(){return Hj},Funnel:function(){return VZ},G2:function(){return tE},Sunburst:function(){return Hz},Liquid:function(){return HO},Violin:function(){return HT}});var l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G,V,H,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tv,tm={};n.r(tm),n.d(tm,{geoAlbers:function(){return r8},geoAlbersUsa:function(){return io},geoAzimuthalEqualArea:function(){return ii},geoAzimuthalEqualAreaRaw:function(){return ir},geoAzimuthalEquidistant:function(){return r3},geoAzimuthalEquidistantRaw:function(){return r5},geoConicConformal:function(){return r2},geoConicConformalRaw:function(){return r1},geoConicEqualArea:function(){return r6},geoConicEqualAreaRaw:function(){return r4},geoConicEquidistant:function(){return rJ},geoConicEquidistantRaw:function(){return rQ},geoEqualEarth:function(){return rK},geoEqualEarthRaw:function(){return rX},geoEquirectangular:function(){return rq},geoEquirectangularRaw:function(){return rU},geoGnomonic:function(){return ie},geoGnomonicRaw:function(){return it},geoIdentity:function(){return rH},geoMercator:function(){return rI},geoMercatorRaw:function(){return rL},geoNaturalEarth1:function(){return rV},geoNaturalEarth1Raw:function(){return rG},geoOrthographic:function(){return r$},geoOrthographicRaw:function(){return rW},geoProjection:function(){return rC},geoProjectionMutator:function(){return rN},geoStereographic:function(){return r7},geoStereographicRaw:function(){return r9},geoTransverseMercator:function(){return rF},geoTransverseMercatorRaw:function(){return rD}});var tb={};n.r(tb),n.d(tb,{add:function(){return ao},adjoint:function(){return oL},clone:function(){return o_},copy:function(){return oP},create:function(){return oS},determinant:function(){return oI},equals:function(){return ac},exactEquals:function(){return au},frob:function(){return ai},fromQuat:function(){return o2},fromQuat2:function(){return oK},fromRotation:function(){return oH},fromRotationTranslation:function(){return oX},fromRotationTranslationScale:function(){return o0},fromRotationTranslationScaleOrigin:function(){return o1},fromScaling:function(){return oV},fromTranslation:function(){return oG},fromValues:function(){return oj},fromXRotation:function(){return oU},fromYRotation:function(){return oq},fromZRotation:function(){return oY},frustum:function(){return o5},getRotation:function(){return oJ},getScaling:function(){return oQ},getTranslation:function(){return oZ},identity:function(){return oT},invert:function(){return oN},lookAt:function(){return ae},mul:function(){return af},multiply:function(){return oR},multiplyScalar:function(){return al},multiplyScalarAndAdd:function(){return as},ortho:function(){return o7},orthoNO:function(){return o9},orthoZO:function(){return at},perspective:function(){return o4},perspectiveFromFieldOfView:function(){return o8},perspectiveNO:function(){return o3},perspectiveZO:function(){return o6},rotate:function(){return oz},rotateX:function(){return oB},rotateY:function(){return oW},rotateZ:function(){return o$},scale:function(){return oF},set:function(){return oA},str:function(){return ar},sub:function(){return ap},subtract:function(){return aa},targetTo:function(){return an},translate:function(){return oD},transpose:function(){return oC}});var tx={};n.r(tx),n.d(tx,{frequency:function(){return AB},id:function(){return AW},name:function(){return A$},weight:function(){return Az}});var tO={};n.r(tO),n.d(tO,{area:function(){return C9},bottom:function(){return Na},bottomLeft:function(){return Na},bottomRight:function(){return Na},inside:function(){return Na},left:function(){return Na},outside:function(){return Nc},right:function(){return Na},spider:function(){return Np},surround:function(){return Nd},top:function(){return Na},topLeft:function(){return Na},topRight:function(){return Na}});var tw={};n.r(tw),n.d(tw,{interpolateBlues:function(){return L4},interpolateBrBG:function(){return Lv},interpolateBuGn:function(){return LI},interpolateBuPu:function(){return LD},interpolateCividis:function(){return Ia},interpolateCool:function(){return Im},interpolateCubehelixDefault:function(){return Ig},interpolateGnBu:function(){return Lz},interpolateGreens:function(){return L8},interpolateGreys:function(){return L7},interpolateInferno:function(){return Ij},interpolateMagma:function(){return IP},interpolateOrRd:function(){return LW},interpolateOranges:function(){return Io},interpolatePRGn:function(){return Lb},interpolatePiYG:function(){return LO},interpolatePlasma:function(){return IA},interpolatePuBu:function(){return LH},interpolatePuBuGn:function(){return LG},interpolatePuOr:function(){return LE},interpolatePuRd:function(){return Lq},interpolatePurples:function(){return Ie},interpolateRainbow:function(){return Ix},interpolateRdBu:function(){return LM},interpolateRdGy:function(){return L_},interpolateRdPu:function(){return LX},interpolateRdYlBu:function(){return Lj},interpolateRdYlGn:function(){return LT},interpolateReds:function(){return Ir},interpolateSinebow:function(){return Ik},interpolateSpectral:function(){return LN},interpolateTurbo:function(){return IM},interpolateViridis:function(){return I_},interpolateWarm:function(){return Iv},interpolateYlGn:function(){return LJ},interpolateYlGnBu:function(){return LZ},interpolateYlOrBr:function(){return L1},interpolateYlOrRd:function(){return L5},schemeAccent:function(){return Nj},schemeBlues:function(){return L3},schemeBrBG:function(){return Lg},schemeBuGn:function(){return LL},schemeBuPu:function(){return LR},schemeCategory10:function(){return NP},schemeDark2:function(){return NA},schemeGnBu:function(){return LF},schemeGreens:function(){return L6},schemeGreys:function(){return L9},schemeObservable10:function(){return NT},schemeOrRd:function(){return LB},schemeOranges:function(){return Ii},schemePRGn:function(){return Lm},schemePaired:function(){return NC},schemePastel1:function(){return NN},schemePastel2:function(){return NL},schemePiYG:function(){return Lx},schemePuBu:function(){return LV},schemePuBuGn:function(){return L$},schemePuOr:function(){return Lw},schemePuRd:function(){return LU},schemePurples:function(){return It},schemeRdBu:function(){return Lk},schemeRdGy:function(){return LS},schemeRdPu:function(){return LY},schemeRdYlBu:function(){return LP},schemeRdYlGn:function(){return LA},schemeReds:function(){return In},schemeSet1:function(){return NI},schemeSet2:function(){return NR},schemeSet3:function(){return ND},schemeSpectral:function(){return LC},schemeTableau10:function(){return NF},schemeYlGn:function(){return LQ},schemeYlGnBu:function(){return LK},schemeYlOrBr:function(){return L0},schemeYlOrRd:function(){return L2}});var tE={};n.r(tE),n.d(tE,{AREA_CLASS_NAME:function(){return EO},Academy:function(){return m0},Bin:function(){return S5},BinX:function(){return S3},COMPONENT_CLASS_NAME:function(){return Eb},Chart:function(){return Dr},ChartEvent:function(){return ke},Classic:function(){return mX},ClassicDark:function(){return mQ},Dark:function(){return mZ},DiffY:function(){return _i},DodgeX:function(){return S6},ELEMENT_CLASS_NAME:function(){return Eg},Filter:function(){return _T},FlexX:function(){return __},Group:function(){return _m},GroupColor:function(){return _O},GroupX:function(){return _b},GroupY:function(){return _x},Jitter:function(){return S7},JitterX:function(){return _t},JitterY:function(){return _e},LABEL_CLASS_NAME:function(){return Ex},LABEL_LAYER_CLASS_NAME:function(){return Ey},Light:function(){return mY},LinearAxis:function(){return xY},MAIN_LAYER_CLASS_NAME:function(){return Ed},MASK_CLASS_NAME:function(){return Ew},MaybeDefaultX:function(){return g0},MaybeDefaultY:function(){return g5},MaybeFunctionAttribute:function(){return vi},MaybeGradient:function(){return dw},MaybeIdentityX:function(){return gl},MaybeIdentityY:function(){return ga},MaybeKey:function(){return hj},MaybeSeries:function(){return dE},MaybeSize:function(){return yy},MaybeStackY:function(){return De},MaybeTitle:function(){return hS},MaybeTooltip:function(){return h_},MaybeTuple:function(){return yK},MaybeTupleX:function(){return gz},MaybeTupleY:function(){return g$},MaybeVisualPosition:function(){return yQ},MaybeZeroPadding:function(){return y1},MaybeZeroX:function(){return iD},MaybeZeroY:function(){return yd},MaybeZeroY1:function(){return iR},MaybeZeroZ:function(){return Dn},NormalizeY:function(){return _l},PLOT_CLASS_NAME:function(){return Em},Pack:function(){return _P},Runtime:function(){return R7},Sample:function(){return _A},Select:function(){return _p},SelectX:function(){return _d},SelectY:function(){return _g},Selection:function(){return pH},SortColor:function(){return _S},SortX:function(){return _k},SortY:function(){return _M},StackEnter:function(){return _o},StackY:function(){return S_},SymmetryY:function(){return _r},VIEW_CLASS_NAME:function(){return Ev},corelib:function(){return Pr},extend:function(){return TQ},geolib:function(){return ih},graphlib:function(){return A3},plotlib:function(){return TK},register:function(){return R6},render:function(){return RB},renderToMountedElement:function(){return RW},select:function(){return pV},stdlib:function(){return TZ}});var tk={}.toString,tM=function(t,e){return tk.call(t)==="[object "+e+"]"},tS=function(t){return Array.isArray?Array.isArray(t):tM(t,"Array")},t_=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},tP=function(t,e){if(!!t){if(tS(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(t_(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},tj=function(t){return tM(t,"Function")},tA=Array.prototype;tA.splice,tA.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tT=function(t){return tM(t,"Number")},tC=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return tP(t,function(n,r){!(tj(t)&&"prototype"===r)&&e.push(n)}),e},tN=function(t){if(!("object"==typeof(e=t)&&null!==e)||!tM(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},tL=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&tN(a)?(!tN(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tS(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tI=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tR=function(t,e){if(!tI(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var tD=function(t){return t};function tF(t){var e;return null==(e=t)?0:tI(t)?t.length:Object.keys(t).length}var tz=function(t,e){return(tz=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function tB(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tz(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tW=function(){return(tW=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function t$(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function tG(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function tV(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function tH(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function tU(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function tq(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function tY(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function tX(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}!function(t,e){if(!tj(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!eG&&(eG=document.createElement("canvas").getContext("2d")),eG.font=[o,a,i,n+"px",r].join(" "),eG.measureText(tM(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tq([t],tC(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class tK{constructor(t){this.options=tL({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tL({},this.options,t),this.rescale(t)}rescale(t){}}function tZ(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function tQ(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function tJ(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var t0=n("254"),t1=n.n(t0);function t2(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function t5(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=t2(a,o,e+1/3),s=t2(a,o,e);return[255*l,255*s,255*t2(a,o,e-1/3),i]}(r):null}let t3=(t,e)=>n=>t*(1-n)+e*n,t4=(t,e)=>{let n=t5(t),r=t5(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},t6=(t,e)=>"number"==typeof t&&"number"==typeof e?t3(t,e):"string"==typeof t&&"string"==typeof e?t4(t,e):()=>t,t8=(t,e)=>{let n=t3(t,e);return t=>Math.round(n(t))};function t9(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let t7=Math.sqrt(50),et=Math.sqrt(10),ee=Math.sqrt(2);function en(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=t7?10:o>=et?5:o>=ee?2:1)*10**i:-(10**-i)/(o>=t7?10:o>=et?5:o>=ee?2:1)}function er(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=t7?i*=10:o>=et?i*=5:o>=ee&&(i*=2),e<t?-i:i}let ei=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=en(l,s,n))>0?r=en(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=en(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},eo=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=tZ(o,a),i=n(l,s)):(r=tZ(a,o),i=n(s,l)),tQ(i,r)},ea=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=tZ(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=tJ(t,e,1,r)-1,a=i[n];return tQ(o[n],a)(e)}},el=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?ea:eo)(t,e,r?t8:n)};class es extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t3,tickCount:5}}map(t){return t9(t)?this.output(t):this.options.unknown}invert(t){return t9(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return ei}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):tD}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=el(n.map(t),r,o,i);this.output=tQ(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=el(i,r.map(t),t3);this.input=tQ(e,n,o)}}let eu=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=en(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class ec extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5}}chooseTransforms(){return[tD,tD]}clone(){return new ec(this.options)}}var ef=function(t){return null==t},ep=function(t){return ef(t)?"":t.toString()},eh=function(t){var e=ep(t);return e.charAt(0).toUpperCase()+e.substring(1)},ed=t=>t;function ey(t,e){t&&ev.hasOwnProperty(t.type)&&ev[t.type](t,e)}var eg={Feature:function(t,e){ey(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ey(n[r].geometry,e)}},ev={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){em(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)em(n[r],e,0)},Polygon:function(t,e){eb(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eb(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ey(n[r],e)}};function em(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eb(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)em(t[n],e,1);e.polygonEnd()}function ex(t,e){t&&eg.hasOwnProperty(t.type)?eg[t.type](t,e):ey(t,e)}class eO{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ew=Math.PI,eE=ew/2,ek=ew/4,eM=2*ew,eS=180/ew,e_=ew/180,eP=Math.abs,ej=Math.atan,eA=Math.atan2,eT=Math.cos,eC=Math.ceil,eN=Math.exp,eL=Math.log,eI=Math.pow,eR=Math.sin,eD=Math.sign||function(t){return t>0?1:t<0?-1:0},eF=Math.sqrt,ez=Math.tan;function eB(t){return t>1?0:t<-1?ew:Math.acos(t)}function eW(t){return t>1?eE:t<-1?-eE:Math.asin(t)}function e$(){}var eG,eV,eH,eU,eq,eY=new eO,eX=new eO,eK={point:e$,lineStart:e$,lineEnd:e$,polygonStart:function(){eK.lineStart=eZ,eK.lineEnd=e0},polygonEnd:function(){eK.lineStart=eK.lineEnd=eK.point=e$,eY.add(eP(eX)),eX=new eO},result:function(){var t=eY/2;return eY=new eO,t}};function eZ(){eK.point=eQ}function eQ(t,e){eK.point=eJ,eV=eU=t,eH=eq=e}function eJ(t,e){eX.add(eq*t-eU*e),eU=t,eq=e}function e0(){eJ(eV,eH)}var e1=1/0,e2=1/0,e5=-1/0,e3=e5,e4={point:function(t,e){t<e1&&(e1=t),t>e5&&(e5=t),e<e2&&(e2=e),e>e3&&(e3=e)},lineStart:e$,lineEnd:e$,polygonStart:e$,polygonEnd:e$,result:function(){var t=[[e1,e2],[e5,e3]];return e5=e3=-(e2=e1=1/0),t}},e6,e8,e9,e7,nt=0,ne=0,nn=0,nr=0,ni=0,no=0,na=0,nl=0,ns=0,nu={point:nc,lineStart:nf,lineEnd:nd,polygonStart:function(){nu.lineStart=ny,nu.lineEnd=ng},polygonEnd:function(){nu.point=nc,nu.lineStart=nf,nu.lineEnd=nd},result:function(){var t=ns?[na/ns,nl/ns]:no?[nr/no,ni/no]:nn?[nt/nn,ne/nn]:[NaN,NaN];return nt=ne=nn=nr=ni=no=na=nl=ns=0,t}};function nc(t,e){nt+=t,ne+=e,++nn}function nf(){nu.point=np}function np(t,e){nu.point=nh,nc(e9=t,e7=e)}function nh(t,e){var n=t-e9,r=e-e7,i=eF(n*n+r*r);nr+=i*(e9+t)/2,ni+=i*(e7+e)/2,no+=i,nc(e9=t,e7=e)}function nd(){nu.point=nc}function ny(){nu.point=nv}function ng(){nm(e6,e8)}function nv(t,e){nu.point=nm,nc(e6=e9=t,e8=e7=e)}function nm(t,e){var n=t-e9,r=e-e7,i=eF(n*n+r*r);nr+=i*(e9+t)/2,ni+=i*(e7+e)/2,no+=i,na+=(i=e7*t-e9*e)*(e9+t),nl+=i*(e7+e),ns+=3*i,nc(e9=t,e7=e)}function nb(t){this._context=t}nb.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,eM)}},result:e$};var nx,nO,nw,nE,nk,nM=new eO,nS={point:e$,lineStart:function(){nS.point=n_},lineEnd:function(){nx&&nP(nO,nw),nS.point=e$},polygonStart:function(){nx=!0},polygonEnd:function(){nx=null},result:function(){var t=+nM;return nM=new eO,t}};function n_(t,e){nS.point=nP,nO=nE=t,nw=nk=e}function nP(t,e){nE-=t,nk-=e,nM.add(eF(nE*nE+nk*nk)),nE=t,nk=e}class nj{constructor(t){this._append=null==t?nA:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nA;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(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(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function nA(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nT(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),ex(t,i(o))),o.result()}return a.area=function(t){return ex(t,i(eK)),eK.result()},a.measure=function(t){return ex(t,i(nS)),nS.result()},a.bounds=function(t){return ex(t,i(e4)),e4.result()},a.centroid=function(t){return ex(t,i(nu)),nu.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ed):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nj(n)):new nb(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new nj(n)),a},a.projection(t).digits(n).context(e)}function nC(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function nN(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nL(t,e,n){var r=nC(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nI={}.toString,nR=function(t,e){return nI.call(t)==="[object "+e+"]"},nD=function(t){return Array.isArray?Array.isArray(t):nR(t,"Array")},nF=function(t){return"object"==typeof t&&null!==t},nz=function(t){if(!nF(t)||!nR(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},nB=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&nz(a)?(!nz(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nD(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nW=function(t){var e=ep(t);return e.charAt(0).toLowerCase()+e.substring(1)};function n$(t){return t}function nG(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),n$)}function nV(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function nH(t=""){throw Error(t)}function nU(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))!r.has(e)&&("transform"===e&&t.attr(e,""),t.attr(e,i))}function nq(t){return null!=t&&!Number.isNaN(t)}function nY(t,e){return nX(t,e)||{}}function nX(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nW(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function nK(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function nZ(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function nQ(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function nJ(t){return null===t||!1===t}function n0(t,e,n={},r=!1){return nJ(t)||Array.isArray(t)&&r?t:nB(n,nY(t,e))}function n1(t,e={}){return nJ(t)||Array.isArray(t)||!n2(t)?t:nB(e,t)}function n2(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function n5(t,e){return"object"==typeof t?nY(t,e):t}function n3(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function n4(t,e){return eP(t)>ew&&(t-=Math.round(t/eM)*eM),[t,e]}function n6(t,e,n){return(t%=eM)?e||n?n3(n9(t),n7(e,n)):n9(t):e||n?n7(e,n):n4}function n8(t){return function(e,n){return eP(e+=t)>ew&&(e-=Math.round(e/eM)*eM),[e,n]}}function n9(t){var e=n8(t);return e.invert=n8(-t),e}function n7(t,e){var n=eT(t),r=eR(t),i=eT(e),o=eR(e);function a(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*n+l*r;return[eA(s*i-c*o,l*n-u*r),eW(c*i+s*o)]}return a.invert=function(t,e){var a=eT(e),l=eT(t)*a,s=eR(t)*a,u=eR(e),c=u*i-s*o;return[eA(s*i+u*o,l*n+c*r),eW(c*n-l*r)]},a}n4.invert=n4;function rt(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:e$,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function re(t,e){return 1e-6>eP(t[0]-e[0])&&1e-6>eP(t[1]-e[1])}function rn(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rr(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(re(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new rn(r,t,null,!0)),s.push(n.o=new rn(r,null,n,!1)),l.push(n=new rn(a,t,null,!1)),s.push(n.o=new rn(a,null,n,!0))}}),l.length){for(s.sort(e),ri(l),ri(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function ri(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ro(t){return[eA(t[1],t[0]),eW(t[2])]}function ra(t){var e=t[0],n=t[1],r=eT(n);return[r*eT(e),r*eR(e),eR(n)]}function rl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rs(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ru(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rf(t){var e=eF(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rp(t){return eP(t[0])<=ew?t[0]:eD(t[0])*((eP(t[0])+ew)%eM-ew)}function rh(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rd(t,e,n,r){return function(i){var o,a,l,s=e(i),u=rt(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=m,p.lineEnd=b,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=rh(a);var t=function(t,e){var n=rp(e),r=e[1],i=eR(r),o=[eR(n),-eT(n),0],a=0,l=0,s=new eO;1===i?r=eE+1e-6:-1===i&&(r=-eE-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length){for(var f,p,h=f[p-1],d=rp(h),y=h[1]/2+ek,g=eR(y),v=eT(y),m=0;m<p;++m,d=x,g=w,v=E,h=b){var b=f[m],x=rp(b),O=b[1]/2+ek,w=eR(O),E=eT(O),k=x-d,M=k>=0?1:-1,S=M*k,_=S>ew,P=g*w;if(s.add(eA(P*M*eR(S),v*E+P*eT(S))),a+=_?k+M*eM:k,_^d>=n^x>=n){var j=rs(ra(h),ra(b));rf(j);var A=rs(o,j);rf(A);var T=(_^k>=0?-1:1)*eW(A[2]);(r>T||r===T&&(j[0]||j[1]))&&(l+=_^k>=0?1:-1)}}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(!f&&(i.polygonStart(),f=!0),rr(a,rg,t,n,i)):t&&(!f&&(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function m(){c.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(!f&&(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(ry))}}return p}}function ry(t){return t.length>1}function rg(t,e){return((t=t.x)[0]<0?t[1]-eE-1e-6:eE-t[1])-((e=e.x)[0]<0?e[1]-eE-1e-6:eE-e[1])}var rv=rd(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l=o>0?ew:-ew,s=eP(o-n);1e-6>eP(s-ew)?(t.point(n,r=(r+a)/2>0?eE:-eE),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):i!==l&&s>=ew&&(1e-6>eP(n-i)&&(n-=1e-6*i),1e-6>eP(o-l)&&(o-=1e-6*l),r=function(t,e,n,r){var i,o,a=eR(t-n);return eP(a)>1e-6?ej((eR(e)*(o=eT(r))*eR(n)-eR(r)*(i=eT(e))*eR(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=o,r=a),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*eE,r.point(-ew,i),r.point(0,i),r.point(ew,i),r.point(ew,0),r.point(ew,-i),r.point(0,-i),r.point(-ew,-i),r.point(-ew,0),r.point(-ew,i);else if(eP(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ew:-ew;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ew,-eE]);function rm(t,e){e=ra(e),e[0]-=t,rf(e);var n=eB(-e[1]);return((0>-e[2]?-n:n)+eM-1e-6)%eM}var rb=-1e9;function rx(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>eP(r[0]-t)?i>0?0:3:1e-6>eP(r[0]-n)?i>0?2:1:1e-6>eP(r[1]-e)?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,m,b=a,x=rt(),O={point:w,lineStart:function(){O.point=E,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(E(f,p),h&&g&&x.rejoin(),s.push(x.result())),O.point=w,g&&b.lineEnd()},polygonStart:function(){b=x,s=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=m&&e,i=(s=rh(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&rr(s,l,e,o,a),a.polygonEnd()),b=a,s=u=c=null}};function w(t,e){i(t,e)&&b.point(t,e)}function E(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(b.lineStart(),b.point(o,a));else if(l&&g)b.point(o,a);else{var s=[d=Math.max(rb,Math.min(1e9,d)),y=Math.max(rb,Math.min(1e9,y))],x=[o=Math.max(rb,Math.min(1e9,o)),a=Math.max(rb,Math.min(1e9,a))];(function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,!h&&a<0)return;if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,!!d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}})(s,x,t,e,n,r)?(!g&&(b.lineStart(),b.point(s[0],s[1])),b.point(x[0],x[1]),!l&&b.lineEnd(),m=!1):l&&(b.lineStart(),b.point(o,a),m=!1)}d=o,y=a,g=l}return O}}function rO(t){return function(e){var n=new rw;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rw(){}function rE(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),ex(n,t.stream(e4)),e(e4.result()),null!=r&&t.clipExtent(r),t}function rk(t,e,n){return rE(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function rM(t,e,n){return rk(t,[[0,0],e],n)}function rS(t,e,n){return rE(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function r_(t,e,n){return rE(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}rw.prototype={constructor:rw,point:function(t,e){this.stream.point(t,e)},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()}};var rP=eT(30*e_);function rj(t,e){return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,m=c-i,b=v*v+m*m;if(b>4*e&&y--){var x=a+p,O=l+h,w=s+d,E=eF(x*x+O*O+w*w),k=eW(w/=E),M=1e-6>eP(eP(w)-1)||1e-6>eP(o-f)?(o+f)/2:eA(O,x),S=t(M,k),_=S[0],P=S[1],j=_-r,A=P-i,T=m*j-v*A;(T*T/b>e||eP((v*j+m*A)/b-.5)>.3||a*p+l*h+s*d<rP)&&(n(r,i,o,a,l,s,_,P,M,x/=E,O/=E,w,y,g),g.point(_,P),n(_,P,M,x,O,w,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=m,e.lineStart()}function m(r,i){var o=ra([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=O,y.lineEnd=w}function O(t,e){m(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=m}function w(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return rO({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var rA=rO({point:function(t,e){this.stream.point(t*e_,e*e_)}});function rT(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=eT(o),l=eR(o),s=a*t,u=l*t,c=a/t,f=l/t,p=(l*n-a*e)/t,h=(l*e+a*n)/t;function d(t,o){return[s*(t*=r)-u*(o*=i)+e,n-u*t-s*o]}return d.invert=function(t,e){return[r*(c*t-f*e+p),i*(h-f*t-c*e)]},d}function rC(t){return rN(function(){return t})()}function rN(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,m=0,b=0,x=1,O=1,w=null,E=rv,k=null,M=ed,S=.5;function _(t){return s(t[0]*e_,t[1]*e_)}function P(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eS,t[1]*eS]}function j(){var t=rT(f,0,0,x,O,b).apply(null,e(d,y)),r=rT(f,p-t[0],h-t[1],x,O,b);return n=n6(g,v,m),l=n3(e,r),s=n3(n,l),a=rj(l,S),A()}function A(){return u=c=null,_}return _.stream=function(t){var e;return u&&c===t?u:u=rA((e=n,rO({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(E(a(M(c=t)))))},_.preclip=function(t){return arguments.length?(E=t,w=void 0,A()):E},_.postclip=function(t){return arguments.length?(M=t,k=r=i=o=null,A()):M},_.clipAngle=function(t){return arguments.length?(E=+t?function(t){var e=eT(t),n=2*e_,r=e>0,i=eP(e)>1e-6;function o(t,n){return eT(t)*eT(n)>e}function a(t,n,r){var i=ra(t),o=ra(n),a=[1,0,0],l=rs(i,o),s=rl(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=rs(a,l),p=rc(a,e*s/c);ru(p,rc(l,-e*u/c));var h=rl(p,f),d=rl(f,f),y=h*h-d*(rl(p,p)-1);if(!(y<0)){var g=eF(y),v=rc(f,(-h-g)/d);if(ru(v,p),v=ro(v),!r)return v;var m,b=t[0],x=n[0],O=t[1],w=n[1];x<b&&(m=b,b=x,x=m);var E=x-b,k=1e-6>eP(E-ew);if(!k&&w<O&&(m=O,O=w,w=m),k||E<1e-6?k?O+w>0^v[1]<(1e-6>eP(v[0]-b)?O:w):O<=v[1]&&v[1]<=w:E>ew^(b<=v[0]&&v[0]<=x)){var M=rc(f,(-h+g)/d);return ru(M,p),[v,ro(M)]}}}function l(e,n){var i=r?t:ew-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rd(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ew:-ew),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||re(e,d)||re(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),g&&(!e||!re(e,y))&&t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=eT(e),l=eR(e),s=r*n;null==i?(i=e+r*eM,o=e-s/2):(i=rm(a,i),o=rm(a,o),(r>0?i<o:i>o)&&(i+=r*eM));for(var u,c=i;r>0?c>o:c<o;c-=s)u=ro([a,-l*eT(c),-l*eR(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ew,t-ew])}(w=t*e_):(w=null,rv),A()):w*eS},_.clipExtent=function(t){return arguments.length?(M=null==t?(k=r=i=o=null,ed):rx(k=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),A()):null==k?null:[[k,r],[i,o]]},_.scale=function(t){return arguments.length?(f=+t,j()):f},_.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],j()):[p,h]},_.center=function(t){return arguments.length?(d=t[0]%360*e_,y=t[1]%360*e_,j()):[d*eS,y*eS]},_.rotate=function(t){return arguments.length?(g=t[0]%360*e_,v=t[1]%360*e_,m=t.length>2?t[2]%360*e_:0,j()):[g*eS,v*eS,m*eS]},_.angle=function(t){return arguments.length?(b=t%360*e_,j()):b*eS},_.reflectX=function(t){return arguments.length?(x=t?-1:1,j()):x<0},_.reflectY=function(t){return arguments.length?(O=t?-1:1,j()):O<0},_.precision=function(t){return arguments.length?(a=rj(l,S=t*t),A()):eF(S)},_.fitExtent=function(t,e){return rk(_,t,e)},_.fitSize=function(t,e){return rM(_,t,e)},_.fitWidth=function(t,e){return rS(_,t,e)},_.fitHeight=function(t,e){return r_(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&P,j()}}function rL(t,e){return[t,eL(ez((eE+e)/2))]}function rI(){return rR(rL).scale(961/eM)}function rR(t){var e,n,r,i=rC(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ew*a(),l=i((function(t){function e(e){return e=t(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e}return t=n6(t[0]*e_,t[1]*e_,t.length>2?t[2]*e_:0),e.invert=function(e){return e=t.invert(e[0]*e_,e[1]*e_),e[0]*=eS,e[1]*=eS,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rL?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function rD(t,e){return[eL(ez((eE+e)/2)),-t]}function rF(){var t=rR(rD),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function rz(t){return function(e,n){var r=eT(e),i=eT(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eR(e),o*eR(n)]}}function rB(t){return function(e,n){var r=eF(e*e+n*n),i=t(r),o=eR(i);return[eA(e*o,r*eT(i)),eW(r&&n*o/r)]}}function rW(t,e){return[eT(e)*eR(t),eR(e)]}function r$(){return rC(rW).scale(249.5).clipAngle(90.000001)}function rG(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function rV(){return rC(rG).scale(175.295)}function rH(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=rO({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),v=ed;function m(){return d=l*c,y=l*f,o=a=null,b}function b(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return b.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},b.stream=function(t){return o&&a===t?o:o=g(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,m()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,ed):rx(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==h?null:[[h,n],[r,i]]},b.scale=function(t){return arguments.length?(l=+t,m()):l},b.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],m()):[s,u]},b.angle=function(n){return arguments.length?(e=eR(p=n%360*e_),t=eT(p),m()):p*eS},b.reflectX=function(t){return arguments.length?(c=t?-1:1,m()):c<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return rk(b,t,e)},b.fitSize=function(t,e){return rM(b,t,e)},b.fitWidth=function(t,e){return rS(b,t,e)},b.fitHeight=function(t,e){return r_(b,t,e)},b}function rU(t,e){return[t,e]}function rq(){return rC(rU).scale(152.63)}rL.invert=function(t,e){return[t,2*ej(eN(e))-eE]},rD.invert=function(t,e){return[-e,2*ej(eN(t))-eE]},rW.invert=rB(eW),rG.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(eP(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},rU.invert=rU;var rY=eF(3)/2;function rX(t,e){var n=eW(rY*eR(e)),r=n*n,i=r*r*r;return[t*eT(n)/(rY*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function rK(){return rC(rX).scale(177.158)}function rZ(t){var e=0,n=ew/3,r=rN(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*e_,n=t[1]*e_):[e*eS,n*eS]},i}function rQ(t,e){var n=eT(t),r=t===e?eR(t):(n-eT(e))/(e-t),i=n/r+t;if(1e-6>eP(r))return rU;function o(t,e){var n=i-e,o=r*t;return[n*eR(o),i-n*eT(o)]}return o.invert=function(t,e){var n=i-e,o=eA(t,eP(n))*eD(n);return n*r<0&&(o-=ew*eD(t)*eD(n)),[o/r,i-eD(r)*eF(t*t+n*n)]},o}function rJ(){return rZ(rQ).scale(131.154).center([0,13.9389])}function r0(t){return ez((eE+t)/2)}function r1(t,e){var n=eT(t),r=t===e?eR(t):eL(n/eT(e))/eL(r0(e)/r0(t)),i=n*eI(r0(t),r)/r;if(!r)return rL;function o(t,e){i>0?e<-eE+1e-6&&(e=-eE+1e-6):e>eE-1e-6&&(e=eE-1e-6);var n=i/eI(r0(e),r);return[n*eR(r*t),i-n*eT(r*t)]}return o.invert=function(t,e){var n=i-e,o=eD(r)*eF(t*t+n*n),a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,2*ej(eI(i/o,1/r))-eE]},o}function r2(){return rZ(r1).scale(109.5).parallels([30,30])}rX.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o,a,l=0;l<12&&(a=n*(1.340264+-.081106*r+i*(893e-6+.003796*r))-e,n-=o=a/(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r)),i=(r=n*n)*r*r,!(1e-12>eP(o)));++l);return[rY*t*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))/eT(n),eW(eR(n)/rY)]};var r5=rz(function(t){return(t=eB(t))&&t/eR(t)});function r3(){return rC(r5).scale(79.4188).clipAngle(179.999)}r5.invert=rB(function(t){return t});function r4(t,e){var n=eR(t),r=(n+eR(e))/2;if(1e-6>eP(r))return function(t){var e=eT(t);function n(t,n){return[t*e,eR(n)/e]}return n.invert=function(t,n){return[t/e,eW(n*e)]},n}(t);var i=1+n*(2*r-n),o=eF(i)/r;function a(t,e){var n=eF(i-2*r*eR(e))/r;return[n*eR(t*=r),o-n*eT(t)]}return a.invert=function(t,e){var n=o-e,a=eA(t,eP(n))*eD(n);return n*r<0&&(a-=ew*eD(t)*eD(n)),[a/r,eW((i-(t*t+n*n)*r*r)/(2*r))]},a}function r6(){return rZ(r4).scale(155.424).center([0,33.6442])}function r8(){return r6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function r9(t,e){var n=eT(e),r=1+eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function r7(){return rC(r9).scale(250).clipAngle(142)}function it(t,e){var n=eT(e),r=eT(t)*n;return[n*eR(t)/r,eR(e)/r]}function ie(){return rC(it).scale(144.049).clipAngle(60)}r9.invert=rB(function(t){return 2*ej(t)}),it.invert=rB(ej);var ir=rz(function(t){return eF(2/(1+t))});function ii(){return rC(ir).scale(124.75).clipAngle(179.999)}ir.invert=rB(function(t){return 2*eW(t/2)});function io(){var t,e,n,r,i,o,a=r8(),l=r6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=r6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return rk(c,t,e)},c.fitSize=function(t,e){return rM(c,t,e)},c.fitWidth=function(t,e){return rS(c,t,e)},c.fitHeight=function(t,e){return r_(c,t,e)},c.scale(1070)}var ia=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function il(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return nC(eC(r/d)*d,n,d).map(c).concat(nC(eC(l/y)*y,a,y).map(f)).concat(nC(eC(e/p)*p,t,p).filter(function(t){return eP(t%d)>1e-6}).map(s)).concat(nC(eC(o/h)*h,i,h).filter(function(t){return eP(t%y)>1e-6}).map(u))}return v.lines=function(){return m().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=nN(o,i,90),u=nL(e,t,g),c=nN(l,a,90),f=nL(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function is(t){return"geoPath"===t.type}let iu=()=>t=>{let e;let{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=ia(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tm[`geo${eh(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(il);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();!function(t,e,n,r){let{outline:i=(()=>{let t=e.filter(is);if(t.find(t=>t.sphere))return{type:"Sphere"};return{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;if("geometry"===e)return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if("feature"===e)return{type:"FeatureCollection",features:[t]};if("featureCollection"===e)return t})(t).features)}})()}=r,{size:o="fitExtent"}=r;"fitExtent"===o?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,i,n):"fitWidth"===o?function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=nT(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(t,i,n):void 0}(s,l,{x:t,y:n,width:r,height:i},o),!function(t,e){var n;for(let[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(s,o),e=nT(s);let u=new ec({domain:[t,t+r]}),c=new ec({domain:[n,n+i]}),f=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[u.map(n),c.map(r)]},p=t=>{if(!t)return null;let[e,n]=t,r=[u.invert(e),c.invert(n)];return s.invert(r)};return{transform:t=>f(t),untransform:t=>p(t)}}]]}},children:l.flatMap(t=>is(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:n1(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};iu.props={};var ic=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ip=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},ic(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function ih(){return{"composition.geoView":iu,"composition.geoPath":ip}}ip.props={};let id=()=>[["cartesian"]];id.props={};let iy=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},ig=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=iy(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};ig.props={};let iv=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];iv.props={transform:!0};let im=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),ib=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=im(t);return[...iv(),...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ib.props={};let ix=()=>[["parallel",0,1,0,1]];ix.props={};let iO=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];iO.props={transform:!0};let iw=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),iE=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=iw(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};iE.props={};let ik=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...ix(),...ig({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ik.props={};let iM=({value:t})=>e=>e.map(()=>t);iM.props={};let iS=({value:t})=>e=>e.map(e=>e[t]);iS.props={};let i_=({value:t})=>e=>e.map(t);i_.props={};let iP=({value:t})=>()=>t;function ij(t,e){if(null!==t)return{type:"column",value:t,field:e}}function iA(t,e){return Object.assign(Object.assign({},ij(t,e)),{inferred:!0})}function iT(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}iP.props={};function iC(t,e){let n=[];for(let r of t)n[r]=e;return n}function iN(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function iL(t,...e){for(let n of e){if("string"!=typeof n)return[n,null];{let[e,r]=iN(t,n);if(null!==e)return[e,r]}}return[null,null]}function iI(t){return!(t instanceof Date)&&"object"==typeof t}let iR=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{y1:iA(iC(t,0))}})]};iR.props={};let iD=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{x:iA(iC(t,0))},scale:{x:{guide:null}}})]};function iF(t){return function(){return t}}iD.props={};let iz=Math.abs,iB=Math.atan2,iW=Math.cos,i$=Math.max,iG=Math.min,iV=Math.sin,iH=Math.sqrt,iU=Math.PI,iq=iU/2,iY=2*iU;function iX(t){return t>=1?iq:t<=-1?-iq:Math.asin(t)}let iK=Math.PI,iZ=2*iK,iQ=iZ-1e-6;function iJ(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class i0{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?iJ:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return iJ;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6){if(Math.abs(c*l-s*u)>1e-6&&i){let p=n-o,h=r-a,d=l*l+s*s,y=Math.sqrt(d),g=Math.sqrt(f),v=i*Math.tan((iK-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),m=v/g,b=v/y;Math.abs(m-1)>1e-6&&this._append`L${t+m*u},${e+m*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+b*l},${this._y1=e+b*s}`}else this._append`L${this._x1=t},${this._y1=e}`}else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,n=+n,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%iZ+iZ),f>iQ?this._append`A${n},${n},0,1,${c},${t-a},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=iK)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function i1(){return new i0}function i2(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new i0(e)}function i5(t){return t.innerRadius}function i3(t){return t.outerRadius}function i4(t){return t.startAngle}function i6(t){return t.endAngle}function i8(t){return t&&t.padAngle}i1.prototype=i0.prototype;function i9(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/iH(l*l+s*s),c=u*s,f=-u*l,p=t+c,h=e+f,d=n+c,y=r+f,g=(p+d)/2,v=(h+y)/2,m=d-p,b=y-h,x=m*m+b*b,O=i-o,w=p*y-d*h,E=(b<0?-1:1)*iH(i$(0,O*O*x-w*w)),k=(w*b-m*E)/x,M=(-w*m-b*E)/x,S=(w*b+m*E)/x,_=(-w*m+b*E)/x,P=k-g,j=M-v,A=S-g,T=_-v;return P*P+j*j>A*A+T*T&&(k=S,M=_),{cx:k,cy:M,x01:-c,y01:-f,x11:k*(i/O-1),y11:M*(i/O-1)}}function i7(){var t=i5,e=i3,n=iF(0),r=null,i=i4,o=i6,a=i8,l=null,s=i2(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-iq,d=o.apply(this,arguments)-iq,y=iz(d-h),g=d>h;if(!l&&(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12){if(y>iY-1e-12)l.moveTo(p*iW(h),p*iV(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*iW(d),f*iV(d)),l.arc(0,0,f,d,h,g));else{var v,m,b=h,x=d,O=h,w=d,E=y,k=y,M=a.apply(this,arguments)/2,S=M>1e-12&&(r?+r.apply(this,arguments):iH(f*f+p*p)),_=iG(iz(p-f)/2,+n.apply(this,arguments)),P=_,j=_;if(S>1e-12){var A=iX(S/f*iV(M)),T=iX(S/p*iV(M));(E-=2*A)>1e-12?(A*=g?1:-1,O+=A,w-=A):(E=0,O=w=(h+d)/2),(k-=2*T)>1e-12?(T*=g?1:-1,b+=T,x-=T):(k=0,b=x=(h+d)/2)}var C=p*iW(b),N=p*iV(b),L=f*iW(w),I=f*iV(w);if(_>1e-12){var R,D=p*iW(x),F=p*iV(x),z=f*iW(O),B=f*iV(O);if(y<iU){if(R=function(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,p=f*s-c*u;if(!(p*p<1e-12))return p=(c*(e-o)-f*(t-i))/p,[t+p*s,e+p*u]}(C,N,z,B,D,F,L,I)){var W,$=C-R[0],G=N-R[1],V=D-R[0],H=F-R[1],U=1/iV(((W=($*V+G*H)/(iH($*$+G*G)*iH(V*V+H*H)))>1?0:W<-1?iU:Math.acos(W))/2),q=iH(R[0]*R[0]+R[1]*R[1]);P=iG(_,(f-q)/(U-1)),j=iG(_,(p-q)/(U+1))}else P=j=0}}k>1e-12?j>1e-12?(v=i9(z,B,C,N,p,j,g),m=i9(D,F,L,I,p,j,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),j<_?l.arc(v.cx,v.cy,j,iB(v.y01,v.x01),iB(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,j,iB(v.y01,v.x01),iB(v.y11,v.x11),!g),l.arc(0,0,p,iB(v.cy+v.y11,v.cx+v.x11),iB(m.cy+m.y11,m.cx+m.x11),!g),l.arc(m.cx,m.cy,j,iB(m.y11,m.x11),iB(m.y01,m.x01),!g))):(l.moveTo(C,N),l.arc(0,0,p,b,x,!g)):l.moveTo(C,N),f>1e-12&&E>1e-12?P>1e-12?(v=i9(L,I,D,F,f,-P,g),m=i9(C,N,z,B,f,-P,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),P<_?l.arc(v.cx,v.cy,P,iB(v.y01,v.x01),iB(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,P,iB(v.y01,v.x01),iB(v.y11,v.x11),!g),l.arc(0,0,f,iB(v.cy+v.y11,v.cx+v.x11),iB(m.cy+m.y11,m.cx+m.x11),g),l.arc(m.cx,m.cy,P,iB(m.y11,m.x11),iB(m.y01,m.x01),!g))):l.arc(0,0,f,w,O,g):l.lineTo(L,I)}}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-iU/2;return[iW(r)*n,iV(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:iF(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iF(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:iF(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:iF(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:iF(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function ot(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function oe(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function on(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function or(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function oi(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function oo(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function oa(t){return or(t)||oe(t)}function ol(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function os(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}var ou=n("420"),oc="undefined"!=typeof Float32Array?Float32Array:Array;function of(){var t=new oc(3);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function op(t){var e=new oc(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function oh(t){return Math.hypot(t[0],t[1],t[2])}function od(t,e,n){var r=new oc(3);return r[0]=t,r[1]=e,r[2]=n,r}function oy(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function og(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function ov(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function om(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}!Math.hypot&&(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function ob(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ox(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function oO(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ow(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function oE(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ok(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}var oM=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function oS(){var t=new oc(16);return oc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function o_(t){var e=new oc(16);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 oP(t,e){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 oj(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new oc(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function oA(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function oT(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oC(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function oN(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],m=n*l-r*a,b=n*s-i*a,x=n*u-o*a,O=r*s-i*l,w=r*u-o*l,E=i*u-o*s,k=c*y-f*d,M=c*g-p*d,S=c*v-h*d,_=f*g-p*y,P=f*v-h*y,j=p*v-h*g,A=m*j-b*P+x*_+O*S-w*M+E*k;return A?(A=1/A,t[0]=(l*j-s*P+u*_)*A,t[1]=(i*P-r*j-o*_)*A,t[2]=(y*E-g*w+v*O)*A,t[3]=(p*w-f*E-h*O)*A,t[4]=(s*S-a*j-u*M)*A,t[5]=(n*j-i*S+o*M)*A,t[6]=(g*x-d*E-v*b)*A,t[7]=(c*E-p*x+h*b)*A,t[8]=(a*P-l*S+u*k)*A,t[9]=(r*S-n*P-o*k)*A,t[10]=(d*w-y*x+v*m)*A,t[11]=(f*x-c*w-h*m)*A,t[12]=(l*M-a*_-s*k)*A,t[13]=(n*_-r*M+i*k)*A,t[14]=(y*b-d*O-g*m)*A,t[15]=(c*O-f*b+p*m)*A,t):null}function oL(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function oI(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function oR(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],m=e[15],b=n[0],x=n[1],O=n[2],w=n[3];return t[0]=b*r+x*l+O*f+w*y,t[1]=b*i+x*s+O*p+w*g,t[2]=b*o+x*u+O*h+w*v,t[3]=b*a+x*c+O*d+w*m,b=n[4],x=n[5],O=n[6],w=n[7],t[4]=b*r+x*l+O*f+w*y,t[5]=b*i+x*s+O*p+w*g,t[6]=b*o+x*u+O*h+w*v,t[7]=b*a+x*c+O*d+w*m,b=n[8],x=n[9],O=n[10],w=n[11],t[8]=b*r+x*l+O*f+w*y,t[9]=b*i+x*s+O*p+w*g,t[10]=b*o+x*u+O*h+w*v,t[11]=b*a+x*c+O*d+w*m,b=n[12],x=n[13],O=n[14],w=n[15],t[12]=b*r+x*l+O*f+w*y,t[13]=b*i+x*s+O*p+w*g,t[14]=b*o+x*u+O*h+w*v,t[15]=b*a+x*c+O*d+w*m,t}function oD(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function oF(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function oz(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P=r[0],j=r[1],A=r[2],T=Math.hypot(P,j,A);return T<1e-6?null:(P*=T=1/T,j*=T,A*=T,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],m=e[11],b=P*P*a+o,x=j*P*a+A*i,O=A*P*a-j*i,w=P*j*a-A*i,E=j*j*a+o,k=A*j*a+P*i,M=P*A*a+j*i,S=j*A*a-P*i,_=A*A*a+o,t[0]=l*b+f*x+y*O,t[1]=s*b+p*x+g*O,t[2]=u*b+h*x+v*O,t[3]=c*b+d*x+m*O,t[4]=l*w+f*E+y*k,t[5]=s*w+p*E+g*k,t[6]=u*w+h*E+v*k,t[7]=c*w+d*E+m*k,t[8]=l*M+f*S+y*_,t[9]=s*M+p*S+g*_,t[10]=u*M+h*S+v*_,t[11]=c*M+d*S+m*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function oB(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function oW(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function o$(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(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[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function oG(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function oV(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oH(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function oU(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oq(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oY(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function oX(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,m=a*u;return t[0]=1-(h+y),t[1]=f+m,t[2]=p-v,t[3]=0,t[4]=f-m,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function oK(t,e){var n=new oc(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),oX(t,e,n),t}function oZ(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function oQ(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function oJ(t,e){var n=new oc(3);oQ(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function o0(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,m=l*u,b=l*c,x=r[0],O=r[1],w=r[2];return t[0]=(1-(d+g))*x,t[1]=(p+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(p-b)*O,t[5]=(1-(f+g))*O,t[6]=(y+v)*O,t[7]=0,t[8]=(h+m)*w,t[9]=(y-v)*w,t[10]=(1-(f+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function o1(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,m=s*u,b=s*c,x=s*f,O=r[0],w=r[1],E=r[2],k=i[0],M=i[1],S=i[2],_=(1-(y+v))*O,P=(h+x)*O,j=(d-b)*O,A=(h-x)*w,T=(1-(p+v))*w,C=(g+m)*w,N=(d+b)*E,L=(g-m)*E,I=(1-(p+y))*E;return t[0]=_,t[1]=P,t[2]=j,t[3]=0,t[4]=A,t[5]=T,t[6]=C,t[7]=0,t[8]=N,t[9]=L,t[10]=I,t[11]=0,t[12]=n[0]+k-(_*k+A*M+N*S),t[13]=n[1]+M-(P*k+T*M+L*S),t[14]=n[2]+S-(j*k+C*M+I*S),t[15]=1,t}function o2(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function o5(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function o3(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}of();var o4=o3;function o6(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function o8(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function o9(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var o7=o9;function at(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function ae(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],m=r[1],b=r[2],x=n[0],O=n[1],w=n[2];return 1e-6>Math.abs(d-x)&&1e-6>Math.abs(y-O)&&1e-6>Math.abs(g-w)?oT(t):(h=1/Math.hypot(c=d-x,f=y-O,p=g-w),c*=h,f*=h,p*=h,(h=Math.hypot(i=m*p-b*f,o=b*c-v*p,a=v*f-m*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function an(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function ar(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function ai(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function ao(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function aa(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function al(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function as(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function au(t,e){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]}function ac(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],m=e[0],b=e[1],x=e[2],O=e[3],w=e[4],E=e[5],k=e[6],M=e[7],S=e[8],_=e[9],P=e[10],j=e[11],A=e[12],T=e[13],C=e[14],N=e[15];return Math.abs(n-m)<=1e-6*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=1e-6*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(l-E)<=1e-6*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(s-k)<=1e-6*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(c-S)<=1e-6*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-_)<=1e-6*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(p-P)<=1e-6*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(h-j)<=1e-6*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(d-A)<=1e-6*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(y-T)<=1e-6*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(v-N)<=1e-6*Math.max(1,Math.abs(v),Math.abs(N))}var af=oR,ap=aa;function ah(){var t=new oc(9);return oc!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function ad(){var t=new oc(4);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ay(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function ag(){var t=new oc(4);return oc!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function av(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function am(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}ad();function ab(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function ax(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}var aO=function(t,e,n,r){var i=new oc(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},aw=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},aE=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};of(),od(1,0,0),od(0,1,0),ag(),ag(),ah();Pm=new oc(2),oc!=Float32Array&&(Pm[0]=0,Pm[1]=0);var ak={}.toString,aM=function(t,e){return ak.call(t)==="[object "+e+"]"},aS=function(t){return aM(t,"Number")};function a_(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var aP=function(t){return null==t},aj=function(t){return aM(t,"String")},aA=function(t,e,n){return t<e?e:t>n?n:t},aT={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function aC(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return aT[e]===t.length-1&&"achlmqstvz".includes(e)})}function aN(t){return aC(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function aL(t){return aN(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var aI={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function aR(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=aT[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,aT[n]))),aT[n]););}function aD(t){return t>=48&&t<=57}function aF(t){var e,n=t.pathValue,r=t.max;for(;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var az=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function aB(t){if(aL(t))return[].concat(t);for(var e=function(t){if(aN(t))return[].concat(t);var e=function(t){if(aC(t))return[].concat(t);var e=new az(t);for(aF(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=aT[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){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}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,aF(t),t.data=[],!o){aR(t);return}for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l))!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t);else!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!aD(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&aD(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&aD(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;aD(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&aD(r.charCodeAt(o)))for(;o<n&&aD(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t);if(t.err.length)return;t.data.push(t.param),aF(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,aF(t))}if(t.index>=t.max)break;if(!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}aR(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=tW({},aI),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if(!"TQ".includes(n)&&(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function aW(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function a$(t,e,n,r,i){var o=a_([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i){if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=aW([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function aG(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function aV(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,m=t,b=e,x=0,O=[m,b,0],w=[m,b],E=0,k={x:0,y:0},M=[{x:m,y:b}];v&&s<=0&&(k={x:m,y:b});for(var S=0;S<=g;S+=1){if(m=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,E=S/g)).x,b=c.y,p&&M.push({x:m,y:b}),d&&(x+=a_(w,[m,b])),w=[m,b],v&&x>=s&&s>O[2]){var _=(x-s)/(x-O[2]);k={x:w[0]*(1-_)+O[0]*_,y:w[1]*(1-_)+O[1]*_}}O=[m,b,x]}return v&&s>=x&&(k={x:a,y:l}),{length:x,point:k,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function aH(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=aB(t),h="number"==typeof e,d=[],y=0,g=0,v=0,m=0,b=[],x=[],O=0,w={x:0,y:0},E=w,k=w,M=w,S=0,_=0,P=p.length;_<P;_+=1)d=(u="M"===(c=(f=p[_])[0]))?d:[y,g].concat(f.slice(1)),u?(v=f[1],E=w={x:v,y:m=f[2]},O=0,h&&e<.001&&(M=w)):"L"===c?(O=(r=a$(d[0],d[1],d[2],d[3],(e||0)-S)).length,w=r.min,E=r.max,k=r.point):"A"===c?(O=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,m="number"==typeof u,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];m&&u<=0&&(M={x:b,y:x});for(var _=0;_<=v;_+=1){if(b=(f=function(t,e,n,r,i,o,a,l,s,u){var c,f=Math.abs,p=Math.sin,h=Math.cos,d=Math.sqrt,y=Math.PI,g=f(n),v=f(r),m=y/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===g||0===v)return a$(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:h(m)*b+p(m)*x,y:-p(m)*b+h(m)*x},w=Math.pow(O.x,2)/Math.pow(g,2)+Math.pow(O.y,2)/Math.pow(v,2);w>1&&(g*=d(w),v*=d(w));var E=(Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(O.y,2)-Math.pow(v,2)*Math.pow(O.x,2))/(Math.pow(g,2)*Math.pow(O.y,2)+Math.pow(v,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*d(E=E<0?0:E),M={x:k*(g*O.y/v),y:k*(-(v*O.x)/g)},S={x:h(m)*M.x-p(m)*M.y+(t+l)/2,y:p(m)*M.x+h(m)*M.y+(e+s)/2},_={x:(O.x-M.x)/g,y:(O.y-M.y)/v},P=aG({x:1,y:0},_);var j=aG(_,{x:(-O.x-M.x)/g,y:(-O.y-M.y)/v});!a&&j>0?j-=2*y:a&&j<0&&(j+=2*y);var A=P+(j%=2*y)*u,T=g*h(A),C=v*p(A);return{x:h(m)*T-p(m)*C+S.x,y:p(m)*T+h(m)*C+S.y}}(t,e,n,r,i,o,a,l,s,k=_/v)).x,x=f.y,h&&S.push({x:b,y:x}),y&&(O+=a_(E,[b,x])),E=[b,x],m&&O>=u&&u>w[2]){var P=(O-u)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return m&&u>=O&&(M={x:l,y:s}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-S,n||{})).length,w=i.min,E=i.max,k=i.point):"C"===c?(O=(o=aV(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-S,n||{})).length,w=o.min,E=o.max,k=o.point):"Q"===c?(O=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,m=0,b=[g,v,0],x=[g,v],O=0,w={x:0,y:0},E=[{x:g,y:v}];y&&a<=0&&(w={x:g,y:v});for(var k=0;k<=d;k+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,O=k/d)).x,v=s.y,c&&E.push({x:g,y:v}),p&&(m+=a_(x,[g,v])),x=[g,v],y&&m>=a&&a>b[2]){var M=(m-a)/(m-b[2]);w={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[g,v,m]}return y&&a>=m&&(w={x:i,y:o}),{length:m,point:w,min:{x:Math.min.apply(null,E.map(function(t){return t.x})),y:Math.min.apply(null,E.map(function(t){return t.y}))},max:{x:Math.max.apply(null,E.map(function(t){return t.x})),y:Math.max.apply(null,E.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-S,n||{})).length,w=a.min,E=a.max,k=a.point):"Z"===c&&(O=(l=a$((d=[y,g,v,m])[0],d[1],d[2],d[3],(e||0)-S)).length,w=l.min,E=l.max,k=l.point),h&&S<e&&S+O>=e&&(M=k),x.push(E),b.push(w),S+=O,y=(s="Z"!==c?f.slice(-2):[v,m])[0],g=s[1];return h&&e>=S&&(M={x:y,y:g}),{length:S,point:M,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,x.map(function(t){return t.x})),y:Math.max.apply(null,x.map(function(t){return t.y}))}}}var aU=function(t){return Array.isArray?Array.isArray(t):aM(t,"Array")},aq=function(t){if(!!aU(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},aY=function(t){if(!!aU(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aX=function(t,e){return(t%e+e)%e};function aK(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aZ=function(t,e,n,r){return tY(tY([],aW([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function aQ(t,e){if(void 0===e&&(e=!1),aL(n=t)&&n.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i,o=[].concat(t);return e?[o,[]]:o}for(var a=aB(t),l=tW({},aI),s=[],u="",c=a.length,f=[],p=0;p<c;p+=1){a[p]&&(u=a[p][0]),s[p]=u;var h=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,m=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,m=r,b=i,x=s,O=u,w=120*Math.PI/180,E=Math.PI/180*(+o||0),k=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=aK(g,v,-E)).x,v=f.y,x=(f=aK(x,O,-E)).x,O=f.y;var M=(g-x)/2,S=(v-O)/2,_=M*M/(m*m)+S*S/(b*b);_>1&&(m*=_=Math.sqrt(_),b*=_);var P=m*m,j=b*b,A=(a===l?-1:1)*Math.sqrt(Math.abs((P*j-P*S*S-j*M*M)/(P*S*S+j*M*M)));d=A*m*S/b+(g+x)/2,y=-(A*b)*M/m+(v+O)/2,p=Math.asin(((v-y)/b*1e9>>0)/1e9),h=Math.asin(((O-y)/b*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=x<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var T=h-p;if(Math.abs(T)>w){var C=h,N=x,L=O;x=d+m*Math.cos(h=p+w*(l&&h>p?1:-1)),k=t(x,O=y+b*Math.sin(h),m,b,o,0,l,N,L,[h,C,d,y])}T=h-p;var I=Math.cos(p),R=Math.cos(h),D=Math.tan(T/4),F=4/3*m*D,z=4/3*b*D,B=[g,v],W=[g+F*Math.sin(p),v-z*I],$=[x+F*Math.sin(h),O-z*R],G=[x,O];if(W[0]=2*B[0]-W[0],W[1]=2*B[1]-W[1],c)return W.concat($,G,k);k=W.concat($,G,k);for(var V=[],H=0,U=k.length;H<U;H+=1)V[H]=H%2?aK(k[H-1],k[H],E).y:aK(k[H],k[H+1],E).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":;return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],s=1/3,u=2/3,[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(aZ(y,g,h,d));case"Z":if(y===v&&g===m)return["C",y,g,v,m,v,m];return["C"].concat(aZ(y,g,v,m))}return t}(a[p],l);a[p]=h,!function(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}(a,s,p),c=a.length,"Z"===u&&f.push(p),i=(r=a[p]).length,l.x1=+r[i-2],l.y1=+r[i-1],l.x2=+r[i-4]||l.x1,l.y2=+r[i-3]||l.y1}return e?[a,f]:a}function aJ(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g=e&&n[e-1].slice(-2).concat(t.slice(1)),v=e?aV(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],{bbox:!1}).length:0;if(e){;y=v?(void 0===i&&(i=.5),o=(r=g).slice(0,2),a=r.slice(2,4),l=r.slice(4,6),s=r.slice(6,8),u=aW(o,a,i),c=aW(a,l,i),f=aW(l,s,i),p=aW(u,c,i),h=aW(c,f,i),d=aW(p,h,i),[["C"].concat(u,p,d),["C"].concat(h,f,s)]):[t,t]}else y=[t];return{s:t,ss:y,l:v}})}function a0(t){var e,n,r;return e=0,n=0,r=0,aQ(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l,s,u,c,f,p,h=t.slice(1),d=h[0],y=h[1],g=h[2],v=h[3],m=h[4],b=h[5];return o=e,a=n,l=d,s=y,u=g,c=v,f=m,r=3*(((p=b)-a)*(l+u)-(f-o)*(s+c)+s*(o-u)-l*(a-c)+p*(u+o/3)-f*(c+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var a1=function(t){return aM(t,"Boolean")},a2=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},a5=function(t){return void 0===t};function a3(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function a4(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function a6(){}var a8=1.4285714285714286,a9="\\s*([+-]?\\d+)\\s*",a7="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",lt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",le=/^#([0-9a-f]{3,8})$/,ln=RegExp("^rgb\\("+[a9,a9,a9]+"\\)$"),lr=RegExp("^rgb\\("+[lt,lt,lt]+"\\)$"),li=RegExp("^rgba\\("+[a9,a9,a9,a7]+"\\)$"),lo=RegExp("^rgba\\("+[lt,lt,lt,a7]+"\\)$"),la=RegExp("^hsl\\("+[a7,lt,lt]+"\\)$"),ll=RegExp("^hsla\\("+[a7,lt,lt,a7]+"\\)$"),ls={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function lu(){return this.rgb().formatHex()}a3(a6,lf,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:lu,formatHex:lu,formatHsl:function(){return lb(this).formatHsl()},formatRgb:lc,toString:lc});function lc(){return this.rgb().formatRgb()}function lf(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=le.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?lp(e):3===n?new ld(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?lh(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?lh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ln.exec(t))?new ld(e[1],e[2],e[3],1):(e=lr.exec(t))?new ld(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=li.exec(t))?lh(e[1],e[2],e[3],e[4]):(e=lo.exec(t))?lh(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=la.exec(t))?lm(e[1],e[2]/100,e[3]/100,1):(e=ll.exec(t))?lm(e[1],e[2]/100,e[3]/100,e[4]):ls.hasOwnProperty(t)?lp(ls[t]):"transparent"===t?new ld(NaN,NaN,NaN,0):null}function lp(t){return new ld(t>>16&255,t>>8&255,255&t,1)}function lh(t,e,n,r){return r<=0&&(t=e=n=NaN),new ld(t,e,n,r)}function ld(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ly(){return"#"+lv(this.r)+lv(this.g)+lv(this.b)}function lg(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function lv(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function lm(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new lx(t,e,n,r)}function lb(t){if(t instanceof lx)return new lx(t.h,t.s,t.l,t.opacity);if(!(t instanceof a6)&&(t=lf(t)),!t)return new lx;if(t instanceof lx)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new lx(a,l,s,t.opacity)}a3(ld,function(t,e,n,r){var i;return 1==arguments.length?(!((i=t)instanceof a6)&&(i=lf(i)),i)?new ld((i=i.rgb()).r,i.g,i.b,i.opacity):new ld:new ld(t,e,n,null==r?1:r)},a4(a6,{brighter:function(t){return t=null==t?a8:Math.pow(a8,t),new ld(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ld(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:ly,formatHex:ly,formatRgb:lg,toString:lg}));function lx(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function lO(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}a3(lx,function(t,e,n,r){return 1==arguments.length?lb(t):new lx(t,e,n,null==r?1:r)},a4(a6,{brighter:function(t){return t=null==t?a8:Math.pow(a8,t),new lx(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new lx(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ld(lO(t>=240?t-240:t+120,i,r),lO(t,i,r),lO(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function lw(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function lE(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function lk(t,e){var n=Math.min.apply(Math,tY([],tU(t),!1)),r=Math.min.apply(Math,tY([],tU(e),!1));return{x:n,y:r,width:Math.max.apply(Math,tY([],tU(t),!1))-n,height:Math.max.apply(Math,tY([],tU(e),!1))-r}}function lM(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,tY([],tU(t.concat([h])),!1)),i.apply(void 0,tY([],tU(e.concat([h])),!1))],y=lE(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){;var v=a-f,m=a+f,d=[i.apply(void 0,tY([],tU(t.concat([v])),!1)),i.apply(void 0,tY([],tU(e.concat([v])),!1))],y=lE(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var b=[i.apply(void 0,tY([],tU(t.concat([m])),!1)),i.apply(void 0,tY([],tU(e.concat([m])),!1))],x=lE(s[0],s[1],b[0],b[1]);m<=1&&x<l?(a=m,l=x):f*=.5}}return{x:i.apply(void 0,tY([],tU(t.concat([a])),!1)),y:i.apply(void 0,tY([],tU(e.concat([a])),!1))}}function lS(t,e,n,r){return lE(t,e,n,r)}function l_(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function lP(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function lj(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(lw(l,0))!lw(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;lw(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function lA(t,e,n,r,i,o,a,l,s,u,c){var f=lM([t,n,i,a],[e,r,o,l],s,u,lP,c);return lE(f.x,f.y,s,u)}function lT(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function lC(t,e,n){var r=t+n-2*e;if(lw(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var lN="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},lL={exports:{}};Pb=lL,PO=0,Pw=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length){if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(!o&&(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;!i&&(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){;for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u=e.children[l],c=s(u),f=function(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}(t,u)-c;f<o?(o=f,i=c<i?c:i,a=u):f===o&&c<i&&(i=c,a=u)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){!i&&(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;){if(i=l.pop(),!(i-(r=l.pop())<=o)){var s,u,c,f,p,h=r+Math.ceil((i-r)/o/2)*o;s=n,u=h,c=r,f=i,p=a,function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}}(s,u,c||0,f||s.length-1,p||e),l.push(r,h,h,i)}}}return n},Pb.exports=Pw();var lI=lL.exports;(PE=PQ||(PQ={})).GROUP="g",PE.CIRCLE="circle",PE.ELLIPSE="ellipse",PE.IMAGE="image",PE.RECT="rect",PE.LINE="line",PE.POLYLINE="polyline",PE.POLYGON="polygon",PE.TEXT="text",PE.PATH="path",PE.HTML="html",PE.MESH="mesh",(Pk=PJ||(PJ={}))[Pk.ZERO=0]="ZERO",Pk[Pk.NEGATIVE_ONE=1]="NEGATIVE_ONE";var lR=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),lD=function(){function t(t){this.clipSpaceNearZ=PJ.NEGATIVE_ONE,this.plugins=[],this.config=tW({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function lF(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function lz(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lB(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lW(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function l$(t){return void 0===t?0:t>360||t<-360?t%360:t}function lG(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?op(t):aS(t)?od(t,e,n):od(t[0],t[1]||e,t[2]||n)}function lV(t){return Math.PI/180*t}function lH(t){return 180/Math.PI*t}function lU(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w;if(16===e.length){;return n=t,r=e,a=.5*Math.PI,s=(l=tU(oQ(of(),r),3))[0],u=l[1],c=l[2],(f=Math.asin(-r[2]/s))<a?f>-a?(i=Math.atan2(r[6]/u,r[10]/c),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/u,r[5]/u)):(o=0,i=Math.atan2(r[4]/u,r[5]/u)),n[0]=i,n[1]=f,n[2]=o,n}return p=t,d=(h=e)[0],y=h[1],g=h[2],v=h[3],O=d*d+(m=y*y)+(b=g*g)+(x=v*v),(w=d*v-y*g)>.499995*O?(p[0]=Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):w<-.499995*O?(p[0]=-Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):(p[0]=Math.asin(2*(d*g-v*y)),p[1]=Math.atan2(2*(d*v+y*g),1-2*(b+x)),p[2]=Math.atan2(2*(d*y+g*v),1-2*(m+b))),p}function lq(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=lH(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var lY=oS(),lX=oS(),lK=ad(),lZ=[of(),of(),of()],lQ=of();function lJ(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var l0=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){lF(this.center,t),lF(this.halfExtents,e),lz(this.min,this.center,this.halfExtents),lB(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lB(this.center,e,t),lW(this.center,this.center,.5),lz(this.halfExtents,e,t),lW(this.halfExtents,this.halfExtents,.5),lF(this.min,t),lF(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],m=g[1],b=g[2],x=e.halfExtents,O=x[0],w=x[1],E=x[2],k=v-O,M=v+O,S=m-w,_=m+w,P=b-E,j=b+E;k<c&&(c=k),M>f&&(f=M),S<p&&(p=S),_>h&&(h=_),P<d&&(d=P),j>y&&(y=j),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),m=Math.abs(u),b=Math.abs(c),x=Math.abs(f),O=Math.abs(p),w=Math.abs(h),E=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=m*o[0]+b*o[1]+x*o[2],r[2]=O*o[0]+w*o[1]+E*o[2],lz(this.min,n,r),lB(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t;var u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n);var c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return lF([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return lF([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),l1=function(){function t(t,e){this.distance=t||0,this.normal=e||od(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return oO(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/oh(this.normal);ob(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&ow(n,t,e,i),o},t}();(PM=P0||(P0={}))[PM.OUTSIDE=0xffffffff]="OUTSIDE",PM[PM.INSIDE=0]="INSIDE",PM[PM.INDETERMINATE=0x7fffffff]="INDETERMINATE";var l2=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new l1)}return t.prototype.extractFromVPMatrix=function(t){var e=tU(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];og(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,og(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,og(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,og(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,og(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,og(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),l5=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),l3=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),l4="Method not implemented.",l6="Use document.documentElement instead.";(PS=P1||(P1={}))[PS.ORBITING=0]="ORBITING",PS[PS.EXPLORING=1]="EXPLORING",PS[PS.TRACKING=2]="TRACKING",(P_=P2||(P2={}))[P_.DEFAULT=0]="DEFAULT",P_[P_.ROTATIONAL=1]="ROTATIONAL",P_[P_.TRANSLATIONAL=2]="TRANSLATIONAL",P_[P_.CINEMATIC=3]="CINEMATIC",(PP=P5||(P5={}))[PP.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",PP[PP.PERSPECTIVE=1]="PERSPECTIVE";var l8={UPDATED:"updated"},l9=function(){function t(){this.clipSpaceNearZ=PJ.NEGATIVE_ONE,this.eventEmitter=new ou,this.matrix=oS(),this.right=od(1,0,0),this.up=od(0,1,0),this.forward=od(0,0,1),this.position=od(0,0,1),this.focalPoint=od(0,0,0),this.distanceVector=od(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=oS(),this.projectionMatrixInverse=oS(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=P1.EXPLORING,this.trackingMode=P2.DEFAULT,this.projectionMode=P5.PERSPECTIVE,this.frustum=new l2,this.orthoMatrix=oS()}return t.prototype.isOrtho=function(){return this.projectionMode===P5.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===P1.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===P1.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==P1.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return oN(oS(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oG(oS(),[t,e,0]);this.jitteredProjectionMatrix=oR(oS(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===P5.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===P5.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===P5.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},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===P5.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},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===P5.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===P5.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=od(a.x-r,a.y-i,0),s=oO(l,this.right)/oh(this.right),u=oO(l,this.up)/oh(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=P5.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h,d,y=this.near*Math.tan(lV(.5*this.fov))/this.zoom,g=2*y,v=this.aspect*g,m=-.5*v;if(null===(d=this.view)||void 0===d?void 0:d.enabled){var b=this.view.fullWidth,x=this.view.fullHeight;m+=this.view.offsetX*v/b,y-=this.view.offsetY*g/x,v*=this.view.width/b,g*=this.view.height/x}return i=this.projectionMatrix,o=m,a=m+v,l=y,s=y-g,u=t,c=this.far,f=this.clipSpaceNearZ===PJ.ZERO,f?(p=-c/(c-u),h=-c*u/(c-u)):(p=-(c+u)/(c-u),h=-2*c*u/(c-u)),i[0]=2*u/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*u/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=p,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,oF(this.projectionMatrix,this.projectionMatrix,od(1,-1,1)),oN(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=P5.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null===(a=this.view)||void 0===a?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===PJ.NEGATIVE_ONE?o7(this.projectionMatrix,f,p,d,h,i,o):at(this.projectionMatrix,f,p,d,h,i,o),oF(this.projectionMatrix,this.projectionMatrix,od(1,-1,1)),oN(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=lG(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=od(0,1,0);if(this.focalPoint=lG(t,e,n),this.trackingMode===P2.CINEMATIC){var i=om(of(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=lH(Math.asin(e/oh(i))),a=90+lH(Math.atan2(n,t)),l=oS();oW(l,l,lV(a)),oB(l,l,lV(o)),r=oE(of(),[0,1,0],l)}return oN(this.matrix,ae(oS(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=of();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=l$(t),this.computeMatrix(),this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=av(ag(),[0,0,1],lV(this.roll));oT(this.matrix);var e=av(ag(),[1,0,0],lV((this.rotateWorld&&this.type!==P1.TRACKING||this.type===P1.TRACKING?1:-1)*this.elevation)),n=av(ag(),[0,1,0],lV((this.rotateWorld&&this.type!==P1.TRACKING||this.type===P1.TRACKING?1:-1)*this.azimuth)),r=am(ag(),n,e);r=am(ag(),r,t);var i=o2(oS(),r);this.type===P1.ORBITING||this.type===P1.EXPLORING?(oD(this.matrix,this.matrix,this.focalPoint),oR(this.matrix,this.matrix,i),oD(this.matrix,this.matrix,[0,0,this.distance])):this.type===P1.TRACKING&&(oD(this.matrix,this.matrix,this.position),oR(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lG(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){oy(this.right,lG(ay(ad(),[1,0,0,0],this.matrix))),oy(this.up,lG(ay(ad(),[0,1,0,0],this.matrix))),oy(this.forward,lG(ay(ad(),[0,0,1,0],this.matrix))),ox(this.right,this.right),ox(this.up,this.up),ox(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=oh(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===P1.TRACKING?(this.elevation=lH(Math.asin(e/r)),this.azimuth=lH(Math.atan2(-t,-n))):this.rotateWorld?(this.elevation=lH(Math.asin(e/r)),this.azimuth=lH(Math.atan2(-t,-n))):(this.elevation=-lH(Math.asin(e/r)),this.azimuth=-lH(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){oy(this.position,lG(ay(ad(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a,l;n=this.distanceVector,r=[0,0,-this.distance],i=(t=ah(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t),o=r[0],a=r[1],l=r[2],n[0]=o*i[0]+a*i[3]+l*i[6],n[1]=o*i[1]+a*i[4]+l*i[7],n[2]=o*i[2]+a*i[5]+l*i[8],ov(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=om(of(),this.focalPoint,this.position),this.distance=oh(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===P5.ORTHOGRAPHIC){var t=this.position,e=av(ag(),[0,0,1],-this.roll*Math.PI/180);o1(this.orthoMatrix,e,od((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),od(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=oR(oS(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(l8.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(l4)},t.prototype.pan=function(t,e){throw Error(l4)},t.prototype.dolly=function(t){throw Error(l4)},t.prototype.createLandmark=function(t,e){throw Error(l4)},t.prototype.gotoLandmark=function(t,e){throw Error(l4)},t.prototype.cancelLandmarkAnimation=function(){throw Error(l4)},t}();function l7(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(l7.Cache||Map),n}l7.Cache=Map,(Pj=P3||(P3={}))[Pj.kUnknown=0]="kUnknown",Pj[Pj.kNumber=1]="kNumber",Pj[Pj.kPercentage=2]="kPercentage",Pj[Pj.kEms=3]="kEms",Pj[Pj.kPixels=4]="kPixels",Pj[Pj.kRems=5]="kRems",Pj[Pj.kDegrees=6]="kDegrees",Pj[Pj.kRadians=7]="kRadians",Pj[Pj.kGradians=8]="kGradians",Pj[Pj.kTurns=9]="kTurns",Pj[Pj.kMilliseconds=10]="kMilliseconds",Pj[Pj.kSeconds=11]="kSeconds",Pj[Pj.kInteger=12]="kInteger",(PA=P4||(P4={}))[PA.kUNumber=0]="kUNumber",PA[PA.kUPercent=1]="kUPercent",PA[PA.kULength=2]="kULength",PA[PA.kUAngle=3]="kUAngle",PA[PA.kUTime=4]="kUTime",PA[PA.kUOther=5]="kUOther",(PT=P6||(P6={}))[PT.kAll=0]="kAll",PT[PT.kNonNegative=1]="kNonNegative",PT[PT.kInteger=2]="kInteger",PT[PT.kNonNegativeInteger=3]="kNonNegativeInteger",PT[PT.kPositiveInteger=4]="kPositiveInteger",(PC=P8||(P8={}))[PC.kYes=0]="kYes",PC[PC.kNo=1]="kNo",(PN=P9||(P9={}))[PN.kYes=0]="kYes",PN[PN.kNo=1]="kNo";var st=[{name:"em",unit_type:P3.kEms},{name:"px",unit_type:P3.kPixels},{name:"deg",unit_type:P3.kDegrees},{name:"rad",unit_type:P3.kRadians},{name:"grad",unit_type:P3.kGradians},{name:"ms",unit_type:P3.kMilliseconds},{name:"s",unit_type:P3.kSeconds},{name:"rem",unit_type:P3.kRems},{name:"turn",unit_type:P3.kTurns}];(PL=P7||(P7={}))[PL.kUnknownType=0]="kUnknownType",PL[PL.kUnparsedType=1]="kUnparsedType",PL[PL.kKeywordType=2]="kKeywordType",PL[PL.kUnitType=3]="kUnitType",PL[PL.kSumType=4]="kSumType",PL[PL.kProductType=5]="kProductType",PL[PL.kNegateType=6]="kNegateType",PL[PL.kInvertType=7]="kInvertType",PL[PL.kMinType=8]="kMinType",PL[PL.kMaxType=9]="kMaxType",PL[PL.kClampType=10]="kClampType",PL[PL.kTransformType=11]="kTransformType",PL[PL.kPositionType=12]="kPositionType",PL[PL.kURLImageType=13]="kURLImageType",PL[PL.kColorType=14]="kColorType",PL[PL.kUnsupportedColorType=15]="kUnsupportedColorType";var se=function(t){var e;if(!t)return P3.kUnknown;if("number"===t)return P3.kNumber;if("percent"===t||"%"===t)return P3.kPercentage;return e=t,st.find(function(t){return t.name===e}).unit_type},sn=function(t){switch(t){case P3.kNumber:case P3.kInteger:return P4.kUNumber;case P3.kPercentage:return P4.kUPercent;case P3.kPixels:return P4.kULength;case P3.kMilliseconds:case P3.kSeconds:return P4.kUTime;case P3.kDegrees:case P3.kRadians:case P3.kGradians:case P3.kTurns:return P4.kUAngle;default:return P4.kUOther}},sr=function(t){switch(t){case P4.kUNumber:return P3.kNumber;case P4.kULength:return P3.kPixels;case P4.kUPercent:return P3.kPercentage;case P4.kUTime:return P3.kSeconds;case P4.kUAngle:return P3.kDegrees;default:return P3.kUnknown}},si=function(t){var e=1;switch(t){case P3.kPixels:case P3.kDegrees:case P3.kSeconds:break;case P3.kMilliseconds:e=.001;break;case P3.kRadians:e=180/Math.PI;break;case P3.kGradians:e=.9;break;case P3.kTurns:e=360}return e},so=function(t){switch(t){case P3.kNumber:case P3.kInteger:break;case P3.kPercentage:return"%";case P3.kEms:return"em";case P3.kRems:return"rem";case P3.kPixels:return"px";case P3.kDegrees:return"deg";case P3.kRadians:return"rad";case P3.kGradians:return"grad";case P3.kMilliseconds:return"ms";case P3.kSeconds:return"s";case P3.kTurns:return"turn"}return""},sa=function(){function t(){}return t.isAngle=function(t){return t===P3.kDegrees||t===P3.kRadians||t===P3.kGradians||t===P3.kTurns},t.isLength=function(t){return t>=P3.kEms&&t<P3.kDegrees},t.isRelativeUnit=function(t){return t===P3.kPercentage||t===P3.kEms||t===P3.kRems},t.isTime=function(t){return t===P3.kSeconds||t===P3.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(P8.kNo,P9.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=P7.kUnitType&&this.getType()<=P7.kClampType},t}(),sl=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tB(e,t),e.prototype.getType=function(){return P7.kColorType},e.prototype.to=function(t){return this},e}(sa);(PI=jt||(jt={}))[PI.Constant=0]="Constant",PI[PI.LinearGradient=1]="LinearGradient",PI[PI.RadialGradient=2]="RadialGradient";var ss=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tB(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return P7.kColorType},e}(sa),su=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tB(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return P7.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(sa),sc=l7(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),sf=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function sp(t){return"function"==typeof t}var sh={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},sd=l7(function(t){var e=sc(t),n=sh[e];return e=(null==n?void 0:n.alias)||e}),sy=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(!function(t){if(!t)throw Error()}(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},sg=function(t){return sr(sn(t))},sv=function(t){function e(e,n){void 0===n&&(n=P3.kNumber);var r,i=t.call(this)||this;return r="string"==typeof n?se(n):n,i.unit=r,i.value=e,i}return tB(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return P7.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=sg(this.unit);if(n!==sg(t)||n===P3.kUnknown)return null;var r=si(this.unit)/si(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case P3.kUnknown:break;case P3.kInteger:r=Number(this.value).toFixed(0);break;case P3.kNumber:case P3.kPercentage:case P3.kEms:case P3.kRems:case P3.kPixels:case P3.kDegrees:case P3.kRadians:case P3.kGradians:case P3.kMilliseconds:case P3.kSeconds:case P3.kTurns:var i=this.value,o=so(this.unit);if(i<-999999||i>999999){var a=so(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?sy(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+=r},e}(sa),sm=new sv(0,"px");new sv(1,"px");var sb=new sv(0,"deg"),sx=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return tB(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(sl),sO=new su("unset"),sw={"":sO,unset:sO,initial:new su("initial"),inherit:new su("inherit")},sE=function(t){return!sw[t]&&(sw[t]=new su(t)),sw[t]},sk=new sx(0,0,0,0,!0),sM=new sx(0,0,0,0),sS=l7(function(t,e,n,r){return new sx(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),s_=function(t,e){return void 0===e&&(e=P3.kNumber),new sv(t,e)},sP=new sv(50,"%");(PR=je||(je={}))[PR.Standard=0]="Standard",(PD=jn||(jn={}))[PD.ADDED=0]="ADDED",PD[PD.REMOVED=1]="REMOVED",PD[PD.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var sj={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l3(0,0,0,0)};(PF=jr||(jr={})).COORDINATE="<coordinate>",PF.COLOR="<color>",PF.PAINT="<paint>",PF.NUMBER="<number>",PF.ANGLE="<angle>",PF.OPACITY_VALUE="<opacity-value>",PF.SHADOW_BLUR="<shadow-blur>",PF.LENGTH="<length>",PF.PERCENTAGE="<percentage>",PF.LENGTH_PERCENTAGE="<length> | <percentage>",PF.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",PF.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",PF.LIST_OF_POINTS="<list-of-points>",PF.PATH="<path>",PF.FILTER="<filter>",PF.Z_INDEX="<z-index>",PF.OFFSET_DISTANCE="<offset-distance>",PF.DEFINED_PATH="<defined-path>",PF.MARKER="<marker>",PF.TRANSFORM="<transform>",PF.TRANSFORM_ORIGIN="<transform-origin>",PF.TEXT="<text>",PF.TEXT_TRANSFORM="<text-transform>";var sA=function(){var t={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]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!m(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=m(e);if(i){!m(t.startCall)&&n("Missing (");var o=r(i);return!m(t.endCall)&&n("Missing )"),o}}function a(){return function(){return v("directional",t.sideOrCorner,1)}()||function(){return v("angular",t.angleValue,1)}()}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,m(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t=function(){var t=v("shape",/^(circle)/i,0);return t&&(t.style=g()||u()),t}()||function(){var t=v("shape",/^(ellipse)/i,0);return t&&(t.style=y()||u()),t}();if(t)t.at=c();else{var e=u();if(e){t=e;var n=c();n&&(t.at=n)}else{var r=f();r&&(t={type:"default-radial",at:r})}}return t}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return!t&&n("Missing positioning value"),t}}function f(){var t=function(){return{x:y(),y:y()}}();if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);m(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=function(){return function(){return v("hex",t.hexColor,1)}()||function(){return o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})}()||function(){return o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})}()||function(){return v("literal",t.literalColor,0)}()}();return!e&&n("Expected color definition"),e.length=y(),e}function d(){return m(t.number)[1]}function y(){return v("%",t.percentageValue,1)||function(){return v("position-keyword",t.positionKeywords,1)}()||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=m(e);if(r)return{type:t,value:r[n]}}function m(t){var n=/^[\n\r\t\s]+/.exec(e);n&&b(n[0].length);var r=t.exec(e);return r&&b(r[0].length),r}function b(t){e=e.substring(t)}return function(t){var i;return e=t,i=function(){return p(r)}(),e.length>0&&n("Invalid input not EOF"),i}}(),sT=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,sC=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sN=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sL=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,sI={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},sR=l7(function(t){var e;return s_(e="angular"===t.type?Number(t.value):sI[t.value]||0,"deg")}),sD=l7(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:s_(e,r),cy:s_(n,i)}}),sF=l7(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return sA(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!==(e=t[i-1].length)&&void 0!==e?e:{type:"%",value:"100"},i>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null===(r=t[l].length)||void 0===r?void 0:r.value;if(!aP(s)&&!aP(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){return{offset:s_(Number(t.length.value),"%"),color:function(t){var e=t.type,n=t.value;if("hex"===e)return"#".concat(n);if("literal"===e)return n;if("rgb"===e)return"rgb(".concat(n.join(","),")");else return"rgba(".concat(n.join(","),")")}(t)}});if("linear-gradient"===e)return new ss(jt.LinearGradient,{angle:n?sR(n):sb,steps:i});if("radial-gradient"===e&&(!n&&(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sD(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?sE(f):s_(f,c)}return new ss(jt.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=sT.exec(t);if(r){var i=(null===(e=r[2].match(sL))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return[new ss(jt.LinearGradient,{angle:s_(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=tU(t,2),n=e[0],r=e[1];return{offset:s_(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=sC.exec(t);if(n){var r=(null===(e=n[4].match(sL))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:s_(50,"%"),cy:s_(50,"%"),steps:r.map(function(t){var e=tU(t,2),n=e[0],r=e[1];return{offset:s_(100*Number(n),"%"),color:r}})}}return null}(t);if(o){if(!aj(o))return[new ss(jt.RadialGradient,o)];t=o}}else if("p"===n)return function(t){var e=sN.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(t)}});function sz(t){return t&&!!t.image}function sB(t){return t&&!aP(t.r)&&!aP(t.g)&&!aP(t.b)}var sW=l7(function(t){if(sz(t))return tW({repetition:"repeat"},t);if(aP(t)&&(t=""),"transparent"===t)return sM;"currentColor"===t&&(t="black");var e=sF(t);if(e)return e;var n=lf(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),sS.apply(void 0,tY([],tU(r),!1))});function s$(t,e){if(!!sB(t)&&!!sB(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(aA(e[n],0,255));return e[3]=aA(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sG(t,e){if(aP(e))return s_(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return s_(Number(e),"px");if("deg".search(t)>=0)return s_(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return s_(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sV=function(t){return sG(/px/g,t)},sH=l7(sV);l7(function(t){return sG(RegExp("%","g"),t)});var sU=function(t){return aS(t)||isFinite(Number(t))?s_(Number(t)||0,"px"):sG(RegExp("px|%|em|rem","g"),t)},sq=l7(sU),sY=function(t){return sG(RegExp("deg|rad|grad|turn","g"),t)},sX=l7(sY);function sK(t){var e=0;if(t.unit===P3.kDegrees)e=t.value;else if(t.unit===P3.kRadians)e=lH(Number(t.value));else if(t.unit===P3.kTurns)e=360*Number(t.value);return e}function sZ(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):aj(t)?n=t.split(" ").map(function(t){return Number(t)}):aS(t)&&(n=[t]),2===e)return 1===n.length?[n[0],n[0]]:[n[0],n[1]];if(1===n.length)return[n[0],n[0],n[0],n[0]];if(2===n.length)return[n[0],n[1],n[0],n[1]];else if(3===n.length)return[n[0],n[1],n[2],n[1]];else return[n[0],n[1],n[2],n[3]]}function sQ(t){return aj(t)?t.split(" ").map(function(t){return sq(t)}):t.map(function(t){return sq(t.toString())})}function sJ(t,e,n){if(0===t.value)return 0;if(t.unit===P3.kPixels)return Number(t.value);if(t.unit===P3.kPercentage&&n){var r=n.nodeName===PQ.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var s0=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function s1(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;if(i=e.index+e[0].length,s0.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sG(/deg|rad|grad|turn|px|%/g,t)||sW(t)})}),n.lastIndex===t.length)return r}return[]}function s2(t){return t.toString()}var s5=function(t){return"number"==typeof t?s_(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?s_(Number(t)):s_(0)},s3=l7(s5);function s4(t,e){return[t,e,s2]}function s6(t,e){return function(n,r){return[n,r,function(n){return s2(aA(n,t,e))}]}}function s8(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function s9(t){if(0===t.parsedStyle.path.totalLength){var e;t.parsedStyle.path.totalLength=aH(t.parsedStyle.path.absolutePath,void 0,tW(tW({},void 0),{bbox:!1,length:!0})).length}return t.parsedStyle.path.totalLength}l7(function(t){return aj(t)?t.split(" ").map(s3):t.map(s3)});function s7(t,e){return t[0]===e[0]&&t[1]===e[1]}function ut(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function ue(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var un=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},ur=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s,u=lV(r=aX(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-a.x)/2,f=(t.y-a.y)/2,p={x:Math.cos(u)*c+Math.sin(u)*f,y:-Math.sin(u)*c+Math.cos(u)*f},h=Math.pow(p.x,2)/Math.pow(e,2)+Math.pow(p.y,2)/Math.pow(n,2);h>1&&(e=Math.sqrt(h)*e,n=Math.sqrt(h)*n);var d=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(p.y,2)-Math.pow(n,2)*Math.pow(p.x,2))/(Math.pow(e,2)*Math.pow(p.y,2)+Math.pow(n,2)*Math.pow(p.x,2)),y=(i!==o?1:-1)*Math.sqrt(d=d<0?0:d),g={x:y*(e*p.y/n),y:y*(-(n*p.x)/e)},v={x:Math.cos(u)*g.x-Math.sin(u)*g.y+(t.x+a.x)/2,y:Math.sin(u)*g.x+Math.cos(u)*g.y+(t.y+a.y)/2},m={x:(p.x-g.x)/e,y:(p.y-g.y)/n},b=un({x:1,y:0},m);var x=un(m,{x:(-p.x-g.x)/e,y:(-p.y-g.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(u)*w-Math.sin(u)*E+v.x,y:Math.sin(u)*w+Math.cos(u)*E+v.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:v,resultantRx:e,resultantRy:n}};function ui(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=ur({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=ur({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function uo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function ua(t,e){return uo(t)*uo(e)?(t[0]*e[0]+t[1]*e[1])/(uo(t)*uo(e)):1}function ul(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ua(t,e))}function us(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function uu(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p,h=[];switch(t.nodeName){case PQ.LINE:var d=t.parsedStyle,y=d.x1,g=d.y1,v=d.x2,m=d.y2;h=[["M",void 0===y?0:y,void 0===g?0:g],["L",void 0===v?0:v,void 0===m?0:m]];break;case PQ.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;h=us(O,O,E,M);break;case PQ.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;h=us(void 0===_?0:_,void 0===P?0:P,E,M);break;case PQ.POLYLINE:case PQ.POLYGON:;n=t.parsedStyle.points.points,r=t.nodeName===PQ.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),h=i;break;case PQ.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;h=function(t,e,n,r,i){if(i){var o=tU(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=c+f!==0?1:0;return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return aA(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case PQ.PATH:h=tY([],tU(t.parsedStyle.path.absolutePath),!1)}if(h.length){;return o=h,a=t,l=e,c=void 0===(u=(s=a.parsedStyle).defX)?0:u,p=void 0===(f=s.defY)?0:f,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=od(e[1]-c,e[2]-p,0);l&&oE(r,r,l),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=od(e[1]-c,e[2]-p,0),o=od(e[3]-c,e[4]-p,0),a=od(e[5]-c,e[6]-p,0);l&&(oE(i,i,l),oE(o,o,l),oE(a,a,l)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(a[0],",").concat(a[1])}else if("A"===e[0]){var s=od(e[6]-c,e[7]-p,0);l&&oE(s,s,l),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=od(e[1]-c,e[2]-p,0),o=od(e[3]-c,e[4]-p,0);l&&(oE(i,i,l),oE(o,o,l)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}}var uc=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=aB(t)}catch(n){e=aB(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&s7(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=aX(lV(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,m=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,b=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,x=[(f-g)/n,(p-v)/r],O=[(-1*f-g)/n,(-1*p-v)/r],w=ul([1,0],x),E=ul(x,O);return -1>=ua(x,O)&&(E=Math.PI),ua(x,O)>=1&&(E=0),0===a&&E>0&&(E-=2*Math.PI),1===a&&E<0&&(E+=2*Math.PI),{cx:m,cy:b,rx:s7(t,[u,c])?0:n,ry:s7(t,[u,c])?0:r,startAngle:w,endAngle:w+E,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s);c.arcParams=f}if("Z"===u)n=i,r=t[o+1];else{var p=s.length;n=[s[p-2],s[p-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&s7(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;c.nextPoint=h;var d=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===u){var y=[s[1],s[2]];c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===u){var g=e[l-1],y=ue(g.currentPoint,d);"Q"===g.command?(c.command="Q",c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===u){var v=[s[1],s[2]],m=[s[3],s[4]];c.startTangent=[d[0]-v[0],d[1]-v[1]],c.endTangent=[n[0]-m[0],n[1]-m[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[v[0]-m[0],v[1]-m[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===u){var g=e[l-1],v=ue(g.currentPoint,d),m=[s[1],s[2]];"C"===g.command?(c.command="C",c.startTangent=[d[0]-v[0],d[1]-v[1]]):(c.command="SQ",c.startTangent=[d[0]-m[0],d[1]-m[1]]),c.endTangent=[n[0]-m[0],n[1]-m[1]]}else if("A"===u){var b=ui(c,0),x=b.x,O=b.y,w=ui(c,1,!1),E=w.x,k=w.y;c.startTangent=[x,O],c.endTangent=[E,k]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=lC(t,n,i)[0],l=lC(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(lT(t,n,i,a)),void 0!==l&&u.push(lT(e,r,o,l)),lk(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=lj(t,n,i,a),f=lj(e,r,o,l),p=0;p<c.length;p++)s.push(lP(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(lP(e,r,o,l,f[p]));return lk(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d,y,g,v,m,b=(h=t,d=0,y=n,g=r,y*Math.cos(v=i)*Math.cos(m=c[f])-g*Math.sin(v)*Math.sin(m)+h);b<s&&(s=b),b>u&&(u=b)}for(var x=Math.atan(r/(n*Math.tan(i))),O=1/0,w=-1/0,E=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var k=x+f;o<a?o<k&&k<a&&E.push(k):a<k&&k<o&&E.push(k)}for(var f=0;f<E.length;f++){var M,S,_,P,j,A,T=(M=0,S=e,_=n,P=r,_*Math.sin(j=i)*Math.cos(A=E[f])+P*Math.cos(j)*Math.sin(A)+S);T<O&&(O=T),T>w&&(w=T)}return{x:s,y:O,width:u-s,height:w-O}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=aq(n),h=aq(r),d=aY(n),y=aY(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=(g=ut(a,e)).xExtra:l[0]===d&&(d+=(g=ut(a,e)).xExtra),l[1]===h?h-=(g=ut(a,e)).yExtra:l[1]===y&&(y+=(g=ut(a,e)).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},uf=l7(uc);function up(t){return aj(t)?uf(t):uc(t)}function uh(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=t.curve,g=e.curve;(!y||0===y.length)&&(y=aQ(t.absolutePath,!1),t.curve=y),(!g||0===g.length)&&(g=aQ(e.absolutePath,!1),e.curve=g);var v=[y,g];y.length!==g.length&&(v=function t(e,n,r){var i=aJ(e),o=aJ(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=y?1:0,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(y,g));var m=a0(v[0])!==a0(v[1])?[["M"].concat((i=(r=v[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):v[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[m,(o=v[1],a=m,l=o.length-1,s=[],u=0,c=0,(d=(h=(p=(f=o).length)-1,f.map(function(t,e){return f.map(function(t,n){var r=e+n;return 0===n||f[r]&&"M"===f[r][0]?["M"].concat(f[r].slice(-2)):(r>=p&&(r-=h),f[r])})}))).forEach(function(t,e){o.slice(1).forEach(function(t,n){c+=a_(o[(e+n)%l].slice(-2),a[n%l].slice(-2))}),s[e]=c,c=0}),d[u=s.indexOf(Math.min.apply(null,s))]),function(t){return t}]}function ud(t,e){n=aj(t)?t.split(" ").map(function(t){var e=tU(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t;var n,r,i,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=lE(r[0],r[1],i[0],i[1])}return e}(n);n.forEach(function(t,e){if(n[e+1]){var s,u,c;(r=[0,0])[0]=a/l,s=t[0],u=t[1],c=n[e+1][0],i=lE(s,u,c,n[e+1][1]),a+=i,r[1]=a/l,o.push(r)}});var s=Math.min.apply(Math,tY([],tU(n.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,tY([],tU(n.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:n,totalLength:l,segments:o}}function uy(t,e){return[t.points,e.points,function(t){return t}]}function ug(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function uv(t){return t}var um={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],uv],matrix3d:["NNNNNNNNNNNNNNNN",uv],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ug([null,null,new sv(1)]),uv],scalex:["N",ug([null,new sv(1),new sv(1)]),ug([null,new sv(1)])],scaley:["N",ug([new sv(1),null,new sv(1)]),ug([new sv(1),null])],scalez:["N",ug([new sv(1),new sv(1),null])],scale3d:["NNN",uv],skew:["Aa",null,uv],skewx:["A",null,ug([null,sb])],skewy:["A",null,ug([sb,null])],translate:["Tt",ug([null,null,sm]),uv],translatex:["T",ug([null,sm,sm]),ug([null,sm])],translatey:["T",ug([sm,null,sm]),ug([sm,null])],translatez:["L",ug([sm,sm,null])],translate3d:["TTL",uv]};function ub(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=um[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?sb:sX(t)},N:s3,T:sq,L:sH})[p.toUpperCase()](f):({a:sb,n:u[0],t:sm})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ux(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=um[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?sb:sY(t)},N:s5,T:sU,L:sV})[p.toUpperCase()](f):({a:sb,n:u[0],t:sm})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function uO(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lV(sK(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=lV(sK(t.d[0]))),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[Math.cos(i=lV(sK(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=lV(sK(t.d[3]));var e,n,r,i,o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.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,t.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,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=lV(sK(t.d[0]));return[1,Math.tan(lV(sK(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=lV(sK(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lV(sK(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=sJ(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sJ(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sJ(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=sJ(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=sJ(t.d[0],0,null)||0,1];case"translate3d":return e=sJ(t.d[0],0,null)||0,n=sJ(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,r=sJ(t.d[2],0,null)||0,1];case"perspective":var f=sJ(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function uw(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function uE(t){var e,n=[0,0,0],r=[1,1,1],i=[0,0,0],o=[0,0,0,1],a=[0,0,0,1];return!function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(lY,t))return;if(oP(lX,lY),lX[3]=0,lX[7]=0,lX[11]=0,lX[15]=1,1e-8>Math.abs(oI(lX)))return;var a,l,s,u,c,f,p,h,d,y=lY[3],g=lY[7],v=lY[11],m=lY[12],b=lY[13],x=lY[14],O=lY[15];if(0!==y||0!==g||0!==v){if(lK[0]=y,lK[1]=g,lK[2]=v,lK[3]=O,!oN(lX,lX))return;oC(lX,lX),ay(i,lK,lX)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=m,e[1]=b,e[2]=x,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(lZ,lY),n[0]=oh(lZ[0]),ox(lZ[0],lZ[0]),r[0]=oO(lZ[0],lZ[1]),lJ(lZ[1],lZ[1],lZ[0],1,-r[0]),n[1]=oh(lZ[1]),ox(lZ[1],lZ[1]),r[0]/=n[1],r[1]=oO(lZ[0],lZ[2]),lJ(lZ[2],lZ[2],lZ[0],1,-r[1]),r[2]=oO(lZ[1],lZ[2]),lJ(lZ[2],lZ[2],lZ[1],1,-r[2]),n[2]=oh(lZ[2]),ox(lZ[2],lZ[2]),r[1]/=n[2],r[2]/=n[2],a=lQ,l=lZ[1],s=lZ[2],u=l[0],c=l[1],f=l[2],p=s[0],h=s[1],d=s[2],a[0]=c*d-f*h,a[1]=f*p-u*d,a[2]=u*h-c*p,0>oO(lZ[0],lQ))for(var w=0;w<3;w++)n[w]*=-1,lZ[w][0]*=-1,lZ[w][1]*=-1,lZ[w][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lZ[0][0]-lZ[1][1]-lZ[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lZ[0][0]+lZ[1][1]-lZ[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lZ[0][0]-lZ[1][1]+lZ[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lZ[0][0]+lZ[1][1]+lZ[2][2],0)),lZ[2][1]>lZ[1][2]&&(o[0]=-o[0]),lZ[0][2]>lZ[2][0]&&(o[1]=-o[1]),lZ[1][0]>lZ[0][1]&&(o[2]=-o[2])}(0===(e=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(uO).reduce(uw),n,r,i,o,a),[[n,r,i,a,o]]}var uk=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[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])}}();function uM(t){return t.toFixed(6).replace(".000000","")}function uS(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=uE(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=uE(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=aA(r,-1,1);var i=[];if(1===r)i=t;else{for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a)}return i}(n[0][3],r[0][3],t[5]);return uk(t[0],t[1],t[2],e,t[4]).map(uM).join(",")}])}function u_(t){return t.replace(/[xy]/,"")}function uP(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function uj(t,e,n){var r=!1;if(!t.length||!e.length){!t.length&&(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map(function(t){return"number"==typeof t?s_(a):s_(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=uS(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u,c,f=t[i].t,p=e[i].t,h=t[i].d,d=e[i].d,y=um[f],g=um[p],v=void 0;if(u=f,c=p,"perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=uS([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(f===p)v=f;else if(y[2]&&g[2]&&u_(f)===u_(p))v=u_(f),h=y[2](h),d=g[2](d);else if(y[1]&&g[1]&&uP(f)===uP(p))v=uP(f),h=y[1](h),d=g[1](d);else{var s=uS(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var m=[],b=[],x=[],O=0;O<h.length;O++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=sg(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=so(t.unit)):(sv.isLength(t.unit)||sv.isLength(e.unit))&&(a=sJ(t,i,n),l=sJ(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(h[O],d[O],n,!1,O);m[O]=s[0],b[O]=s[1],x.push(s[2])}o.push(m),a.push(b),l.push([v,x])}if(r){var w=o;o=a,a=w}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var uA=l7(function(t){if(!aj(t))return[s_(t[0]||0,"px"),s_(t[1]||0,"px")];if("text-anchor"===t)return[s_(0,"px"),s_(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sq(uC(e[0])),sq(uC(e[1]))]}),uT=function(t){if(!aj(t))return[s_(t[0]||0,"px"),s_(t[1]||0,"px")];if("text-anchor"===t)return[s_(0,"px"),s_(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[sU(uC(e[0])),sU(uC(e[1]))]};function uC(t){if("center"===t)return"50%";if("left"===t||"top"===t)return"0";if("right"===t||"bottom"===t)return"100%";return t}var uN=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:jr.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:jr.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:jr.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:jr.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:jr.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:jr.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:jr.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:jr.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:jr.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:jr.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:jr.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:jr.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:jr.FILTER},{n:"clipPath",syntax:jr.DEFINED_PATH},{n:"textPath",syntax:jr.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:jr.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===PQ.CIRCLE||t===PQ.ELLIPSE?"center":t===PQ.TEXT?"text-anchor":"left top"},l:!0,syntax:jr.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===PQ.CIRCLE||t===PQ.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:jr.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:jr.COORDINATE},{n:"cy",int:!0,d:"0",syntax:jr.COORDINATE},{n:"cz",int:!0,d:"0",syntax:jr.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:jr.COORDINATE},{n:"y",int:!0,d:"0",syntax:jr.COORDINATE},{n:"z",int:!0,d:"0",syntax:jr.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jr.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:jr.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"y1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"z1",int:!0,l:!0,syntax:jr.COORDINATE},{n:"x2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"y2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"z2",int:!0,l:!0,syntax:jr.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:jr.PATH,p:50},{n:"points",int:!0,l:!0,syntax:jr.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:jr.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:jr.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:jr.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:jr.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:jr.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:jr.NUMBER,d:function(t){return t===PQ.PATH||t===PQ.POLYGON||t===PQ.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:jr.MARKER},{n:"markerEnd",syntax:jr.MARKER},{n:"markerMid",syntax:jr.MARKER},{n:"markerStartOffset",syntax:jr.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:jr.LENGTH,l:!0,int:!0,d:"0"}],uL=uN.filter(function(t){return!!t.l}).map(function(t){return t.n}),uI={},uR=new WeakMap,uD=function(t,e){var n=uR.get(t);return!n||0===n.length||n.includes(e)},uF=function(){function t(t){var e=this;this.runtime=t,uN.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){tY([t.n],tU(t.a||[]),!1).forEach(function(e){uI[e]=t})},t.prototype.unregisterMetadata=function(t){delete uI[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<uL.length;s++)if(uL[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sW(e.fill)),e.stroke&&(t.parsedStyle.stroke=sW(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sW(e.shadowColor)),e.filter&&(t.parsedStyle.filter=s1(e.filter)),!aP(e.radius)&&(t.parsedStyle.radius=sZ(e.radius,4)),!aP(e.lineDash)&&(t.parsedStyle.lineDash=sZ(e.lineDash,2)),e.points&&(t.parsedStyle.points=ud(e.points,t)),""===e.path&&(t.parsedStyle.path=tW({},sj)),e.path&&(t.parsedStyle.path=up(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=sZ(e.anchor,2)),e.transform&&(t.parsedStyle.transform=ub(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=uA(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),((t.nodeName===PQ.CIRCLE||t.nodeName===PQ.ELLIPSE)&&(!aP(e.cx)||!aP(e.cy))||(t.nodeName===PQ.RECT||t.nodeName===PQ.IMAGE||t.nodeName===PQ.GROUP||t.nodeName===PQ.HTML||t.nodeName===PQ.TEXT||t.nodeName===PQ.MESH)&&(!aP(e.x)||!aP(e.y)||!aP(e.z))||t.nodeName===PQ.LINE&&(!aP(e.x1)||!aP(e.y1)||!aP(e.z1)||!aP(e.x2)||!aP(e.y2)||!aP(e.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),!aP(e.zIndex)&&this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),!aP(e.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;!u&&(t.attributes[n]=e[n]),!d&&(null===(r=uI[n])||void 0===r?void 0:r.l)&&(d=!0)}),!c&&y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=uI[t],o=e;if((""===e||aP(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=sE(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=sE(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=uI[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof su){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)!aP(u)&&(e=this.parseProperty(t,sp(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});if(!aP(f))return f;this.addUnresolveProperty(n,t);return}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof su?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=uI[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=uR.get(t);!n&&(uR.set(t,[]),n=uR.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&uD(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=uR.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uR.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;!r.contentBounds&&(r.contentBounds=new l0),!r.renderBounds&&(r.renderBounds=new l0);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,m=i.filter,b=i.transformOrigin,x=i.anchor;e===PQ.TEXT?delete i.anchor:e===PQ.MESH&&(i.anchor[2]=.5);var O=[(1-2*(x&&x[0]||0))*a/2+(void 0===u?0:u),(1-2*(x&&x[1]||0))*l/2+(void 0===c?0:c),(1-2*(x&&x[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(O,p);var w=e===PQ.POLYLINE||e===PQ.POLYGON||e===PQ.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var E=((d||0)+(y||0))*w;p[0]+=E,p[1]+=E}if(r.renderBounds.update(O,p),v&&g&&"inner"!==g){var k=r.renderBounds,M=k.min,S=k.max,_=i.shadowBlur,P=i.shadowOffsetX,j=i.shadowOffsetY,A=_||0,T=P||0,C=j||0,N=M[0]-A+T,L=S[0]+A+T,I=M[1]-A+C,R=S[1]+A+C;M[0]=Math.min(M[0],N),S[0]=Math.max(S[0],L),M[1]=Math.min(M[1],I),S[1]=Math.max(S[1],R),r.renderBounds.setMinMax(M,S)}(void 0===m?[]:m).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,lB(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),x=i.anchor;var D=a<0,F=l<0,z=(D?-1:1)*(b?sJ(b[0],0,t):0),B=(F?-1:1)*(b?sJ(b[1],1,t):0);z-=(D?-1:1)*(x&&x[0]||0)*r.contentBounds.halfExtents[0]*2,B-=(F?-1:1)*(x&&x[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,B),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(!t.style.rawLineWidth&&(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===PQ.CIRCLE&&(!t.style.rawR&&(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===PQ.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=uI[t];return!!e&&e.inh},t}(),uz=function(){function t(){this.parser=sX,this.parserUnmemoize=sY,this.parserWithCSSDisabled=null,this.mixer=s4}return t.prototype.calculator=function(t,e,n,r){return sK(n)},t}(),uB=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof su&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),uW=function(){function t(){this.parser=sW,this.parserWithCSSDisabled=sW,this.mixer=s$}return t.prototype.calculator=function(t,e,n,r){return n instanceof su?"none"===n.value?sk:sM:n},t}(),u$=function(){function t(){this.parser=s1}return t.prototype.calculator=function(t,e,n){return n instanceof su?[]:n},t}();function uG(t){var e=t.parsedStyle.fontSize;return aP(e)?null:e}var uV=function(){function t(){this.parser=sq,this.parserUnmemoize=sU,this.parserWithCSSDisabled=null,this.mixer=s4}return t.prototype.calculator=function(t,e,n,r,i){if(aS(n))return n;if(!sv.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===P3.kPercentage)return 0;if(n.unit===P3.kEms){if(r.parentNode){var l=uG(r.parentNode);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}else if(n.unit===P3.kRems){if(null===(o=null==r?void 0:r.ownerDocument)||void 0===o?void 0:o.documentElement){var l=uG(r.ownerDocument.documentElement);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),uH=function(){function t(){this.mixer=s8}return t.prototype.parser=function(t){var e,n=sQ(aS(t)?[t]:t);return e=1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uU=function(){function t(){this.mixer=s8}return t.prototype.parser=function(t){var e,n=sQ(aS(t)?[t]:t);return e=1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),uq=oS();function uY(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[sm,sm];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[sm];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[sm];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[sm];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[sm,sm,sm];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[sb];e.rotateLocal(0,0,sK(s[0]))}else if("rotatex"===i){var s=o||[sb];e.rotateLocal(sK(s[0]),0,0)}else if("rotatey"===i){var s=o||[sb];e.rotateLocal(0,sK(s[0]),0)}else if("rotatez"===i){var s=o||[sb];e.rotateLocal(0,0,sK(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(lV(u[0]),lV(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lV(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],lV(u[0]))}else if("matrix"===i){var c=tU(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(oA(uq,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(oA.apply(tb,tY([uq],tU(o.map(function(t){return t.value})),!1)),uq[12]+=n,uq[13]+=r,e.setLocalTransform(uq))}),e.getLocalTransform()}var uX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case PQ.CIRCLE:case PQ.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;!aP(a)&&(n=a),!aP(l)&&(r=l),!aP(s)&&(i=s);break;case PQ.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case PQ.RECT:case PQ.IMAGE:case PQ.GROUP:case PQ.HTML:case PQ.TEXT:case PQ.MESH:!aP(t.parsedStyle.x)&&(n=t.parsedStyle.x),!aP(t.parsedStyle.y)&&(r=t.parsedStyle.y),!aP(t.parsedStyle.z)&&(i=t.parsedStyle.z)}if(t.nodeName!==PQ.PATH&&t.nodeName!==PQ.POLYLINE&&t.nodeName!==PQ.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!aP(n)||!aP(r)||!aP(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)uY(h,t);else{var d=tU(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(aP(n)?y:n,aP(r)?g:r,aP(i)?v:i)}}},e}(uV),uK=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof su&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),uZ=function(){function t(){this.mixer=s4,this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uQ=function(){function t(){this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null,this.mixer=s6(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(!!n){var i=n.nodeName;if(i===PQ.LINE||i===PQ.PATH||i===PQ.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uJ=function(){function t(){this.parser=s3,this.parserUnmemoize=s5,this.parserWithCSSDisabled=null,this.mixer=s6(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),u0=function(){function t(){this.parser=up,this.parserWithCSSDisabled=up,this.mixer=uh}return t.prototype.calculator=function(t,e,n){return n instanceof su&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new l3(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===PQ.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),u1=function(){function t(){this.parser=ud,this.mixer=uy}return t.prototype.postProcessor=function(t,e){if((t.nodeName===PQ.POLYGON||t.nodeName===PQ.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),u2=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.mixer=s6(0,1/0),e}return tB(e,t),e}(uV),u5=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof su)return"unset"===n.value?"":n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),u3=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),u4={},u6=0,u8="undefined"!=typeof window&&void 0!==window.document;function u9(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function u7(t){var e,n=t;do{if(null===(e=n.parsedStyle)||void 0===e?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function ct(t,e){if(u8)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var ce={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},cn="object"==typeof performance&&performance.now?performance:Date;function cr(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var ci=1,co="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},ca=Date.now(),cl={},cs=Date.now(),cu=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-cs,r=ci++;return(cl[r]=t,Object.keys(cl).length>1)?r:(setTimeout(function(){cs=e;var t=cl;cl={},Object.keys(t).forEach(function(e){return t[e](co.performance&&"function"==typeof co.performance.now?co.performance.now():Date.now()-ca)})},n>16?0:16-n),r)},cc=function(t){delete cl[t]},cf=function(t){return"string"!=typeof t?cu:""===t?co.requestAnimationFrame:co[t+"RequestAnimationFrame"]},cp=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!cf(t)}),ch=cf(cp);var cd="string"!=typeof(Pz=cp)?cc:""===Pz?co.cancelAnimationFrame:co[Pz+"CancelAnimationFrame"]||co[Pz+"CancelRequestAnimationFrame"];co.requestAnimationFrame=ch,co.cancelAnimationFrame=cd;var cy=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,tY([],tU(t),!1))}))},t}(),cg=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tG(this,void 0,void 0,function(){var e,n,r;return tV(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,tY([],tU(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),cv=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),cm=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),cb=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],cx=/([\"\'])[^\'\"]+\1/,cO=function(){function t(){this.parser=ub,this.parserUnmemoize=ux,this.parserWithCSSDisabled=ux,this.mixer=uj}return t.prototype.calculator=function(t,e,n,r){return n instanceof su?[]:n},t.prototype.postProcessor=function(t){uY(t.parsedStyle.transform,t)},t}(),cw=function(){this.parser=uA,this.parserUnmemoize=uT},cE=function(){function t(){this.parser=s3,this.parserUnmemoize=s5}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=jn.Z_INDEX_CHANGED)}},t}(),ck=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),cM=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry;return{width:2*n,height:2*r}},t}(),cS=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),l=Math.min(n,i),s=Math.max(n,i);return{width:a-o,height:s-l}},t}(),c_=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),cP=function(){function t(){}return t.prototype.update=function(t){if(t.points&&aU(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,tY([],tU(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,tY([],tU(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,tY([],tU(e.map(function(t){return t[1]})),!1)),o=Math.max.apply(Math,tY([],tU(e.map(function(t){return t[1]})),!1));return{width:r-n,height:o-i}}return{width:0,height:0}},t}(),cj=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!aj(n)&&(!o&&(o=n.width,t.width=o),!a&&(a=n.height,t.height=a)),{width:o,height:a}},t}(),cA=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!aP(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],m=0;"center"===o||"middle"===o?(m=a/2,v=[.5,1]):("right"===o||"end"===o)&&(m=a,v=[1,1]);var b=0;return"middle"===l?b=g[1]:"top"===l||"hanging"===l?b=2*g[1]:"alphabetic"===l?b=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(b=0),s&&(m+=s),u&&(b+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:m,offsetY:b}},t}(),cT=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new l5,this.page=new l5,this.canvas=new l5,this.viewport=new l5,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(l4)},t}(),cC=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.client=new l5,e.movement=new l5,e.offset=new l5,e.global=new l5,e.screen=new l5,e}return tB(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(l4)},e}(cT),cN=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tB(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(cC),cL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(cC),cI=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return tB(e,t),e}(cT),cR=function(){function t(){this.emitter=new ou}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=a1(n)&&n||a2(n)&&n.capture,i=a2(n)&&n.once,o=sp(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=tU(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=sp(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if((null===(t=e[0].target)||void 0===t?void 0:t.name)===l)c.apply(void 0,tY([],tU(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=a1(n)&&n||a2(n)&&n.capture,i=sp(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=sp(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cI(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],!e&&(t.target=this),null===(r=t.manager)||void 0===r||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),cD=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return tB(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===PQ.TEXT&&(n+=this.style.text);try{for(var r=tH(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===PQ.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===PQ.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(l4)},e.prototype.lookupNamespaceURI=function(t){throw Error(l4)},e.prototype.lookupPrefix=function(t){throw Error(l4)},e.prototype.normalize=function(){throw Error(l4)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p)){if(s===o)return e.DOCUMENT_POSITION_PRECEDING;break}if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),!t(this)&&(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(cR),cF=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new ou,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=oS(),this.tmpVec3=of(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=cn.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}cD.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],!a.clicksByButton[t.button]&&(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,!(null===(e=i.detail)||void 0===e?void 0:e.preventClick)&&(!n.context.config.useNativeClickEvent&&("mouse"===c.pointerType||"touch"===c.pointerType)&&n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),cD.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&cD.isNode(o)&&o.parentNode;f&&f!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;){;f=f.parentNode}if(!f||f===(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),cD.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),cD.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(cD.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),cD.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),cD.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=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)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new l5(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new l5(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=oR(this.tmpMatrix,s,l),c=og(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return oE(c,c,u),new l5(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=oR(this.tmpMatrix,n,r),o=og(this.tmpVec3,t.x,t.y,0);oE(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new l5((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){!this.mappingTable[t]&&(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(!!this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){if(n){t.eventPhase=t.AT_TARGET;var r=this.rootTarget.defaultView||null;t.currentTarget=r,this.notifyListeners(t,e)}else t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e);this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(!!t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)cD.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=tH(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(cN);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(cL);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return!this.mappingState.trackingData[t]&&(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(cL);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(cN);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=cn.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){!this.eventPool.has(t)&&this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;!this.eventPool.has(e)&&this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r){if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)}},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||cD.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=cD.isNode(e)&&e.parentNode}},t}(),cz=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||c5.offscreenCanvas)this.canvas=t||c5.offscreenCanvas,this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",tW({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context?this.context:(this.getOrCreateCanvas(t,e),this.context)},t}();(PB=ji||(ji={}))[PB.CAMERA_CHANGED=0]="CAMERA_CHANGED",PB[PB.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",PB[PB.NONE=2]="NONE";var cB=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new cv,initAsync:new cy,dirtycheck:new cm,cull:new cm,beginFrame:new cv,beforeRender:new cv,render:new cv,afterRender:new cv,endFrame:new cv,destroy:new cv,pick:new cg,pickSync:new cm,pointerDown:new cv,pointerUp:new cv,pointerMove:new cv,pointerOut:new cv,pointerOver:new cv,pointerWheel:new cv,pointerCancel:new cv,click:new cv}}return t.prototype.init=function(t){var e=this,n=tW(tW({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(ji.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(ji.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==jn.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>u9(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(u9)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(ji.DISPLAY_OBJECT_CHANGED)},t}(),cW=/\[\s*(.*)=(.*)\s*\]/,c$=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null}},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]}},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;else{var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(cW),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return aP(n)?"":n.toString?n.toString():""},t}(),cG=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return tB(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(cT);function cV(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(PW=jo||(jo={})).REPARENT="reparent",PW.DESTROY="destroy",PW.ATTR_MODIFIED="DOMAttrModified",PW.INSERTED="DOMNodeInserted",PW.REMOVED="removed",PW.MOUNTED="DOMNodeInsertedIntoDocument",PW.UNMOUNTED="DOMNodeRemovedFromDocument",PW.BOUNDS_CHANGED="bounds-changed",PW.CULLED="culled";var cH=new cG(jo.REPARENT,null,"","","",0,"",""),cU=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new cI(jo.BOUNDS_CHANGED),this.rotate=(e=ag(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=od(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=ag();ax(a,n[0],n[1],n[2]);var l=h.getRotation(t);aw(e,h.getRotation(t.parentNode)),ab(e,e),am(a,e,a),am(o.localRotation,a,l),aE(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=ag(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=od(e,r,i));var o=t.transformable;ax(n,e[0],e[1],e[2]),am(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=ag(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=od(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){ax(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);aw(r,ab(ag(),a)),am(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=od(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,m,b,x,O,w=t.transformable;if(!ok(e,of()))i=e,o=e,l=(a=w.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,m=s*v-u*g,b=u*y-l*v,x=l*g-s*y,y*=O=2*c,g*=O,v*=O,m*=2,b*=2,x*=2,i[0]=f+y+m,i[1]=p+g+b,i[2]=d+v+x,ov(w.localPosition,w.localPosition,e),h.dirtifyLocal(t,w)},this.setPosition=(i=oS(),o=of(),function(t,e){var n=t.transformable;if(o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,!ok(h.getPosition(t),o))oy(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(oP(i,t.parentNode.transformable.worldTransform),oN(i,i),oE(n.localPosition,o,i)):oy(n.localPosition,o),h.dirtifyLocal(t,n)}),this.setLocalPosition=(a=of(),function(t,e){var n=t.transformable;if(a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,!ok(n.localPosition,a))oy(n.localPosition,a),h.dirtifyLocal(t,n)}),this.translate=(l=of(),s=of(),u=of(),function(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=og(s,e,n,r)),!ok(e,l))ov(u,h.getPosition(t),e),h.setPosition(t,u)}),this.setRotation=function(){var t=ag();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=aO(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(aw(t,h.getRotation(e.parentNode)),ab(t,t),am(a.localRotation,t,n),aE(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=oS(),f=of(),p=aO(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(o1(t.localTransform,t.localRotation,t.localPosition,od(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=oT(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),oR(t.localTransform,t.localTransform,e)}var n=o1(c,p,f,t.localScale,t.origin);oR(t.localTransform,t.localTransform,n)}else o1(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,aP(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null===(r=null==a?void 0:a.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=jn.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cH)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null===(e=null==i?void 0:i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=jn.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=od(e,n,r));var i=t.transformable;ax(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=od(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=od(e[0],e[1],e[2]||n.localScale[2]);if(!ok(r,n.localScale))oy(n.localScale,r),this.dirtifyLocal(t,n)},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=aO(e,n,r,i));var o=t.transformable;aw(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){if("number"==typeof e){;r=e,i=n,(o=new oc(2))[0]=r,o[1]=i,e=o}var r,i,o,a,l,s=t.transformable;a=s.localSkew,l=e,a[0]=l[0],a[1]=l[1],this.dirtifyLocal(t,s)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,!e.dirtyFlag&&this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){!e.dirtyFlag&&this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=tU(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)cV(n),n=n.parentNode;e&&t.forEach(function(t){cV(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);!a&&(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),!a[t]&&(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new cG(jo.ATTR_MODIFIED,n,e,e,t,cG.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oZ(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oJ(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return oQ(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return(void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag)?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=oZ(of(),e),r=oJ(ag(),e),i=oQ(of(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(l0.isEmpty(r))return null;var i=n||new l0;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new l0},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new l0).update(r.center,r.halfExtents))}),e){var a=u7(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return!o&&(o=new l0),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=oS();t.parentNode.transformable&&(e=oN(oS(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!l0.isEmpty(n)){var r=new l0;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);!l0.isEmpty(i)&&(r=new l0).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=tU(r.getMin(),2),l=a[0],s=a[1],u=tU(r.getMax(),2),c=u[0],f=u[1];return new l3(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new l3((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;!e.dirtyFlag&&n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?oR(e.worldTransform,r.worldTransform,e.localTransform):oP(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),cq="|\xc9q\xc5",cY="M",cX=1.4,cK=2,cZ=[10,13],cQ=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],cJ=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,c0=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),c1=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),c2=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&(!!(t&&(c1.exec(n)||c0.exec(t)))||!1)},this.trimByKinsokuShorui=function(t){var e=tY([],tU(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=cq+cY,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(cY).width),s=cK*l;l=l*cX|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=aS(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!cx.test(u)&&0>cb.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),m=0;if(c){c.getTotalLength();for(var b=0;b<g.length;b++)var x=y.measureText(g[b]).width+(g[b].length-1)*u}else{for(var b=0;b<g.length;b++){var O=y.measureText(g[b]).width+(g[b].length-1)*u;v[b]=O,m=Math.max(m,O)}var x=m+a,w=o||d.fontSize+a,E=Math.max(w,d.fontSize+a)+(g.length-1)*(w+p);w+=p;var k=0;return"middle"===l?k=-E/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?k=-E:("top"===l||"hanging"===l)&&(k=0),{font:h,width:x,height:E,lines:g,lineWidths:v,lineHeight:w,maxLineWidth:m,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new l3(n-a/2,k+e*w,t+a,w)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),b=0;b<m.length;b++){var x=m[b],O=t[b-1],w=t[b+1],E=g(x);if(this.isNewline(x)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+E>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var k=p[h].length,M=0,S=k,_=0;_<k;_++){var P=g(p[h][_]);if(M+P+v>c){S=_;break}M+=P}p[h]=(p[h]||"").slice(0,S)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(x))continue;!this.canBreakInLastChar(x)&&(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(x,w)&&(p=this.trimByKinsokuShorui(p),d+=g(O||""))}d+=E,p[h]=(p[h]||"")+x}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&cQ.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&cZ.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=tY([],tU(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i),a=r+1,l=r+(o?0:1);return e[e.length-1]+=n.slice(a,n.length),e[e.length-2]=n.slice(0,l),e},t.prototype.canBreakInLastChar=function(t){return!(t&&cJ.test(t))&&!0},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!cJ.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),c5={};var c3=(PG=new cj,PV=new cP,(P$={})[PQ.CIRCLE]=new ck,P$[PQ.ELLIPSE]=new cM,P$[PQ.RECT]=PG,P$[PQ.IMAGE]=PG,P$[PQ.GROUP]=PG,P$[PQ.LINE]=new cS,P$[PQ.TEXT]=new cA(c5),P$[PQ.POLYLINE]=PV,P$[PQ.POLYGON]=PV,P$[PQ.PATH]=new c_,P$[PQ.HTML]=null,P$[PQ.MESH]=null,P$);var c4=(PU=new uW,Pq=new uV,(PH={})[jr.PERCENTAGE]=null,PH[jr.NUMBER]=new uZ,PH[jr.ANGLE]=new uz,PH[jr.DEFINED_PATH]=new uB,PH[jr.PAINT]=PU,PH[jr.COLOR]=PU,PH[jr.FILTER]=new u$,PH[jr.LENGTH]=Pq,PH[jr.LENGTH_PERCENTAGE]=Pq,PH[jr.LENGTH_PERCENTAGE_12]=new uH,PH[jr.LENGTH_PERCENTAGE_14]=new uU,PH[jr.COORDINATE]=new uX,PH[jr.OFFSET_DISTANCE]=new uQ,PH[jr.OPACITY_VALUE]=new uJ,PH[jr.PATH]=new u0,PH[jr.LIST_OF_POINTS]=new u1,PH[jr.SHADOW_BLUR]=new u2,PH[jr.TEXT]=new u5,PH[jr.TEXT_TRANSFORM]=new u3,PH[jr.TRANSFORM]=new cO,PH[jr.TRANSFORM_ORIGIN]=new cw,PH[jr.Z_INDEX]=new cE,PH[jr.MARKER]=new uK,PH);c5.CameraContribution=l9,c5.AnimationTimeline=null,c5.EasingFunction=null,c5.offscreenCanvasCreator=new cz,c5.sceneGraphSelector=new c$,c5.sceneGraphService=new cU(c5),c5.textService=new c2(c5),c5.geometryUpdaterFactory=c3,c5.CSSPropertySyntaxFactory=c4,c5.styleValueRegistry=new uF(c5),c5.layoutRegistry=null,c5.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},c5.enableCSSParsing=!0,c5.enableDataset=!1,c5.enableStyleSyntax=!0,c5.enableSizeAttenuation=!1;var c6=0,c8=new cG(jo.INSERTED,null,"","","",0,"",""),c9=new cG(jo.REMOVED,null,"","","",0,"",""),c7=new cI(jo.DESTROY),ft=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.entity=c6++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:je.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.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]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=c5.enableCSSParsing?{anchor:sO,opacity:sO,fillOpacity:sO,strokeOpacity:sO,fill:sO,stroke:sO,transform:sO,transformOrigin:sO,visibility:sO,pointerEvents:sO,lineWidth:sO,lineCap:sO,lineJoin:sO,increasedLineWidthForHitTesting:sO,fontSize:sO,fontFamily:sO,fontStyle:sO,fontWeight:sO,fontVariant:sO,textAlign:sO,textBaseline:sO,textTransform:sO,zIndex:sO,filter:sO,shadowType:sO}:null,e.parsedStyle={},e.attributes={},e}return tB(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(l4)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return c5.sceneGraphService.attach(t,this,e),(null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),c8.relatedNode=this,t.dispatchEvent(c8),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return c9.relatedNode=this,t.dispatchEvent(c9),(null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),c5.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return c5.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return c5.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return c5.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return c5.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return c5.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return c5.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return c5.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(c5.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=tU(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,tY([],tU(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,tY([],tU(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,tY([],tU(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(c7),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return c5.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return c5.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return c5.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return c5.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return c5.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return c5.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=sd(t);return e=this.attributes[n],c5.enableCSSParsing&&aP(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(l4)},e.prototype.getAttributeNode=function(t){throw Error(l4)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(l4)},e.prototype.hasAttributeNS=function(t,e){throw Error(l4)},e.prototype.removeAttributeNS=function(t,e){throw Error(l4)},e.prototype.removeAttributeNode=function(t){throw Error(l4)},e.prototype.setAttributeNS=function(t,e,n){throw Error(l4)},e.prototype.setAttributeNode=function(t){throw Error(l4)},e.prototype.setAttributeNodeNS=function(t){throw Error(l4)},e.prototype.toggleAttribute=function(t,e){throw Error(l4)},e}(cD);function fe(t){return!!(null==t?void 0:t.nodeName)}var fn=new cG(jo.ATTR_MODIFIED,null,null,null,null,cG.MODIFICATION,null,null),fr={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},fi={anchor:[0,0],fill:sk,stroke:sk,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},fo=tW(tW({},fi),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),fa=tY(tY([],tU(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),fl="data-",fs=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!==(n=r.config.capture)&&void 0!==n?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||PQ.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,c5.enableCSSParsing?fi:fo,r.config.initialParsedStyle),c5.enableCSSParsing&&Object.assign(r.attributes,fr),r.initAttributes(r.config.style);var i=c5.globalThis.Proxy?c5.globalThis.Proxy:function(){};return c5.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(fl).concat(sf(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(fl).concat(sf(e)),n),!0}})),c5.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return tB(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=tW({},this.attributes);for(var r in n){var i=n[r];fe(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};c5.enableCSSParsing&&(n.usedAttributes=fa);var r={};for(var i in t)r[sd(i)]=t[i];c5.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=sd(e);if(!a5(n))(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];c5.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(fn.relatedNode=this,fn.prevValue=o,fn.newValue=e,fn.attrName=t,fn.prevParsedValue=a,fn.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(fn):(fn.target=this,this.ownerDocument.defaultView.dispatchEvent(fn,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=tU(t.getMin(),2),n=e[0],r=e[1],i=tU(t.getMax(),2);return new l3(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setOrigin(this,lG(t,e,n)),this},e.prototype.getOrigin=function(){return c5.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setPosition(this,lG(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.setLocalPosition(this,lG(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.translate(this,lG(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),c5.sceneGraphService.translateLocal(this,lG(t,e,n)),this},e.prototype.getPosition=function(){return c5.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return c5.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lG(t,e,n)),c5.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lG(t,e,n)),c5.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return c5.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return c5.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return lH(tU(lU(of(),c5.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return lH(tU(lU(of(),c5.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return c5.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return c5.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return aP(e)&&aP(n)?c5.sceneGraphService.rotateLocal(this,0,0,t):c5.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return aP(e)&&aP(n)?c5.sceneGraphService.rotate(this,0,0,t):c5.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return c5.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return c5.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return c5.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return c5.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return c5.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return c5.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return c5.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return c5.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return c5.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){c5.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,tY([],tU(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,tY([],tU(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=tU(e,2),i=r[0],o=r[1];return i?a2(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=t||this.getWorldTransform(),m=tU(oZ(of(),v),2),b=m[0],x=m[1],O=tU(oQ(of(),v),2),w=O[0],E=O[1],k=oJ(ag(),v),M=tU(lU(of(),k),3),S=M[0],_=M[2];return e=S||_,n=b,r=x,i=w,o=E,a=Math.cos(e),l=Math.sin(e),s=i*a,u=o*l,c=0,f=-i*l,p=o*a,h=0,d=n,y=r,(g=new oc(9))[0]=s,g[1]=u,g[2]=0,g[3]=f,g[4]=p,g[5]=0,g[6]=d,g[7]=y,g[8]=1,g},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=tU(lq(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=tU(lq(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){c5.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){c5.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(ft),fu=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;c5.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},fc=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.CIRCLE,style:c5.enableCSSParsing?tW({cx:"",cy:"",r:""},n):tW({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:c5.enableCSSParsing?null:[sP,sP]}},r))||this}return tB(e,t),e}(fs),ff=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,tW({style:c5.enableCSSParsing?tW({x:"",y:""},r):tW({},r)},i))||this).isCustomElement=!0,n}return tB(e,t),e}(fs),fp=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.ELLIPSE,style:c5.enableCSSParsing?tW({cx:"",cy:"",rx:"",ry:""},n):tW({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:c5.enableCSSParsing?null:[sP,sP]}},r))||this}return tB(e,t),e}(fs),fh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.GROUP,style:c5.enableCSSParsing?tW({x:"",y:"",width:"",height:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fd=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,tW({type:PQ.HTML,style:c5.enableCSSParsing?tW({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tW({},r)},i))||this).cullable.enable=!1,n}return tB(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new l3(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect(),i=new l0,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=oN(oS(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!l0.isEmpty(e)){var n=new l0;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(fs),fy=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.IMAGE,style:c5.enableCSSParsing?tW({x:"",y:"",img:"",width:"",height:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fg=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.LINE,style:tW({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,m=t?s:u;if(!!m&&!!fe(m)){var b=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),b=Math.atan2(n,e),m.setLocalEulerAngles(180*b/Math.PI+a),m.setLocalPosition(r+Math.cos(b)*o,i+Math.sin(b)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=l_(r,i,o,a,t),c=u.x,f=u.y,p=oE(of(),od(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return lE(t.x1,t.y1,t.x2,t.y2)},e}(fs),fv=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.PATH,style:c5.enableCSSParsing?tW({path:"",miterLimit:""},r):tW({},r),initialParsedStyle:c5.enableCSSParsing?null:{miterLimit:4,path:tW({},sj)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&fe(s)&&n.placeMarkerMid(s),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(!!d&&!!fe(d)){var y=0;if(t){var g=tU(this.getStartTangent(),2),v=g[0],m=g[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=c||0,a=this.markerStartAngle}else{var b=tU(this.getEndTangent(),2),v=b[0],m=b[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&fe(t))for(var o=1;o<n.length-1;o++){var a=tU(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return s9(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n,r=this.parsedStyle,i=r.defX,o=r.defY;var a=aH(r.path.absolutePath,t,tW(tW({},void 0),{bbox:!1,length:!0})).point,l=a.x,s=a.y,u=oE(of(),od(l-i,s-o,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(u[0],u[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*s9(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(fs),fm=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=t$(e,["style"]);(n=t.call(this,tW({type:PQ.POLYGON,style:c5.enableCSSParsing?tW({points:"",miterLimit:"",isClosed:!0},r):tW({},r),initialParsedStyle:c5.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&fe(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&fe(s)&&n.placeMarkerMid(s),l&&fe(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tB(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&fe(r)&&(this.markerStartAngle=0,r.remove()),i&&fe(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&fe(r)&&(this.markerEndAngle=0,r.remove()),i&&fe(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(!!g&&!!fe(g)&&!!y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var m=y.length;this.parsedStyle.isClosed?(e=y[m-1][0]-y[0][0],n=y[m-1][1]-y[0][1]):(r=y[m-1][0]-h,i=y[m-1][1]-d,e=y[m-2][0]-y[m-1][0],n=y[m-2][1]-y[m-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&fe(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(fs),fb=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.POLYLINE,style:c5.enableCSSParsing?tW({points:"",miterLimit:"",isClosed:!1},n):tW({},n),initialParsedStyle:c5.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tB(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=l_(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=oE(of(),od(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new l5(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(fm),fx=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.RECT,style:c5.enableCSSParsing?tW({x:"",y:"",width:"",height:"",radius:""},n):tW({},n)},r))||this}return tB(e,t),e}(fs),fO=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({type:PQ.TEXT,style:c5.enableCSSParsing?tW({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):tW({fill:"black"},n),initialParsedStyle:c5.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return tB(e,t),e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(fs),fw=function(){function t(){this.registry={},this.define(PQ.CIRCLE,fc),this.define(PQ.ELLIPSE,fp),this.define(PQ.RECT,fx),this.define(PQ.IMAGE,fy),this.define(PQ.LINE,fg),this.define(PQ.GROUP,fh),this.define(PQ.PATH,fv),this.define(PQ.POLYGON,fm),this.define(PQ.POLYLINE,fb),this.define(PQ.TEXT,fO),this.define(PQ.HTML,fd)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),fE=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new c5.AnimationTimeline(e)}catch(t){}var n={};return uN.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=sp(i)?i(PQ.GROUP):i)}),e.documentElement=new fh({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tB(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);!n&&(console.warn("Unsupported tagName: ",t),n="tspan"===t?fO:fh);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(l4)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return tG(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tV(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return tG(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tV(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(l6)},e.prototype.insertBefore=function(t,e){throw Error(l6)},e.prototype.removeChild=function(t,e){throw Error(l6)},e.prototype.replaceChild=function(t,e,n){throw Error(l6)},e.prototype.append=function(){throw Error(l6)},e.prototype.prepend=function(){throw Error(l6)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(cD),fk=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new cI(jo.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),fM=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new cN(null),this.rootWheelEvent=new cL(null),this.onPointerMove=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=tH(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||aP(r)||aP(i)){var l=this.context.eventService.client2Viewport(new l5(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=ce[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=cn.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];a5(i.button)&&(i.button=0),a5(i.buttons)&&(i.buttons=1),a5(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),a5(i.width)&&(i.width=i.radiusX||1),a5(i.height)&&(i.height=i.radiusY||1),a5(i.tiltX)&&(i.tiltX=0),a5(i.tiltY)&&(i.tiltY=0),a5(i.pointerType)&&(i.pointerType="touch"),a5(i.pointerId)&&(i.pointerId=i.identifier||0),a5(i.pressure)&&(i.pressure=i.force||.5),a5(i.twist)&&(i.twist=0),a5(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(a5(t.isPrimary)&&(t.isPrimary=!0),a5(t.width)&&(t.width=1),a5(t.height)&&(t.height=1),a5(t.tiltX)&&(t.tiltX=0),a5(t.tiltY)&&(t.tiltY=0),a5(t.pointerType)&&(t.pointerType="mouse"),a5(t.pointerId)&&(t.pointerId=1),a5(t.pressure)&&(t.pressure=.5),a5(t.twist)&&(t.twist=0),a5(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),fS=[PQ.CIRCLE,PQ.ELLIPSE,PQ.IMAGE,PQ.RECT,PQ.LINE,PQ.POLYLINE,PQ.POLYGON,PQ.TEXT,PQ.PATH,PQ.HTML],f_=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(l0.isEmpty(o))return!1;var a=t.getFrustum(),l=null===(r=null===(n=e.parentNode)||void 0===n?void 0:n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||P0.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==P0.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===P0.OUTSIDE||n===P0.INSIDE)return n;for(var i=P0.INSIDE,o=fS.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(oO(c,e.getPositiveFarPoint(r[a]))+f<0)return P0.OUTSIDE;oO(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),fP=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;c5.enableSizeAttenuation&&c5.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),c5.enableCSSParsing&&c5.styleValueRegistry.recalc(e),c5.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),c5.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(jo.MOUNTED,u),a.addEventListener(jo.UNMOUNTED,c),a.addEventListener(jo.ATTR_MODIFIED,l),a.addEventListener(jo.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(jo.MOUNTED,u),a.removeEventListener(jo.UNMOUNTED,c),a.removeEventListener(jo.ATTR_MODIFIED,l),a.removeEventListener(jo.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=tU(i.getMin(),2),a=o[0],l=o[1],s=tU(i.getMax(),2),u=s[0],c=s[1];!r.aabb&&(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}r.aabb&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.minX)&&!isNaN(r.aabb.minY)&&e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(PY=ja||(ja={})).READY="ready",PY.BEFORE_RENDER="beforerender",PY.RERENDER="rerender",PY.AFTER_RENDER="afterrender",PY.BEFORE_DESTROY="beforedestroy",PY.AFTER_DESTROY="afterdestroy",PY.RESIZE="resize",PY.DIRTY_RECTANGLE="dirtyrectangle",PY.RENDERER_CHANGED="rendererchanged";var fj=new cI(jo.MOUNTED),fA=new cI(jo.UNMOUNTED),fT=new cI(ja.BEFORE_RENDER),fC=new cI(ja.RERENDER),fN=new cI(ja.AFTER_RENDER),fL=function(t){function e(e){var n,r,i,o,a=t.call(this)||this;a.Element=fs,a.inited=!1,a.context={},a.document=new fE,a.document.defaultView=a,a.customElements=new fw;var l=e.container,s=e.canvas,u=e.offscreenCanvas,c=e.width,f=e.height,p=e.devicePixelRatio,h=e.renderer,d=e.background,y=e.cursor,g=e.document,v=e.requestAnimationFrame,m=e.cancelAnimationFrame,b=e.createImage,x=e.supportsPointerEvents,O=e.supportsTouchEvents,w=e.supportsCSSTransform,E=e.supportsMutipleCanvasesInOneContainer,k=e.useNativeClickEvent,M=e.alwaysTriggerPointerEventOnCanvas,S=e.isTouchEvent,_=e.isMouseEvent;!E&&!function(t,e){if(t){var n="string"==typeof t?t:t.id||u6++;u4[n]&&u4[n].destroy(),u4[n]=e}}(l,a);var P=c,j=f,A=p;if(s){;A=(A=p||u8&&window.devicePixelRatio||1)>=1?Math.ceil(A):1,P=c||("auto"===(r=ct(n=s,"width"))?n.offsetWidth:parseFloat(r))||s.width/A,j=f||("auto"===(o=ct(i=s,"height"))?i.offsetHeight:parseFloat(o))||s.height/A}return u&&(c5.offscreenCanvas=u),a.devicePixelRatio=A,a.requestAnimationFrame=null!=v?v:ch.bind(c5.globalThis),a.cancelAnimationFrame=null!=m?m:cd.bind(c5.globalThis),a.supportsTouchEvents=null!=O?O:"ontouchstart"in c5.globalThis,a.supportsPointerEvents=null!=x?x:!!c5.globalThis.PointerEvent,a.isTouchEvent=null!=S?S:function(t){return a.supportsTouchEvents&&t instanceof c5.globalThis.TouchEvent},a.isMouseEvent=null!=_?_:function(t){return!c5.globalThis.MouseEvent||t instanceof c5.globalThis.MouseEvent&&(!a.supportsPointerEvents||!(t instanceof c5.globalThis.PointerEvent))},a.initRenderingContext({container:l,canvas:s,width:P,height:j,renderer:h,offscreenCanvas:u,devicePixelRatio:A,cursor:y||"default",background:d||"transparent",createImage:b,document:g,supportsCSSTransform:w,useNativeClickEvent:k,alwaysTriggerPointerEventOnCanvas:M}),a.initDefaultCamera(P,j,h.clipSpaceNearZ),a.initRenderer(h,!0),a}return tB(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new c5.CameraContribution;i.clipSpaceNearZ=n,i.setType(P1.EXPLORING,P2.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(l8.UPDATED,function(){r.context.renderingContext.renderReasons.add(ji.CAMERA_CHANGED),c5.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){c5.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),!e&&this.dispatchEvent(new cI(ja.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),!e&&this.dispatchEvent(new cI(ja.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===P5.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cI(ja.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(fT),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(fC)}),this.dispatchEvent(fN)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new lI,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new fM,new fP,new fk([new f_])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tW(tW({},c5),this.context)),this.context.renderingService=new cB(c5,this.context),this.context.eventService=new cF(c5,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new cI(ja.READY))}):r.dispatchEvent(new cI(ja.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cI(ja.RENDERER_CHANGED)),!e&&r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(c5)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),tY([],tU(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(c5)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(fA):(fA.target=t,this.dispatchEvent(fA,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?!t.isConnected&&(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(fj):(fj.target=t,this.dispatchEvent(fj,!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: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(cR),fI={}.toString,fR=function(t,e){return fI.call(t)==="[object "+e+"]"},fD=function(t){function e(){var e=t.apply(this,tY([],tU(arguments),!1))||this;return e.landmarks=[],e}return tB(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=l$(e),this.relAzimuth=l$(t),this.relRoll=l$(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===P1.EXPLORING){var r=av(ag(),[1,0,0],lV((this.rotateWorld?1:-1)*this.relElevation)),i=av(ag(),[0,1,0],lV((this.rotateWorld?1:-1)*this.relAzimuth)),o=av(ag(),[0,0,1],lV(this.relRoll)),a=am(ag(),i,r);a=am(ag(),a,o);var l=o2(oS(),a);oD(this.matrix,this.matrix,[0,0,-this.distance]),oR(this.matrix,this.matrix,l),oD(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getPosition():this.type===P1.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lG(t,e,0),r=op(this.position);return ov(r,r,ob(of(),this.right,n[0])),ov(r,r,ob(of(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=op(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===P1.ORBITING||this.type===P1.EXPLORING?this._getDistance():this.type===P1.TRACKING&&ov(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new c5.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!==(n=l[1])&&void 0!==n?n:this.position[1],null!==(r=l[2])&&void 0!==r?r:this.position[2]),p.setFocalPoint(u[0],null!==(i=u[1])&&void 0!==i?i:this.focalPoint[1],null!==(o=u[2])&&void 0!==o?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:o_(p.getWorldTransform()),right:op(p.right),up:op(p.up),forward:op(p.forward),position:op(p.getPosition()),focalPoint:op(p.getFocalPoint()),distanceVector:op(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=fR(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=fR(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,m=(void 0===u?void 0:u)||c5.EasingFunction(void 0===a?"linear":a),b=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},x=function(t){void 0===i&&(i=t);var e=t-i;if(e>s){b();return}var r=m(e/s),o=of(),a=of(),l=1,u=0;if(ow(o,n.focalPoint,y,r),ow(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),oM(o,y)+oM(a,d)<=.01&&void 0==g&&void 0==v){b();return}n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(x))};this.canvas.requestAnimationFrame(x)}},e.prototype.syncFromLandmark=function(t){this.matrix=oP(this.matrix,t.matrix),this.right=oy(this.right,t.right),this.up=oy(this.up,t.up),this.forward=oy(this.forward,t.forward),this.position=oy(this.position,t.position),this.focalPoint=oy(this.focalPoint,t.focalPoint),this.distanceVector=oy(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(l9);c5.CameraContribution=fD;var fF=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),fz=0,fB=new WeakMap,fW=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){var n;if(t===e)return t;return js&&((n=t)===js||n===jl)?js:null}(e[n-1],t);if(r){e[n-1]=r;return}}else(function(t){fH.push(t),!fV&&(fV=!0,void 0!==c5.globalThis?c5.globalThis.setTimeout(fU):fU())})(this.observer);e[n]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(jo.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(jo.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(jo.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(jo.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(jo.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(jo.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fB.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case jo.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=function(t,e){return jl=new fF(t,e)}("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cG.ADDITION?null:t.prevValue;fG(n,function(t){if(t.attributes)return t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(r)&&-1===t.attributeFilter.indexOf(i)?void 0:t.attributeOldValue?function(t){return js?js:((js=fF.copy(jl)).oldValue=t,js)}(o):e});break;case jo.REMOVED:case jo.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===jo.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=function(t,e){return jl=new fF(t,e)}("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fG(n,function(t){if(t.childList)return e})}(function(){jl=js=void 0})()},t}();function f$(t,e){return jl=new fF(t,e)}!function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=fz++}t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=fB.get(t);!r&&fB.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}!n&&(n=new fW(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fB.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t}}();function fG(t,e){for(var n=t;n;n=n.parentNode){var r=fB.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}var fV=!1,fH=[];function fU(){fV=!1;var t=fH;fH=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();!function(t){t.nodes.forEach(function(e){var n=fB.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})})}(t),n.length&&(t.callback(n,t),e=!0)}),e&&fU()}var fq=function(t,e,n){return t<e?e:t>n?n:t},fY={}.toString,fX=function(t){var e;return e=t,"[object Number]"===fY.call(e)},fK=function(t){return null==t},fZ=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return tB(e,t),e}(cT),fQ=0,fJ=function(){function t(t,e){var n;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=e,this.id="".concat(fQ++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),!this.pending&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return!this.finishedPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;if(!isNaN(t=Number(t))){if(this.timeline.restart(),!this._paused&&null!==this._startTime&&(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime===t)return;this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),!isNaN(t=Number(t)))!this._paused&&!this._idle&&(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=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),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=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())},t.prototype.cancel=function(){var t=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 e=new fZ(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):!this._isFinished&&this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(l4)},t.prototype.addEventListener=function(t,e,n){throw Error(l4)},t.prototype.removeEventListener=function(t,e,n){throw Error(l4)},t.prototype.dispatchEvent=function(t){throw Error(l4)},t.prototype.commitStyles=function(){throw Error(l4)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new fZ(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new fZ(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),f0=.1,f1="function"==typeof Float32Array,f2=function(t,e){return 1-3*e+3*t},f5=function(t,e){return 3*e-6*t},f3=function(t){return 3*t},f4=function(t,e,n){return((f2(e,n)*t+f5(e,n))*t+f3(e))*t},f6=function(t,e,n){return 3*f2(e,n)*t*t+2*f5(e,n)*t+f3(e)},f8=function(t,e,n,r,i){var o,a,l=0;do(o=f4(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},f9=function(t,e,n,r){for(var i=0;i<4;++i){var o=f6(e,n,r);if(0===o)break;var a=f4(e,n,r)-t;e-=a/o}return e},f7=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=f1?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=f4(o*f0,t,n);var a=function(e){for(var r=0,o=1,a=10;o!==a&&i[o]<=e;++o)r+=f0;var l=r+(e-i[--o])/(i[o+1]-i[o])*f0,s=f6(l,t,n);return s>=.001?f9(e,l,t,n):0===s?l:f8(e,r,r+f0,t,n)};return function(t){return 0===t||1===t?t:f4(a(t),e,r)}},pt=function(t){return Math.pow(t,2)},pe=function(t){return Math.pow(t,3)},pn=function(t){return Math.pow(t,4)},pr=function(t){return Math.pow(t,5)},pi=function(t){return Math.pow(t,6)},po=function(t){return 1-Math.cos(t*Math.PI/2)},pa=function(t){return 1-Math.sqrt(1-t*t)},pl=function(t){return t*t*(3*t-2)},ps=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},pu=function(t,e){void 0===e&&(e=[]);var n=tU(e,2),r=n[0],i=n[1],o=fq(Number(void 0===r?1:r),1,10),a=fq(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},pc=function(t,e,n){void 0===e&&(e=[]);var r=tU(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=fq(o,.1,1e3),l=fq(l,.1,1e3),u=fq(u,.1,1e3),f=fq(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},pf=function(t,e){void 0===e&&(e=[]);var n=tU(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fq(t,0,1)*i)/i},pp=function(t,e){void 0===e&&(e=[]);var n=tU(e,4);return f7(n[0],n[1],n[2],n[3])(t)},ph=f7(.42,0,1,1),pd=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},py=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},pg=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},pv={steps:pf,"step-start":function(t){return pf(t,[1,"start"])},"step-end":function(t){return pf(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":pp,ease:function(t){return pp(t,[.25,.1,.25,1])},in:ph,out:pd(ph),"in-out":py(ph),"out-in":pg(ph),"in-quad":pt,"out-quad":pd(pt),"in-out-quad":py(pt),"out-in-quad":pg(pt),"in-cubic":pe,"out-cubic":pd(pe),"in-out-cubic":py(pe),"out-in-cubic":pg(pe),"in-quart":pn,"out-quart":pd(pn),"in-out-quart":py(pn),"out-in-quart":pg(pn),"in-quint":pr,"out-quint":pd(pr),"in-out-quint":py(pr),"out-in-quint":pg(pr),"in-expo":pi,"out-expo":pd(pi),"in-out-expo":py(pi),"out-in-expo":pg(pi),"in-sine":po,"out-sine":pd(po),"in-out-sine":py(po),"out-in-sine":pg(po),"in-circ":pa,"out-circ":pd(pa),"in-out-circ":py(pa),"out-in-circ":pg(pa),"in-back":pl,"out-back":pd(pl),"in-out-back":py(pl),"out-in-back":pg(pl),"in-bounce":ps,"out-bounce":pd(ps),"in-out-bounce":py(ps),"out-in-bounce":pg(ps),"in-elastic":pu,"out-elastic":pd(pu),"in-out-elastic":py(pu),"out-in-elastic":pg(pu),spring:pc,"spring-in":pc,"spring-out":pd(pc),"spring-in-out":py(pc),"spring-out-in":pg(pc)},pm=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},pb=function(t){return t};function px(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var pO="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",pw=RegExp("cubic-bezier\\("+pO+","+pO+","+pO+","+pO+"\\)"),pE=/steps\(\s*(\d+)\s*\)/,pk=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function pM(t){var e=pw.exec(t);if(e)return f7.apply(void 0,tY([],tU(e.slice(1).map(Number)),!1));var n=pE.exec(t);if(n)return px(Number(n[1]),0);var r=pk.exec(t);if(r)return px(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]);return pv[pm(t)]||pv.linear}function pS(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var p_=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!c5.enableCSSParsing&&fX(i)?i:n(i)}},pP=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=pb,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=pM(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function pj(t,e){if(null===t)return[];!Array.isArray(t)&&(t=function(t){var e=[];for(var n in t){if(!(n in["easing","offset","composite"])){var r=t[n];!Array.isArray(r)&&(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(fK(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),!r&&!function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!fK(l)&&!fK(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var pA="backwards|forwards|both|none".split("|"),pT="reverse|alternate|alternate-reverse".split("|"),pC=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=(i=!1,o=r=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}(null!=(r=n)?r:{duration:"auto"}),a=i,l=new pP,a&&(l.fill="both",l.duration="auto"),"number"!=typeof o||isNaN(o)?void 0!==o&&Object.keys(o).forEach(function(t){if(void 0!==o[t]&&null!==o[t]&&"auto"!==o[t]){if(!(("number"==typeof l[t]||"duration"===t)&&("number"!=typeof o[t]||isNaN(o[t])))&&("fill"!==t||-1!==pA.indexOf(o[t]))&&("direction"!==t||-1!==pT.indexOf(o[t])))l[t]=o[t]}}):l.duration=o,l),this.timing.effect=this,this.timing.activeDuration=Math.abs(function(t){var e;return 0===t.duration||0===t.iterations?0:("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(s=this.timing)/(s.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=pj(e,this.timing),this.interpolations=(u=this.normalizedKeyframes,c=this.timing,f=this.target,h=function(t,e){var n=[];for(var r in t){for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=uI[t];if(i&&i.syntax&&i.int){var o=c5.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(c5.enableCSSParsing){var s=c5.styleValueRegistry.parseProperty(t,e,r,!1),u=c5.styleValueRegistry.parseProperty(t,n,r,!1);a=c5.styleValueRegistry.computeProperty(t,s,r,!1),l=c5.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=p_.apply(void 0,tY([],tU(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return p_(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(p=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(pS(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:pM(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(u,c),f),function(t,e){if(null!==e)h.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in p)pS(n)&&t.setAttribute(n,null)});var y=c5.globalThis.Proxy;this.computedTiming=y?new y(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return d.animation&&d.animation.currentTime||null;else if("currentIteration"===e)return d.animation&&"running"===d.animation.playState?t.currentIteration||0:null;else if("progress"===e)return d.animation&&"running"===d.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),x=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,b,n.delay);if(null===x)return null;var O="auto"===n.duration?0:n.duration;var w=(r=O,i=b,o=n.iterations,a=x,l=n.iterationStart,0===r?1!==i&&(l+=o):l+=a/r,l);var E=(s=w,u=n.iterationStart,c=b,f=n.iterations,p=x,h=O,0==(d=s===1/0?u%1:s%1)&&2===c&&0!==f&&(0!==p||0===h)&&(d=1),d);var k=(y=b,g=n.iterations,v=E,m=w,2===y&&g===1/0?1/0:1===v?Math.floor(m)-1:Math.floor(m)),M=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,k,E);return n.currentIteration=k,n.progress=M,n.easingFunction(M)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=pj(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function pN(t,e){return Number(t.id)-Number(e.id)}var pL=function(){function t(t){var e=this;this.document=t,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(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(pN),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new fJ(new pC(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(pN),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return!this.ticking&&(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){!this.timelineTicking&&(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,tY([],tU(a),!1)),(i=this.pendingEffects).push.apply(i,tY([],tU(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();c5.EasingFunction=pM,c5.AnimationTimeline=pL;class pI extends Map{constructor(t,e=pD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(pR(this,t))}has(t){return super.has(pR(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function pR({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function pD(t){return null!==t&&"object"==typeof t?t.valueOf():t}function pF(t){return t}function pz(t,...e){return pG(t,pF,pF,e)}function pB(t,...e){return pG(t,Array.from,pF,e)}function pW(t,e,...n){return pG(t,pF,e,n)}function p$(t,e,...n){return pG(t,Array.from,e,n)}function pG(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new pI,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}function pV(t){return new pH([t],null,t,t.ownerDocument)}class pH{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new pH("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new pH(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new pH([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new pH(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new pH(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pH([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new pH([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=pz(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new pH([],r,this._parent,this._document),new pH(i,null,this._parent,this._document),new pH(o,null,this._parent,this._document),new pH([],a,this._parent,this._document),new pH(l,null,this._parent,this._document)];return new pH(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pH(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pH.registry[t];return e?new e:nH(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new pH([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function pU([t,e],[n,r]){return[t-n,e-r]}function pq([t,e],[n,r]){return[t+n,e+r]}function pY([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pX([t,e]){return Math.atan2(e,t)}function pK([t,e]){return pX([t,e])+Math.PI/2}function pZ(t,e){let n=pX(t),r=pX(e);return n<r?r-n:2*Math.PI-(n-r)}function pQ(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function pJ([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function p0(t,e,n){return Math.max(e,Math.min(t,n))}function p1(t,e=10){return"number"!=typeof t?t:1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}pH.registry={g:fh,rect:fx,circle:fc,path:fv,text:fO,ellipse:fp,image:fy,line:fg,polygon:fm,polyline:fb,html:fd};var p2=function(t){return nR(t,"Number")};function p5(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function p3(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function p4(t){return t.map((t,e)=>e)}function p6(t){return t[t.length-1]}function p8(t,e){let n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function p9(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function p7(t,e,n,r,i){let o=pX(pU(r,e))+Math.PI,a=pX(pU(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function ht(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)return e?180:90;return e?90:0})(r,o),s=p4(a),[u,c]=p5(s,t=>a[t]),f=new ec({domain:[u,c],range:[0,100]}),p=t=>p2(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function he(t){let[e,n,r,i]=t;return[i,e,n,r]}function hn(t,e,n){let[r,i,,o]=ot(t)?he(e):e,[a,l]=n,s=t.getCenter(),u=pK(pU(r,s)),c=pK(pU(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:pY(o,s),outerRadius:pY(r,s)}}function hr(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function hi(t,e){if(!oe(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function ho(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}var ha=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hl(t,e,n,r,i={}){let{inset:o=0,radius:a=0,insetLeft:l=o,insetTop:s=o,insetRight:u=o,insetBottom:c=o,radiusBottomLeft:f=a,radiusBottomRight:p=a,radiusTopLeft:h=a,radiusTopRight:d=a,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,m=ha(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!oe(r)&&!or(r)){let n=!!ot(r),[i,,o]=n?he(e):e,[a,b]=i,[x,O]=pU(o,i),w=Math.abs(x),E=Math.abs(O),k=(x>0?a:a+x)+l,M=(O>0?b:b+O)+s,S=w-(l+u),_=E-(s+c),P=n?p0(S,v,1/0):p0(S,y,g),j=n?p0(_,y,g):p0(_,v,1/0),A=n?k:k-(P-S)/2,T=n?M-(j-_)/2:M-(j-_);return pV(t.createElement("rect",{})).style("x",A).style("y",T).style("width",P).style("height",j).style("radius",[h,d,p,f]).call(p9,m).node()}let{y:b,y1:x}=n,O=r.getCenter(),w=hn(r,e,[b,x]),E=i7().cornerRadius(a).padAngle(o*Math.PI/180);return pV(t.createElement("path",{})).style("path",E(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",a).style("inset",o).call(p9,m).node()}let hs=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=ha(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=ha(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:m=y,radiusBottomLeft:b=y,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:E=x,innerRadiusBottomLeft:k=x,lineWidth:M="stroke"===n||d?h:0,inset:S=0,insetLeft:_=S,insetRight:P=S,insetBottom:j=S,insetTop:A=S,minWidth:T,maxWidth:C,minHeight:N}=a,L=ha(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:I=c,opacity:R}=r,D=[i?g:O,i?v:w,o?m:E,o?b:k],F=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];return ot(l)&&F.push(F.shift()),pV(hl(s,e,r,l,Object.assign(Object.assign({radius:y},Object.fromEntries(F.map((t,e)=>[t,D[e]]))),{inset:S,insetLeft:_,insetRight:P,insetBottom:j,insetTop:A,minWidth:T,maxWidth:C,minHeight:N}))).call(p9,p).style("fill","transparent").style(n,I).style(hr(t),R).style("lineWidth",M).style("stroke",void 0===d?I:d).call(p9,L).node()}};hs.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hu=(t,e)=>hs(Object.assign({colorAttribute:"fill"},t),e);hu.props=Object.assign(Object.assign({},hs.props),{defaultMarker:"square"});let hc=(t,e)=>hs(Object.assign({colorAttribute:"stroke"},t),e);function hf(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function hp(t){this._context=t}function hh(t){return new hp(t)}function hd(t){return t[0]}function hy(t){return t[1]}function hg(t,e){var n=iF(!0),r=null,i=hh,o=null,a=i2(l);function l(l){var s,u,c,f=(l=hf(l)).length,p=!1;for(null==r&&(o=i(c=a())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+t(u,s,l),+e(u,s,l));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?hd:iF(t),e="function"==typeof e?e:void 0===e?hy:iF(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:iF(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),l):r},l}function hv(){}function hm(t){this._context=t}function hb(t){return new hm(t)}hc.props=Object.assign(Object.assign({},hs.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,hp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},hm.prototype={areaStart:hv,areaEnd:hv,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var hx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hO(t,e,n){let[r,i,o,a]=t;if(ot(n)){let t=[e?e[0][0]:i[0],i[1]];return[r,t,[e?e[3][0]:o[0],o[1]],a]}let l=[i[0],e?e[0][1]:i[1]];return[r,l,[o[0],e?e[3][1]:o[1]],a]}let hw=(t,e)=>{let{adjustPoints:n=hO}=t,r=hx(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=hx(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=ot(i)?he(f):f,{color:g=u,opacity:v}=e,m=hg().curve(hb)([p,h,d,y]);return pV(o.createElement("path",{})).call(p9,c).style("path",m).style("fill",g).style("fillOpacity",v).call(p9,r).node()}};function hE(t,e,n){let[r,i,o,a]=t;if(ot(n)){let t=[e?e[0][0]:(i[0]+o[0])/2,i[1]];return[r,t,[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]}let l=[i[0],e?e[0][1]:(i[1]+o[1])/2];return[r,l,[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}hw.props={defaultMarker:"square"};let hk=(t,e)=>hw(Object.assign({adjustPoints:hE},t),e);function hM(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}hk.props={defaultMarker:"square"};let hS=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(nJ(i))return[t,n];let{title:o}=i;if(void 0!==o)return[t,n];let a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>iN(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];let l=[];for(let e of t)l[e]={value:a.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=hM(t.getMonth()+1),r=hM(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${hM(o)}:${hM(a)}:${hM(l)}`:i}(t[e]):t[e]).join(", ")};return[t,nB({},n,{tooltip:{title:l}})]}};hS.props={};let h_=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(nJ(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,nB({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};h_.props={};var hP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let hj=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=hP(n,["key"]);if(void 0!==r)return[t,e];let o=Object.values(i).map(({value:t})=>t),a=t.map(t=>o.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,nB({},e,{encode:{key:ij(a)}})]};function hA(t={}){let{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{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 hT(t={}){return[...hA(t),{name:"title",scale:"identity"}]}function hC(){return[{type:hS,channel:"color"},{type:h_,channel:["x","y"]}]}function hN(){return[{type:hS,channel:"x"},{type:h_,channel:["y"]}]}hj.props={};function hL(t={}){return hA(t)}function hI(){return[{type:hj}]}function hR(){return[]}function hD(t,e){return t.getBandWidth(t.invert(e))}function hF(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=s?0:.5,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,p=!!(null==a?void 0:a.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),d=!!(null==s?void 0:s.getBandWidth);return p||h?(t,e)=>{let n=p?hD(a,r[e]):0,u=h?hD(l,i[e]):0,y=d&&o?(hD(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function hz(t){return parseFloat(t)/100}function hB(t,e,n,r){let{x:i,y:o}=n,{innerWidth:a,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=o[t],r="string"==typeof e?hz(e)*a:+e;return[[r,"string"==typeof n?hz(n)*l:+n]]});return[t,s]}function hW(t){return"function"==typeof t?t:e=>e[t]}function h$(t,e){return Array.from(t,hW(e))}function hG(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:o,nodes:a}=t,l=h$(o,n),s=h$(o,r),u=h$(o,i);return{links:o.map((t,e)=>({target:s[e],source:l[e],value:u[e]})),nodes:a||Array.from(new Set([...l,...s]),t=>({key:t}))}}function hV(t,e){return t.getBandWidth(t.invert(e))}let hH={rect:hu,hollow:hc,funnel:hw,pyramid:hk},hU=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,series:l,size:s}=n,u=e.x,c=e.series,[f]=r.getSize(),p=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=p[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],d=Array.from(t,t=>{let e=hV(u,i[t]),n=c?hV(c,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,[f,p]=h(+i[t]+s,e*n,t),d=+o[t],y=+a[t];return[[f,d],[p,d],[p,y],[f,y]].map(t=>r.map(t))});return[t,d]};hU.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:hH,channels:[...hT({shapes:Object.keys(hH)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...hI(),{type:iR},{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}};let hq={rect:hu,hollow:hc},hY=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]],s=[+o[t],+l[t]];return[e,n,s,[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};hY.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:hq,channels:[...hT({shapes:Object.keys(hq)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:iR}],postInference:[...hN()],interaction:{shareTooltip:!0}};var hX=hZ(hh);function hK(t){this._curve=t}function hZ(t){function e(e){return new hK(t(e))}return e._curve=t,e}function hQ(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(hZ(t)):e()._curve},t}hK.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};function hJ(t){let e="function"==typeof t?t:t.render;return class extends ff{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var h0=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let h1=hJ(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;pV(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(p9,r),pV(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(p9,i)}),h2=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=h0(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f;let{color:p,lineWidth:h}=c,d=h0(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:m,seriesY:b}=e,x=hi(s,e),O=ot(s),w=r&&v?ht(v,m,b,r,i,O):y,E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),w&&{stroke:w}),g&&{lineWidth:g}),x&&{transform:x}),l);if(oe(s)){let t=s.getCenter();f=e=>hQ(hg().curve(hX)).angle((n,r)=>pK(pU(e[r],t))).radius((n,r)=>pY(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=hg().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[k,M]=function(t,e){let n=[],r=[],i=!1,o=null;for(let a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),S=nY(E,"connect"),_=!!M.length;if(!_||a&&!Object.keys(S).length)return pV(u.createElement("path",{})).style("d",f(k)||[]).call(p9,E).node();if(_&&!a)return pV(u.createElement("path",{})).style("d",f(t)).call(p9,E).node();return pV(new h1).style("style1",Object.assign(Object.assign({},E),S)).style("style2",E).style("d1",M.map(f).join(",")).style("d2",f(t)).node()}};h2.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let h5=(t,e)=>{let{coordinate:n}=e;return(...r)=>h2(Object.assign({curve:oe(n)?hb:hh},t),e)(...r)};function h3(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function h4(t,e){this._context=t,this._k=(1-e)/6}function h6(t,e){this._context=t,this._k=(1-e)/6}function h8(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function h9(t,e){this._context=t,this._alpha=e}function h7(t,e){this._context=t,this._alpha=e}h5.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"line"}),h4.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:h3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:h3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new h4(t,e)}return n.tension=function(e){return t(+e)},n}(0),h6.prototype={areaStart:hv,areaEnd:hv,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:h3(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new h6(t,e)}return n.tension=function(e){return t(+e)},n}(0),h9.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:h8(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return e?new h9(t,e):new h4(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),h7.prototype={areaStart:hv,areaEnd:hv,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)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:h8(this,t,e)}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=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var dt=function t(e){function n(t){return e?new h7(t,e):new h6(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function de(t){return t<0?-1:1}function dn(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),l=(o*i+a*r)/(r+i);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function dr(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function di(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function da(t){this._context=t}function dl(t){this._context=new ds(t)}function ds(t){this._context=t}function du(t){return new da(t)}function dc(t){return new dl(t)}da.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:di(this,this._t0,dr(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,di(this,dr(this,n=dn(this,t,e)),n);break;default:di(this,this._t0,n=dn(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(dl.prototype=Object.create(da.prototype)).point=function(t,e){da.prototype.point.call(this,e,t)},ds.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var df=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dp=(t,e)=>{let n=df(t,[]),{coordinate:r}=e;return(...t)=>h2(Object.assign({curve:oe(r)?dt:ot(r)?dc:du},n),e)(...t)};function dh(t,e){this._context=t,this._t=e}function dd(t){return new dh(t,.5)}function dy(t){return new dh(t,0)}function dg(t){return new dh(t,1)}dp.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"smooth"}),dh.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let dv=(t,e)=>h2(Object.assign({curve:dg},t),e);dv.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"hv"});let dm=(t,e)=>h2(Object.assign({curve:dy},t),e);dm.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"vh"});let db=(t,e)=>h2(Object.assign({curve:dd},t),e);db.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"hvh"});var dx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dO=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=dx(i,["color"]),u=i1();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(nq)&&!function(t,e,n,r,i){let o=pX(pU(n,e)),a=o+Math.PI/2,l=[r/2*Math.cos(a),r/2*Math.sin(a)],s=[i/2*Math.cos(a),i/2*Math.sin(a)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],c=[r/2*Math.cos(o),r/2*Math.sin(o)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),p=function([t,e],[n,r]){return[t+n,e+r]}(n,s),h=function([t,e],[n,r]){return[t+n,e+r]}(p,u),d=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=pU(d,s),g=pU(n,s),v=pU(e,l),m=pU(v,c),b=pU(e,c),x=pU(f,c);t.moveTo(...f),t.lineTo(...p),t.arcTo(...h,...d,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...m,...b,r/2),t.arcTo(...x,...f,r/2),t.closePath()}(u,n,r,i,a)}return pV(n.createElement("path",{})).call(p9,s).style("fill",a||l).style("d",u.toString()).call(p9,t).node()}};dO.props=Object.assign(Object.assign({},h2.props),{defaultMarker:"line"});let dw=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,nB({},e,{encode:{series:iT(iC(t,void 0))}})]};dw.props={};let dE=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=iN(n,"color");return[t,nB({},e,{encode:{series:ij(o,a)}})]};dE.props={};let dk={line:h5,smooth:dp,hv:dv,vh:dm,hvh:db,trail:dO},dM=(t,e,n,r)=>{var i,o;let{series:a,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=a?Array.from(pz(t,t=>a[t]).values()):[t],p=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,d=((null===(o=null==c?void 0:c.getBandWidth)||void 0===o?void 0:o.call(c))||0)/2;return[p,Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+d]))),f]},dS=(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");let o=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o});return[t,o]},d_=()=>(t,e,n,r)=>(oi(r)?dS:dM)(t,e,n,r);d_.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:dk,channels:[...hT({shapes:Object.keys(dk)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...hI(),{type:dw},{type:dE}],postInference:[...hN(),{type:hS,channel:"color"},{type:h_,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var dP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let dj=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];dj.style=["fill"];let dA=dj.bind(void 0);dA.style=["stroke","lineWidth"];let dT=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];dT.style=["fill"];let dC=dT.bind(void 0);dC.style=["fill"];let dN=dT.bind(void 0);dN.style=["stroke","lineWidth"];let dL=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};dL.style=["fill"];let dI=dL.bind(void 0);dI.style=["stroke","lineWidth"];let dR=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};dR.style=["fill"];let dD=dR.bind(void 0);dD.style=["stroke","lineWidth"];let dF=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};dF.style=["fill"];let dz=dF.bind(void 0);dz.style=["stroke","lineWidth"];let dB=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};dB.style=["fill"];let dW=dB.bind(void 0);dW.style=["stroke","lineWidth"];let d$=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};d$.style=["fill"];let dG=d$.bind(void 0);dG.style=["stroke","lineWidth"];let dV=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];dV.style=["stroke","lineWidth"];let dH=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];dH.style=["stroke","lineWidth"];let dU=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];dU.style=["stroke","lineWidth"];let dq=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];dq.style=["stroke","lineWidth"];let dY=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];dY.style=["stroke","lineWidth"];let dX=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];dX.style=["stroke","lineWidth"];let dK=dX.bind(void 0);dK.style=["stroke","lineWidth"];let dZ=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];dZ.style=["stroke","lineWidth"];let dQ=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];dQ.style=["stroke","lineWidth"];let dJ=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];dJ.style=["stroke","lineWidth"];let d0=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];d0.style=["stroke","lineWidth"];let d1=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];d1.style=["stroke","lineWidth"];let d2=new Map([["bowtie",d$],["cross",dH],["dash",dK],["diamond",dL],["dot",dX],["hexagon",dB],["hollowBowtie",dG],["hollowDiamond",dI],["hollowHexagon",dW],["hollowPoint",dA],["hollowSquare",dN],["hollowTriangle",dD],["hollowTriangleDown",dz],["hv",dQ],["hvh",d0],["hyphen",dY],["line",dV],["plus",dq],["point",dj],["rect",dC],["smooth",dZ],["square",dT],["tick",dU],["triangleDown",dF],["triangle",dR],["vh",dJ],["vhv",d1]]);var d5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let d3=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=d5(t,["colorAttribute","symbol","mode"]),a=d2.get(r)||d2.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,p=o.stroke?c||1:c,{color:h=f,transform:d,opacity:y}=r,[g,v]=ho(e),m=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||oo(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}(i,e,r,l)||o.r||u.r;return pV(s.createElement("path",{})).call(p9,u).style("fill","transparent").style("d",a(g,v,m)).style("lineWidth",p).style("transform",d).style("stroke",h).style(hr(t),y).style(n,h).call(p9,o).node()}};d3.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let d4=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);d4.props=Object.assign({defaultMarker:"hollowPoint"},d3.props);let d6=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);d6.props=Object.assign({defaultMarker:"hollowDiamond"},d3.props);let d8=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);d8.props=Object.assign({defaultMarker:"hollowHexagon"},d3.props);let d9=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);d9.props=Object.assign({defaultMarker:"hollowSquare"},d3.props);let d7=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);d7.props=Object.assign({defaultMarker:"hollowTriangleDown"},d3.props);let yt=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);yt.props=Object.assign({defaultMarker:"hollowTriangle"},d3.props);let ye=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);ye.props=Object.assign({defaultMarker:"hollowBowtie"},d3.props);let yn=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);yn.props=Object.assign({defaultMarker:"point"},d3.props);let yr=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);yr.props=Object.assign({defaultMarker:"plus"},d3.props);let yi=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);yi.props=Object.assign({defaultMarker:"diamond"},d3.props);let yo=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);yo.props=Object.assign({defaultMarker:"square"},d3.props);let ya=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);ya.props=Object.assign({defaultMarker:"triangle"},d3.props);let yl=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);yl.props=Object.assign({defaultMarker:"hexagon"},d3.props);let ys=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);ys.props=Object.assign({defaultMarker:"cross"},d3.props);let yu=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);yu.props=Object.assign({defaultMarker:"bowtie"},d3.props);let yc=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);yc.props=Object.assign({defaultMarker:"hyphen"},d3.props);let yf=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);yf.props=Object.assign({defaultMarker:"line"},d3.props);let yp=(t,e)=>d3(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);yp.props=Object.assign({defaultMarker:"tick"},d3.props);let yh=(t,e)=>d3(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);yh.props=Object.assign({defaultMarker:"triangleDown"},d3.props);let yd=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{y:iA(iC(t,0))},scale:{y:{guide:null}}})]};yd.props={};let yy=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,nB({},e,{encode:{size:iT(iC(t,3))}})]};yy.props={};let yg={hollow:d4,hollowDiamond:d6,hollowHexagon:d8,hollowSquare:d9,hollowTriangleDown:d7,hollowTriangle:yt,hollowBowtie:ye,point:yn,plus:yr,diamond:yi,square:yo,triangle:ya,hexagon:yl,cross:ys,bowtie:yu,hyphen:yc,line:yf,tick:yp,triangleDown:yh},yv=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l,y1:s,size:u,dx:c,dy:f}=r,[p,h]=i.getSize(),d=hF(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t],i=s?(+a[t]+ +s[t])/2:+a[t];return[r+e,i+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],o=r/p,a=r/h;return[i.map(d([e-o,n-a],t)),i.map(d([e+o,n+a],t))]}):Array.from(e,t=>[i.map(d(y(t),t))]);return[e,g]};yv.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:yg,channels:[...hT({shapes:Object.keys(yg)}),{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:[...hI(),{type:iD},{type:yd}],postInference:[{type:yy},...hC()]};var ym=function(t){return"function"==typeof t};function yb(t){yO(t,!0)}function yx(t){yO(t,!1)}function yO(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}var yw=function(t){return"object"==typeof t&&null!==t},yE={}.toString,yk=function(t,e){return yE.call(t)==="[object "+e+"]"},yM=function(t){if(!yw(t)||!yk(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},yS=function(t){return Array.isArray?Array.isArray(t):yk(t,"Array")},y_=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=tU(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?yM(l)?(!yM(t[a])&&(t[a]={}),n<r?y_(t[a],l,n+1,r):t[a]=e[a]):yS(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},yP=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)y_(t,e[r]);return t},yj=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,tY([],tU(e),!1))||this;return r.addEventListener(jo.INSERTED,function(){yx(r)}),r}return tB(e,t),e}(fh);function yA(t){var e=t.appendChild(new yj({class:"offscreen"}));return yx(e),e}function yT(){yO(this,"hidden"!==this.attributes.visibility)}var yC=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,yP({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return tB(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=yA(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&yT.call(this)},e.prototype.update=function(t,e){var n;return this.attr(yP({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(ff);function yN(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}var yL=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=t$(e,["style"]);return t.call(this,tW({style:tW({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return tB(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=yA(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(fO),yI=function(){var t,e,n;function r(e,n,r,i,o,a,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],l=tU(Array.isArray(a)?a:[a,null],2),s=l[0],u=l[1],c=r(s,o);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var o=0;o<this._elements.length;o++){var f=this._elements[o],s=f.__data__,c=r(s,o);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=tX(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),o=tX(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return o.attr("className",i),o},r.prototype.maybeAppendByName=function(e,r){var i=tX(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});var i,o,a,l,s,u=[],c=[],f=new Set(this._elements),p=[],h=new Set,d=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]}));for(var g=(i=this._elements,o=function(t){return r(t.__data__)},a=new Map,i.forEach(function(t){var e=o(t);!a.has(e)&&a.set(e,[]),a.get(e).push(t)}),a),v=0;v<t.length;v++){var m=t[v],b=n(m,v),x=r(m,v);if(d.has(b)){var O=d.get(b);O.__data__=m,O.__facet__=!1,c.push(O),f.delete(O),d.delete(b)}else if(y.has(b)){var O=y.get(b);O.__data__=m,O.__facet__=!0,c.push(O),y.delete(b)}else if(g.has(b)){var w=g.get(b);p.push([m,w]);try{for(var E=(l=void 0,tH(w)),k=E.next();!k.done;k=E.next()){var O=k.value;f.delete(O)}}catch(t){l={error:t}}finally{try{k&&!k.done&&(s=E.return)&&s.call(E)}finally{if(l)throw l.error}}g.delete(b)}else if(d.has(x)){var O=d.get(x);O.__toData__?O.__toData__.push(m):O.__toData__=[m],h.add(O),f.delete(O)}else u.push(m)}var M=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],p,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,M)},r.prototype.merge=function(t){var n=tY(tY([],tU(this._elements),!1),tU(t._elements),!1),r=tY(tY([],tU(this._transitions),!1),tU(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];return n?new n:function(t){throw Error(t)}("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var o=tU(t,2),a=o[0],l=o[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(a,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){var e=this._transitions;return this.each(function(n,r){e[r]=t.call(this,n,r)})},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,tY([this._parent,this],tU(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var o="string"==typeof n?this.createElement(n):n();return r.appendChild(o),new e([o],null,this._parent,this._document)},r.registry={g:fh,rect:fx,circle:fc,path:fv,text:yL,ellipse:fp,image:fy,line:fg,polygon:fm,polyline:fb,html:fd},r}();function yR(t){return new yI([t],null,t,t.ownerDocument)}var yD=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},yF=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},yz=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},yB=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},yW=function(t){return yk(t,"String")},y$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,n){var r,i,o=t.symbol,a=t.size,l=void 0===a?16:a,s=t$(t,["symbol","size"]);var u=["base64","url","image"].includes(i=function(t){var e="default";if(yB(t)&&t instanceof Image)e="image";else if(ym(t))e="symbol";else if(yW(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(r=o))?"image":r&&"symbol"===i?"path":null;yN(!!u,yR(n),function(t){t.maybeAppendByClassName("marker",u).attr("className","marker ".concat(u,"-marker")).call(function(t){if("image"===u){var n=2*l;t.styles({img:o,width:n,height:n,x:-l,y:-l})}else{var n=l/2,r=ym(o)?o:e.getSymbol(o);t.styles(tW({path:null==r?void 0:r(0,0,n)},s))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(yC);y$.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),y$.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),y$.registerSymbol("line",yF),y$.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),y$.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),y$.registerSymbol("circle",yD),y$.registerSymbol("point",yD),y$.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),y$.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),y$.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),y$.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),y$.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),y$.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),y$.registerSymbol("line",yF),y$.registerSymbol("dot",yz),y$.registerSymbol("dash",yz),y$.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),y$.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),y$.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),y$.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),y$.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});var yG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yV=(t,e,n)=>{let r=pY(t,e),i=pY(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(pY(n,t),2))/(2*r*i)},yH=hJ(t=>{let e;let n=t.attributes,{className:r,class:i,transform:o,rotate:a,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:p=c,text:h,background:d,connector:y,startMarker:g,endMarker:v,coordCenter:m,innerHTML:b}=n,x=yG(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([u,c,f,p].some(t=>!p2(t))){t.children.forEach(t=>t.remove());return}let O=nY(x,"background"),{padding:w}=O,E=yG(O,["padding"]),k=nY(x,"connector"),{points:M=[]}=k,S=yG(k,["points"]),_=[[+f,+p],[+u,+c]];e=b?pV(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",b).call(p9,Object.assign({transform:l,transformOrigin:s},x)).node():pV(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(p9,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},x)).node();let P=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return hg()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(yV(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return hg()(c)}(pV(t).maybeAppend("background","rect").style("zIndex",-1).call(p9,function(t,e=[]){let[n=0,r=0,i=n,o=r]=e,a=t.parentNode,l=a.getEulerAngles();a.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[p,h]=u;return a.setEulerAngles(l),{x:c-o,y:f-n,width:2*p+o+r,height:2*h+n+i}}(e,w)).call(p9,d?E:{}).node(),_,M,m),j=g&&new y$({id:"startMarker",style:Object.assign({x:0,y:0},nY(x,"startMarker"))}),A=v&&new y$({id:"endMarker",style:Object.assign({x:0,y:0},nY(x,"endMarker"))});pV(t).maybeAppend("connector","path").style("zIndex",0).style("path",P).style("markerStart",j).style("markerEnd",A).call(p9,y?S:{})}),yU=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:o,text:a="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(a),stroke:o,fill:o,fontSize:l},[[f,p]]=e;return pV(new yH).style("x",f).style("y",p).call(p9,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(p9,c).call(p9,t).node()}};yU.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yY=hJ(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=yq(e,["class","x","y"]),a=nY(o,"marker"),{size:l=24}=a,s=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",o,a],["Z"]]})(l/2),[u,c]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(pV(t).maybeAppend("marker",()=>new y$({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());pV(t).maybeAppend("text","text").style("x",u).style("y",c).call(p9,o)}),yX=(t,e)=>{let n=yq(t,[]);return(t,e,r)=>{let{color:i}=r,o=yq(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return pV(new yY).call(p9,o).style("x",u).style("y",c).call(p9,s).call(p9,n).node()}};yX.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let yK=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(iI))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),o=r.map(t=>t[1]);return[t,nB({},e,{encode:{x:ij(i),y:ij(o)}})]};yK.props={};var yZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let yQ=()=>(t,e)=>{let{data:n,style:r={}}=e,i=yZ(e,["data","style"]),{x:o,y:a}=r,l=yZ(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],nB({},i,{data:[0],cartesian:!0,encode:{x:ij([o||0]),y:ij([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};yQ.props={};let yJ={text:yU,badge:yX},y0=t=>{let{cartesian:e=!1}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};y0.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:yJ,channels:[...hT({shapes:Object.keys(yJ)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...hI(),{type:yK},{type:yQ}],postInference:[...hC()]};let y1=()=>(t,e)=>[t,nB({scale:{x:{padding:0},y:{padding:0}}},e)];y1.props={};let y2={cell:hu,hollow:hc},y5=()=>(t,e,n,r)=>{let{x:i,y:o}=n,a=e.x,l=e.y,s=Array.from(t,t=>{let e=a.getBandWidth(a.invert(+i[t])),n=l.getBandWidth(l.invert(+o[t])),s=+i[t],u=+o[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function y3(t,e,n){var r=null,i=iF(!0),o=null,a=hh,l=null,s=i2(u);function u(u){var c,f,p,h,d,y=(u=hf(u)).length,g=!1,v=Array(y),m=Array(y);for(null==o&&(l=a(d=s())),c=0;c<=y;++c){if(!(c<y&&i(h=u[c],c,u))===g){if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=c-1;p>=f;--p)l.point(v[p],m[p]);l.lineEnd(),l.areaEnd()}}g&&(v[c]=+t(h,c,u),m[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):m[c]))}if(d)return l=null,d+""||null}function c(){return hg().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?hd:iF(+t),e="function"==typeof e?e:void 0===e?iF(0):iF(+e),n="function"==typeof n?n:void 0===n?hy:iF(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:iF(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:iF(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:iF(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:iF(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:iF(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}y5.props={defaultShape:"cell",defaultLabelShape:"label",shape:y2,composite:!1,channels:[...hT({shapes:Object.keys(y2)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...hI(),{type:iD},{type:yd},{type:y1}],postInference:[...hC()]};var y4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let y6=hJ(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;pV(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(p9,i),pV(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(p9,r)}),y8=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=y4(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:p,seriesX:h,seriesY:d}=e,y=ot(l),g=hi(l,e),v=r&&p?ht(p,h,d,r,void 0,y):f,m=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[b,x]=function(t,e){let n=[],r=[],i=[],o=!1,a=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))o=!0;else{if(n.push(u),r.push(c),o&&a){o=!1;let[t,e]=a;i.push([t,u,e,c])}a=[u,c]}}return[n.concat(r),i]}(t,i),O=nY(m,"connect"),w=!!x.length,E=t=>pV(s.createElement("path",{})).style("d",t||"").call(p9,m).node();if(oe(l)){let e=t=>{var e,r,o,a,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),p=t.slice(t.length/2);return(r=(e=y3().curve(hX)).curve,o=e.lineX0,a=e.lineX1,s=e.lineY0,u=e.lineY1,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 hQ(o())},delete e.lineX0,e.lineEndAngle=function(){return hQ(a())},delete e.lineX1,e.lineInnerRadius=function(){return hQ(s())},delete e.lineY0,e.lineOuterRadius=function(){return hQ(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(hZ(t)):r()._curve},e).angle((t,e)=>pK(pU(f[e],c))).outerRadius((t,e)=>pY(f[e],c)).innerRadius((t,e)=>pY(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):pV(new y6).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?y3().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):y3().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):pV(new y6).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}}};y8.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let y9=(t,e)=>{let{coordinate:n}=e;return(...r)=>y8(Object.assign({curve:oe(n)?hb:hh},t),e)(...r)};y9.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"square"});var y7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gt=(t,e)=>{let n=y7(t,[]),{coordinate:r}=e;return(...t)=>y8(Object.assign({curve:oe(r)?dt:ot(r)?dc:du},n),e)(...t)};gt.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"smooth"});let ge=(t,e)=>(...n)=>y8(Object.assign({curve:dd},t),e)(...n);ge.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"hvh"});let gn=(t,e)=>(...n)=>y8(Object.assign({curve:dy},t),e)(...n);gn.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"vh"});let gr=(t,e)=>(...n)=>y8(Object.assign({curve:dg},t),e)(...n);gr.props=Object.assign(Object.assign({},y8.props),{defaultMarker:"hv"});let gi={area:y9,smooth:gt,hvh:ge,vh:gn,hv:gr},go=()=>(t,e,n,r)=>{var i,o;let{x:a,y:l,y1:s,series:u}=n,{x:c,y:f}=e,p=u?Array.from(pz(t,t=>u[t]).values()):[t],h=p.map(t=>t[0]).filter(t=>void 0!==t),d=((null===(i=null==c?void 0:c.getBandWidth)||void 0===i?void 0:i.call(c))||0)/2,y=((null===(o=null==f?void 0:f.getBandWidth)||void 0===o?void 0:o.call(f))||0)/2;return[h,Array.from(p,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let o=t[i];n[i]=r.map([+a[o]+d,+l[o]+y]),n[e+i]=r.map([+a[o]+d,+s[o]+y])}return n}),p]};go.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:gi,channels:[...hT({shapes:Object.keys(gi)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...hI(),{type:dE},{type:iR},{type:y1}],postInference:[...hN()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let ga=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=iN(n,"y");return[t,nB({},e,{encode:{y1:ij([...i])}})]};ga.props={};let gl=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=iN(n,"x");return[t,nB({},e,{encode:{x1:ij([...i])}})]};gl.props={};var gs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gu=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=gs(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=gs(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=i1();if(h.moveTo(...f),h.lineTo(...p),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*pY(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-a-o,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=a-o;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,p,{arrowSize:r});h.moveTo(...p),h.lineTo(...t),h.moveTo(...p),h.lineTo(...e)}return pV(o.createElement("path",{})).call(p9,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(p9,i).node()}};gu.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gc=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>gu(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};gc.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gp=(t,e)=>{let n=gf(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=gf(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=i1();if(p.moveTo(c[0],c[1]),oe(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=pJ(c,f),e=pY(c,f)/2;p7(p,c,f,t,e)}return pV(i.createElement("path",{})).call(p9,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(p9,n).node()}};gp.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gd=(t,e)=>{let n=gh(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=gh(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=i1();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),pV(r.createElement("path",{})).call(p9,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(p9,n).node()}};gd.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gg=(t,e)=>{let{cornerRatio:n=1/3}=t,r=gy(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=gy(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=i1();if(oe(n)){let o=n.getCenter(),a=pY(t,o),l=pY(e,o);return i.moveTo(t[0],t[1]),p7(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return ot(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}(f,p,i,n);return pV(o.createElement("path",{})).call(p9,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(p9,r).node()}};gg.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gv={link:gc,arc:gp,smooth:gd,vhv:gg},gm=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=hF(n,r,t),c=e.map(t=>[i.map(u([+o[t],+a[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};gm.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:gv,channels:[...hT({shapes:Object.keys(gv)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:ga},{type:gl}],postInference:[...hC()]};var gb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gx=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=gb(o,["color"]),{color:s=a,src:u="",size:c=32,transform:f=""}=i,{width:p=c,height:h=c}=t,[[d,y]]=e,[g,v]=n.getSize();p="string"==typeof p?hz(p)*g:p,h="string"==typeof h?hz(h)*v:h;let m=d-Number(p)/2,b=y-Number(h)/2;return pV(r.createElement("image",{})).call(p9,l).style("x",m).style("y",b).style("img",u).style("stroke",s).style("transform",f).call(p9,t).style("width",p).style("height",h).node()}};gx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gO={image:gx},gw=t=>{let{cartesian:e}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};gw.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:gO,channels:[...hT({shapes:Object.keys(gO)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...hI(),{type:yK},{type:yQ}],postInference:[...hC()]};var gE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gk=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=gE(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){var n;let r=i1();if(oe(e)){let n=e.getCenter(),i=[...t,t[0]],o=i.map(t=>pY(t,n));return i.forEach((e,i)=>{if(0===i){r.moveTo(e[0],e[1]);return}let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?p7(r,l,e,n,a):r.lineTo(e[0],e[1])}),r.closePath(),r}return n=r,t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return pV(r.createElement("path",{})).call(p9,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(p9,t).node()}};gk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gS=(t,e)=>{let n=gM(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=gM(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=i1();if(oe(e)){let t=e.getCenter(),l=pY(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),p7(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),p7(a,r,n,t,l),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return pV(i.createElement("path",{})).call(p9,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(p9,n).node()}};gS.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g_={polygon:gk,ribbon:gS},gP=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let a=i[n][t];if(void 0===a)break;let l=o[n][t];e.push(r.map([+a,+l]))}return e});return[t,a]};gP.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:g_,channels:[...hT({shapes:Object.keys(g_)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[...hC()]};var gj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gA=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=gj(o,["color","fill","stroke"]),p=function(t,e){let n=i1();if(oe(e)){let r=e.getCenter(),[i,o]=r,a=pX(pU(t[0],r)),l=pX(pU(t[1],r)),s=pY(r,t[2]),u=pY(r,t[3]),c=pY(r,t[8]),f=pY(r,t[10]),p=pY(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,s,a,l),n.arc(i,o,s,l,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,u,a,l),n.lineTo(...t[6]),n.arc(i,o,f,l,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,c,a,l),n.arc(i,o,c,l,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,p,a,l),n.arc(i,o,p,l,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return pV(r.createElement("path",{})).call(p9,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(p9,t).node()}};gA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var gT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gC=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=gT(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=i1();if(!oe(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[o,a]=i,l=pY(i,t[3]),s=pY(i,t[8]),u=pY(i,t[10]),c=pX(pU(t[2],i)),f=Math.asin(n/s),p=c-f,h=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.arc(o,a,l,p,h),r.lineTo(Math.cos(h)*u+o,Math.sin(h)*u+a),r.arc(o,a,u,h,p,!0),r.lineTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let d=(p+h)/2;return r.moveTo(Math.cos(d)*(s+n/2)+o,Math.sin(d)*(s+n/2)+a),r.arc(Math.cos(d)*s+o,Math.sin(d)*s+a,n/2,d,2*Math.PI+d),r.closePath(),r}(e,n,4);return pV(r.createElement("path",{})).call(p9,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(p9,t).node()}};gC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gN={box:gA,violin:gC},gL=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,y2:l,y3:s,y4:u,series:c}=n,f=e.x,p=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(p?p.getBandWidth(p.invert(+(null==c?void 0:c[t]))):1),h=(+(null==c?void 0:c[t])||0)*e,d=+i[t]+h+n/2,[y,g,v,m,b]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,b],[d+n/2,b],[d,b],[d,m],[d-n/2,m],[d+n/2,m],[d+n/2,g],[d-n/2,g],[d-n/2,v],[d+n/2,v],[d,g],[d,y],[d-n/2,y],[d+n/2,y]].map(t=>r.map(t))});return[t,h]};gL.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:gN,channels:[...hT({shapes:Object.keys(gN)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...hI(),{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}};let gI={vector:gu},gR=()=>(t,e,n,r)=>{let{x:i,y:o,size:a,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=+l[t]/180*Math.PI,n=+a[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([+i[t]-c/2,+o[t]-f/2]),r.map([+i[t]+c/2,+o[t]+f/2])]});return[t,c]};gR.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:gI,channels:[...hT({shapes:Object.keys(gI)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...hI()],postInference:[...hC()]};var gD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let gF=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=gD(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s,u,c;let{color:f,lineWidth:p}=l,h=gD(l,["color","lineWidth"]),{color:d=f,size:y=p}=e;let g=n?(s=a,u=r,c=Object.assign({fill:i.stroke||d,stroke:i.stroke||d},nY(i,"arrow")),s.createElement("path",{style:Object.assign({path:`M ${u},${u} L -${u},0 L ${u},-${u} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},c)})):null,v=function(t,e){if(!oe(e))return hg().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return i7()({startAngle:0,endAngle:2*Math.PI,outerRadius:pY(t[0],n),innerRadius:pY(t[1],n)})}(t,o),m=function(t,e){if(!oe(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return pV(a.createElement("path",{})).call(p9,h).style("d",v).style("stroke",d).style("lineWidth",y).style("transform",m).style("markerEnd",g).call(p9,i).node()}};gF.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gz=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(iI)?[t,e]:[t,nB({},e,{encode:{x:ij(n)}})]};gz.props={};let gB={line:gF},gW=t=>(e,n,r,i)=>{let{x:o}=r,a=hF(n,r,nB({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[o[t],1];return[e,[o[t],0]].map(e=>i.map(a(e,t)))});return[e,l]};gW.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:gB,channels:[...hL({shapes:Object.keys(gB)}),{name:"x",required:!0}],preInference:[...hI(),{type:gz}],postInference:[]};let g$=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(iI)?[t,e]:[t,nB({},e,{encode:{y:ij(n)}})]};g$.props={};let gG={line:gF},gV=t=>(e,n,r,i)=>{let{y:o}=r,a=hF(n,r,nB({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[0,o[t]];return[e,[1,o[t]]].map(e=>i.map(a(e,t)))});return[e,l]};gV.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:gG,channels:[...hL({shapes:Object.keys(gG)}),{name:"y",required:!0}],preInference:[...hI(),{type:g$}],postInference:[]};var gH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gU(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let gq=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=gH(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{var u;let{color:c,connectLength1:f}=n,p=gH(n,["color","connectLength1"]),{color:h,transform:d}=e,y=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(ot(t)){let t=o+n,e=t+i;return[[t,a],[e,a],[e,s],[l+r,s]]}let u=a-n,c=u-i;return[[o,u],[o,c],[l,c],[l,s-r]]}(s,t,r,i,null!=o?o:f),g=nY(Object.assign(Object.assign({},l),n),"endMarker");return pV(new fv).call(p9,p).style("path",(u=y,hg().x(t=>t[0]).y(t=>t[1])(u))).style("stroke",h||c).style("transform",d).style("markerEnd",a?new y$({className:"marker",style:Object.assign(Object.assign({},g),{symbol:gU})}):null).call(p9,l).node()}};gq.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gY={connector:gq},gX=(...t)=>gm(...t);function gK(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:o}=n;return t=>{var e;let n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function gZ(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=gK("x",e,i,r.x),l=gK("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=a(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>o.map(t))});return[t,s]}}gX.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:gY,channels:[...hL({shapes:Object.keys(gY)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[]};let gQ={range:hu},gJ=()=>gZ();gJ.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:gQ,channels:[...hL({shapes:Object.keys(gQ)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI()],postInference:[]};let g0=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(iI))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nB({},e,{encode:{x:ij(r(n,0)),x1:ij(r(n,1))}})]}return[t,e]};g0.props={};let g1={range:hu},g2=()=>gZ({extendY:!0});g2.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:g1,channels:[...hL({shapes:Object.keys(g1)}),{name:"x",required:!0}],preInference:[...hI(),{type:g0}],postInference:[]};let g5=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(iI))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nB({},e,{encode:{y:ij(r(n,0)),y1:ij(r(n,1))}})]}return[t,e]};g5.props={};let g3={range:hu},g4=()=>gZ({extendX:!0});g4.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:g3,channels:[...hL({shapes:Object.keys(g3)}),{name:"y",required:!0}],preInference:[...hI(),{type:g5}],postInference:[]};var g6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let g8=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=g6(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=g6(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return pV(a.createElement("path",{})).call(p9,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(p9,i).node()}};g8.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g9=(t,e)=>g8(Object.assign({colorAttribute:"fill"},t),e);g9.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g7=(t,e)=>g8(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);g7.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vt={path:g9,hollow:g7},ve=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];ve.props={defaultShape:"path",defaultLabelShape:"label",shape:vt,composite:!1,channels:[...hT({shapes:Object.keys(vt)}),{name:"d",scale:"identity"}],preInference:[...hI()],postInference:[]};var vn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vr=(t,e)=>{let{render:n}=t,r=vn(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};vr.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vi=()=>(t,e)=>{let{style:n={}}=e;return[t,nB({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};vi.props={};let vo=t=>{let{cartesian:e}=t;return e?hB:(e,n,r,i)=>{let{x:o,y:a}=r,l=hF(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};vo.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:vr},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...hI(),{type:yK},{type:yQ},{type:vi}]};var va=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vl=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=va(i,["color"]),{color:s=a}=r,[u,...c]=e,f=i1();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),pV(n.createElement("path",{})).call(p9,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(p9,t).node()}};vl.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vs={density:vl},vu=()=>(t,e,n,r)=>{let{x:i,series:o}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===a||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==o?void 0:o[e]))):1,f=(+(null==o?void 0:o[e])||0)*n,p=+i[e]+f+n*c/2;return[...a.map((n,r)=>[p+ +l[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[p-+l[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function vc(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function vf(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function vp(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}vu.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:vs,channels:[...hT({shapes:Object.keys(vs)}),{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:[...hI(),{type:iR},{type:iD}],postInference:[...hN()],interaction:{shareTooltip:!0}},vp(3);function vh(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}let vd=function(t,e=(...t)=>`${t[0]}`,n=16){let r=vp(n);return(...n)=>{let i=e(...n),o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}((t,e,n)=>{let r=vh(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var vy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vg=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=vy(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),m=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),b=vc(t,t=>t[2]),x=vf(t,t=>t[2]);let O=g&&v?function(t,e,n,r,i,o,a){let l=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)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=vh(a,t,e).getContext("2d"),u=function(t,e){var n;let r=vh(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return("string"==typeof(n=t)?n.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):n).forEach(([t,e])=>{i.addColorStop(t,e)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),!function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=vd(c,1-a,o),y=(f-e)/(n-e);t.globalAlpha=Math.max(y,.001),t.drawImage(d,p,h)};}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=vh(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,b,x,m,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return!d(n,e)&&(t[e]=n),t},{})),c):{canvas:null};return pV(f.createElement("image",{})).call(p9,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",O.canvas).style("transform",y).call(p9,s).node()}};vg.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vv={heatmap:vg},vm=t=>(t,e,n,r)=>{let{x:i,y:o,size:a,color:l}=n;return[[0],[Array.from(t,t=>{let e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),l[t],e]})]]};vm.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:vv,channels:[...hT({shapes:Object.keys(vv)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...hI(),{type:iD},{type:yd}],postInference:[...hC()]};let vb=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];vb.props={};let vx=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];vx.props={};let vO=t=>new ec(t);vO.props={};let vw=Symbol("defaultUnknown");function vE(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function vk(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==vw)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function vM(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class vS extends tK{getDefaultOptions(){return{domain:[],range:[],unknown:vw}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&vE(this.domainIndexMap,this.getDomain(),this.domainKey),vk({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&vE(this.rangeIndexMap,this.getRange(),this.rangeKey),vk({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=vM(e),this.rangeKey=vM(n),!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 vS(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}let v_=t=>new vS(t);function vP({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}v_.props={};function vj(t){return"object"==typeof t?t.valueOf():t}class vA extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=vj,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(vP({map:this.map,initKey:this.initKey},t))}has(t){return super.has(vP({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class vT extends vS{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:vw,flex:[]}}constructor(t){super(t)}clone(){return new vT(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new vA(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new vA(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let vC=t=>new vT(t);function vN(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}vC.props={};let vL=[1,5,2,2.5,4,3],vI=100*Number.EPSILON,vR=(t,e,n=5,r=!0,i=vL,o=[.25,.2,.5,.05])=>{let a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let h=i[n],d=function(t,e,n){let r=tF(e),i=tR(e,t);return 1-i/(r-1)-n+1}(h,i,s);if(o[0]*d+o[1]+o[2]+o[3]<l.score){s=1/0;break}let y=2;for(;y<1/0;){var u,c,f,p;let n=(u=y)>=(c=a)?2-(u-1)/(c-1):1;if(o[0]*d+o[1]+o[2]*n+o[3]<l.score)break;let g=Math.ceil(Math.log10((e-t)/(y+1)/s/h));for(;g<1/0;){let u=s*h*10**g,c=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(y-1));if(o[0]*d+o[1]*c+o[2]*n+o[3]<l.score)break;let v=Math.floor(e/u)*s-(y-1)*s,m=Math.ceil(t/u)*s;if(v<=m){let n=m-v;for(let c=0;c<=n;c+=1){;let n=u/s*(v+c),d=n+u*(y-1),g=function(t,e,n,r,i,o){var a;let l=tF(e),s=tR(e,t),u=0;let c=(r%(a=o)+a)%a;return(c<vI||o-c<vI)&&r<=0&&i>=0&&(u=1),1-s/(l-1)-n+u}(h,i,s,n,d,u);let m=(f=t,1-.5*(((p=e)-d)**2+(f-n)**2)/(.1*(p-f))**2),b=function(t,e,n,r,i,o){let a=(t-1)/(o-i),l=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/l,l/a)}(y,a,t,e,n,d),x=o[0]*g+o[1]*m+o[2]*b+1*o[3];x>l.score&&(!r||n<=t&&d>=e)&&(l.lmin=n,l.lmax=d,l.lstep=u,l.score=x)}}g+=1}y+=1}}s+=1}let h=vN(l.lmax),d=vN(l.lmin),y=vN(l.lstep),g=Math.floor(Math.round((h-d)/y*1e12)/1e12)+1,v=Array(g);v[0]=vN(d);for(let t=1;t<g;t+=1)v[t]=vN(v[t-1]+y);return v};class vD extends tK{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:vR}}map(t){return t9(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new vD(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return tT(r)&&tT(i)?n(r,i,e):[]}}let vF=t=>new vD(t);vF.props={};class vz extends vT{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:vw,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new vz(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let vB=t=>new vz(t);vB.props={};var vW=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,v$="[^\\s]+",vG=/\[([^]*?)\]/gm;function vV(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var vH=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function vU(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}var vq=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],vY=["January","February","March","April","May","June","July","August","September","October","November","December"],vX=vV(vY,3),vK=vV(vq,3),vZ=vU({},{dayNamesShort:vK,dayNames:vq,monthNamesShort:vX,monthNames:vY,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}}),vQ=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},vJ={D:function(t){return String(t.getDate())},DD:function(t){return vQ(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return vQ(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return vQ(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return vQ(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return vQ(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return vQ(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return vQ(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return vQ(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return vQ(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return vQ(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return vQ(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+vQ(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+vQ(Math.floor(Math.abs(e)/60),2)+":"+vQ(Math.abs(e)%60,2)}};vH("monthNamesShort"),vH("monthNames");var v0={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"},v1=function(t,e,n){if(void 0===e&&(e=v0.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=v0[e]||e;var r=[];e=e.replace(vG,function(t,e){return r.push(e),"@@@"});var i=vU(vU({},vZ),n);return(e=e.replace(vW,function(e){return vJ[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};let v2=6e4,v5=36e5,v3=864e5,v4=6048e5,v6=2592e6,v8=31536e6;function v9(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let v7=v9(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),mt=v9(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),me=v9(v2,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+v2*e)},t=>t.getMinutes()),mn=v9(v5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+v5*e)},t=>t.getHours()),mr=v9(v3,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v3*e)},t=>t.getDate()-1),mi=v9(v6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),mo=v9(v4,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=mi.floor(t);return Math.floor((+new Date(+t)-+e)/v4)}),ma={millisecond:v7,second:mt,minute:me,hour:mn,day:mr,week:mo,month:mi,year:v9(v8,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},ml=v9(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ms=v9(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),mu=v9(v2,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+v2*e)},t=>t.getUTCMinutes()),mc=v9(v5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+v5*e)},t=>t.getUTCHours()),mf=v9(v3,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v3*e)},t=>t.getUTCDate()-1),mp=v9(v6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),mh=v9(v4,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+v4*e)},t=>{let e=mp.floor(t);return Math.floor((+new Date(+t)-+e)/v4)}),md={millisecond:ml,second:ms,minute:mu,hour:mc,day:mf,week:mh,month:mp,year:v9(v8,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function my(t,e,n,r,i){let o;let a=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:o,minute:a,second:l,millisecond:s}=t?md:ma;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[a,1],[a,5],[a,15],[a,30],[o,1],[o,3],[o,6],[o,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,p=r?(l-a)/r:n||5,h=r||(l-a)/p,d=s.length,y=tJ(s,h,0,d,f);if(y===d){let t=er(a/u.duration,l/u.duration,p);o=[u,t]}else if(y){let[t,e]=h/f(s[y-1])<f(s[y])/h?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;o=[t,n]}else o=[c,Math.max(er(a,l,p),1)];return o}let mg=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=my(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},mv=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=my(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function mm(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class mb extends es{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:mg,interpolate:t3,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return mv}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options,i=t[0];return[i,t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?md:ma,r=e?mm:tD;return e=>v1(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;if(n.floor(t)<t)return".SSS";if(r.floor(t)<t)return":ss";if(i.floor(t)<t)return"hh:mm";if(o.floor(t)<t)return"hh A";if(l.floor(t)<t)return a.floor(t)<t?"MMM DD":"ddd DD";return s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new mb(this.options)}}let mx=t=>new mb(t);mx.props={};let mO=t=>e=>-t(-e),mw=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?mO(r):r},mE=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?mO(n):n},mk=(t,e,n,r=10)=>{let i=t<0,o=mE(r,i),a=mw(r,i),l=e<t,s=l?e:t,u=l?t:e,c=a(s),f=a(u),p=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=o(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}else for(;c<=f;c+=1){let t=o(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}2*p.length<n&&(p=eu(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=eu(c,f,t).map(o)}return l?p.reverse():p},mM=(t,e,n,r)=>{let i=t<0,o=mw(r,i),a=mE(r,i),l=t>e,s=l?e:t,u=l?t:e,c=[a(Math.floor(o(s))),a(Math.ceil(o(u)))];return l?c.reverse():c};class mS extends es{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:t6,tickMethod:mk,tickCount:5}}chooseNice(){return mM}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options,r=t[0];return[r,t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[mw(t,n),mE(t,n)]}clone(){return new mS(this.options)}}let m_=t=>new mS(t);m_.props={};let mP=t=>e=>e<0?-((-e)**t):e**t,mj=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),mA=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class mT extends es{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:t6,tickMethod:eu,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;if(1===t)return[tD,tD];let e=.5===t?mA:mP(t);return[e,mj(t)]}clone(){return new mT(this.options)}}let mC=t=>new mT(t);mC.props={};class mN extends mT{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:t6,tickMethod:eu,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new mN(this.options)}}let mL=t=>new mN(t);mL.props={};class mI extends tK{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!t9(t))return this.options.unknown;let e=tJ(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new mI(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let mR=t=>new mI(t);mR.props={};class mD extends mI{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:vR}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){!n&&t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new mD(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1,i=e[0];return n(i,e[r],t)}}let mF=t=>new mD(t);mF.props={};class mz extends mI{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:vR}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=ei(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new mz(this.options)}}let mB=t=>new mz(t);mB.props={};let mW=t=>e=>{let n=t(e);return tT(n)?Math.round(n):n},m$=ju=class extends ec{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:tD,tickMethod:eu,tickCount:5}}constructor(t){super(t)}clone(){return new ju(this.options)}};m$=ju=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([(PX=function(t){return[t(0),t(1)]},PK=t=>{let[e,n]=t;return tQ(t3(0,1),tZ(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=PX(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=PK(n.map(t)),a=i?mW(r):r;this.output=tQ(a,o,e,t)},t.prototype.invert=void 0})],m$);let mG=t=>new m$(t);mG.props={};class mV extends tK{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:eu}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return tT(r)&&tT(i)?t(r,i,n):[]}clone(){return new mV(this.options)}}let mH=t=>new mV(t);function mU({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:p,category10:h,category20:d,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:h,category20:d,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:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth: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,strokeWidth: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:e,gridStrokeOpacity:p,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,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"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",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:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[o,o],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,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:s,tickStroke:e,tickStrokeOpacity:c},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,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:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,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:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}mH.props={};let mq=mU({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}),mY=t=>nB({},mq,t);mY.props={};let mX=t=>nB({},mY(),{category10:"category10",category20:"category20"},t);mX.props={};let mK=mU({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",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}),mZ=t=>nB({},mK,{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"}}}},t),mQ=t=>Object.assign({},mZ(),{category10:"category10",category20:"category20"},t);mQ.props={};let mJ=mU({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}),m0=t=>nB({},mJ,{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,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},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}},t);m0.props={};var m1=function(t){return null==t};function m2(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=tU(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){var r;if("boolean"!=typeof(r=t)&&"enter"in r&&"update"in r&&"exit"in r)return!1===t[e]?[e,!1]:[e,tW(tW({},t[e]),n)];return[e,n]}))}function m5(t,e){t?t.finished.then(e):e()}function m3(t,e){"update"in t?t.update(e):t.attr(e)}function m4(t,e,n){return 0===e.length?null:n?t.animate(e,n):(m3(t,{style:e.slice(-1)[0]}),null)}function m6(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=tU(e,2),o=n[0],a=n[1];if(!m1(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?m4(t,[r,i],tW({fill:"both"},n)):(m3(t,i),null)}var m8=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&yM(a)?(!yM(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):yS(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},m9=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=tU(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},m7={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 fv({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",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:[]};m8({},m7,{style:{type:"arc"}}),m8({},m7,{style:{}});var bt=m9({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");function be(t,e){return[t[0]*e,t[1]*e]}function bn(t,e){return[t[0]+e[0],t[1]+e[1]]}function br(t,e){return[t[0]-e[0],t[1]-e[1]]}function bi(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function bo(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function ba(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function bl(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function bs(t){return t*Math.PI/180}function bu(t){return Number((180*t/Math.PI).toPrecision(5))}function bc(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function bf(t,e,n){void 0===n&&(n=!0);var r,i,o=e||(null===(i=t.match(/^([a-z][a-z0-9]+)/))||void 0===i?void 0:i[0])||"",a=t.replace(new RegExp("^(".concat(o,")")),"");return n?(r=a).toString().charAt(0).toLowerCase()+r.toString().slice(1):a}var bp=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function bh(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i,o=tU(t,2),a=o[0],l=o[1];if("className"===a||"class"===a);else if(bp(a,"show")&&bp(bf(a,"show"),e)!==n){;if(a===(i=e,"".concat("show").concat(bc(i))))r[a]=l;else r[a.replace(new RegExp(bc(e)),"")]=l}else if(!bp(a,"show")&&bp(a,e)!==n){var s=bf(a,e);"filter"===s&&"function"==typeof l||(r[s]=l)}}),r}function bd(t,e){return Object.entries(t).reduce(function(t,n){var r=tU(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(bc(i))]=o,t},{})}function by(t,e){void 0===e&&(e=["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(t).forEach(function(t){var o=tU(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function bg(t,e){return ym(t)?t.apply(void 0,tY([],tU(e),!1)):t}function bv(t,e){return!t.style.opacity&&(t.style.opacity=1),m6(t,{opacity:0},e)}var bm=["$el","anchor","cx","cy","d","defX","defY","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 bb(t){var e,n={};for(var r in t){;if(e=r,bm.includes(e))n[r]=t[r]}return n}var bx=m9({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function bO(t){return t.reduce(function(t,e,n){return t.push(tY([0===n?"M":"L"],tU(e),!1)),t},[])}function bw(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return bO(t);if(!i)return[];var o=ba(t[0],i),a=n?0:1;return t.reduce(function(t,e,n){return 0===n?t.push(tY(["M"],tU(e),!1)):t.push(tY(["A",o,o,0,0,a],tU(e),!1)),t},[])}(t,e,n):bO(t)}var bE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l,s,u,c,f,p=t$(t,["type","center","areaFill","closed"]);var h=(i=void 0===(r=(n=t).data)?[]:r,n.closed?i.map(function(t){var e=t.points,n=tU(e,1)[0];return tW(tW({},t),{points:tY(tY([],tU(e),!1),[n],!1)})}):i),d=yR(e).maybeAppendByClassName(bx.lineGroup,"g"),y=yR(e).maybeAppendByClassName(bx.regionGroup,"g");var g=(o=d,a=h,l=t,s=p,u=l.animate,c=l.isBillboard,f=a.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:bw(t.points,l)}}),o.selectAll(bx.line.class).data(f,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=bg(bb(tW({path:t.path},s)),[t,e,f]);this.attr(tW({class:bx.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:c},n))})},function(t){return t.transition(function(t,e){return m6(this,bg(bb(tW({path:t.path},s)),[t,e,f]),u.update)})},function(t){return t.transition(function(){var t=this,e=bv(this,u.exit);return m5(e,function(){return t.remove()}),e})}).transitions()),v=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],l=[],s=0;s<e.length-1;s++){var u=tU([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],l=tU([bw(t,n),bw(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=tU([t[0],e.slice(-1)[0]],2),f=c[0],p=c[1],h=function(t,e){return[s,t,u,e,a].flat()};if("line"===i||"surround"===r)return h([tY(["L"],tU(p),!1)],[tY(["L"],tU(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=tU([ba(p,o),ba(f,o)],2),y=d[0],g=d[1];return h([tY(["A",y,y,0,0,1],tU(p),!1),tY(["L"],tU(p),!1)],[tY(["A",g,g,0,0,0],tU(f),!1),tY(["L"],tU(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(bx.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=bg(t,[t,e,l]);this.attr(n)}).attr("className",bx.region.name)},function(t){return t.transition(function(t,e){return m6(this,bg(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=bv(this,r.exit);return m5(e,function(){return t.remove()}),e})}).transitions()}(y,h,t);return tY(tY([],tU(g),!1),tU(v),!1)},e}(yC),bk=function(t,e,n){for(var r=0,i=yW(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function bM(t,e){var n,r,i,o,a,l,s,u,c,f;if("number"==typeof t&&"number"==typeof e){;return n=t,r=e,function(t){return n*(1-t)+r*t}}if(Array.isArray(t)&&Array.isArray(e)){;return i=t,a=(o=e)?o.length:0,l=i?Math.min(a,i.length):0,function(t){var e=Array(l),n=Array(a),r=0;for(r=0;r<l;++r)e[r]=bM(i[r],o[r]);for(;r<a;++r)n[r]=o[r];for(r=0;r<l;++r)n[r]=e[r](t);return n}}if("object"==typeof t&&"object"==typeof e){;return void 0===(s=t)&&(s={}),void 0===(u=e)&&(u={}),c={},f={},Object.entries(u).forEach(function(t){var e=tU(t,2),n=e[0],r=e[1];n in s?c[n]=bM(s[n],r):f[n]=r}),function(t){return Object.entries(c).forEach(function(e){var n=tU(e,2),r=n[0],i=n[1];return f[r]=i(t)}),f}}return function(e){return t}}var bS=function(t){return yk(t,"Number")};function b_(t){return"function"==typeof t?t():yW(t)||bS(t)?new yL({style:{text:String(t)}}):t}function bP(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&t.scale(i),i}function bj(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)!r.includes(i)&&(n[i]=t[i]);return n}function bA(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=tU(t,2);return[n[0],bg(n[1],e)]}))}function bT(t,e){return e&&ym(e)?t.filter(e):t}function bC(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function bN(t,e){if("linear"===e.type){var n=tU(e.startPos,2),r=n[0],i=n[1],o=tU(e.endPos,2),a=tU([o[0]-r,o[1]-i],2);return bl([a[0],a[1]])}var l=bs(bC(t,e));return[-Math.sin(l),Math.cos(l)]}function bL(t,e,n){var r;return r=bN(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function bI(t,e){return bL(t,e.labelDirection,e)}function bR(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y;if("linear"===e.type){;return n=t,o=(i=tU((r=e).startPos,2))[0],a=i[1],l=tU(r.endPos,2),s=tU([l[0]-o,l[1]-a],2),[o+s[0]*n,a+s[1]*n]}return u=t,f=(c=e).radius,h=(p=tU(c.center,2))[0],d=p[1],[h+f*Math.cos(y=bs(bC(u,c))),d+f*Math.sin(y)]}function bD(t){return 0===bN(0,t)[1]}function bF(t){return 0===bN(0,t)[0]}function bz(t,e){return e-t==360}function bB(t,e,n,r,i){var o=e-t,a=tU([i,i],2),l=a[0],s=a[1],u=tU([bs(t),bs(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=tU(p(c),2),d=h[0],y=h[1],g=tU(p(f),2),v=g[0],m=g[1];if(e-t==360){var b=tU(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,b[0],b[1]],["A",l,s,0,1,0,v,m]]}var x=o>180?1:0,O=t>e?0:1;return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(x,",").concat(O,",").concat(v,",").concat(m)}function bW(t){var e=tU(t,2),n=tU(e[0],2),r=n[0],i=n[1],o=tU(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function b$(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function bG(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var bV=function(t,e,n){if(void 0===n&&(n=128),!ym(t))throw TypeError("Expected a function");var r=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var l=t.apply(this,n);return a.set(o,l),l};return r.cache=function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n),r}(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return jf?jf(t,n):(!jc&&(jc=c5.offscreenCanvasCreator.getOrCreateContext(void 0)),jc.font=[o,a,i,"".concat(n,"px"),r].join(" "),jc.measureText(t).width)},function(t,e){return[t,Object.values(e||bH(t)).join()].join("")},4096),bH=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function bU(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function bq(t,e){var n=bU(t);n&&n.attr(e)}function bY(t,e,n){void 0===n&&(n="..."),bq(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function bX(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l,s,u,c;return"translate(".concat((i=t,o=n,a=r,s=(l=i.getBBox()).width,u=l.height,[(c=tU([o,a].map(function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?s:u):t}),2))[0],c[1]]),")")});t.attr("transform",n)}catch(t){}}var bK=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function bZ(t){if(bS(t))return[t,t,t,t];if(yS(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var bQ=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*a+u,s*r+l*a+c],[l*o-s*a+u,s*o+l*a+c],[l*r-s*i+u,s*r+l*i+c],[l*o-s*i+u,s*o+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function bJ(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=tU(r.min,2),o=i[0],a=i[1],l=tU(r.max,2),s=l[0],u=l[1],c=b0(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=bU(t);if(v){p-=1.5;var m=v.style.textAlign,b=v.style.textBaseline;"center"===m?y=(o+s)/2:("right"===m||"end"===m)&&(y=s),"middle"===b?g=(a+u)/2:"bottom"===b&&(g=u)}var x=tU(bZ(e),4),O=x[0],w=void 0===O?0:O,E=x[1],k=void 0===E?0:E,M=x[2],S=x[3],_=new bQ((h+=o)-(void 0===S?k:S),(d+=a)-w,h+f+k,d+p+(void 0===M?w:M));return t.setEulerAngles(n),_.rotatedPoints(bs(n),y,g)}function b0(t){return t.__bbox__?t.__bbox__:t.getBBox()}function b1(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function b2(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function b5(t,e,n){var r,i,o=e.crossPadding,a=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,l=tU(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=tU(bZ(e),4),d=h[0],y=h[1],g=h[2];return new bQ(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=tU(t.startPos,2),m=v[0],b=v[1],x=tU(t.endPos,2),O=x[0],w=x[1],E=tU(bF(t)?[-e,0,e,0]:[0,e,0,-e],4),k=E[0],M=E[1],S=E[2],_=E[3],P=be(bI(0,t),i),j=new bQ(m,b,O,w);return j.x1+=_,j.y1+=k,j.x2+=M+P[0],j.y2+=S+P[1],j}(e,o);try{for(var u=tH(t),c=u.next();!c.done;c=u.next()){var f,p,h=c.value;if(!function(t){if(s){var e,n,r,i,o,a,l,u,c;return e=s,n=t,i=e.x1,o=e.x2,a=e.y1,l=e.y2,u=bJ(n,void 0),c=[[i,a],[o,a],[o,l],[i,l]],u.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,o=0;do{var a=[t[o],t[(o+1)%n]];if(function(t,e){var n=b2(t[0],t[1],e[0]),r=b2(t[0],t[1],e[1]),i=b2(e[0],e[1],t[0]),o=b2(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&b1(t,e[0])||0===r&&b1(t,e[1])||0===i&&b1(e,t[0])||0===o&&b1(e,t[1]))||!1}(a,r)){if(0===b2(a[0],e,a[1]))return b1(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(c,t)})}return!0}(h))a.add(h);else{;if(l&&(f=l,p=h,f?function(t,e,n){var r,i,o=bJ(t,n).flat(1),a=bJ(e,n).flat(1),l=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var s=tH(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return function(t,e){var n=tU(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=tU(e,4),s=l[0],u=l[1],c=l[2],f=l[3],p=o-r,h=a-i,d=c-s,y=f-u,g=p*y-d*h;if(0===g)return!1;var v=g>0,m=r-s,b=i-u,x=p*b-h*m;if(x<0===v)return!1;var O=d*b-y*m;return O<0!==v&&x>g!==v&&O>g!==v&&!0}(e,t)})}(a,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f,p,bZ(n)):0))a.add(l),a.add(h);else l=h}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(a)}function b3(t,e){return(void 0===e&&(e={}),m1(t))?0:"number"==typeof t?t:Math.floor(bV(t,e))}function b4(t){var e=t.getLocalBounds(),n=tU([e.min,e.max],2),r=tU(n[0],2),i=r[0],o=r[1],a=tU(n[1],2),l=a[0],s=a[1];return{x:i,y:o,width:l-i,height:s-o,left:i,bottom:s,top:o,right:l}}function b6(t,e){var n=tU(t,2),r=n[0],i=n[1],o=tU(e,2),a=o[0],l=o[1];return r!==a&&i===l}var b8={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(yx(t),!1)})}},b9=new Map([["hide",function(t,e,n,r){var i,o,a=t.length,l=e.keepHeader,s=e.keepTail;if(!(a<=1)&&(2!==a||!l||!s)){var u=b8.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,tY([1],tU(t.map(function(t){return b0(t).width})),!1));if("linear"===n.type&&(bD(n)||bF(n))){var y=b4(t[0]).left,g=Math.abs(b4(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&b5((o?tY(tY([o],tU(h),!1),[i],!1):tY([i],tU(h),!1)).filter(bK),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=tH(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),b5(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,p=bH(r.getTextShape(t[0])),h=b3(void 0===u?" ":u,p),d=a?b3(a,p):h,y=b3(s,p);(m1(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return b0(t).width})));var g=t.slice(),v=tU(f,4);v[0],v[1],v[2],v[3];for(var m=function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=b5(t,n,f)).length<1)return{value:void 0}},b=y;b>d+h;b-=h){var x=m(b);if("object"==typeof x)return x.value}}}],["wrap",function(t,e,n,r){var i,o,a,l=e.wordWrapWidth,s=void 0===l?50:l,u=e.maxLines,c=void 0===u?3:u,f=e.recoverWhenFailed,p=e.margin,h=void 0===p?[0,0,0,0]:p,d=t.map(function(t){return t.attr("maxLines")||1}),y=Math.min.apply(Math,tY([],tU(d),!1));var g=(o=(i=n).type,a=i.labelDirection,"linear"===o&&bD(i)?"negative"===a?"bottom":"top":"middle"),v=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,s,i,g)})};if(!(y>c)){for(var m=y;m<=c;m++)if(v(m),b5(t,n,h).length<1)return;(void 0===f||f)&&v(d)}}]]);function b7(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function xt(t,e){var n=tU(t,2),r=n[0],i=n[1],o=tU(e,2),a=o[0],l=o[1],s=tU([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function xe(t,e,n){var r=n.type,i=n.labelAlign,o=bI(t,n),a=b7(e),l=b7(bu(xt([1,0],o))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===a?(s="center",u=1===o[1]?"top":"bottom"):!(l%180)&&[90,270].includes(a)?s="center":0===l?bG(a,0,90,!1,!0)?s="start":(bG(a,0,90)||bG(a,270,360))&&(s="start"):90===l?bG(a,0,90,!1,!0)?s="start":(bG(a,90,180)||bG(a,270,360))&&(s="end"):270===l?bG(a,0,90,!1,!0)?s="end":(bG(a,90,180)||bG(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(bG(a,0,90)||bG(a,270,360))&&(s="end")):"parallel"===i?u=bG(l,0,180,!0)?"top":"bottom":"horizontal"===i?bG(l,90,270,!1)?s="end":(bG(l,270,360,!1)||bG(l,0,90))&&(s="start"):"perpendicular"===i&&(s=bG(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function xn(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=bg(l,[t,s,e]),c=tU([bI(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(a,o)],2),f=tU(bn(be(c[0],u+(1===c[1]?bg(r?i:0,[t,s,e]):0)),bR(t.value,n)),2);return{x:f[0],y:f[1]}}function xr(t,e){"text"===t.nodeName&&t.attr(e)}function xi(t){var e,n,r,i,o;e=this.node().childNodes,n=t,r={hide:yx,show:yb,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=xe(e.__data__.value,t,n),i=e.querySelector(bt.labelItem.class);i&&xr(i,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&bY(t,e||1/0,n)},wrap:function(t,e,n){var r,i,o,a;t&&(r=t,i=e,void 0===(o=n)&&(o=2),void 0===a&&(a="top"),bq(r,{wordWrap:!0,wordWrapWidth:i,maxLines:o,textBaseline:a}))},getTextShape:function(t){return t.querySelector("text")}},!(o=void 0===(i=n.labelOverlap)?[]:i).length||o.forEach(function(t){var i,o,a,l=t.type,s=b9.get(l);if(i=e,o=n,a=l,!(o.labelOverlap.length<1)&&("hide"===a?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(i[0]):"rotate"===a?!i.some(function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))}):"ellipsis"!==a&&"wrap"!==a||i.filter(function(t){return t.querySelector("text")}).length>1))null==s||s(e,t,n,r)})}function xo(t,e,n,r,i){var o,a,l,s,u,c=n.indexOf(e);var f=yR(t).append((o=e,a=c,l=n,ym(u=(s=i).labelFormatter)?function(){return b_(bg(u,[o,a,l,bI(o.value,s)]))}:function(){return b_(o.label||"")})).attr("className",bt.labelItem.name).node(),p=tU(by(bA(r,[e,c,n])),2),h=p[0],d=p[1],y=d.transform,g=t$(d,["transform"]);bX(t,y);var v=function(t,e,n){var r,i,o=n.labelAlign;if(null===(i=e.style.transform)||void 0===i?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=bI(t.value,n),s=bN(t.value,n);if("horizontal"===o)return 0;return!bG(r=(bu(a="perpendicular"===o?xt([1,0],l):xt([s[0]<0?-1:1,0],s))+360)%180,-90,90)&&(r+=180),r}(e,t,i);return t.setLocalEulerAngles(+v),xr(f,tW(tW({},xe(e.value,v,i)),h)),bX(t,y),t.attr(g),f}function xa(t,e){return bL(t,e.tickDirection,e)}function xl(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G=(a=yR(this),l=t,s=e,u=n,f=(c=r).tickFormatter,p=xa(l.value,c),h="line",ym(f)&&(h=function(){return bg(f,[l,s,u,p])}),a.append(h).attr("className",bt.tickItem.name));d=t,y=e,g=n,v=G,m=this,b=r,x=i,O=xa(d.value,b),R=(I=(w=d,E=y,k=g,M=O,S=b.tickLength,A=tU((_=M,P=bg(S,[w,E,k]),[[0,0],[(j=tU(_,2))[0]*P,j[1]*P]]),2),C=(T=tU(A[0],2))[0],N=T[1],{x1:C,x2:(L=tU(A[1],2))[0],y1:N,y2:L[1]})).x1,D=I.x2,F=I.y1,z=I.y2,W=(B=tU(by(bA(x,[d,y,g,O])),2))[0],$=B[1],"line"===v.node().nodeName&&v.styles(tW({x1:R,x2:D,y1:F,y2:z},W)),m.attr($),v.styles(W);var V=tU(bR(t.value,r),2);return m6(this,{x:V[0],y:V[1]},o)}var xs=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.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}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}(),xu=m9({text:"text"},"title");function xc(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function xf(t,e){var n=Object.entries(e).reduce(function(e,n){var r=tU(n,2),i=r[0],o=r[1];return!t.node().attr(i)&&(e[i]=o),e},{});t.styles(n)}var xp=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return tB(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(xu.text.class);if(!a)return new xs(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=tU(bZ(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=tU([0,0,+e,+n],4),g=y[0],v=y[1],m=y[2],b=y[3],x=xc(r);if(x.includes("i"))return new xs(g,v,m,b);x.forEach(function(t,r){var i,o;"t"===t&&(v=(i=tU(0===r?[u+h,+n-u-h]:[0,+n],2))[0],b=i[1]),"r"===t&&(m=tU([+e-s-d],1)[0]),"b"===t&&(b=tU([+n-u-f],1)[0]),"l"===t&&(g=(o=tU(0===r?[s+p,+e-s-p]:[0,+e],2))[0],m=o[1])});var O=tU(bZ(o),4),w=O[0],E=O[1],k=O[2],M=O[3],S=tU([M+E,w+k],2),_=S[0],P=S[1];return new xs(g+M,v+w,m-_,b-P)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new xs(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=this;t.width,t.height,t.position,t.spacing;var m=t$(t,["width","height","position","spacing"]),b=tU(by(m),1)[0];var x=(l=(n=t).width,s=n.height,u=n.position,c=tU([+l/2,+s/2],2),p=(f=tU([+c[0],+c[1],"center","middle"],4))[0],h=f[1],d=f[2],y=f[3],(g=xc(u)).includes("l")&&(p=(r=tU([0,"start"],2))[0],d=r[1]),g.includes("r")&&(p=(i=tU([+l,"end"],2))[0],d=i[1]),g.includes("t")&&(h=(o=tU([0,"top"],2))[0],y=o[1]),g.includes("b")&&(h=(a=tU([+s,"bottom"],2))[0],y=a[1]),{x:p,y:h,textAlign:d,textBaseline:y}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;yN(!!m.text,yR(e),function(t){v.title=t.maybeAppendByClassName(xu.text,"text").styles(b).call(xf,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(yC);function xh(t,e,n,r,i){var o=tU(by(bh(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=t$(l,["transform"]);t.styles(a),e.styles(u);var c=s||function(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(i/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(i/2,")")}return""}(t.node(),a.direction,a.position);bX(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=xc(i),l=t.node().getLocalBounds(),s=tU(l.min,2),u=s[0],c=s[1],f=tU(l.halfExtents,2),p=f[0],h=f[1],d=tU(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=tU([u+p,c+h],2),m=v[0],b=v[1],x=tU(bZ(o),4),O=x[0],w=x[1],E=x[2],k=x[3];if(["start","end"].includes(i)&&"linear"===n.type){var M=n.startPos,S=n.endPos,_=tU("start"===i?[M,S]:[S,M],2),P=_[0],j=_[1],A=tU(be(bl([-j[0]+P[0],-j[1]+P[1]]),O),2),T=A[0],C=A[1];return{x:P[0]+T,y:P[1]+C}}return a.includes("t")&&(b-=h+g+O),a.includes("r")&&(m+=p+y+w),a.includes("l")&&(m-=p+2*y+k),a.includes("b")&&(b+=h+2*g+E),{x:m,y:b}}(yR(n._offscreen||n.querySelector(bt.mainGroup.class)),e,r),p=f.x,h=f.y,d=m6(e.node(),{x:p,y:h},i);return bX(t.node(),c),d}function xd(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=yN(i,e.maybeAppendByClassName(bt.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u,c,f,p=e.type,h=bh(e,"line");if("linear"===p)f=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S=e.showTrunc,_=e.startPos,P=e.endPos,j=e.truncRange,A=e.lineExtension,T=tU([_,P],2),C=tU(T[0],2),N=C[0],L=C[1],I=tU(T[1],2),R=I[0],D=I[1];var F=tU(A?(i=_,o=P,void 0===(a=A)&&(a=[0,0]),l=tU([i,o,a],3),u=(s=tU(l[0],2))[0],c=s[1],p=(f=tU(l[1],2))[0],h=f[1],y=(d=tU(l[2],2))[0],g=d[1],m=(v=tU([p-u,h-c],2))[0],w=(O=tU([-y/(x=Math.sqrt(Math.pow(m,2)+Math.pow(b=v[1],2))),g/x],2))[0],[w*m,w*b,(E=O[1])*m,E*b]):[,,,,].fill(0),4),z=F[0],B=F[1],W=F[2],$=F[3],G=function(e){return t.selectAll(bt.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(bt.line.name," ").concat(t.className)}).styles(n).transition(function(t){return m6(this,bW(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return m6(this,bW(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!S||!j)return G([{line:[[N+z,L+B],[R+W,D+$]],className:bt.line.name}]);var V=tU(j,2),H=V[0],U=V[1],q=R-N,Y=D-L,X=tU([N+q*H,L+Y*H],2),K=X[0],Z=X[1],Q=tU([N+q*U,L+Y*U],2),J=Q[0],tt=Q[1],te=G([{line:[[N+z,L+B],[K,Z]],className:bt.lineFirst.name},{line:[[J,tt],[R+W,D+$]],className:bt.lineSecond.name}]);return k=0,(M=e).truncRange,M.truncShape,M.lineExtension,te}(t,e,bj(h,"arrow"),n);else{;r=t,i=e,o=bj(h,"arrow"),a=n,l=i.startAngle,s=i.endAngle,u=i.center,c=i.radius,f=r.selectAll(bt.line.class).data([{path:bB.apply(void 0,tY(tY([l,s],tU(u),!1),[c],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",bt.line.name).styles(i).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,n,r,i,o,f=this;var p=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=bM(e,n),a=Array(Math.ceil(+(void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:o(e/(n.length-1))}});return t.animate(a,tW({fill:"both"},r))}(this,(t=this,n=(e=t.attributes).startAngle,r=e.endAngle,i=e.center,o=e.radius,tY(tY([n,r],tU(i),!1),[o],!1)),tY(tY([l,s],tU(u),!1),[c],!1),a.update);if(p){var h=function(){var t=bk(f.attributes,"__keyframe_data__");f.style.path=bB.apply(void 0,tY([],tU(t),!1))};p.onframe=h,p.onfinish=h}return p}).styles(i)},function(t){return t.remove()}).styles(o).transitions()}return!function(t,e,n,r){var i,o,a=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(o="arc"===e?t.select(bt.line.class):l?t.select(bt.lineSecond.class):t.select(bt.line.class),!a||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=o.node();f&&(f.style.markerEnd=void 0);return}var p=b_(s);p.attr(r),bP(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,p,e,h),f}(e,t,r)})||[],s=yN(o,e.maybeAppendByClassName(bt.tickGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=bT(o,a.tickFilter),u=bh(a,"tick"),i.selectAll(bt.tick.class).data(s,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",bt.tick.name).transition(function(t,e){return xl.call(this,t,e,s,a,u,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),xl.call(this,t,e,s,a,u,l.update)})},function(t){return t.transition(function(){var t=this,e=bv(this.childNodes[0],l.exit);return m5(e,function(){return t.remove()}),e})}).transitions()})||[],u=yN(a,e.maybeAppendByClassName(bt.labelGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=bT(o,a.labelFilter),u=bh(a,"label"),i.selectAll(bt.label.class).data(s,function(t,e){return e}).join(function(t){return t.append("g").attr("className",bt.label.name).transition(function(t){return xo(this,t,o,u,a),this.attr(xn(t,o,a)),this.__bbox__=t.bbox,null}).call(function(){return xi.call(i,a)})},function(t){return t.transition(function(t){var e=function(t,e,n,r){if(void 0===r&&(r="destroy"),i=t,o=e,"text"===i.nodeName&&"text"===o.nodeName&&i.attributes.text===o.attributes.text)return t.remove(),[null];var i,o,a=function(){"destroy"===r?t.destroy():"hide"===r&&yx(t),e.isVisible()&&yb(e)};if(!n)return a(),[null];var l=n.duration,s=void 0===l?0:l,u=n.delay,c=void 0===u?0:u,f=Math.ceil(+s/2),p=+s/4,h=function(t){if("circle"===t.nodeName){var e=tU(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},d=tU(h(t),2),y=d[0],g=d[1],v=tU(h(e),2),m=tU([(y+v[0])/2-y,(g+v[1])/2-g],2),b=m[0],x=m[1],O=t.style.opacity,w=e.style.opacity,E=t.animate([{opacity:void 0===O?1:O,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(x,")")}],tW(tW({fill:"both"},n),{duration:c+f+p})),k=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-x,")"),offset:.01},{opacity:void 0===w?1:w,transform:"translate(0, 0)"}],tW(tW({fill:"both"},n),{duration:f+p,delay:c+f-p}));return m5(k,a),[E,k]}(this.querySelector(bt.labelItem.class),xo(this,t,o,u,a),l.update),n=m6(this,xn(t,o,a),l.update);return this.__bbox__=t.bbox,tY(tY([],tU(e),!1),[n],!1)}).call(function(t){var e,n;e=bk(t,"_transitions").flat().filter(bK),n=function(){return xi.call(i,a)},0===e.length?n():Promise.all(e.map(function(t){return null==t?void 0:t.finished})).then(n)})},function(t){return t.transition(function(){var t=this,e=bv(this.childNodes[0],l.exit);return m5(e,function(){return yR(t).remove()}),e})}).transitions()})||[];return tY(tY(tY([],tU(l),!1),tU(s),!1),tU(u),!1).filter(function(t){return!!t})}var xy=function(t){function e(e){return t.call(this,e,m7)||this}return tB(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=(function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r})(o,u).filter(function(t){var e=t.value;return(!c||!(e>c[0])||!(e<c[1]))&&!0}),p=m2(void 0===n?a:n),h=yN(s,yR(e).maybeAppendByClassName(bt.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u,c,h,d,y,g,v;return n=e,r=f,i=t,o=p,l=(a=bh(i,"grid")).type,s=a.areaFill,u=b$(i),c=bT(r,i.gridFilter),g="segment"===l?(h=c,y=(d=i).gridLength,h.map(function(t,e){var n,r=t.value,i=tU(bR(r,d),2),o=i[0],a=i[1];var l=tU(be(bL(r,(n=d).gridDirection,n),y),2);return{id:e,points:[[o,a],[o+l[0],a+l[1]]]}})):function(t,e){var n=e.gridControlAngles,r=b$(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=tU(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=tU(bR(t.value,e),2),l=tU([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=bs(t),n=tU([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+o,s*i+u*r+a])}),{points:c,id:r}})}(c,i),v=tW(tW({},a),{center:u,areaFill:ym(s)?c.map(function(t,e){return bg(s,[t,e,c])}):s,animate:o,data:g}),n.selectAll(bt.grid.class).data([1]).join(function(t){return t.append(function(){return new bE({style:v})}).attr("className",bt.grid.name)},function(t){return t.transition(function(){return this.update(v)})},function(t){return t.remove()}).transitions()})||[],d=yR(e).maybeAppendByClassName(bt.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&xd(t,yR(this.offscreenGroup),f,m2(!1));var y=xd(t,yR(d.node()),f,p),g=yN(l,yR(e).maybeAppendByClassName(bt.titleGroup,"g"),function(e){var n,i,o,a,l;return n=e,i=r,o=t,a=p,l=o.titleText,n.selectAll(bt.title.class).data([{title:l}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(t){return t.append(function(){return b_(l)}).attr("className",bt.title.name).transition(function(){return xh(yR(this),n,i,o,a.enter)})},function(t){return t.transition(function(){return xh(yR(this),n,i,o,a.update)})},function(t){return t.remove()}).transitions()})||[];return tY(tY(tY([],tU(h),!1),tU(y),!1),tU(g),!1).flat().filter(function(t){return!!t})},e}(yC),xg=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},xv=function(t,e){if(!!t){if(nD(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(xg(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},xm=function(t,e,n){if(!nD(t)&&!nz(t))return t;var r=n;return xv(t,function(t,n){r=e(r,t,n)}),r},xb=function(t,e){return xm(t,function(t,n,r){return!e.includes(r)&&(t[r]=n),t},{})};function xx(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var xO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xw(t){var e;if(!(e=xO.exec(t)))throw Error("invalid format: "+t);return new xE({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function xE(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}xw.prototype=xE.prototype,xE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function xk(t,e){var n=xx(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}var xM={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>xk(100*t,e),r:xk,s:function(t,e){var n=xx(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(jp=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+Array(1-o).join("0")+xx(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function xS(t){return t}var x_=Array.prototype.map,xP=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];(function(t){jd=(jh=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?xS:(e=x_.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));){;l=e[a=(a+1)%e.length]}return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?xS:(r=x_.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=xw(t)).fill,n=t.align,r=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):!xM[m]&&(void 0===g&&(g=12),v=!0,m="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===p?a:/[%p]/.test(m)?u:"",O=xM[m],w=/[defgprs%]/.test(m);function E(t){var o,a,u,p=b,E=x;if("c"===m)E=O(t)+E,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:O(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==r&&(k=!1),p=(k?"("===r?r:c:"-"===r||"("===r?"":r)+p,E=("s"===m?xP[8+jp/3]:"")+E+(k&&"("===r?")":""),w){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){E=(46===u?l+t.slice(o+1):t.slice(o))+E,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var M=p.length+t.length+E.length,S=M<d?Array(d-M+1).join(e):"";switch(y&&h&&(t=i(S+t,S.length?d-E.length:1/0),S=""),n){case"<":t=p+t+E+S;break;case"=":t=p+S+t+E;break;case"^":t=S.slice(0,M=S.length>>1)+p+t+E+S.slice(M);break;default:t=S+p+t+E}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return t+""},E}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=xw(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=xx(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=xP[8+i/3];return function(t){return r(o*t)+a}}}}(t)).format,jh.formatPrefix})({thousands:",",grouping:[3],currency:["$",""]});function xj(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],l=a.x,s=a.y,u=tU([l+a.width,s+a.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new xs(e,n,r-e,i-n)}var xA=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===a,p="row"===a||"column"===a,h=f?p?[1,0]:[-1,0]:p?[0,1]:[0,-1],d=tU([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=tU([y,g],2),o=i[0],a=i[1];return y=(e=tU([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new xs(o,a,n,r)}),m=xj(v),b={"flex-start":0,"flex-end":f?r-m.width:i-m.height,center:f?(r-m.width)/2:(i-m.height)/2},x=v.map(function(t){var e=t.x,n=t.y,r=xs.fromRect(t);return r.x=f?e+b[s]:e,r.y=f?n:n+b[s],r});xj(x);var O=function(t){var e=tU(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}};return x.map(function(t){var e=t.x,n=t.y,r=xs.fromRect(t);return r.x=f?e:e+O(r),r.y=f?n+O(r):n,r}).map(function(e){var n,r,i=xs.fromRect(e);return i.x+=null!==(n=t.x)&&void 0!==n?n:0,i.y+=null!==(r=t.y)&&void 0!==r?r:0,i})},xT=function(t,e,n){return[]},xC=function(t,e,n){if(0===e.length)return[];var r={flex:xA,grid:xT},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},xN=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[jo.BOUNDS_CHANGED,jo.INSERTED,jo.REMOVED],n.$margin=bZ(0),n.$padding=bZ(0);var r=e.style||{},i=r.margin,o=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===o?0:o,n.isMutationObserved=!0,n.bindEvents(),n}return tB(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=bZ(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=bZ(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,o=tU(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new xs((void 0===e?0:e)-u,(void 0===n?0:n)-a,r+u+l,i+a+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=tU(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=tU(this.$margin,4),u=s[0];return new xs(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(!!this.attributes.display&&!!this.isConnected){if(!this.children.some(function(t){return!t.isConnected}))try{var t=xC(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(e,n){var r=t[n],i=r.x,o=r.y;e.attr({x:i,y:o})})}catch(t){}}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target.isMutationObserved=!0,t.layout()})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(fh),xL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xI(t,e,n){return t.querySelector(e)?pV(t).select(e):pV(t).append(n)}function xR(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function xD(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},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 t in o&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class xF extends xN{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n)}}class xz extends xF{update(t){var e;let{subOptions:n}=t;this.attr(t),null===(e=this.child)||void 0===e||e.update(n)}}function xB(t,e){var n;return null===(n=t.filter(t=>t.getOptions().name===e))||void 0===n?void 0:n[0]}function xW(t,e,n){let{bbox:r}=t,{position:i="top",size:o,length:a}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,p=o||c||s,h=a||f||u,[d,y]=l?[h,p]:[p,h];return{orientation:l?"horizontal":"vertical",width:d,height:y,size:p,length:h}}function x$(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=xL(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${eh(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var xG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xV(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function xH(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function xU(t,e,n,r,i,o,a,l){var s;(void 0!==n||void 0!==o)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=p5(e,t=>+t),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),p=r||(null===(s=t.getFormatter)||void 0===s?void 0:s.call(t))||f,h=function(t,e){if(oe(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:o,insetLeft:a,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,o,r]:[a,l,n],f=new ec({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(a,l),d=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!oo(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new ec({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new ec({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return oe(l)||ot(l)?c.map((e,n,r)=>{var i,o;let s=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:on(l)&&"center"===a||ot(l)&&(null===(o=t.getTicks)||void 0===o?void 0:o.call(t))&&y(a)||ot(l)&&g(a)?1-u:u,label:f(p(p1(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:g(a)?1-l:l,label:f(p(p1(e),n,r)),id:String(n)}})}let xq=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var o;let{scales:[a]}=i,l=(null===(o=a.getTicks)||void 0===o?void 0:o.call(a))||a.getOptions().domain,s="string"==typeof n?jd(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},xY=xq(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:p,tickMethod:h,transform:d,indexBBox:y}=t,g=xG(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:m,theme:b})=>{var x,O,w,E;let{bbox:k}=v,[M]=i,{domain:S,xScale:_}=M.getOptions(),P=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${nV(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${eh(s)}`]||{})}(t,0,n,0,i,0);if("center"===i){var l;return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(l=o)||l===-Math.PI/2?10:0,tick:"center"!==r&&void 0})}return a}(M,m,b,e,l,o)),u),g),j=function(t,e,n="xy"){let[r,i,o]=xH(e);if("xy"===n)return t.includes("bottom")||t.includes("top")?i:r;if("xz"===n)return t.includes("bottom")||t.includes("top")?o:r;return t.includes("bottom")||t.includes("top")?i:o}(a||l,m,t.plane),A=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+l,a]};if("left"===t)return{startPos:[o+l,a+s],endPos:[o+l,a]};if("right"===t)return{startPos:[o,a+s],endPos:[o,a]};if("top"===t)return{startPos:[o,a+s],endPos:[o+l,a+s]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+s]};if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=ol(r),[f,p]=os(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[m,b]=[t+o-d,n+a-y],[x,O]=[Math.cos(e),Math.sin(e)],w=oe(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[m+v*x,b+v*O],endPos:[m+g*x,b+g*O],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[m,b],gridControlAngles:Array(w).fill(0).map((t,e,n)=>(p-f)/w*e)}}}return{}}(l,o,k,m,_),T=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(m),C=xU(M,S,f,r,p,h,l,m),N=y?C.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):C;let L=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),{type:"linear",data:N,crossSize:s,titleText:xR(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],l=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}(d,P),grid:(x=P.grid,O=m,w=M,!(oe(E=O)&&ot(E)||oi(O))&&(void 0===x?!!w.getTicks:x)),gridLength:j,line:!0,indexBBox:y}),P.line?null:{lineOpacity:0}),A),T),n);return L.labelOverlap.find(t=>"hide"===t.type)&&(L.crossSize=!1),new xy({className:"axis",style:x$(L)})}}),xX=xq(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:l,tickMethod:s,important:u={},style:c={},indexBBox:f,title:p,grid:h=!1}=t,d=xG(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:c}=e,{domain:y}=t.getOptions(),g=xU(t,y,l,o,a,s,r,n),v=f?g.map((t,e)=>{let n=f.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):g,[m,b]=ol(n),x=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=e,u=[o+l/2,a+s/2],c=Math.min(l,s)/2,[f,p]=os(i),[h,d]=xH(i),y={center:u,radius:c,startAngle:f,endAngle:p,gridLength:Math.min(h,d)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,c,m,b,n),{axis:O,axisArc:w={}}=i;return new xy({style:xb(x$(nB({},O,w,x,Object.assign(Object.assign({type:"arc",data:v,titleText:xR(p),grid:h},d),u))),["transform"])})}});xY.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},xX.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let xK=t=>(...e)=>{let n=xY(Object.assign({},{crossPadding:50},t))(...e);return xV(n,t),n};xK.props=Object.assign(Object.assign({},xY.props),{defaultPosition:"bottom"});let xZ=t=>(...e)=>{let n=xY(Object.assign({},{crossPadding:10},t))(...e);return xV(n,t),n};xZ.props=Object.assign(Object.assign({},xY.props),{defaultPosition:"left"});var xQ=function(){},xJ=function(t,e,n){var r=t,i=yW(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(!yB(r[t])&&(r[t]=bS(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},x0=function(t,e,n){return t<e?e:t>n?n:t},x1=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,!n&&t.apply(i,o)},e),a&&t.apply(i,o)}},x2=m9({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"),x5=function(t){function e(e){var n,r,i,o=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,0-(i=6)],["L",(n=0)+i,r=0],["L",n-i,r+i],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return o.playState="idle",o.contentGroup=o.appendChild(new fh({class:x2.contentGroup.name})),o.playWindow=o.contentGroup.appendChild(new fh({class:x2.playWindow.name})),o.innerCurrPage=o.defaultPage,o}return tB(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return x0(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t,e,n=tU(((null===(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])||void 0===e?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,tY([],tU(t),!1))}),2),r=n[0],i=n[1],o=this.attributes,a=o.pageWidth,l=o.pageHeight;return{pageWidth:void 0===a?r:a,pageHeight:void 0===l?i:l}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,l=o.pageHeight;return new xs(n,r,a+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,o=this.playWindow,a=this.pageViews;if("idle"!==i||t<0||a.length<=0||t>=a.length)return null;a[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=tU(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=m4(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return m5(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:x0(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:x0(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(x2.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?yb(e):yx(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,o=r.controllerPadding,a=n.getBBox(),l=a.width;a.height;var s=tU("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),p=f.width,h=f.height,d=e.getBBox(),y=d.width,g=d.height,v=Math.max(p,l,y),m="horizontal"===i?{offset:[[0,0],[p/2+o,0],[p+l+2*o,0]],textAlign:"start"}:{offset:[[v/2,-h-o],[v/2,0],[v/2,g+o]],textAlign:"center"},b=tU(m.offset,3),x=tU(b[0],2),O=x[0],w=x[1],E=tU(b[1],2),k=E[0],M=E[1],S=tU(b[2],2),_=S[0],P=S[1],j=m.textAlign,A=n.querySelector("text");A&&(A.style.textAlign=j),t.setLocalPosition(O,w),n.setLocalPosition(k,M),e.setLocalPosition(_,P)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;!(n.length<2)&&(null===(t=this.pageInfoGroup.querySelector(x2.pageInfo.class))||void 0===t||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=tU(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,l=t.maybeAppendByClassName(x2.controller,"g");if(yO(l.node(),a),a){var s=bh(this.attributes,"button"),u=bh(this.attributes,"pageNum"),c=tU(by(s),2),f=c[0],p=c[1],h=f.size,d=t$(f,["size"]),y=!l.select(x2.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(x2.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(x2.prevBtn,"path"),m=l.maybeAppendByClassName(x2.nextBtnGroup,"g").styles(p);this.nextBtnGroup=m.node(),[v,m.maybeAppendByClassName(x2.nextBtn,"path")].forEach(function(t){t.styles(tW(tW({},d),{transformOrigin:"center"})),bP(t.node(),h,!0)});var b=l.maybeAppendByClassName(x2.pageInfoGroup,"g");this.pageInfoGroup=b.node(),b.maybeAppendByClassName(x2.pageInfo,"text").styles(u),this.updatePageInfo(),l.node().setLocalPosition(i+n,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=yR(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=x1(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(jo.INSERTED,e),this.playWindow.addEventListener(jo.REMOVED,e)},e}(yC);y$.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),y$.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]}),y$.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]});function x3(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var x4=m9({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"),x6=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new fc({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return tB(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,r=t.node().getBBox(),i=r.width,o=r.height,a=e.node().getBBox();return{markerWidth:n,labelWidth:i,valueWidth:a.width,height:Math.max(n,o,a.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=tU(bZ(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.height,l=this.actualSpace,s=l.labelWidth,u=l.valueWidth,c=tU(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=tU(this.span,2);s=(t=tU([d[0]*h,d[1]*h],2))[0],u=t[1]}return{width:o+s+u+f+p,height:a,markerWidth:o,labelWidth:s,valueWidth:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var e=tU(bZ(t),2),n=e[0],r=e[1];return this.showValue?[n,r]:[n,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,o=t.height,a=tU(this.spacing,2),l=a[0];return{height:o,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+l,e+n+l+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(x4.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,o=void 0===i?e.strokeWidth:i,a=n.markerLineWidth,l=void 0===a?e.lineWidth:a,s=n.markerStroke,u=void 0===s?e.stroke:s,c=+(o||l||(u?1:0))*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=bh(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(x4.markerGroup,"g").style("zIndex",0),yN(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(x4.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=tH(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=tU(a.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(i,o),yR(i).styles(r)):(i.remove(),yR(o).attr("className",x4.marker.name).styles(r),t.appendChild(o)):(yR(o).attr("className",x4.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),bP(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=bh(this.attributes,"label"),n=e.text,r=t$(e,["text"]);this.labelGroup=t.maybeAppendByClassName(x4.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(x4.label,function(){return b_(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=bh(this.attributes,"value"),r=n.text,i=t$(n,["text"]);this.valueGroup=t.maybeAppendByClassName(x4.valueGroup,"g").style("zIndex",0),yN(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(x4.value,function(){return b_(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=bh(this.attributes,"background");this.background=t.maybeAppendByClassName(x4.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(x4.background,"rect").styles(tW({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=tU(t.position,3),o=i[0],a=i[1],l=i[2],s=r/2;this.markerGroup.styles({x:o,y:s}),this.labelGroup.styles({x:a,y:s}),bY(this.labelGroup.select(x4.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),bY(this.valueGroup.select(x4.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=yR(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(yC),x8=m9({page:"item-page",navigator:"navigator",item:"item"},"items"),x9=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},x7=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:xQ,mouseenter:xQ,mouseleave:xQ})||this;return n.navigatorShape=[0,0],n}return tB(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=bh(this.attributes,"item");return e.map(function(t,i){var o=t.id,a=void 0===o?i:o,l=t.label,s=t.value;return{id:"".concat(a),index:i,style:tW({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=tU(n,2);return[r[0],bg(r[1],[t,i,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=tU(this.navigatorShape,1)[0],l=tU(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var p,h,d=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var m=tU(v,2),b=m[0],x=m[1],O=(r-a-(u-1)*o)/u,w=e.getBBox().height,E=tU([0,0],2),k=E[0],M=E[1];return"horizontal"===n?(k=(p=tU([f,b*(w+i)],2))[0],M=p[1],f=x===u-1?0:f+O+o):(k=(h=tU([x*(O+o),f],2))[0],M=h[1],f=b===s-1?0:f+w+i),{page:d,index:l,row:b,col:x,pageIndex:y,width:O,height:w,x:k,y:M}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=tU(this.navigatorShape,1)[0],a=tU(this.grid,2),l=a[0],s=a[1],u=tU([e-o,n],2),c=u[0],f=u[1],p=tU([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],m=p[5],b=p[6],x=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),O=p.width,w=p.height,E=0===b?0:i,k=b+E+O;return k<=c&&x9(v,function(t){return t<s})?(h=(n=tU([b+E,x,k],3))[0],d=n[1],b=n[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(m=(o=tU([m+1,0,0,x+w+r],4))[0],v=o[1],b=o[2],(x=o[3])+w<=f&&x9(m,function(t){return t<l}))?(h=(a=tU([b,x,O],3))[0],d=a[1],b=a[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(h=(u=tU([0,0,O,0,y+1,0,0,0],8))[0],d=u[1],b=u[2],x=u[3],y=u[4],g=u[5],m=u[6],v=u[7],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return x3(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(x8.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(x8.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);yR(t).selectAll(x8.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new x6({style:t.style})}).attr("className",x8.item.name).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,o=tU(this.navigatorShape,2),a=o[0],l=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this;var r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=tU(t,2);return{page:e[0],layouts:e[1]}}),i=tY([],tU(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new fh({className:x8.page.name}));e.forEach(function(t){var e=t.x,n=t.y,o=t.index,a=t.width,l=t.height,s=i[o];r.appendChild(s),xJ(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=yP({orientation:this.attributes.orientation},bh(this.attributes,"nav")),n=this;return t.selectAll(x8.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new x5({style:e})}).attr("className",x8.navigator.name).each(function(){n.navigator=this})},function(t){return t.each(function(){this.update(e)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(yR(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new cI(t,{detail:e});this.dispatchEvent(n)},e}(yC),Ot=m9({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Oe={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},On=function(t){function e(e){return t.call(this,e,Oe)||this}return tB(e,t),e.prototype.render=function(t,e){var n=yR(e).maybeAppendByClassName(Ot.markerGroup,"g");this.renderMarker(n);var r=yR(e).maybeAppendByClassName(Ot.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?x3(r,"horizontalHandle","verticalHandle"):i;yN(!!o,t,function(t){var n=bh(e.attributes,"marker"),r=tW({symbol:o},n);e.marker=t.maybeAppendByClassName(Ot.marker,function(){return new y$({style:r})}).update(r)})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,l=n.formatter;yN(r,t,function(t){var n,r=bh(e.attributes,"label"),o=r.text,s=t$(r,["text"]),u=(null===(n=t.select(Ot.marker.class))||void 0===n?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=tU(x3(i,[0,(void 0===f?0:f)+a,"center","top"],[(void 0===c?0:c)+a,0,"start","middle"]),4),h=p[0],d=p[1],y=p[2],g=p[3];t.maybeAppendByClassName(Ot.label,"text").styles(tW(tW({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(yC),Or={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Oi=yP({},Or,{}),Oo=yP({},Or,bd(Oe,"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"}),Oa=m9({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"),Ol=function(t){function e(e){return t.call(this,e,Oi)||this}return tB(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=tU(by(bh(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(Oa.titleGroup,"g").styles(s);var u=tW(tW({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(Oa.title,function(){return new xp({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=tU(by(bh(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=tW(tW({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(Oa.itemsGroup,"g").styles(tW({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(Oa.items.class).data(["items"]).join(function(t){return t.append(function(){return new x7({style:u})}).attr("className",Oa.items.name).each(function(){c.items=yR(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().setLocalPosition(e,n)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new xs(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),i=null===(n=this.items)||void 0===n?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,l=t.getBBox(),s=e.getBBox(),u=xc(r),c=tU(bZ(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=tU(bZ(o),4),g=y[0],v=y[1],m=y[2],b=y[3],x=tU([d+p,f+h],2),O=x[0],w=x[1],E=tU([b+v,g+m],2),k=E[0],M=E[1];if("l"===u[0])return new xs(l.x,l.y,s.width+l.width+O+k,Math.max(s.height+M,l.height));if("t"===u[0])return new xs(l.x,l.y,Math.max(s.width+k,l.width),s.height+l.height+w+M);var S=tU([e.attributes.width||s.width,e.attributes.height||s.height],2),_=S[0],P=S[1];return new xs(s.x,s.y,_+l.width+O+k,P+l.height+w+M)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=yR(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(yC),Os=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function Ou(t){if(Os(t))return t[t.length-1]}var Oc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Of=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=Oc(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=c;return e=>{let{value:r,theme:i}=e,{bbox:a}=r,{width:u,height:p}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:o}=xW(t,e,n);return{width:i,height:o}}(r,t,Of),h=xD(o,n),d=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:u,height:p,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==f&&{gridRow:f}),{titleText:xR(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=xB(t,"size");return n instanceof vD?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=xB(t,"shape"),r=xB(t,"color"),i=n?n.clone():null,o=[];for(let[t,n]of e){let e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var o;return i?i.map(e||"point"):(null===(o=null==t?void 0:t.style)||void 0===o?void 0:o.shape)||n.defaultShape||"point"});"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length||!n)return o[0];let{range:a}=n.getOptions();return o.map(([t,e])=>{let n=0;for(let t=0;t<o.length;t++){let r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,a;let l=(null===(a=null===(i=null===(n=r[`mark.${o}`])||void 0===n?void 0:n.props)||void 0===i?void 0:i.shape[t])||void 0===a?void 0:a.props.defaultMarker)||Ou(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,strokeWidth:i,path:o,stroke:a,lineWidth:l,color:s}=e,u=dP(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=d2.get(t)||d2.get("point");return(...t)=>new fv({style:Object.assign(Object.assign({},u),{path:c(...t),stroke:c.style.includes("stroke")?s||a:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?l||l||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${a[t]}`;return xB(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=xB(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?jd(n):n,s=xB(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=x$(Object.assign({},y,d,c)),v=new xz({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new Ol({className:"legend-category",style:g})),v}};Of.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Op={}.toString,Oh=function(t,e){return Op.call(t)==="[object "+e+"]"},Od=function(t){return Array.isArray?Array.isArray(t):Oh(t,"Array")},Oy=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},Og=function(t,e){if(!!t){if(Od(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(Oy(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},Ov=function(t){return Oh(t,"Function")},Om=Array.prototype;Om.splice,Om.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var Ob=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return Og(t,function(n,r){!(Ov(t)&&"prototype"===r)&&e.push(n)}),e},Ox=function(t){if(!("object"==typeof(e=t)&&null!==e)||!Oh(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},OO=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&Ox(a)?(!Ox(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):Od(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var Ow=function(t){return t};!function(t,e){if(!Ov(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!jg&&(jg=document.createElement("canvas").getContext("2d")),jg.font=[o,a,i,n+"px",r].join(" "),jg.measureText(Oh(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),tq([t],Ob(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class OE{constructor(t){this.options=OO({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=OO({},this.options,t),this.rescale(t)}rescale(t){}}function Ok(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function OM(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function OS(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function O_(t){let e=t1().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=OS(a,o,e+1/3),s=OS(a,o,e);return[255*l,255*s,255*OS(a,o,e-1/3),i]}(r):null}let OP=(t,e)=>n=>t*(1-n)+e*n,Oj=(t,e)=>{let n=O_(t),r=O_(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},OA=(t,e)=>"number"==typeof t&&"number"==typeof e?OP(t,e):"string"==typeof t&&"string"==typeof e?Oj(t,e):()=>t,OT=(t,e)=>{let n=OP(t,e);return t=>Math.round(n(t))};function OC(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let ON=Math.sqrt(50),OL=Math.sqrt(10),OI=Math.sqrt(2);function OR(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=ON?10:o>=OL?5:o>=OI?2:1)*10**i:-(10**-i)/(o>=ON?10:o>=OL?5:o>=OI?2:1)}let OD=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=OR(l,s,n))>0?r=OR(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=OR(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},OF=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=Ok(o,a),i=n(l,s)):(r=Ok(a,o),i=n(s,l)),OM(i,r)},Oz=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=Ok(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,1,r)-1,a=i[n];return OM(o[n],a)(e)}},OB=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?Oz:OF)(t,e,r?OT:n)};class OW extends OE{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:OP,tickCount:5}}map(t){return OC(t)?this.output(t):this.options.unknown}invert(t){return OC(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return OD}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):Ow}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=OB(n.map(t),r,o,i);this.output=OM(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=OB(i,r.map(t),OP);this.input=OM(e,n,o)}}let O$=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=OR(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class OG extends OW{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:OA,tickMethod:O$,tickCount:5}}chooseTransforms(){return[Ow,Ow]}clone(){return new OG(this.options)}}function OV(t,e){return+t.toPrecision(e)}function OH(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var OU={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Oq=m9({background:"background",labelGroup:"label-group",label:"label"},"indicator"),OY=function(t){function e(e){var n=t.call(this,e,OU)||this;return n.point=[0,0],n.group=n.appendChild(new fh({})),n.isMutationObserved=!0,n}return tB(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=tU(bZ(t.padding),4),r=n[0],i=n[1],o=n[2],a=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new xs(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=bh(this.attributes,"background");this.background=yR(this.group).maybeAppendByClassName(Oq.background,"path").styles(tW(tW({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=tU(by(bh(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,t$(i,["text"]));this.label=yR(this.group).maybeAppendByClassName(Oq.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(Oq.label,function(){return b_(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=tU(this.point,2),e=t[0],n=t[1];this.group.attr("x",-e).attr("y",-n)},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,l=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,tY([s+1,1],tU(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=b6.apply(void 0,tY([],tU(t),!1)),r=tU(t,2),i=tU(r[0],2),o=i[0],a=i[1],l=tU(r[1],2),s=l[0],u=l[1],c=tU(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=tU(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,m=g*Math.sqrt(3)/2*.8,b=tU([h,h+y-v,h+y,h+y+v,d],5),x=b[0],O=b[1],w=b[2],E=b[3],k=b[4];return n?(this.point=[w,a-m],[["L",x,a],["L",O,a],["L",w,a-m],["L",E,a],["L",k,a]]):(this.point=[o+m,w],[["L",o,x],["L",o,O],["L",o+m,w],["L",o,E],["L",o,k]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?yx(this):yb(this)},e.prototype.bindEvents=function(){this.label.on(jo.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(yC),OX={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},OK={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},OZ={orientation:"horizontal",showLabel:!0,type:"start"},OQ=m9({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),OJ=m9({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),O0=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tB(e,t),e.prototype.render=function(t,e){var n=t.size,r=void 0===n?10:n,i=t.radius,o=t.orientation,a=t$(t,["size","radius","orientation"]),l=2.4*r,s=yR(e).maybeAppendByClassName(OJ.iconRect,"rect").styles(tW(tW({},a),{width:r,height:l,radius:void 0===i?r/4:i,x:-r/2,y:-l/2})),u=1/3*r,c=2/3*r,f=1/4*l,p=3/4*l;s.maybeAppendByClassName("".concat(OJ.iconLine,"-1"),"line").styles(tW({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(OJ.iconLine,"-2"),"line").styles(tW({x1:c,x2:c,y1:f,y2:p},a)),s.node().setOrigin(r/2,l/2),"vertical"===o?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},e}(yC),O1=function(t){function e(e){return t.call(this,e,OZ)||this}return tB(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=bh(this.attributes,"label"),i=r.transform,o=tU(by(t$(r,["transform"]),[]),2),a=o[0],l=o[1],s=yR(t).maybeAppendByClassName(OJ.labelGroup,"g").styles(l),u=tW(tW({},OK),a),c=u.text,f=t$(u,["text"]);yN(!!n,s,function(t){e.label=t.maybeAppendByClassName(OJ.label,"text").styles(tW(tW({},f),{transform:i,text:"".concat(c)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.orientation,r=e.type,i=tW(tW({orientation:n},OX),bh(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new O0({style:i})}:o;yR(t).maybeAppendByClassName(OJ.iconGroup,"g").selectAll(OJ.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",OJ.icon.name)},function(t){return t.update(i)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(yC);function O2(t,e){var n=tU(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var O5=m9({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function O3(t){var e=t.orientation,n=t.size,r=t.length;return x3(e,[r,n],[n,r])}function O4(t){var e=t.type,n=tU(O3(t),2),r=n[0],i=n[1];return"size"===e?[["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"]]}var O6=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return tB(e,t),e.prototype.render=function(t,e){!function(t,e){var n=bh(e,"track");t.maybeAppendByClassName(O5.track,"path").styles(tW({path:O4(e)},n))}(yR(e).maybeAppendByClassName(O5.trackGroup,"g"),t),!function(t,e){var n=bh(e,"selection"),r=function(t){var e,n,r,i,o,a,l=t.orientation,s=t.color,u=t.block,c=t.partition,f=(a=ym(s)?Array(20).fill(0).map(function(t,e,n){return s(e/(n.length-1))}):s).length,p=a.map(function(t){return sW(t).toString()});if(!f)return"";if(1===f)return p[0];if(u){;return e=c,n=p,r=l,i=Array.from(n),Array(o=e.length).fill(0).reduce(function(t,n,r){var a=i[r%i.length];return t+" ".concat(e[r],":").concat(a).concat(r<o-1?" ".concat(e[r+1],":").concat(a):"")},"l(".concat("horizontal"===r?"0":"270",")"))}return p.reduce(function(t,e,n){return t+" ".concat(n/(f-1),":").concat(e)},"l(".concat(x3(l,"0","270"),")"))}(e),i=t.maybeAppendByClassName(O5.selection,"path").styles(tW({path:O4(e),fill:r},n)),o=i.maybeAppendByClassName(O5.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=tU(O3(t),2),i=r[0],o=r[1],a=tU(n,2),l=a[0],s=a[1],u=x3(e,l*i,0),c=x3(e,0,l*o),f=x3(e,s*i,i),p=x3(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(e)}).node();i.style("clip-path",o)}(yR(e).maybeAppendByClassName(O5.selectionGroup,"g"),t)},e}(yC),O8=function(t){function e(e){var n=t.call(this,e,Oo)||this;return n.eventToOffsetScale=new OG({}),n.innerRibbonScale=new OG({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=O2(r.map(function(t){return t.value}),o).range;n.showIndicator((a[0]+a[1])/2,"".concat(a[0],"-").concat(a[1])),n.dispatchIndicated(o,a)}else{var l=n.getTickValue(o);n.showIndicator(l),n.dispatchIndicated(l)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=tU(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),l=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==l&&(n.prevValue=a,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return tB(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new xs(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(yR(e));var i=this.availableSpace,o=i.x,a=i.y,l=yR(e).maybeAppendByClassName(Oa.contentGroup,"g").styles({x:o,y:a});yN(!!r,l.maybeAppendByClassName(Oa.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(Oa.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Oa.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(s),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t,e=this.attributes,n=e.data,r=e.domain;return r?{min:r[0],max:r[1]}:(t=n,{min:Math.min.apply(Math,tY([],tU(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,tY([],tU(t.map(function(t){return t.value})),!1))})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=tU(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=tU(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return x3(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=bh(this.attributes,"title"),l=tW(tW({},a),{width:i,height:o,text:r}),s=this;t.selectAll(Oa.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new xp({style:l})}).attr("className",Oa.title.name).each(function(){s.title=this})},function(t){return t.update(l)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new xs(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,n=t.labelDirection;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[e][n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new xs(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null===(t=this.label.querySelector(bt.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new xs(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,o=r.height,a=this.ifHorizontal(o,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,o);return{width:i,height:o,size:a,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,l=a.size,s=a.length,u=tU(this.ifHorizontal([o,i],[i,o]),2),c=u[0],f=u[1],p=e?this.handleShape:{size:0,length:0},h=p.size,d=p.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n?n:["bottom","right"].includes(v)?Math.min(c-l,(c-h)/y):c*(1-y)>h?Math.max(c-l,0):Math.max((c-l-h)/y,0);var m=Math.max(d,s),b=f-m,x=tU(this.ifHorizontal([b,g],[g,b]),2),O=x[0],w=x[1],E=["top","left"].includes(v)?l:0,k=tU(this.ifHorizontal([m/2,E],[E,m/2]),2);return new xs(k[0],k[1],O,w)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,l=bh(this.attributes,"ribbon"),s=this.range,u=s.min,c=s.max,f=this.ribbonBBox,p=f.x,h=f.y,d=this.ribbonShape,y=yP({x:p,y:h,length:d.length,size:d.size,type:r,orientation:i,color:o,block:a,partition:n.map(function(t){return(t.value-u)/(c-u)}),range:this.ribbonRange},l);this.ribbon=t.maybeAppendByClassName(Oa.ribbon,function(){return new O6({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(Oa.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=bh(this.attributes,"handle"),i=tU(this.selection,2),o=i[0],a=i[1],l=tW(tW({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?On:O1,c=this;this.handlesGroup.selectAll(Oa.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:l})}).attr("className",function(t){var e=t.type;return"".concat(Oa.handle," ").concat(c.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),c["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",c.onDragStart(e))})},function(t){return t.update(l).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;c["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=tU(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},e.prototype.adjustTitle=function(){var t=this.attributes,e=t.titlePosition,n=t.orientation,r=tU(this.getElementsByClassName(Oa.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!!r&&!!i){if("top-left"===e&&"horizontal"===n){var o=tU(i.getLocalBounds().min,1)[0],a=tU(r.getLocalBounds().min,1)[0];r.style.x=+(this.style.x||0)+(o-a)}}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new xs(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=tU([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new xs(0,0,o,a),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=tU(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,l=this.getOffset(e),s=tU(this.ifHorizontal([i+l,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({x:u,y:c,formatter:n})},e.prototype.renderIndicator=function(t){var e=bh(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(Oa.indicator,function(){return new OY({})}).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var o,a,l=null!==(o=null==n?void 0:n.id)&&void 0!==o?o:r.toString();if(e.push(tW(tW({},n),{id:l,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=tU([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(tW(tW({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(p)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=tU(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,o=bh(this.attributes,"tick"),a=bh(this.attributes,"label"),l=a.align,s=yP(tW({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),bd(o,"tick"),bd(a,"label"),{data:this.labelData}),u=tW(tW(tW({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(Oa.label,function(){return new xy({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,l=this.labelFixedSpacing,s=tU([0,0,0],3),u=s[0],c=s[1],f=s[2],p=null!=i?i:o;if(e){f=p;"positive"===n?"right"===a?(u=p,f=p):"bottom"===a&&(u=f):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))}else"positive"===n?"right"===a||"bottom"===a&&(u=o+l):n;return{offset:u,spacing:r,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,l=o.spacing,s=o.tickLength,u=tU(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!1)}},e.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)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t){this.hideIndicator();return}var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=x0(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+a,l],[a,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),yb(this.indicator.node())},e.prototype.hideIndicator=function(){yx(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i=tU(this.selection,2),o=i[0],a=i[1],l=tU([t,e],2),s=l[0],u=l[1];n&&(s+=o,u+=a);var c=this.range;s=(r=tU(function(t,e,n,r){void 0===r&&(r=4);var i,o=tU(t,2),a=o[0],l=o[1],s=tU(e,2),u=s[0],c=s[1],f=tU(n,2),p=f[0],h=f[1],d=tU([u,c],2),y=d[0],g=d[1],v=g-y;if(y>g&&(y=(i=tU([g,y],2))[0],g=i[1]),v>l-a)return[a,l];if(y<a)return p===a&&h===g?[a,g]:[a,v+a];if(g>l)return h===l&&p===y?[y,l]:[l-v,l];return[y,g]}([c.min,c.max],[s,u],this.selection),2))[0],u=r[1],this.update({defaultValue:[s,u]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return void 0===e?OV((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r,i,o=this.attributes,a=o.data,l=o.block,s=this.range.min;if(l)return O2(a.map(function(t){return t.value}),t).tick;return e=t,n=this.step,i=Math.round((e-(r=s))/n),r+i*n},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=tU(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,tY([],tU(OH(t)),!1));return x0(this.getOffset(u-s,!0),r,i)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return(a.update({domain:[r,i],range:[0,o]}),e)?a.invert(t):a.map(t)},e.prototype.dispatchSelection=function(){var t=new cI("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new cI("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(yC),O9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function O7(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],p6(e)];return[n,r]}let wt=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=O9(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:u})=>{let{bbox:c}=i,{x:p,y:h,width:d,height:y}=c,g=xD(o,n),{legendContinuous:v={}}=a,m=x$(Object.assign({},v,Object.assign(Object.assign({titleText:xR(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>jd(e)(t.label):e},function(t,e,n,r,i,o){let a=xB(t,"color"),l=function(t,e,n){let{size:r}=e,i=xW(t,e,n);return function(t,e,n){var r;if(t.size=e,"horizontal"===(r=n)||0===r)t.height=e;else t.width=e;return t}(i,r,i.orientation)}(n,r,i);if(a instanceof mI){let{range:t}=a.getOptions(),[e,n]=O7(a);return a instanceof mz||a instanceof mD?function(t,e,n,r,i){var o;let a=e.thresholds;let l=(o=r,t=>({value:t/o,label:String(t)}));return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(l)})}(l,a,e,n,t):function(t,e,n){let r=[-1/0,...e.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(l,a,t)}let s=xB(t,"size");return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[sW(e).toString()]})),r}(l,s),[c,f]=O7(u),[p,h]=O7([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof mV)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,s,xB(t,"opacity"),e,o)}(r,u,i,t,wt,a)),s),f)),b=new xF({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:m})});return b.appendChild(new O8({className:"legend-continuous",style:m})),b}};wt.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let we=t=>()=>new fh;we.props={};var wn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wr(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}let wi=(PZ={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=wn(t,["width","title","subtitle","spacing","align"]),s=nY(l,"title"),u=nY(l,"subtitle"),c=xI(e,".title","text").attr("className","title").call(p9,Object.assign(Object.assign(Object.assign({},wr(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();xI(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},wr(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends ff{constructor(t){super(t),this.descriptor=PZ}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(nB({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}}),wo=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new wi({style:nB({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function wa({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}wo.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};function wl(t){return"object"==typeof t?t.valueOf():t}class ws extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=wl,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(wa({map:this.map,initKey:this.initKey},t))}has(t){return super.has(wa({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let wu=Symbol("defaultUnknown");function wc(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function wf(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==wu)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function wp(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class wh extends OE{getDefaultOptions(){return{domain:[],range:[],unknown:wu}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&wc(this.domainIndexMap,this.getDomain(),this.domainKey),wf({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&wc(this.rangeIndexMap,this.getRange(),this.rangeKey),wf({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=wp(e),this.rangeKey=wp(n),!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 wh(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class wd extends wh{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:wu,flex:[]}}constructor(t){super(t)}clone(){return new wd(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new ws(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new ws(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var wy=function(t){if("object"!=typeof t||null===t)return t;if(yS(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=wy(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=wy(t[i]):e[i]=t[i];return e},wg=function(t){function e(e){var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,m8({},{type:"column"},tW({style:r},i)))||this).columnsGroup=new fh({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return tB(e,t),e.prototype.render=function(){var t=this.attributes.columns;yR(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(yP({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(fs),wv=function(t){function e(e){var n=this,r=e.style,i=t$(e,["style"]);return(n=t.call(this,m8({},{type:"lines"},tW({style:r},i)))||this).linesGroup=n.appendChild(new fh),n.areasGroup=n.appendChild(new fh),n.render(),n}return tB(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas;e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(yP({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){yR(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){yR(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(fs),wm=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},wb=function(t,e){if(t===e)return!0;if(!t||!e||yW(t)||yW(e))return!1;if(wm(t)||wm(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=wb(t[r],e[r]));r++);return n}if(yw(t)||yw(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=wb(t[i[r]],e[i[r]]));r++);return n}return!1};function wx(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return tY([e===n?"M":"L"],tU(t),!1)});return e?r.reverse():r}function wO(t,e){if(void 0===e&&(e=!1),t.length<=2)return wx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];!wb(o,n.slice(-2))&&n.push.apply(n,tY([],tU(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=tU(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=bi(p,g),h=bo(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n){if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][n?0:1]],a=t[n?(d+1)%v:d+1];var m=[0,0];m=be(m=br(a,o),.4);var b=ba(g,o),x=ba(g,a),O=b+x;0!==O&&(b/=O,x/=O);var w=be(m,-b),E=be(m,x);s=bn(g,w),l=bi(l=bn(g,E),bo(a,g)),w=be(w=br(l=bo(l,bi(a,g)),g),-b/x),s=bi(s=bn(g,w),bo(o,g)),s=bo(s,bi(o,g)),E=be(E=br(g,s),x/b),l=bn(g,E),f&&(s=bi(s=bo(s,p),h),l=bi(l=bo(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s)}else u=g}return n&&c.push(c.shift()),c}(l,.4,a,n),f=l.length,p=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],o=l[s+1],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]]);return a&&(r=c[f],i=c[f+1],o=tU(l,1)[0],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]])),p}(n,!1);return e?a.unshift(tY(["M"],tU(t[r-1]),!1)):a.unshift(tY(["M"],tU(t[0]),!1)),a}function ww(t,e,n){var r=wy(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var wE=function(t){if(!!yS(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},wk=function(t,e){if(!!yS(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=ym(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},wM=function(t){if(!!yS(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},wS=function(t,e){if(!!yS(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=ym(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function w_(t){return 0===t.length?[0,0]:[wE(wk(t,function(t){return wE(t)||0})),wM(wS(t,function(t){return wM(t)||0}))]}function wP(t){for(var e=wy(t),n=e[0].length,r=tU([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1){for(var l=e[a],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=o[s],o[s]=l[s])}return e}var wj=function(t){function e(e){return t.call(this,e,{type:"line",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 tB(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=wy(t);return bS(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?wP(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=tU(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var o=bh(this.attributes,"area"),a=bh(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=u.x,f=u.y;var p=(d=s,v=(y={type:"line",x:c,y:f}).x,x=(b=tU((m=y.y).getOptions().range||[0,0],2))[0],(O=b[1])>x&&(O=(g=tU([x,O],2))[0],x=g[1]),d.map(function(t){return t.map(function(t,e){return[v.map(e),x0(m.map(t),O,x)]})})),h=[];if(o){var d,y,g,v,m,b,x,O,w,E,k,M,S=this.baseline;if(r)h=i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=wO(o),l=void 0;if(0===i)l=ww(a,e,n);else{var s=wO(t[i-1],!0),u=o[0];s[0][0]="L",l=tY(tY(tY([],tU(a),!1),tU(s),!1),[tY(["M"],tU(u),!1),["Z"]],!1)}r.push(l)}return r}(p,l,S):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=wx(t[i]),a=void 0;if(0===i)a=ww(o,e,n);else{var l=wx(t[i-1],!0);l[0][0]="L",a=tY(tY(tY([],tU(o),!1),tU(l),!1),[["Z"]],!1)}r.push(a)}return r}(p,l,S);else{;w=p,E=i,k=l,M=S,h=w.map(function(t){return ww(E?wO(t):wx(t),k,M)})}}return{lines:p.map(function(e,n){return tW({stroke:t.getColor(n),path:i?wO(e):wx(e)},a)}),areas:h.map(function(e,n){return tW({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=bh(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var a=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=wP(l));var s=this.createScales(l),u=s.x,c=s.y,f=tU(w_(l),2),p=f[0],h=new OG({domain:[0,f[1]-(p>0?0:p)],range:[0,a*o]}),d=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,o){var a=d/l.length;return tW(tW({fill:t.getColor(i)},e),r?{x:u.map(o),y:c.map(n),width:d,height:h.map(y[i][o])}:{x:u.map(o)+a*i,y:n>=0?c.map(n):c.map(0),width:a,height:h.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(r=".container",i="rect",(n=e).querySelector(r)?yR(n).select(r):yR(n).append(i)).attr("className","container").node();var n,r,i,o=t.type,a="spark".concat(o),l="line"===o?this.linesStyle:this.columnsStyle;yR(e).selectAll(".spark").data([o]).join(function(t){return t.append(function(t){return"line"===t?new wv({className:a,style:l}):new wg({className:a,style:l})}).attr("className","spark ".concat(a))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return yS(e)?e[t%e.length]:ym(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,l=void 0===a?[]:a,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,p=tU(w_(t),2),h=p[0],d=p[1],y=new OG({domain:[null!==(e=l[0])&&void 0!==e?e:h,null!==(n=l[1])&&void 0!==n?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new OG({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new wd({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(yC),wA=function(t){function e(e){var n=t.call(this,e,tW(tW(tW({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.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},bd(OZ,"handle")),bd(OX,"handleIcon")),bd(OK,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(OH(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),l=a.x,s=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(OH(t)),l=a-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],l=new cI("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(l),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return tB(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=bh(this.attributes,"sparkline");return tW(tW({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=tU(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=tU(bZ(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],i=t[3],o=this.shape;return{x:i,y:e,width:o.width-(i+n),height:o.height-(e+r)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(OQ.selection.class).each(function(n,r){m6(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&m6(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&m6(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=bh(this.attributes,"track");this.trackShape=yR(t).maybeAppendByClassName(OQ.track,"rect").styles(tW(tW({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=yR(t).maybeAppendByClassName(OQ.brushArea,"rect").styles(tW({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;yN("horizontal"===this.attributes.orientation,yR(t).maybeAppendByClassName(OQ.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(OQ.sparkline,function(){return new wj({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(OQ.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new O1({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(OQ.handle.name," ").concat(e,"-handle")),o["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(o.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;o["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.type,r=e.selectionType;this.foregroundGroup=yR(t).maybeAppendByClassName(OQ.foreground,"g");var i=bh(this.attributes,"selection"),o=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===r?"grab":"invert"===r?"crosshair":"default"}).styles(i)},a=this;this.foregroundGroup.selectAll(OQ.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:tW({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",OQ.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=yR(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),a.onDragStart("selection")(t)}),a.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),a.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),a.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",a.onDragStart("track"))})},function(t){return t.call(o)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=tU(this.range,2),i=r[0],o=r[1],a=tU(this.getValues().map(function(t){return OV(t,e)}),2),l=a[0],s=a[1],u=tU(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return OV(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,x0(f,i,o)];c>f&&(c=(n=tU([f,c],2))[0],f=n[1]);var p=f-c;if(p>o-i)return[i,o];if(c<i)return l===i&&s===f?[i,f]:[i,p+i];if(f>o)return s===o&&l===c?[c,o]:[o-p,o];return[c,f]},e.prototype.calcSelectionArea=function(t){var e=tU(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:a,height:s,x:o,width:n*l},{y:a,height:s,x:n*l+o,width:(r-n)*l},{y:a,height:s,x:r*l,width:(1-r)*l}],[{x:o,width:l,y:a,height:n*s},{x:o,width:l,y:n*s+a,height:(r-n)*s},{x:o,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,l=tU(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([o,a])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,o/2]),y:i+this.getOrientVal([a/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transform:"rotate(90)",textAlign:"start"}:"end"===t?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,l=bh(this.attributes,"handle"),s=bh(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new yL({style:tW(tW(tW({},s),this.inferTextStyle(t)),{text:p})}),d=h.getBBox(),y=d.width,g=d.height;if(h.destroy(),!a){if("value"===r)return{text:p,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:p})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var m=0,b=0,x=this.availableSpace,O=x.width,w=x.height,E=this.calcSelectionArea()[1],k=E.x,M=E.y,S=E.width,_=E.height,P=u+c;if("horizontal"===i){var j=P+y/2;m="start"===t?k-P-y>0?-j:j:O-k-S-P>y?j:-j}else{var A=g+P;b="start"===t?M-c>g?-A:P:w-(M+_)-c>g?A:-P}return{x:m,y:b,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=bh(this.attributes,"handleLabel");return tW(tW(tW({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=bh(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return tW({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,r=e.showLabelOnInteraction,i=e.orientation,o=this.calcHandlePosition(t),a=this.calcHandleText(t),l=n;return!n&&r&&(l=!!this.target||!1),tW(tW(tW(tW({},bd(this.getHandleIconStyle(),"icon")),bd(tW(tW({},this.getHandleLabelStyle(t)),a),"label")),o),{orientation:i,showLabel:l,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e?e:Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=tU(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this.attributes.type,i=tU(this.getValues(),2),o=i[0],a=i[1],l=[o+("range"===r?t:0),a+e].sort();n?this.setValues(l):this.innerSetValues(l,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new cI(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r,!0)}},e.tag="slider",e}(yC);function wT(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function wC(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wN(t){let e,n,r;function i(t,r,o=0,a=t.length){if(o<a){if(0!==e(r,r))return a;do{let e=o+a>>>1;0>n(t[e],r)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=wT,n=(e,n)=>wT(t(e),n),r=(e,n)=>t(e)-n):(e=t===wT||t===wC?t:wL,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){let a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{let e=i+o>>>1;0>=n(t[e],r)?i=e+1:o=e}while(i<o)}return i}}}function wL(){return 0}function wI(t){return null===t?NaN:+t}let wR=wN(wT),wD=wR.right,wF=wR.left,wz=wN(wI).center;function wB(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=w$(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>w$(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(wW(n))}function wW(t=wT){if(t===wT)return w$;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function w$(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function wG(t){return!!t.getBandWidth}function wV(t,e,n){var r;if(!wG(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep();let l=(r=wF(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function wH(t,e,n){if(!e)return t.getOptions().domain;if(!wG(t)){let r=wB(e);if(!n)return r;let[i]=r,{range:o}=t.getOptions(),[a,l]=o,s=t.invert(t.map(i)+(a>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){let t=o+Math.round(r.length*n);return r.slice(o,t)}let a=e[e.length-1],l=r.indexOf(a);return r.slice(o,l+1)}function wU(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[wV(a,n,e),wV(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1),f=wH(a,[u[0],c[0]]);return[f,wH(l,[u[1],c[1]])]}function wq(t,e){let n,[r,i]=t;return[e.map(r),e.map(i)+((n=e).getStep?n.getStep():0)]}var wY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let wX=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=wY(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:p}=u,{width:h,height:d}=p,{slider:y={}}=c,g=(null===(l=s.getFormatter)||void 0===l?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?jd(n):n,m="horizontal"===e,b=ot(f)&&m,{trackSize:x=y.trackSize}=i,[O,w]=function(t,e,n){let{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(p,o,x);return new wA({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:O,y:w,trackLength:m?h:d,orientation:e,formatter:t=>(v||g)(wV(s,b?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;return nD(t.sparklineData)?t.sparklineData:function(t,e){let[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:n,slider:r}=t;if((null==r?void 0:r.x)&&0===Object.keys(r.x).length)return Object.fromEntries(e.map(t=>{let e=n[t];return[t,e?e.value:void 0]}))});return(null==n?void 0:n.series)?Object.values(n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{})):null==n?void 0:n.y}(n,["y","series"])}(t,r)},i),a))})}};wX.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let wK=t=>wX(Object.assign(Object.assign({},t),{orientation:"horizontal"}));wK.props=Object.assign(Object.assign({},wX.props),{defaultPosition:"bottom"});let wZ=t=>wX(Object.assign(Object.assign({},t),{orientation:"vertical"}));wZ.props=Object.assign(Object.assign({},wX.props),{defaultPosition:"left"});var wQ=function(t){function e(e){var n=t.call(this,e,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new cI("scroll",r)),n.dispatchEvent(new cI("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=tU(n.getLocalPosition(),2),r=e[0],i=e[1],o=tU(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(OH(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new cI("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new cI("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new cI("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new cI("trackMouseleave",{detail:t.detail}))},n}return tB(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return bZ(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=tU(this.range,2);return x0(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=tU(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=tU(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+l[0]-(a+i),height:+l[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=tU(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,o=e.slidable,a=bh(this.attributes,"track"),l=bh(this.attributes,"thumb"),s=tW(tW({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},bd(a,"track")),bd(l,"selection"));this.slider=yR(t).maybeAppendByClassName("scrollbar",function(){return new wA({style:s})}).update(s).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=tU(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(x0(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.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)},e.tag="scrollbar",e}(yC),wJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let w0=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=wJ(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{let{bbox:a}=n,{x:l,y:s,width:u,height:c}=a,{scrollbar:f={}}=o,{ratio:p,range:h}=t.getOptions(),d="horizontal"===e?u:c,y=d/p,[g,v]=h;return new wQ({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:d,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:d}))})}};w0.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let w1=t=>w0(Object.assign(Object.assign({},t),{orientation:"horizontal"}));w1.props=Object.assign(Object.assign({},w0.props),{defaultPosition:"bottom"});let w2=t=>w0(Object.assign(Object.assign({},t),{orientation:"vertical"}));w2.props=Object.assign(Object.assign({},w0.props),{defaultPosition:"left"});let w5=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w3=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w4=(t,e)=>{let{coordinate:n}=e;return fu({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:jr.NUMBER}),(e,r,i)=>{let[o]=e;return oe(n)?(e=>{let{__data__:r,style:o}=e,{radius:a=0,inset:l=0,fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=o,{points:f,y:p,y1:h}=r,d=hn(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=i7().cornerRadius(a).padAngle(l*Math.PI/180),m=new fv({}),b=n.getCenter(),x=t=>{m.attr({d:v(t),transform:`translate(${b[0]}, ${b[1]})`});let e=uu(m);return m.style.transform="",e},O=e.animate([{scaleInYRadius:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:y+1e-4,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:u,opacity:c}],Object.assign(Object.assign({},i),t));return O.onframe=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},O.onfinish=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:g}))},O})(o):(e=>{let{style:r}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=r,[u,c]=ot(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return e.animate(f,Object.assign(Object.assign({},i),t))})(o)}},w6=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=ot(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},w8=(t,e)=>{fu({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:jr.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!oe(n))return w5(t,e)(r,i,o);let l=n.getCenter(),{__data__:s,style:u}=a,{radius:c=0,inset:f=0,fillOpacity:p=1,strokeOpacity:h=1,opacity:d=1}=u,{points:y,y:g,y1:v}=s,m=i7().cornerRadius(c).padAngle(f*Math.PI/180),b=hn(n,y,[g,v]),{startAngle:x,endAngle:O}=b,w=new fv({}),E=t=>{w.attr({d:m(t),transform:`translate(${l[0]}, ${l[1]})`});let e=uu(w);return w.style.transform="",e},k=a.animate([{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:O,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return k.onframe=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:Number(a.style.waveInArcAngle)}))},k.onfinish=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:O}))},k}};w8.props={};let w9=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:l}],Object.assign(Object.assign({},r),t))};w9.props={};let w7=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:o,strokeOpacity:a,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};w7.props={};let Et=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},Ee=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},En=t=>(e,n,r)=>{var i;let[o]=e,a=(null===(i=o.getTotalLength)||void 0===i?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function Er(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}En.props={};let Ei=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function Eo(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function Ea(t,e){let[n,r,i,o]=Eo(t),a=Math.ceil(Math.sqrt(e/(o/i))),l=[],s=o/Math.ceil(e/a),u=0,c=e;for(;c>0;){let t=Math.min(c,a),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,o=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
|
|
11
11
|
M ${e} ${n}
|
|
12
12
|
L ${e+r} ${n}
|
|
13
13
|
L ${e+r} ${n+i}
|